-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(core): Implement suppressTracing
#11468
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
Conversation
We need a browser version of this utility. The symbolification in Next.js is isomorphic. |
damn, I guess we'll need to put this on the ACS then, as this means we'll have to export this from core and use a different implementation. will look into it! |
I don't think ACS is the right place tbh. Can we just have two different exports that have the exact same interface? |
This exports a new `suppressTracing` utility from `@sentry/opentelemetry` which can be used to wrap a callback to avoid tracing inside of it. We use this for bun transport, and for nextjs error symbolication.
702d5d9
to
65d4c30
Compare
suppressTracing
size-limit report 📦
|
This implements a new `suppressTracing` method which can be used to ensure we do not send any spans inside of a callback. Usage: ```js await suppressTracing(() => { // do not capture any spans for this fetch! return fetch(...); }); ``` This also changes the behavior of starting child spans slightly to actually create `NonRecordingSpan` as child spans when not sampled (previously, we'd still create SentrySpans). I choose to continue to create proper spans for unsampled transactions because it makes things like picking name and stuff like this easier for the time being.
This implements a new
suppressTracing
method which can be used to ensure we do not send any spans inside of a callback.Usage:
This also changes the behavior of starting child spans slightly to actually create
NonRecordingSpan
as child spans when not sampled (previously, we'd still create SentrySpans). I choose to continue to create proper spans for unsampled transactions because it makes things like picking name and stuff like this easier for the time being.