Guide

Send OpenTelemetry traces to SupaTrace

Set OTEL_EXPORTER_OTLP_ENDPOINT=https://supatrace.dev and put your ingest key in OTEL_EXPORTER_OTLP_HEADERS. A stock OTLP/HTTP exporter then sends traces to POST /v1/traces on supatrace.dev. No SupaTrace package is needed.

Status: OTLP/HTTP ingest Live, traces only, protobuf or JSON. No gRPC, metrics or logs. Ingest from apps on a Langfuse SDK Beta.

Steps

  1. Create an ingest key on Home or the API keys page in your workspace.
  2. Set two environment variables in a fresh shell, replacing only YOUR_INGEST_KEY:
    export OTEL_EXPORTER_OTLP_ENDPOINT=https://supatrace.dev
    export OTEL_EXPORTER_OTLP_HEADERS="x-supatrace-key=YOUR_INGEST_KEY"
    The base URL makes stock exporters append /v1/traces. Leave any OTEL_EXPORTER_OTLP_TRACES_ENDPOINT and OTEL_EXPORTER_OTLP_TRACES_HEADERS overrides unset.
  3. Send one synthetic span to check the key. This calls no model provider:
    curl -X POST https://supatrace.dev/v1/traces \
      -H 'Content-Type: application/json' \
      -H 'Authorization: Bearer YOUR_INGEST_KEY' \
      -d '{"resourceSpans":[{"scopeSpans":[{"spans":[{"traceId":"11111111111111111111111111111111","spanId":"1111111111111111","name":"synthetic.example","startTimeUnixNano":"1794685870000000000","endTimeUnixNano":"1794685871000000000"}]}]}]}'
  4. Run your app with a stock exporter. For Python, install opentelemetry-sdk and opentelemetry-exporter-otlp-proto-http. For Node, use @opentelemetry/exporter-trace-otlp-http. Full first-trace scripts for both are in the OpenTelemetry docs.
  5. Find the trace. Open Traces in the workspace. Each trace becomes a run named otlp.<traceid>, and each span becomes an event.

Details

Based on

Last reviewed .