OpenTelemetry
OpenTelemetry
OTLP over HTTP for logs, metrics and traces — no Logstreem-specific code.
Logstreem accepts OTLP/HTTP directly. Point an existing collector or SDK exporter at the endpoint and set one header; nothing else changes.
Endpoint
export OTEL_EXPORTER_OTLP_ENDPOINT="https://api.logstreem.com/v1/otlp"
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer $LOGSTREEM_TOKEN,X-Logstreem-Dataset=otel-spans"
export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"How OTLP maps to events
| OTLP | Becomes | Note |
|---|---|---|
| Resource attributes | ['service.name'], ['host.name'], … | Flattened onto every event |
| Span | One event | ['trace.id'], ['span.id'], ['parent.span.id'], duration |
| Span events | One event each | Linked by ['span.id'] |
Log record body | message | Structured bodies keep their shape |
| Severity | level | Mapped to debug/info/warn/error |
| Metric data point | One event | metric.name, metric.value, plus its labels |
Querying spans like any other event
read top to bottom
1['otel-spans']2| where ['service.name'] == "checkout" and duration > 10003| summarize p95 = percentile(duration, 95), spans = count() by ['span.name']4| order by p95 desc5| take 10Route by dataset, not by pipeline
X-Logstreem-Dataset on the exporter decides where the data lands. Send traces and logs to the *same* dataset and a single where ['trace.id'] == … returns both — which is the whole point of correlating them.