> ## Documentation Index
> Fetch the complete documentation index at: https://dev-docs.altrum.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenTelemetry

> Send traces of your AI Gateway traffic to your own observability tools.

<Info>This is in development. Details may change before it is available.</Info>

Altrum can send a trace of every AI Gateway request to your own OpenTelemetry collector, so model traffic appears next to the rest of your systems in the tools you already use. Nothing is sent unless you switch it on and give a collector address.

## Set it up

An owner or admin opens **AI Gateway**, then **OpenTelemetry**:

| Setting | |
| - | - |
| Protocol | **HTTP** (OTLP over HTTP) or **gRPC**. |
| Collector address | HTTP: a web address that starts with `https://`, such as `https://collector.example.com/v1/traces`. gRPC: `host:port`, such as `collector.example.com:4317`. |
| Headers | What your collector needs, such as an API key. Up to 20. Names use letters, digits, hyphens and underscores. Each value is one line of up to 4096 characters. Altrum sets `Host`, `Content-Type` and the other transport headers itself. |

Headers are stored encrypted, sent exactly as you wrote them, and never shown again after you save: only their names are. Rotate a key by saving the headers again.

**Send test span** sends one span to the saved collector and says whether it took it. Use it after any change.

Altrum refuses a collector address that is on a private network, a loopback address or a cloud metadata address, when you save it and again every time it connects. A name that later points somewhere private is refused too.

## What is sent

* Only your organization's requests go to your collector, and only to yours.
* Spans follow the OpenTelemetry conventions for generative AI: the provider, the model, tokens, cost, finish reason and time taken, with `altrum.*` attributes for the key, the AI system and the organization.
* Request content (messages, tool definitions, tool arguments and results) is included only for a request whose content may be kept: the AI system's content logging setting if it has one, otherwise the organization's. Otherwise only metadata is sent.
* No span carries details of the machine that served the request.
* Metrics are not sent, only traces.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.