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

# Cloudflare AI Gateway

> Trace every LLM call passing through Cloudflare AI Gateway via its built-in OpenTelemetry exporter, no Zespan SDK required.

<Note>
  Available via: **Cloudflare's built-in OpenTelemetry exporter** (any language calling through the gateway). This is not a Zespan SDK wrapper — see [Send traces from any OTel-instrumented app](/sdk/otel-integration#send-traces-from-any-otel-instrumented-app-no-zespan-sdk) for how the underlying endpoint works. Configuration is dashboard-based, not code.
</Note>

If you already route LLM traffic through [Cloudflare AI Gateway](https://developers.cloudflare.com/ai-gateway/), its built-in OpenTelemetry exporter automatically emits a trace span for every request the gateway processes — model, provider, tokens, cost, prompt, and completion — with no changes to the apps calling it.

## Setup

<Steps>
  <Step title="Open your gateway's Settings">
    In the Cloudflare dashboard, go to your AI Gateway, then the **Settings** tab.
  </Step>

  <Step title="Add an OTEL exporter">
    Add a new exporter and set:

    * **URL**: `https://api.zespan.com/v1/traces`
    * **Headers**: `x-api-key: zsp_...`
    * **Content type**: `json` (Zespan accepts both `json` and `protobuf` — `json` needs no extra setup)
  </Step>

  <Step title="Save">
    Every subsequent request through this gateway is exported as an OTel trace.
  </Step>
</Steps>

## What gets captured

Cloudflare AI Gateway's spans already carry model, provider, token usage, cost, and prompt/completion content, mapped through the standard [OpenTelemetry GenAI semantic conventions](/sdk/otel-integration#attributes-zespan-reads) Zespan reads. As with any gateway integration, every request routed through it is traced regardless of the calling app's language or framework.
