Direct OTLP Traces
Send OpenTelemetry traces directly to Sentry without a Sentry SDK.
This feature is currently in open beta. Please reach out to feedback-tracing@sentry.io if you have feedback or questions. Features in beta are still in-progress and may have bugs. We recognize the irony.
Send traces directly from your OpenTelemetry SDK to Sentry's OTLP endpoint. You can find your endpoint URL and auth key in Project settings > Client Keys (DSN).
The simplest way to configure your OTel SDK:
.envCopied
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="___OTLP_TRACES_URL___"
export OTEL_EXPORTER_OTLP_TRACES_HEADERS="x-sentry-auth=sentry sentry_key=___PUBLIC_KEY___"
You can also configure the exporter directly in your application code. Here's an example with the OTel Node SDK:
app.tsCopied
import { NodeSDK } from "@opentelemetry/sdk-node";
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
const sdk = new NodeSDK({
traceExporter: new OTLPTraceExporter({
url: "___OTLP_TRACES_URL___",
headers: {
"x-sentry-auth": "sentry sentry_key=___PUBLIC_KEY___",
},
}),
});
sdk.start();
- Span events are not supported. All span events are dropped during ingestion.
- Span links are partially supported. We ingest and display span links, but they cannot be searched, filtered, or aggregated. Links are shown in the Trace View.
- Array attributes are partially supported. We ingest and display array attributes, but they cannot be searched, filtered, or aggregated. Array attributes are shown in the Trace View.
If you need to process traces before sending them to Sentry (sampling, transforming, routing to multiple projects), see the OpenTelemetry Collector guide.
Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").