Gateways and telemetry · Telemetry you send
Kong AI Gateway
Per-request model usage from Kong AI Gateway's Gen AI spans, sent by Kong's OpenTelemetry plugin to the OTLP receiver. No API connection: Kong pushes the spans.
- How data moves
- Your code, gateway or exporter sends request data to AI Spendbook with an ingestion key.
- Credential
- No vendor credential
- What it covers
- request telemetry
- Money
- An estimate priced by AI Spendbook, never a bill
- Runs
- push
- Freshness
- Spans arrive as Kong exports them (in batches, seconds after each request).
- Not included
- billed cost
- Status
- No vendor API to read: cost is an estimate from request telemetry.
Set it up
- Create an ingestion key under Settings → Ingestion keys; the secret is shown once.
- Turn on log_statistics in the AI Proxy plugin (Kong Gateway 3.13 or later) so spans carry token usage.
- Add the OpenTelemetry plugin with traces_endpoint https://<your API host>/api/v1/ingest/otlp/v1/traces and the header Authorization: Bearer afk_…, and set tracing_instrumentations and tracing_sampling_rate in kong.conf so requests are traced.
- For customer or feature, add them as resource_attributes in the plugin, or map an attribute you already send under Settings → OTLP attribute mapping.
What it needs
An ingestion key (afk_…) created under Settings → Ingestion keys (admin).