Skip to content

[DOCS] Document OTLP metrics push endpoint and GenAI semconv metric names #320

Closed

Description

@edenreich

Summary

The gateway now exposes an opt-in OTLP/HTTP metrics push endpoint and its Prometheus metrics were migrated from the homegrown llm_* names to the OpenTelemetry GenAI semantic conventions (gen_ai.*). The docs need to cover both.

Source: inference-gateway/inference-gateway#404, implemented in inference-gateway/inference-gateway#409 (see also inference-gateway/schemas#96).

User-facing changes to document:

  • New endpoint: POST /v1/metrics accepts an OTLP ExportMetricsServiceRequest as application/x-protobuf or application/json (gzip supported, 4 MiB cap), returns an OTLP response with partial_success details. Opt-in via TELEMETRY_METRICS_PUSH_ENABLE=true (alongside TELEMETRY_ENABLE=true); returns 403 when disabled; sits behind OIDC auth when enabled.
  • Metric renames (breaking, pre-1.0): gen_ai_client_token_usage, gen_ai_server_request_duration_seconds (seconds, not ms), gen_ai_execute_tool_duration_seconds, gen_ai_client_operation_duration_seconds, gen_ai_client_operation_time_to_first_chunk_seconds, gen_ai_server_time_to_first_token_seconds, inference_gateway_tool_calls_total. Old-to-new migration table exists in examples/docker-compose/monitoring/README.md.
  • New source label on every series: "gateway" for gateway-observed traffic vs client-supplied (e.g. "claude-code-subscription") for pushed metrics.
  • Ingestion rules worth documenting: only allowlisted gen_ai.* metrics, delta temporality only, attribute allowlist, histogram replay approximation.

Affected pages: observability/telemetry page (metric names, labels, examples), API reference (new POST /v1/metrics operation), configuration page (TELEMETRY_METRICS_PUSH_ENABLE).

A curl example for the push endpoint is available in examples/docker-compose/monitoring/README.md in the gateway repo.

Acceptance Criteria

  • Telemetry/observability docs list the new gen_ai.* metric set, labels (including source), and the old-to-new migration table
  • The POST /v1/metrics endpoint is documented (encodings, opt-in flags, auth, partial success, limits)
  • TELEMETRY_METRICS_PUSH_ENABLE is documented on the configuration page

Activity

  1. added
    documentation
    on Jul 4, 2026
  2. added theissue type on Jul 4, 2026
  3. moved this to Todo in 2026on Jul 4, 2026
  4. edenreich commented on Jul 4, 2026

    @edenreich
    ContributorAuthor

    @infer Can you work on this?

  5. inference-gateway-maintainer commented on Jul 4, 2026

    @inference-gateway-maintainer
    Contributor

    Model: ollama_cloud/deepseek-v4-flash · View Job

    Todos

    • Explore repo structure and find relevant pages
    • Update telemetry/observability page with new gen_ai.* metrics, labels, and migration table
    • Document POST /v1/metrics endpoint in API reference
    • Document TELEMETRY_METRICS_PUSH_ENABLE on configuration page

    Pull Request

    #321

    ✅ Infer Result: Success

    All acceptance criteria have been met. No further work is needed.

    Model: ollama_cloud/deepseek-v4-flash · Exit Code: 0 · Duration: 3m 45s

    Tokens: 3,995,706 in · 17,027 out · 4,012,733 total (41 requests)

    Tool calls: 42 total · 98% success rate

    ⚠️ 1 failed tool call(s)
    • Bash: exit status 1: accepts at most 1 arg(s), received 2

    Triggered by edenreich · Infer Action

  6. moved this from Todo to Done in 2026on Jul 5, 2026
  7. inference-gateway-releaser commented on Jul 6, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.8.0 🎉

    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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions