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

# CoreWeave Weave OTEL

> Learn how to export LLM Gateway traces to CoreWeave Weave (W&B Weave) using the OpenTelemetry integration.

This guide provides instructions for integrating [CoreWeave Weave](https://weave-docs.wandb.ai/) with the TrueFoundry AI Gateway to export OpenTelemetry traces.

## What is CoreWeave Weave?

CoreWeave Weave (formerly Weights & Biases Weave) is a managed observability platform purpose-built for GenAI applications. It ingests OpenTelemetry traces over HTTP, parses GenAI semantic-convention attributes, and renders LLM calls, evaluations, and agent traces in a UI tuned for prompt-and-response workflows.

### Key Features of CoreWeave Weave

* **[OTLP trace ingestion](https://weave-docs.wandb.ai/guides/tracking/otel/)**: Accepts OpenTelemetry traces over HTTP protobuf at a single hosted endpoint, with project routing controlled by headers.
* **[LLM-aware trace UI](https://weave-docs.wandb.ai/guides/tracking/tracing)**: Visualizes multi-turn conversations, tool calls, token usage, and latencies from `gen_ai.*` semantic-convention spans.
* **[Evaluations and Datasets](https://weave-docs.wandb.ai/guides/core-types/evaluations)**: Run scoring functions against logged traces and compare model variants side by side.

## Prerequisites

Before integrating CoreWeave Weave with TrueFoundry, ensure you have:

1. **TrueFoundry Account**: Create a [TrueFoundry account](https://www.truefoundry.com/register) and follow the instructions in our [Gateway Quick Start Guide](https://docs.truefoundry.com/gateway/quick-start).
2. **CoreWeave Weave Account**: Sign up at [wandb.ai](https://wandb.ai/) and create at least one project. You will need an **entity** (team or user slug) and a **project name**.
3. **W\&B API Key**: Generate a personal API key at [wandb.ai/authorize](https://wandb.ai/authorize).

## Understanding the CoreWeave Weave Endpoint

CoreWeave Weave exposes a single OTLP/HTTP trace endpoint that varies by deployment type.

| Deployment                | Traces Endpoint                                    |
| ------------------------- | -------------------------------------------------- |
| SaaS (Multi-tenant Cloud) | `https://trace.wandb.ai/otel/v1/traces`            |
| Dedicated / Self-Managed  | `https://<your-subdomain>.wandb.io/otel/v1/traces` |

Routing of spans to your Weave project is controlled by a **`project_id`** header in the form `<entity>/<project>`. The entity is your W\&B team or user slug; the project is the workspace within that entity where traces should appear.

<Note>
  CoreWeave Weave does not accept OTLP metrics — only traces are supported via this endpoint.
</Note>

## Integration Steps

TrueFoundry AI Gateway supports exporting OpenTelemetry traces to CoreWeave Weave, allowing you to monitor and analyze your LLM requests in Weave's observability platform.

<Steps>
  <Step title="Get your W&B API Key">
    1. Sign in to [wandb.ai](https://wandb.ai/) and navigate to [wandb.ai/authorize](https://wandb.ai/authorize).
    2. Copy the API key shown on the page. This is your **`wandb-api-key`** value.

    <Frame>
      <img src="https://mintcdn.com/truefoundry/kJnmizipng9IiTZe/images/coreweave-weave-apikey.png?fit=max&auto=format&n=kJnmizipng9IiTZe&q=85&s=6fb4421f8183dbdc8d0cd6f610efa5fb" alt="W&B authorize page showing the API key for OTEL export" width="1598" height="730" data-path="images/coreweave-weave-apikey.png" />
    </Frame>

    <Tip>
      Treat this key like a password — anyone with it can write traces to any project your account can access.
    </Tip>
  </Step>

  <Step title="Identify your entity and project">
    1. In the Weave UI, open the project you want traces to land in.
    2. The URL is of the form `https://wandb.ai/<entity>/<project>/...` — copy the entity and project slugs.
    3. Combine them as `<entity>/<project>` — this is your **`project_id`** header value.

    <Frame>
      <img src="https://mintcdn.com/truefoundry/kJnmizipng9IiTZe/images/coreweave-weave-project.png?fit=max&auto=format&n=kJnmizipng9IiTZe&q=85&s=bff9a6243e459f3aa1e670d43e64f169" alt="Weave project page showing the entity/project slug in the URL" width="1082" height="544" data-path="images/coreweave-weave-project.png" />
    </Frame>
  </Step>

  <Step title="Configure OTEL Export in TrueFoundry">
    1. Go to **AI Gateway** → **Controls** → **Settings** in the TrueFoundry dashboard.
    2. Scroll down to the **OTEL Config** section and click the edit button.

    <Frame>
      <img src="https://mintcdn.com/truefoundry/kJnmizipng9IiTZe/images/coreweave-tfy-otel-nav.png?fit=max&auto=format&n=kJnmizipng9IiTZe&q=85&s=2b73960e196f99061fa0c2608566ebd2" alt="TrueFoundry AI Gateway Settings page showing the OTEL Config section" width="2968" height="1646" data-path="images/coreweave-tfy-otel-nav.png" />
    </Frame>

    3. Enable the **OTEL Traces Exporter Configuration** toggle.
    4. Select **HTTP Configuration**.
    5. Enter the CoreWeave Weave traces endpoint: `https://trace.wandb.ai/otel/v1/traces`
    6. Set **Encoding** to `Proto`.
    7. Add the required headers:

    | Header          | Value                                      |
    | --------------- | ------------------------------------------ |
    | `wandb-api-key` | Your W\&B API key from Step 1              |
    | `project_id`    | `<your-entity>/<your-project>` from Step 2 |

    8. Click **Save** to apply the configuration.

    <Frame>
      <img src="https://mintcdn.com/truefoundry/kJnmizipng9IiTZe/images/coreweave-tfy-traces-config.png?fit=max&auto=format&n=kJnmizipng9IiTZe&q=85&s=7c3605b1e77fc8a456e69ac0f6c6fa42" alt="TrueFoundry OTEL Traces Exporter Configuration filled in for CoreWeave Weave" width="1580" height="1638" data-path="images/coreweave-tfy-traces-config.png" />
    </Frame>

    <Note>
      CoreWeave Weave does not accept OTLP metrics. Leave the **OTEL Metrics Exporter Configuration** toggle disabled, or point it at a separate metrics backend (Prometheus, Datadog, Grafana Cloud) if you need gateway metrics.
    </Note>

    <Tip>
      Weave also accepts Basic auth as an alternative to the `wandb-api-key` header: set the header key to `Authorization` and the value to `Basic ` followed by the base64 encoding of the literal string `api:<your-wandb-api-key>`. The `wandb-api-key` header is simpler and is recommended.
    </Tip>
  </Step>

  <Step title="Verify the Integration">
    1. Make a request through the TrueFoundry AI Gateway, for example a chat completion to any configured model.
    2. Log into your CoreWeave Weave dashboard and navigate to the **Traces** section of your project.
    3. Confirm a trace from `service.name: tfy-llm-gateway` appears, with attributes such as `tfy.span_type`, `gen_ai.request.model`, `gen_ai.usage.prompt_tokens`, and `gen_ai.usage.completion_tokens`.

    <Frame>
      <img src="https://mintcdn.com/truefoundry/kJnmizipng9IiTZe/images/coreweave-weave-traces.png?fit=max&auto=format&n=kJnmizipng9IiTZe&q=85&s=2868b3402307a06e4dd375d3b92a842c" alt="CoreWeave Weave traces page showing LLM call traces from TrueFoundry AI Gateway" width="3024" height="1634" data-path="images/coreweave-weave-traces.png" />
    </Frame>
  </Step>
</Steps>

## Configuration Reference

| Configuration                   | Value                                                                   |
| ------------------------------- | ----------------------------------------------------------------------- |
| **Traces Endpoint (SaaS)**      | `https://trace.wandb.ai/otel/v1/traces`                                 |
| **Traces Endpoint (Dedicated)** | `https://<your-subdomain>.wandb.io/otel/v1/traces`                      |
| **Protocol**                    | HTTP                                                                    |
| **Encoding**                    | Proto                                                                   |
| **Auth Header Key**             | `wandb-api-key`                                                         |
| **Auth Header Value**           | Your W\&B API key from [wandb.ai/authorize](https://wandb.ai/authorize) |
| **Project Header Key**          | `project_id`                                                            |
| **Project Header Value**        | `<your-entity>/<your-project>`                                          |
| **Metrics**                     | Not supported — only traces are accepted                                |
