-
-
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
hasTracingEnabled doesn't handle undefined values correctly #12034
Comments
Hey, the background for this is based on browser-land, where we want to do certain things only if performance is set in any way. |
ref #12034 cc @AbhiPrasad when you're back, let's look again at `hasTracingEnabled()` and see if we want to adjust this maybe.
Hey, we have updated this in the SDK, so that even if this is set to (FWIW, we have not updated the I will leave the issue open still because I think the fundamental problem it poses remains valid! |
This was fixed, or rather will be fixed with v9 |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node
SDK Version
8.0.0
Framework Version
No response
Link to Sentry event
No response
SDK Setup
Steps to Reproduce
import-in-the-middle
so that you can tell when it's being imported.tracesSampleRate: undefined
.import-in-the-middle
is still loaded by Sentry and instrumentation is still added.Expected Result
I would expect that an undefined value for
tracesSampleRate
would be interpreted as "don't enable tracing".Actual Result
The mere existence of a
tracesSampleRate
value in the Sentry init options, regardless of what the value is, is interpreted as "enable tracing instrumentation":sentry-javascript/packages/core/src/utils/hasTracingEnabled.ts
Line 21 in d5568d8
I think that check should probably look more like this:
I'd be happy to open a PR with this if a maintainer can give the go-ahead!
The text was updated successfully, but these errors were encountered: