Skip to content

[DOCS] Document OpenTelemetry tracing configuration (TELEMETRY_TRACING_ENABLE) #457

Closed

Description

Summary

The gateway now supports OpenTelemetry tracing spans (inference-gateway/inference-gateway#483, closes inference-gateway/inference-gateway#450). Two new env vars were added and should be documented on the observability/configuration pages:

Behavior worth documenting: root spans on all routes except /health and /v1/metrics, gen_ai provider/model span attributes on /v1/chat/completions and /v1/messages, one child span per MCP tool execution, and W3C traceparent propagation in and out (incoming headers honored; provider, proxy, and MCP requests carry traceparent). Sampling and exporter tuning use the standard OTEL_TRACES_SAMPLER / OTEL_EXPORTER_OTLP_* env vars.

Acceptance Criteria

  • Both env vars documented with defaults
  • Tracing behavior (span coverage, propagation, excluded routes) described on the observability page
  • Note that sampling/exporter tuning uses standard OTEL_* env vars

Activity

  1. added
    documentation
    on Jul 22, 2026
  2. edenreich commented on Jul 22, 2026

    @edenreich
    Contributor

    @claude Can you work on this?

  3. inference-gateway-maintainer commented on Jul 22, 2026

    @inference-gateway-maintainer
    ContributorAuthor

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


    Documenting OpenTelemetry tracing configuration

    • Read observability.md and configuration.md for structure/patterns
    • Document TELEMETRY_TRACING_ENABLE + TELEMETRY_TRACING_OTLP_ENDPOINT in configuration.md
    • Add tracing behavior section to observability.md (span coverage, propagation, excluded routes, OTEL_* tuning)
    • Lint / format / build checks
    • Commit and open PR

    Opened PR #459.

    What changed

    configuration.md

    • Added TELEMETRY_TRACING_ENABLE (default false) and TELEMETRY_TRACING_OTLP_ENDPOINT (default http://localhost:4318) to the Telemetry settings table and the complete-config .env example.
    • Clarified that tracing is a separate opt-in from metrics and links to the tracing section.

    observability.md (Distributed Tracing section)

    • Rewrote the intro to reflect the two-flag opt-in (TELEMETRY_ENABLE=true and TELEMETRY_TRACING_ENABLE=true) and the TELEMETRY_TRACING_OTLP_ENDPOINT default.
    • Span coverage - root spans on all inbound routes except /health and /v1/metrics; gen_ai provider/model attributes on /v1/chat/completions and /v1/messages; one child span per MCP tool execution.
    • Context propagation - W3C traceparent honored inbound; carried outbound on provider, proxy, and MCP requests.
    • Sampling and exporter tuning - documented the standard OTEL_TRACES_SAMPLER / OTEL_EXPORTER_OTLP_* env vars and the per-signal endpoint precedence.
    • Updated the "Traces missing" troubleshooting entry and the Jaeger endpoint reference to match.

    All three acceptance criteria are covered. lint:md, format:check, and build pass locally.

    • branch docs/issue-457-20260722-1402
  4. added a commit that references this issue on Jul 22, 2026
    a986ae5
  5. moved this from Todo to Done in 2026on Jul 22, 2026
  6. inference-gateway-releaser commented on Jul 22, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.9.3 🎉

    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

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions