> ## 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.

# Kong AI Gateway

> Trace every LLM call passing through Kong AI Gateway via its OpenTelemetry plugin, no Zespan SDK required.

<Note>
  Available via: **Kong's OpenTelemetry plugin** (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.
</Note>

If you already route LLM traffic through [Kong AI Gateway](https://developer.konghq.com/ai-gateway/), enable Kong's OpenTelemetry plugin on the relevant route or service and point it at Zespan — every call proxied through Kong is traced with GenAI-specific span attributes (model, tokens, cost), independent of which app made the call.

## Setup

Enable the `opentelemetry` plugin on your AI Gateway route (declarative config shown; the same fields apply via the Admin API or `kubectl`/Konnect):

```yaml theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
plugins:
  - name: opentelemetry
    route: my-ai-route
    config:
      traces_endpoint: https://api.zespan.com/v1/traces
      headers:
        x-api-key: zsp_...
      resource_attributes:
        service.name: kong-ai-gateway
```

<Note>
  Kong sends OTLP over HTTP with Protobuf by default — this matches what Zespan's `/v1/traces` endpoint accepts, no protocol change needed.
</Note>

## What gets captured

Kong AI Gateway's LLM-specific spans already carry [GenAI semantic-convention attributes](https://developer.konghq.com/ai-gateway/llm-open-telemetry/) — model, token usage, cost, latency — the same fields [Zespan reads](/sdk/otel-integration#attributes-zespan-reads) from any OTel source. Every request proxied through the gateway is traced regardless of the calling app's language or framework, which is the main reason to route through a gateway in the first place.
