-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix: sent_at for envelope headers #2597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some questions about stuff so I can learn more about how this works.
event_id: event.event_id, | ||
sent_at: new Date().toISOString(), | ||
// We need to add * 1000 since we devide it by 1000 by default but JS works with ms precision | ||
// The reason we use timestampWithMs here is that all clocks across the SDK use the same clock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than saying that all clocks are the same, maybe mention something about the performance API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I rather not, maybe we drop the usage of performance API.
We use timestampWithMs
everywhere and we should also here.
Co-authored-by: Sijawusz Pur Rahnama <sija@sija.pl>
Co-authored-by: Abhijeet Prasad <AbhiPrasad@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will make some browser instances set sent_at
to wildly wrong values as we've found in #2590.
With the changes to collect more debug info in #2588, and changes to timestamp correction in Relay, we can give this a shot.
Fixes
sent_at
header in the envelope to use the same clock as everywhere else.