Proposing 2 changes to the current heartbeat iteration implementation.
1. Heartbeat interval
The EEC exposes the /alive endpoint for heartbeats and statuses sent by the datasource. Internal doc mentions that statuses shouldn't be sent more than every 1 minute. In addition - if sent more frequently - EEC collects all statuses and only sends the last received one.
Based on this, we should compose & send the SDK execution status every 60 sec instead of current 30.
2. Status timestamp
For some reason every time the heartbeat loops through user-defined callbacks it also ends up manually adjusting the status timestamp to the adjusted metric timestamp of the last callback in the array.
While this may not break things it certainly doesn't make any sense -> we run every 1 minute, compose an aggregated status, and should share it at current point in time.
Proposing 2 changes to the current heartbeat iteration implementation.
1. Heartbeat interval
The EEC exposes the
/alive
endpoint for heartbeats and statuses sent by the datasource. Internal doc mentions that statuses shouldn't be sent more than every 1 minute. In addition - if sent more frequently - EEC collects all statuses and only sends the last received one.Based on this, we should compose & send the SDK execution status every 60 sec instead of current 30.
2. Status timestamp
For some reason every time the
heartbeat
loops through user-defined callbacks it also ends up manually adjusting the status timestamp to the adjusted metric timestamp of the last callback in the array.While this may not break things it certainly doesn't make any sense -> we run every 1 minute, compose an aggregated status, and should share it at current point in time.