Prerequisites
Before you start, make sure you have:- A TrueFoundry account with AI Gateway configured.
- A Lunary project with its Public Key copied from Settings → API Keys.
Open the OTEL configuration
In TrueFoundry, go to
Settings → Organisation → AI Gateway → OTEL Data Export Configuration.

Configure trace export
Enable OTEL Traces Exporter Configuration, select HTTP Configuration,
and enter:
Replace 
| Setting | Value |
|---|---|
| Endpoint | https://api.lunary.ai/v1/traces |
| Encoding | proto or json |
| Header | Authorization: Bearer <LUNARY_PUBLIC_KEY> |
<LUNARY_PUBLIC_KEY> with your Lunary Public Key.
Optionally configure metrics
To export aggregate metrics, enable OTEL Metrics Exporter Configuration and
use
https://api.lunary.ai/v1/metrics with the same encoding and authorization
header.Save and verify
Save the configuration and send a request through TrueFoundry AI Gateway. In
Lunary, open Explore → Traces and confirm that the gateway trace appears.
