Skip to content

Conversation

HazAT
Copy link
Member

@HazAT HazAT commented May 18, 2020

Fixes sent_at header in the envelope to use the same clock as everywhere else.

@HazAT HazAT requested a review from rhcarvalho May 18, 2020 11:14
@HazAT HazAT requested a review from kamilogorek as a code owner May 18, 2020 11:14
@HazAT HazAT self-assigned this May 18, 2020
@getsentry-bot
Copy link
Contributor

getsentry-bot commented May 18, 2020

Messages
📖

@sentry/browser bundle gzip'ed minified size: (ES5: 17.1475 kB) (ES6: 16.1787 kB)

📖 ✅ TSLint passed

Generated by 🚫 dangerJS against 33602df

Copy link
Member

@AbhiPrasad AbhiPrasad left a 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
Copy link
Member

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?

Copy link
Member Author

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.

HazAT and others added 2 commits May 18, 2020 14:30
Co-authored-by: Sijawusz Pur Rahnama <sija@sija.pl>
Co-authored-by: Abhijeet Prasad <AbhiPrasad@users.noreply.github.com>
Copy link
Contributor

@rhcarvalho rhcarvalho left a 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.

@HazAT HazAT merged commit edbc2df into master May 18, 2020
@HazAT HazAT deleted the fix/sent_at branch May 18, 2020 13:43
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.

5 participants