-
-
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
ref: Remove performance clear entry calls #2490
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.
We cannot guarantee that 300 is actually an increase. Specially not without looking at the number of entries.
// The Performance object has a limited buffer size, often 150 entries. At some point the buffer may overflow, in | ||
// which case we would not be able to use it to create/update spans. Therefore, after we have processed entries to | ||
// report to Sentry, we clear the buffer in an attempt to allow for more entries to be added in the future. | ||
// https://developer.mozilla.org/en-US/docs/Web/API/Performance | ||
logger.log('[Tracing] Clearing most performance marks'); | ||
performance.clearMarks(); | ||
performance.clearMeasures(); | ||
performance.clearResourceTimings(); |
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.
👍
onresourcetimingbufferfull
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.
Looks good to me 👍
User code or other libraries may be using the performance entries, therefore we do not clear entries.
Note: there is a limit on the number of "resource timing" entries, we do not change that, leaving it up to the browser default.