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

# LiteLLM Proxy (Gateway)

> Trace every call through a self-hosted LiteLLM Proxy gateway via its built-in OpenTelemetry callback, no Zespan SDK required.

<Note>
  Available via: **native OpenTelemetry callback** (any language calling the proxy). 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>

<Note>
  This page is for **LiteLLM Proxy** — the self-hosted gateway server that sits in front of your LLM providers and traces every call that passes through it, regardless of which app or language made the call. If your app calls the `litellm` Python module or client directly instead, use [`patch_litellm()`/`wrapLiteLLM()`](/sdk/integrations/litellm) — that's a client-side SDK wrapper, a different integration point than this page.
</Note>

LiteLLM Proxy has a built-in `otel` logging callback — enable it in your proxy config and every request that flows through the gateway (from any calling app, in any language) is traced, with zero changes to the apps calling it.

## Setup

In your proxy's `config.yaml`:

```yaml theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
model_list:
  - model_name: gpt-4o
    litellm_params:
      model: openai/gpt-4o
      api_key: os.environ/OPENAI_API_KEY

litellm_settings:
  callbacks: ["otel"]

general_settings:
  otel: true
```

Set the exporter destination as environment variables before starting the proxy:

```bash theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
export OTEL_EXPORTER="otlp_http"
export OTEL_ENDPOINT="https://api.zespan.com/v1/traces"
export OTEL_HEADERS="x-api-key=zsp_..."

litellm --config config.yaml
```

## What gets captured

Every request routed through the proxy — across every provider and model configured in `model_list` — is traced, mapped through the standard [OpenTelemetry GenAI semantic conventions](/sdk/otel-integration#attributes-zespan-reads) Zespan reads. This is the common pattern for teams that standardize LLM access behind a self-hosted gateway rather than calling providers directly from each service.
