Skip to content

Conversation

JonasBa
Copy link
Member

@JonasBa JonasBa commented Sep 12, 2024

Modifies the functionality of profiler start and stop calls to regenerate the profilerId

Copy link
Contributor

github-actions bot commented Sep 12, 2024

size-limit report 📦

Path Size % Change Change
@sentry/browser 22.52 KB - -
@sentry/browser - with treeshaking flags 21.3 KB - -
@sentry/browser (incl. Tracing) 34.8 KB - -
@sentry/browser (incl. Tracing, Replay) 71.26 KB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 61.7 KB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 75.61 KB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 88.33 KB - -
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 90.18 KB - -
@sentry/browser (incl. metrics) 26.83 KB - -
@sentry/browser (incl. Feedback) 39.6 KB - -
@sentry/browser (incl. sendFeedback) 27.19 KB - -
@sentry/browser (incl. FeedbackAsync) 31.9 KB - -
@sentry/react 25.28 KB - -
@sentry/react (incl. Tracing) 37.77 KB - -
@sentry/vue 26.72 KB - -
@sentry/vue (incl. Tracing) 36.67 KB - -
@sentry/svelte 22.66 KB - -
CDN Bundle 23.77 KB - -
CDN Bundle (incl. Tracing) 36.5 KB - -
CDN Bundle (incl. Tracing, Replay) 70.96 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 76.27 KB - -
CDN Bundle - uncompressed 69.65 KB - -
CDN Bundle (incl. Tracing) - uncompressed 108.28 KB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 220.06 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 233.25 KB - -
@sentry/nextjs (client) 37.53 KB - -
@sentry/sveltekit (client) 35.37 KB - -
@sentry/node 121.06 KB +0.01% +1 B 🔺
@sentry/node - without tracing 93.34 KB +0.01% +2 B 🔺
@sentry/aws-serverless 103.05 KB - -

View base workflow run


// There is no off method to disable this, so we need to ensure to add the listener only once. This adds overhead
// to the event processing, but it is minimal as we short circuit if there is no profilerId active and return early.
this._client.on('beforeSendEvent', this._onBeforeSendThreadContextAssignment.bind(this));
Copy link
Member

Choose a reason for hiding this comment

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

on should return a function that deregisters a callback. We can use that to disable it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ahh, I missed that! I'll keep the same implementation I think bc of simplicity, but let me remove that comment

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed it and left a comment for future optimization

@JonasBa JonasBa merged commit afa79b6 into develop Sep 16, 2024
160 checks passed
@JonasBa JonasBa deleted the jb/profiling/clear-profiler branch September 16, 2024 15:00
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.

2 participants