Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node
SDK Version
8.18.0
Framework Version
No response
Link to Sentry event
No response
SDK Setup/Reproduction Example
Sentry.init({
dsn: 'dsn goes here',
skipOpenTelemetrySetup: true,
});
Steps to Reproduce
See #12969
- Do not enable tracing
- We still register node-fetch & http otel instrumentation which emits spans
- If you have a manual OTEL setup it will pickup these spans
Expected Result
For node fetch, we should just skip creating any spans if tracing is disabled. node-fetch is special because it uses diagnostics channel, which can be double-registered, so you may get multiple spans.
For http, this is harder because we cannot double-instrument http, so this will conflict anyhow if users also add http-instrumentation themselves. We'll need to educate users that they have to configure our http integration if they want to do that with a custom otel setup, somehow...
Actual Result
When registering node-fetch instrumentation manually, it will double-instrument fetch and create multiple spans.
When registering http instrumentation manually, it may overwrite our http-instrumentation which we depend on, and which will lead to scope leaking etc.