Skip to content

fix: capture timestamps at AsyncRecorder call-time#202

Closed
dannykopping wants to merge 1 commit intomainfrom
fix/async-recorder-timestamps
Closed

fix: capture timestamps at AsyncRecorder call-time#202
dannykopping wants to merge 1 commit intomainfrom
fix/async-recorder-timestamps

Conversation

@dannykopping
Copy link
Collaborator

@dannykopping dannykopping commented Mar 5, 2026

Capture timestamps at AsyncRecorder call-time, before async dispatch. This ensures we trust the source timestamp (when the event was recorded) rather than the server timestamp (when it was eventually persisted).

AsyncRecorder dispatches records asynchronously via goroutines. Previously,
timestamps (CreatedAt/EndedAt) were not set before the goroutine launch,
meaning the timestamp would reflect when the record was eventually persisted
rather than when the event actually occurred.

This captures timestamps at method call-time, before the goroutine is
launched, ensuring they accurately reflect when the event happened regardless
of async dispatch delays.
@dannykopping dannykopping force-pushed the fix/async-recorder-timestamps branch from 5469a38 to 329db62 Compare March 5, 2026 13:19
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.

1 participant