Skip to content

Duplication of OpenTelemetry Spans in HTTP requests with @sentry/node #12969

Closed
@vibaiher-qatium

Description

@vibaiher-qatium

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.18.0

Framework Version

Express 4.19.2

Link to Sentry event

No response

SDK Setup/Reproduction Example

Sentry.init({
      dsn: settings.server,
      environment: settings.environment,
      release: settings.release,
      enabled: settings.enabled,
      skipOpenTelemetrySetup: true,
      initialScope: (scope) => {
        scope.setTag("runtime_environment", settings.runtime);
        return scope;
      }
});

Steps to Reproduce

  1. Enable opentelemetry in your app using a file that is registered when executing node. Opentelemetry setup must use node autoinstrumentation. Example: node --require @qatium/open-telemetry-express build/api.js
  2. In you express api file, enable Sentry integration with opentelemetry setup to false and tracing disabled.
  3. Generate some requests in endpoints that have some http calls.

Expected Result

The expected behavior is that @sentry/node does not register the opentelemetry-instrumentation-node-fetch instrumentation if the tracing option is disabled in Sentry's configuration.

Actual Result

Despite having the tracing option disabled in Sentry's configuration, the opentelemetry-instrumentation-node-fetch library is still being registered, causing duplication of Span information when using OpenTelemetry instrumentation for HTTP.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: nodeIssues related to the Sentry Node SDK

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions