Telemetry export
Send every request to your own OpenTelemetry collector as a span, with its model, tokens, cost and timings, so it sits beside the rest of your traces.
Telemetry export, under Configure, sends each request your organization makes to an OpenTelemetry collector you run, or to any service that takes OTLP over HTTP. Owners and admins can change it; other roles can read it.
What is sent
One span per request, about three minutes after it finishes, in the OpenTelemetry GenAI semantic conventions:
- the model you asked for and the model that answered, and the provider;
- input and output tokens, and tokens read from the provider's cache;
- the finish reason, the HTTP status and, for a request that failed, its error code (the span's status is then error);
- the request's start and end, time to first token, and how many hosts were tried;
- what the request cost, in micro-USD, and the request id, project, key and endpoint.
Prompts and completions are never sent. A span's trace and span ids are made from the request id, so a span that is sent twice is the same span. The request id on a span is the one the request log and the response headers carry.
Set it up
- Enter the collector's Collector traces URL: an https address that takes OTLP/HTTP JSON, usually ending in
/v1/traces. It must be reachable on the internet. - Optionally set the Service name the spans carry (
ai.mlunless you change it). - Under Headers, enter any headers the collector needs, one per line, such as
Authorization: Bearer …. They are stored encrypted and never shown again; the page lists only their names. - Press Save. Requests that finish from then on are sent; earlier ones are not.
Send a test span posts one made-up span at once and says whether the collector accepted it.
When the collector refuses
The page shows the collector's answer. Spans are kept and sent once it accepts them again, in order. After three days of refusals the export stops; saving it again restarts it from that moment.
To change the headers, enter all of them again: what you enter replaces the stored set. Leave the box empty to keep them. Clearing Send spans pauses the export; Remove stops it and forgets the collector and its headers.
The same settings are in the API as GET, PUT and DELETE /v1/otel-export, with POST /v1/otel-export/test.