-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Description
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 * as Sentry from '@sentry/node-core/light';
import { otlpIntegration } from '@sentry/node-core/light/otlp';
const provider = new NodeTracerProvider();
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:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels