Skip to content

OpenTelemetry ​

Latency speaks OTLP, OpenTelemetry's native protocol. Any OpenTelemetry SDK, agent or Collector can send traces, metrics and logs straight to Latency. No Latency library, no extra container.

Before you start ​

Create one Stream per signal you want to send, and issue a key for each:

SignalStream type
TracesTraces
MetricsMetrics
LogsLogs

New to streams? The Quick Start walks through creating one.

Why a key per signal?

Each stream has its own type and retention (keep traces 7 days and logs 30, for example), and each key can write to one stream only. A leaked key can't reach anything else.

Endpoints ​

SignalEndpoint
Traceshttps://ws.latency.app/v1/telemetry/traces
Metricshttps://ws.latency.app/v1/telemetry/metrics
Logshttps://ws.latency.app/v1/telemetry/logs

Latency accepts OTLP over HTTP, as protobuf or JSON, optionally compressed (gzip, deflate, br or zstd). gRPC isn't supported, so always set the protocol to http/protobuf.

Configuration ​

Every SDK reads the same environment variables. This is the whole setup for most languages:

bash
OTEL_SERVICE_NAME=checkout-api
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf

OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://ws.latency.app/v1/telemetry/traces
OTEL_EXPORTER_OTLP_TRACES_HEADERS=authorization=Bearer%20lit_your_traces_key

OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=https://ws.latency.app/v1/telemetry/metrics
OTEL_EXPORTER_OTLP_METRICS_HEADERS=authorization=Bearer%20lit_your_metrics_key
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=delta

OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=https://ws.latency.app/v1/telemetry/logs
OTEL_EXPORTER_OTLP_LOGS_HEADERS=authorization=Bearer%20lit_your_logs_key
  • OTEL_SERVICE_NAME is how your app shows up in Latency. Give every service its own.
  • %20 is a space. The header value is Bearer lit_..., encoded.
  • The endpoints are used exactly as written. Don't add /v1/traces to them.

Sending only some signals ​

Turn off what you don't send, so the SDK doesn't try to reach a default endpoint that isn't there:

bash
OTEL_METRICS_EXPORTER=none
OTEL_LOGS_EXPORTER=none

Pick your language ​

Node.jsExpress, Fastify, NestJS, Next.js and more, with zero code
DenoBuilt into the runtime: one environment variable
PythonDjango, Flask, FastAPI and more, with zero code
Gonet/http, gRPC and database drivers
PHPLaravel, Symfony, Slim and more
RubyRails, Sinatra and more
CollectorAlready run a Collector? Add Latency as an exporter

Metrics settings ​

Two optional settings get the most out of metrics:

  • OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=delta (included above) sends "how much since last time" instead of a running total. Totals from many servers then simply add up. Without it, Latency still works it out from the running totals, including restarts.
  • OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION=base2_exponential_bucket_histogram sends histograms in the same format Latency stores them in, for the sharpest percentiles. Regular bucketed histograms work too.

Not every SDK reads both. Where one doesn't, the defaults work fine.

Metrics arrive once a minute

SDKs export metrics every 60 seconds by default. Set OTEL_METRIC_EXPORT_INTERVAL=10000 to send every 10 seconds instead.

Something not showing up? ​

See Troubleshooting.

© 2026 Latency Labs LLC