Skip to content

Collector ​

Already run an OpenTelemetry Collector? Add Latency as an exporter and everything flowing through it lands in Latency. Apps keep sending to the Collector as they do today.

You don't need a Collector

Every OpenTelemetry SDK can send to Latency directly. Use a Collector when you already have one, or to bring in sources that aren't OpenTelemetry, like StatsD.

Before you start

You need a stream and ingest key for each signal. See OpenTelemetry → Before you start.

1. Add the exporters ​

One exporter per signal, since each has its own key:

yaml
exporters:
  otlphttp/latency-traces:
    traces_endpoint: https://ws.latency.app/v1/telemetry/traces
    headers:
      authorization: Bearer ${env:LATENCY_TRACES_KEY}
  otlphttp/latency-metrics:
    metrics_endpoint: https://ws.latency.app/v1/telemetry/metrics
    headers:
      authorization: Bearer ${env:LATENCY_METRICS_KEY}
  otlphttp/latency-logs:
    logs_endpoint: https://ws.latency.app/v1/telemetry/logs
    headers:
      authorization: Bearer ${env:LATENCY_LOGS_KEY}

2. Add them to your pipelines ​

yaml
service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlphttp/latency-traces]
    metrics:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlphttp/latency-metrics]
    logs:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlphttp/latency-logs]

Already exporting somewhere else? Add Latency next to it in the exporters list and send to both while you compare.

3. Set the keys and restart ​

bash
LATENCY_TRACES_KEY=lit_your_traces_key
LATENCY_METRICS_KEY=lit_your_metrics_key
LATENCY_LOGS_KEY=lit_your_logs_key

The exporter compresses with gzip and retries 429 and 503 responses on its own.

Bring your StatsD metrics ​

Apps using a StatsD client can keep it. The Collector's StatsD receiver (in the otelcol-contrib distribution) listens where your StatsD daemon did, totals up every interval, and forwards to Latency:

yaml
receivers:
  statsd:
    endpoint: localhost:8125
    aggregation_interval: 10s
    timer_histogram_mapping:
      - statsd_type: timing
        observer_type: histogram
      - statsd_type: histogram
        observer_type: histogram
      - statsd_type: distribution
        observer_type: histogram

service:
  pipelines:
    metrics:
      receivers: [statsd]
      processors: [batch]
      exporters: [otlphttp/latency-metrics]

Mapping timers to histogram keeps real percentiles in Latency.

Bring your Prometheus metrics ​

The Prometheus receiver (also in otelcol-contrib) scrapes /metrics endpoints with the same scrape_configs you'd give Prometheus:

yaml
receivers:
  prometheus:
    config:
      scrape_configs:
        - job_name: checkout-api
          scrape_interval: 15s
          static_configs:
            - targets: ['localhost:9464']

Add prometheus to your metrics pipeline's receivers.

© 2026 Latency Labs LLC