Skip to content

Conversation

@DtDamianGrzes
Copy link
Contributor

@DtDamianGrzes DtDamianGrzes commented Dec 12, 2025

#133 broke random distribution of callbacks across heartbeat interval. Compared to start_timestamp, start_timestamp_monotonic is not updated after the first call, which leads to the situation where the first call is executed with random offset, but the following ones are executed in full intervals measuring from callback's creation. Eg. 15 sec -> 60 sec -> 120 sec -> etc
Another possible fix would be to update start_timestamp_monotonic with first call, but that causes some data races, so I chose to use the offset in each calculation. Current expected behavior would be eg. 15 sec -> 75 sec -> 135 sec -> etc.

I also added possibility to define offset for the specific callback, which is used in Dynatrace's end to end tests.

- allow specifing callback's offset in schedule method
@DtDamianGrzes DtDamianGrzes force-pushed the fix/callback-interaval-balancing branch 3 times, most recently from e3e8999 to 6ec9093 Compare December 12, 2025 11:53
@DtDamianGrzes DtDamianGrzes force-pushed the fix/callback-interaval-balancing branch from 6ec9093 to 9e2d369 Compare December 12, 2025 12:03

This comment was marked as outdated.

@dlopes7 dlopes7 merged commit 5bebc73 into main Dec 16, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants