Skip to content

[DOCS] Document gateway tracing (TELEMETRY_TRACING_*) with an example walkthrough #1249

Closed

Description

Summary

The gateway's OpenTelemetry tracing is only documented as two Configurations.md table rows today; the docs site has no tracing page. The gateway repo now ships a runnable example: the monitoring example (docker-compose and Kubernetes flavours) enables TELEMETRY_TRACING_ENABLED with TELEMETRY_TRACING_OTLP_ENDPOINT against a Jaeger OTLP backend, walks through the inference-gateway server span (its gen_ai.provider.name and gen_ai.request.model attributes), the execute_tool <name> span around MCP tool calls, and the W3C trace context propagation to MCP servers and A2A agents.

Upstream PR: inference-gateway/inference-gateway#938 (resolves inference-gateway/inference-gateway#933)

Suggested docs-site work:

  • A tracing section next to the observability/metrics page: what TELEMETRY_TRACING_ENABLED and TELEMETRY_TRACING_OTLP_ENDPOINT do (OTLP over HTTP, the gateway appends /v1/traces to a path-less endpoint, requires TELEMETRY_ENABLED=true), and supported backends (Jaeger, Tempo, any OTLP collector)
  • The span shape: the inference-gateway server span opened for every request except /health and /v1/metrics, execute_tool <name> spans around MCP tool calls, and traceparent propagation into MCP servers and A2A agents so their spans nest under the gateway's
  • Link to or adapt the docker-compose tracing walkthrough in the gateway repo examples/monitoring/docker-compose/README.md

Acceptance Criteria

  • The docs site names TELEMETRY_TRACING_ENABLED and TELEMETRY_TRACING_OTLP_ENDPOINT, states the TELEMETRY_ENABLED prerequisite and the /v1/traces path behavior of a path-less endpoint
  • A worked example (curl -> Jaeger) shows the server span attributes (gen_ai.provider.name, gen_ai.request.model) and the MCP execute_tool <name> span
  • The observability page cross-links the monitoring example in the inference-gateway repo

Activity

  1. added
    documentation
    on Nov 17, 2026
  2. added theissue type on Nov 17, 2026
  3. edenreich commented on Nov 17, 2026

    @edenreich
    Contributor

    @claude can you document this?

  4. inference-gateway-maintainer commented on Nov 17, 2026

    @inference-gateway-maintainer
    ContributorAuthor

    Claude finished @edenreich's task in 2m 0s —— View job • docs/issue-1249-20261117-0658 • [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-1249-20261117-0658?quick_pull=1&title=Issue%20%231249%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%231249%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)


    Gateway tracing walkthrough added - PR #1250

    observability.md already had a Distributed Tracing section, so I added to it instead of creating a new page.

    What changed in the Distributed Tracing section:

    • Endpoint path: if TELEMETRY_TRACING_OTLP_ENDPOINT has no path, the gateway adds /v1/traces. The section now says this and lists the backends that work: Jaeger, Tempo, or any OTLP collector. The TELEMETRY_ENABLED prerequisite was already documented.
    • Span coverage: names the inference-gateway server span and its gen_ai.provider.name and gen_ai.request.model attributes. Failed requests carry error.type. execute_tool <name> spans now list gen_ai.tool.name.
    • Context propagation: A2A agents are now listed with MCP servers as receiving traceparent, so their spans nest under the gateway's.
    • New "Example: curl to Jaeger" section: adapted from examples/monitoring/docker-compose. It walks through a plain chat completion (the server span) and then an MCP time-tool call (execute_tool mcp_time_time).
    • Reference Monitoring Stack: now says both examples export traces to Jaeger and links to the new walkthrough. It previously listed Loki, which the compose example doesn't include.

    The Jaeger UI URL is written as inline code instead of a link because VitePress fails the build on a localhost link.

    I didn't check the gateway source for the /v1/traces behavior. That detail comes from the upstream example README and the Kubernetes gateway.yaml comments.
    | Branch

  5. moved this from Todo to In progress in 2026on Nov 17, 2026
  6. moved this from In progress to QA in 2026on Nov 17, 2026
  7. moved this from QA to Done in 2026on Nov 17, 2026
  8. inference-gateway-releaser commented on Nov 17, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.9.27 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationreleased

    Type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions