OpenTelemetry Integration
Send LLM traces to Ingate using the standard OTLP/HTTP protocol. Compatible with any OpenTelemetry SDK.
Overview
Ingate includes a built-in OTLP/HTTP trace receiver at /v1/traces. If your application is already instrumented with OpenTelemetry, you can export GenAI spans directly to Ingate without modifying your code. Just point your OTel exporter at Ingate.
Endpoint
/v1/tracesOTLP/HTTP trace export. Accepts protobuf and JSON.
Content Types
| Content-Type | Format |
|---|---|
application/x-protobuf | Standard protobuf encoding (recommended) |
application/json | JSON encoding |
Configuration
Point your OpenTelemetry exporter at Ingate:
# Set the OTLP endpoint to Ingate
export OTEL_EXPORTER_OTLP_ENDPOINT=https://api.ingateai.com
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
# Authenticate with your Ingate API key
export OTEL_EXPORTER_OTLP_HEADERS="X-Ingate-Key=sk-ingate-your-key"Python Example
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
exporter = OTLPSpanExporter(
endpoint="https://api.ingateai.com/v1/traces",
headers={"X-Ingate-Key": "sk-ingate-your-key"}
)
provider.add_span_processor(BatchSpanProcessor(exporter))GenAI Span Filtering
Ingate processes only GenAI-related spans from the trace payload. Other spans (HTTP, database, etc.) are silently ignored. GenAI spans are identified by semantic conventions in the span attributes.
Mapped Fields
GenAI span attributes are mapped to Ingate's unified log format:
| OTel Attribute | Ingate Field |
|---|---|
gen_ai.system | provider |
gen_ai.request.model | model |
gen_ai.prompt | prompt |
gen_ai.completion | completion |
gen_ai.usage.prompt_tokens | token_count (input) |
gen_ai.usage.completion_tokens | token_count (output) |
| Span duration | latency_ms |
Request Limits
Maximum request body size: 4 MB. Payloads exceeding this limit receive413 Request Entity Too Large.
Complementary to the proxy