traceparent header through the gateway. Every request that shares a trace_id appears as a single trace in your observability backend — the whole chain on one ticket.
How the gateway propagates traces
- Your application sends a request with a
traceparentheader. - The gateway extracts the trace context and creates its HTTP and GenAI spans as children of that trace.
- The gateway injects
traceparentinto the upstream provider request, so the application, gateway, and provider share one trace ID. - The gateway returns
traceparentin the response headers so your application can continue the trace.
Group multiple LLM calls under one trace
If your application uses the OpenTelemetry SDK, wrap multiple gateway calls in a single span. The OTel HTTP instrumentation automatically propagates thetraceparent header.
summarize-document span in your trace viewer.
Agent-to-agent tracing
When one agent delegates to another, pass thetraceparent through to maintain a single end-to-end trace:
To enrich these traces with session metadata or client-side operation context (tool execution, retrieval, agent steps), see Context Propagation.
Manual traceparent without an OTel SDK
If you don’t use an OpenTelemetry SDK, you can still pass atraceparent header manually. The format is:
trace_id and appear in one trace. To chain further calls, read the traceparent header from each gateway response — it carries the gateway’s own span ID — and forward it as the parent of the next request.