Skip to content

ref(replay): Improve internal logging #8740

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

Merged
merged 2 commits into from
Aug 7, 2023
Merged

ref(replay): Improve internal logging #8740

merged 2 commits into from
Aug 7, 2023

Conversation

mydea
Copy link
Member

@mydea mydea commented Aug 7, 2023

This delays adding the internal replay logging breadcrumbs to the next tick, to avoid race conditions on initial logs where replay may not be initialized yet.

With this, you should get proper log breadcrumbs in a replay for itself:

[Replay] Created new session 00:00
[Replay] Starting replay in session mode 00:00

@mydea mydea added the Package: replay Issues related to the Sentry Replay SDK label Aug 7, 2023
@mydea mydea requested a review from billyvg August 7, 2023 09:36
@mydea mydea self-assigned this Aug 7, 2023
@@ -1139,6 +1139,7 @@ export class ReplayContainer implements ReplayContainerInterface {
`[Replay] Session duration (${Math.floor(duration / 1000)}s) is too ${
tooShort ? 'short' : 'long'
}, not sending replay.`,
this._options._experiments.traceInternals,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also noticed this, missed this in the refactor.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might have messed this up when rebasing #8716, sorry!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no big deal either way, it's just internal logging ;)

@@ -1139,6 +1139,7 @@ export class ReplayContainer implements ReplayContainerInterface {
`[Replay] Session duration (${Math.floor(duration / 1000)}s) is too ${
tooShort ? 'short' : 'long'
}, not sending replay.`,
this._options._experiments.traceInternals,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might have messed this up when rebasing #8716, sorry!

@mydea mydea merged commit a0290b9 into develop Aug 7, 2023
@mydea mydea deleted the fn/internal-logging branch August 7, 2023 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: replay Issues related to the Sentry Replay SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants