-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat: Add autopop parameter, Add debug loggings #2459
Merged
Merged
Conversation
This file contains 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
1 task
kamilogorek
suggested changes
Feb 28, 2020
logger.log(`[Tracing] auto pop of: ${name}#${Tracing._currentIndex} in ${options.autoPopAfter}ms`); | ||
const index = Tracing._currentIndex; | ||
setTimeout(() => { | ||
Tracing.popActivity(index, { |
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.
Is popping same activity twice safe?
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.
Yes, it doesn't do anything if it no longer exists.
Bump |
Nope |
wth github plz |
This was referenced Mar 9, 2020
This was referenced Mar 17, 2020
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.
This PR adds a new parameter to
pushActivity
as a fallback to auto finish never finishing spans.If someone starts an activity (span) and it never finishes, the transaction will never be flushed unless a navigation change happens. By providing the
autoPopAfterMs
parameter inpushActivity
we have an idle timeout to finish the span regardless.If this timeout kicks in, we mark the span with
DeadlineExceeded
status so it's clear this is an error in the users application and the span was never finished.This happens on sentry.io in our React Profiler for measuring rendering times, sometimes it happens that
finishProfile
is never called and therefore we never pop the activity (finish the span).Debug logging example: