Skip to content

feat(channels): wire OTLP telemetry into channels-manager daemon - #922

Merged
edenreich merged 3 commits into
mainfrom
fix/issue-921
Jul 16, 2026
Merged

edenreich merged 3 commits into
mainfrom
fix/issue-921

Conversation

@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

Resolves #921

Summary

Initialize the telemetry meter provider + OTLP metric exporter in the channels-manager daemon path, reusing the existing telemetry.Recorder from the agent/chat path. The daemon now pushes operational metrics (messages processed, per-message duration, active channels) over OTLP when telemetry is enabled and an endpoint is configured - no new config surface needed.

Changes

  • Add ExecDaemon execution mode to telemetry recorder to distinguish daemon metrics from agent subprocess metrics
  • Add Meter() accessor on telemetry.Recorder so subsystems can register their own instruments on the shared meter provider
  • Initialize telemetry recorder in RunChannelsCommand with the existing config (telemetry.enabled, telemetry.otlp.{endpoint,headers,interval} / INFER_TELEMETRY_*)
  • Flush telemetry on daemon shutdown so final metrics reach the collector
  • Add daemon-level instruments to ChannelManagerService: infer.daemon.messages_processed (counter), infer.daemon.message.duration (histogram), infer.daemon.active_channels (updown counter)
  • Exporter failures are logged and dropped (matching [FEATURE] OTLP metrics exporter #842) - never affect daemon operation
  • No otel init / zero overhead when telemetry is disabled

Follow-up

  • [DOCS] issue filed against inference-gateway/docs for orchestrator/daemon metrics setup

Comment thread cmd/channels.go Resolved
@edenreich
edenreich marked this pull request as ready for review July 16, 2026 19:24
@edenreich
edenreich requested a review from a team as a code owner July 16, 2026 19:24
inference-gateway-maintainer Bot and others added 3 commits July 16, 2026 21:29
…bsystem stops

The daemon instruments (messages_processed, message.duration,
active_channels) were created but never recorded, so no data points were
ever exported. Record them at the message-handling and channel-lifecycle
sites. Also move the telemetry flush to after all subsystems stop (so
their final measurements are exported) and bound it with a 10s timeout
so an unreachable collector cannot hang shutdown.
@edenreich
edenreich merged commit 6411536 into main Jul 16, 2026
1 check passed
@edenreich
edenreich deleted the fix/issue-921 branch July 16, 2026 19:37
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.148.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] channels-manager: push metrics over OTLP (daemon telemetry init)

1 participant