feat(realtime): fix timestamp lag and add run_indefinitely flag#38
Open
pjbertels wants to merge 2 commits intoelastic:mainfrom
Open
feat(realtime): fix timestamp lag and add run_indefinitely flag#38pjbertels wants to merge 2 commits intoelastic:mainfrom
pjbertels wants to merge 2 commits intoelastic:mainfrom
Conversation
- Remove Truncate(time.Second) from nowish so realtime timestamps are not systematically up to 1s behind wall clock - Default EndTime to MaxInt64/time.Second when real_time is true and no end_time/end_now_minus is configured, so the receiver runs indefinitely instead of exiting immediately - Use currentTime.Before(EndTime) in loop condition to avoid int64 overflow when EndTime is set to a far-future value - Add tests for indefinite realtime operation and wall clock timestamp alignment Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
felixbarny
reviewed
Mar 23, 2026
…acing Introduces an explicit `run_indefinitely` flag that replaces the implicit behaviour where `real_time: true` with no end time would run forever. Also adds a validation error when `start_now_minus` is used with `real_time: true`, as this results in a permanent timestamp lag. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
felixbarny
approved these changes
Mar 24, 2026
Member
felixbarny
left a comment
There was a problem hiding this comment.
One comment that should be addressed, otherwise LGTM!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Truncate(time.Second)fromnowishso real-time timestamps are not systematically up to 1s behind wall clockrun_indefinitelyflag to explicitly control whether the receiver runs forever, decoupling duration from pacing (real_time). Replaces the implicit behaviour wherereal_time: truewith noend_time/end_now_minuswould run indefinitely. Breaking change: configs relying on that implicit behaviour must addrun_indefinitely: true.start_now_minusis used withreal_time: true— this combination results in a permanent timestamp lag with no way to recover.currentTime.Before(EndTime)in the loop condition to avoid int64 overflow whenEndTimeis set to a far-future valuerun_indefinitely: true