Skip to content

Emit privacy-safe OpenTelemetry traces from AI Gateway and vLLM #148

Description

@ns-mkusper

Problem

The model-serving pack does not configure Envoy AI Gateway or vLLM to emit session-correlated OpenTelemetry traces. Operators can see aggregate metrics, but cannot follow one chat-client request through gateway routing, queueing, inference, and streaming completion.

Scope

  • Add an opt-in tracing contract for the pack/operator that configures:
    • Envoy AI Gateway OTLP export and a stable service name.
    • x-session-idsession.id span mapping and W3C trace-context propagation.
    • vLLM --otlp-traces-endpoint plus OTLP protocol/service resource attributes.
  • Hide OpenInference inputs, outputs, embedding text, and vectors by default.
  • Keep vLLM detailed model/worker traces disabled by default because they can affect performance.
  • Support a configured cluster OpenTelemetry Collector endpoint instead of deploying another collector.
  • Add an E2E test with a local OTLP receiver that verifies one chat request produces correlated gateway and vLLM spans without prompt/completion content.

Acceptance criteria

  • Tracing is disabled by default and can be enabled through documented chart/model configuration.
  • Gateway and vLLM spans share trace/session correlation where upstream context is present.
  • Streaming chat completions produce terminal spans with status, latency, model, and token usage.
  • Prompt and completion content are absent under the default privacy configuration.
  • Sampling and detailed-trace settings are independently configurable.
  • Generated CRDs, Helm examples, operator reconciliation, and E2E coverage include the new fields.
  • The design works without a LangChain dependency.

Dependencies

Official references:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Start date

    None yet

    Target date

    None yet

    Size

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions