Examples

OpenTelemetry Collector

Route OTLP telemetry through an OpenTelemetry Collector into RawTree.

OpenTelemetry Collector example

Use this Collector config when your application already exports OTLP locally and you want the Collector to forward traces, logs, and metrics to RawTree.

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
      http:
        endpoint: 0.0.0.0:4318

exporters:
  otlphttp/rawtree:
    endpoint: https://api.rawtree.com/otlp
    headers:
      Authorization: Bearer ${env:RAWTREE_API_KEY}

service:
  pipelines:
    traces:
      receivers: [otlp]
      exporters: [otlphttp/rawtree]
    logs:
      receivers: [otlp]
      exporters: [otlphttp/rawtree]
    metrics:
      receivers: [otlp]
      exporters: [otlphttp/rawtree]

Run it with your RawTree project API key:

export RAWTREE_API_KEY=rt_...
otelcol --config collector.yaml

Applications can then export to the local Collector:

export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf

By default, RawTree writes traces to traces, logs to logs, and metrics to metrics. To use custom destination tables, add x-rawtree-traces-table, x-rawtree-logs-table, or x-rawtree-metrics-table under the exporter headers map.

See the OpenTelemetry guide for endpoint details and the Transforms guide for emitted row shapes.