OpenTelemetry
Send OpenTelemetry traces, logs, and metrics to RawTree with native OTLP.
OpenTelemetry
If you already have an OpenTelemetry SDK or Collector, point OTLP at RawTree and authenticate with a project API key.
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_ENDPOINT=https://api.rawtree.com/otlp
export OTEL_EXPORTER_OTLP_HEADERS="authorization=Bearer%20$API_KEY"RawTree writes traces to traces, logs to logs, and metrics to metrics by default.
Endpoints
| Signal | OTLP/HTTP endpoint | OTLP/gRPC service | Destination table |
|---|---|---|---|
| Traces | POST /otlp/v1/traces | opentelemetry.proto.collector.trace.v1.TraceService/Export | traces |
| Logs | POST /otlp/v1/logs | opentelemetry.proto.collector.logs.v1.LogsService/Export | logs |
| Metrics | POST /otlp/v1/metrics | opentelemetry.proto.collector.metrics.v1.MetricsService/Export | metrics |
RawTree accepts OTLP/HTTP JSON (application/json), OTLP/HTTP protobuf (application/x-protobuf), and OTLP/gRPC protobuf. gzip-compressed requests are accepted on both transports. OTLP/HTTP request bodies are limited to 10 MiB after decompression; larger exports return 413.
For OTLP/gRPC, use https://api.rawtree.com as the endpoint. When running the local Docker Compose stack, use http://localhost:4317.
Custom destination tables
Set a signal-specific header when you want telemetry in a non-default table. The API key selects the project, and the header selects the table.
| Signal | Header |
|---|---|
| Traces | x-rawtree-traces-table |
| Logs | x-rawtree-logs-table |
| Metrics | x-rawtree-metrics-table |
export OTEL_EXPORTER_OTLP_HEADERS="authorization=Bearer%20$API_KEY,x-rawtree-traces-table=my_traces"OpenTelemetry Collector
Use the OTLP/HTTP exporter to forward all signals from a Collector:
exporters:
otlphttp/rawtree:
endpoint: https://api.rawtree.com/otlp
headers:
Authorization: Bearer ${env:RAWTREE_API_KEY}See the full OpenTelemetry Collector example. For a sandbox telemetry walkthrough, see the Daytona OpenTelemetry example.
SDK snippets
Most SDKs read the same environment variables. Use these for Node.js, Python, Go, and other standard OTLP exporters:
export OTEL_SERVICE_NAME=my-service
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_ENDPOINT=https://api.rawtree.com/otlp
export OTEL_EXPORTER_OTLP_HEADERS="authorization=Bearer%20$API_KEY"
export OTEL_EXPORTER_OTLP_COMPRESSION=gzipIf your exporter expects per-signal endpoints instead of a base endpoint, use:
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://api.rawtree.com/otlp/v1/traces
export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=https://api.rawtree.com/otlp/v1/logs
export OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=https://api.rawtree.com/otlp/v1/metrics60-second smoke test
When setting up OTel collection, send one JSON OTLP span:
curl -X POST "https://api.rawtree.com/otlp/v1/traces" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"resourceSpans":[{"resource":{"attributes":[{"key":"service.name","value":{"stringValue":"otel-smoke-test"}}]},"scopeSpans":[{"spans":[{"traceId":"5B8EFFF798038103D269B633813FC60C","spanId":"EEE19B7EC3C1B174","name":"rawtree smoke test"}]}]}]}'Query it back:
rtree query "SELECT name, service.name FROM traces WHERE service.name = 'otel-smoke-test' ORDER BY inserted_at DESC LIMIT 1"If the query returns no rows, check insert logs:
rtree logs --type insert --status error --table traces --since 15mPartial success
If RawTree accepts an export but drops invalid records, the OTLP response includes partialSuccess with rejectedSpans, rejectedLogRecords, or rejectedDataPoints plus an error message. Many SDKs do not surface partial success clearly, so check rtree logs when telemetry is missing.
Row shapes
Native OTLP endpoints apply RawTree's built-in OpenTelemetry transforms. See Transforms for the fields RawTree emits for traces, logs, and metrics.