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

# How to integrate HoneyHive with TrueFoundry

> Integrate HoneyHive with TrueFoundry AI Gateway to export OTLP/HTTP traces. Route gateway spans to HoneyHive for unified observability across model providers.

[TrueFoundry AI Gateway](https://www.truefoundry.com/ai-gateway) can export OpenTelemetry traces for LLM gateway traffic. [HoneyHive](https://www.honeyhive.ai/) ingests OTLP/HTTP traces directly, so requests routed through TrueFoundry can appear in HoneyHive without adding HoneyHive SDK code to each application.

## Quick Start

<Tip>
  **Trace AI Gateway traffic with no SDK code in your application.** Point TrueFoundry's OTEL exporter at HoneyHive and gateway requests start appearing in the Traces tab.
</Tip>

## Prerequisites

* Admin access to your TrueFoundry AI Gateway settings
* A HoneyHive API key from [**Settings → Project → API Keys**](https://app.us.honeyhive.ai/settings/project/keys)

## Provider host and OTLP traces URL

HoneyHive routes OTLP ingestion through your deployment's **API host**. Replace `<provider-host>` with the hostname shown in your HoneyHive dashboard or API settings:

```text theme={null}
https://<provider-host>/opentelemetry/v1/traces
```

Example for a US production deployment:

```text theme={null}
https://api.dp1.us.prod.honeyhive.ai/opentelemetry/v1/traces
```

Use the exact host for your org and environment. If ingest fails, confirm the hostname matches the region where your project lives.

## Configure TrueFoundry

<Steps>
  <Step title="Create a HoneyHive project API key">
    In HoneyHive, open [**Settings → Project → API Keys**](https://app.us.honeyhive.ai/settings/project/keys), create an API key, and copy it. The key determines which HoneyHive project receives traces.
  </Step>

  <Step title="Open the TrueFoundry OTEL settings">
    In TrueFoundry, go to [**AI Gateway → Controls → Settings**](https://www.truefoundry.com/docs/ai-gateway/export-opentelemetry-data), then edit **OTEL Config**.
  </Step>

  <Step title="Enable HTTP trace export">
    Enable **Otel Traces Exporter Configuration**, select **HTTP Configuration**, and set:

    | Field    | Value                                             |
    | -------- | ------------------------------------------------- |
    | Endpoint | `https://<provider-host>/opentelemetry/v1/traces` |
    | Encoding | `Json`                                            |
  </Step>

  <Step title="Add the HoneyHive authorization header">
    Enable headers and add:

    | Header          | Value                 |
    | --------------- | --------------------- |
    | `Authorization` | `Bearer <HH_API_KEY>` |

    Replace `<HH_API_KEY>` with the project API key from HoneyHive.
  </Step>

  <Frame>
    <img src="https://mintcdn.com/honeyhiveai/PBPz3YHPsyZ8u0dQ/images/integrations/truefoundry-otel-config.png?fit=max&auto=format&n=PBPz3YHPsyZ8u0dQ&q=85&s=21c70074ff65d5708c45efd55c2c870c" alt="TrueFoundry OTEL Traces Exporter Configuration with HoneyHive endpoint and Authorization header" width="963" height="831" data-path="images/integrations/truefoundry-otel-config.png" />
  </Frame>

  <Step title="Save and send gateway traffic">
    Save the TrueFoundry OTEL configuration, then send a few requests through the AI Gateway.
  </Step>
</Steps>

## Verify traces in HoneyHive

Open HoneyHive and go to the **Traces** tab for the project tied to your API key. New gateway spans appear with `source` set to `otlp`.

<Frame>
  <img src="https://mintcdn.com/honeyhiveai/PBPz3YHPsyZ8u0dQ/images/integrations/truefoundry-events.png?fit=max&auto=format&n=PBPz3YHPsyZ8u0dQ&q=85&s=a24406729544c14514658ce7969ee5d1" alt="HoneyHive Traces Events view showing OTLP events exported from gateway traffic" width="1918" height="1040" data-path="images/integrations/truefoundry-events.png" />
</Frame>

If traces do not appear:

1. Confirm the TrueFoundry endpoint uses your HoneyHive API host and ends with `/opentelemetry/v1/traces`.
2. Confirm the header is exactly `Authorization: Bearer <HH_API_KEY>`.
3. Confirm the API key was created in the HoneyHive project where you expect the traces to appear.
4. Check that your gateway can reach the HoneyHive API host over outbound HTTPS.

## Configuration reference

| Setting         | Value                                             |
| --------------- | ------------------------------------------------- |
| Protocol        | OTLP/HTTP                                         |
| Traces endpoint | `https://<provider-host>/opentelemetry/v1/traces` |
| Encoding        | `Json`                                            |
| Auth header     | `Authorization: Bearer <HH_API_KEY>`              |

## Related

<CardGroup cols={2}>
  <Card title="OpenTelemetry concepts" icon="network-wired" href="/v2/tracing/concepts">
    Learn how HoneyHive stores OTLP traces and AI span attributes
  </Card>

  <Card title="Distributed tracing" icon="share-nodes" href="/v2/tutorials/distributed-tracing">
    Connect gateway spans with application spans across services
  </Card>

  <Card title="Custom spans" icon="code" href="/v2/tracing/custom-spans">
    Add HoneyHive spans around business logic in your application
  </Card>
</CardGroup>

## Resources

* [TrueFoundry HoneyHive guide](https://www.truefoundry.com/docs/ai-gateway/honeyhive)
* [TrueFoundry AI Gateway documentation](https://www.truefoundry.com/docs/ai-gateway/intro-to-llm-gateway)
