Skip to content

feat(node-core): Add OTLP integration for node-core/light #19730

Description

@github-actions

Note

The pull request "Ab/otlp integration" was created by @andreiborza but did not reference an issue. Therefore this issue was created for better visibility in external tools like Linear.

Added otlpIntegration at @sentry/node-core/light/otlp for users who manage their own OpenTelemetry setup and want to send trace data to Sentry without adopting the full @sentry/node SDK.

import{NodeTracerProvider}from'@opentelemetry/sdk-trace-node';import*asSentryfrom'@sentry/node-core/light';import{otlpIntegration}from'@sentry/node-core/light/otlp';constprovider=newNodeTracerProvider();provider.register();Sentry.init({dsn: '__DSN__',integrations: [otlpIntegration({// Export OTel spans to Sentry via OTLP (default: true)setupOtlpTracesExporter: true,// Propagate sentry-trace/baggage headers (default: true)setupPropagator: true,// Capture span.recordException() as Sentry errors (default: false)captureExceptions: false,}),],});

Split up for easier reviewing:

  • functionality to register a function to get the propagation context from OTel: 863136d
  • OTLP integration: 067218c
  • e2e tests: b608187
  • CHANGELOG entry: 1bf9f6e

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions