Repository navigation
Description
Problem
Follow-up from operator inference-gateway/operator#157 (resolves operator #156), which added OTel-aligned telemetry config to the Orchestrator CRD. When telemetry is enabled, the operator sets these env vars on the infer channels-manager daemon:
INFER_TELEMETRY_ENABLED=trueINFER_TELEMETRY_OTLP_ENDPOINT=<collector>(single shared endpoint ->config.Telemetry.OTLP.Endpoint)
The OTLP metrics exporter itself already exists (#842): the agent/chat path builds the DI container (internal/container/container.go -> OTLPEndpoint: c.config.Telemetry.OTLP.Endpoint), which wires the telemetry recorder + meter provider and pushes infer.* / gen_ai.* metrics over OTLP on an interval.
But the channels-manager daemon never initializes it. RunChannelsCommand (cmd/channels.go) constructs services.NewChannelManagerService(cfg.Channels) directly and never builds the container, so the long-running daemon pushes no metrics over OTLP even when the env vars above are set.
This matters specifically for operator deployments: the Orchestrator workload is outbound-only (no Service) (see operator CLAUDE.md), so a Prometheus pull/scrape exporter can never reach it. OTLP push is the only way to get metrics out of it - and today it is not wired on the daemon path.
Ask
Initialize the telemetry meter provider + OTLP metric exporter in the channels-manager daemon path, reusing the exporter from #842 and honoring the existing config (telemetry.enabled, telemetry.otlp.{endpoint,headers,interval} / INFER_TELEMETRY_*). No new config surface is needed - just wire the daemon to the same telemetry engine the agent/chat path already uses.
Candidate daemon-level metrics (beyond the per-run infer.* counters): messages processed, active channels, scheduler ticks, heartbeat liveness, per-message loop duration/outcome.
Open question
Per-message work is spawned as infer agent subprocesses (see examples/telegram-channel). If those inherit INFER_TELEMETRY_*, per-run agent metrics may already flow from the subprocesses; the remaining gap would then be the daemon process's own operational metrics plus confirming env inheritance. Worth confirming which signals are actually missing before implementing.
Acceptance criteria
-
channels-managerinitializes the meter provider + OTLP metric exporter whentelemetry.enabledand an OTLP endpoint are set; no otel init / zero overhead when unset. - Daemon metrics visible via a local otel-collector debug exporter (mirror the
examples/a2a-tracessetup). - Exporter failures never affect daemon operation (log-and-drop, matching [FEATURE] OTLP metrics exporter #842).
- Metrics flushed on daemon shutdown.
-
[DOCS]follow-up filed againstinference-gateway/docsfor the orchestrator/daemon metrics setup.
References
- Prior art: [FEATURE] OTLP metrics exporter #842 (OTLP metrics exporter), [FEATURE] Add traces and logs to the telemetry package (single CLI telemetry engine) #893 (single CLI telemetry engine)
- Operator PR: feat(orchestrator): add OTel-aligned telemetry support to Orchestrator CRD operator#157 - Operator issue: [FEATURE] support OTel-aligned telemetry (traces/metrics exporters) in Orchestrator CRD operator#156
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
edenreich commentedon Jul 16, 2026
@infer Can you work on this? use /ponytail:ponytail /go /go-concurrency
inference-gateway-maintainer commentedon Jul 16, 2026
Model:
ollama_cloud/deepseek-v4-flash· View JobTodos
Pull Request
#922
✅ Infer Result: Success
All done. Here's a summary of what was changed:
Wired OTLP telemetry into the channels-manager daemon (PR #922, resolves #921):
internal/telemetry/recorder.go: AddedExecDaemonexecution mode ("daemon") and aMeter()accessor onRecorderso subsystems can register their own instruments on the shared meter providercmd/channels.go:RunChannelsCommandnow setstelemetry.ExecutionMode = telemetry.ExecDaemon, creates atelemetry.Recorderfrom the existing config (telemetry.enabled,telemetry.otlp.{endpoint,headers,interval}/INFER_TELEMETRY_*), passes it to the channel manager, and callstel.Shutdown()on daemon shutdown to flush final metricsinternal/services/channel_manager.go:NewChannelManagerServiceaccepts a*telemetry.Recorderparameter, initializes daemon-level OTel instruments (infer.daemon.messages_processedcounter,infer.daemon.message.durationhistogram,infer.daemon.active_channelsupdown counter), and records metrics on message processing. Exporter failures are logged and dropped (matching [FEATURE] OTLP metrics exporter #842). No overhead when telemetry is disabled (nil-safe no-op)internal/services/channel_manager_test.go: Updated all test calls to passnilfor the new telemetry parameterDOCS follow-up filed at inference-gateway/docs#414.
Model:
ollama_cloud/deepseek-v4-flash· Exit Code:0· Duration: 18m 55sTokens: 8,192,273 in · 19,664 out · 8,211,937 total (63 requests)
Tool calls: 85 total · 95% success rate
Traces
Stats
Triggered by edenreich · Infer Action
chore(hooks): replace pip pre-commit framework with plain .githooks (#…
inference-gateway-releaser commentedon Jul 17, 2026
🎉 This issue has been resolved in version 0.148.0 🎉
The release is available on:
Your semantic-release bot 📦🚀