You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Metrics migration steps aren't performable/verifiable under the operator #6434
Step 1 of the migration in docs/observability.md says to point a scraper at the
diagnostics port and confirm metrics arrive. Under the operator today that step isn't
actually performable: mcpserver_controller.go:1467 declares only the proxy containerPort, and :1561 only the proxy ServicePort. The diagnostics listener is
genuinely up on 9464 (or whatever prometheusPort resolves to) — it's just
undiscoverable. A PodMonitor has no named port to key on, and prometheusPort is
intentionally absent from MCPTelemetryConfigSpec (see the drift-table justification
in telemetry_drift_test.go), so there's no field to even declare it explicitly.
Separately, step 2 ("set metricsOnTransportPort: false and confirm nothing else was
still scraping it") isn't verifiable either. The startup WARN reports configuration,
not usage — it fires because the flag is on, not because a scraper actually hit the
endpoint. And the transport-port /metrics mux registration outranks the /
catch-all, so those requests bypass the telemetry middleware entirely; there's no
counter anywhere that would tell you whether traffic there is real.
Proposed fixes
Discoverability: add a named containerPort (e.g. metrics) on the workload
pod when EnablePrometheusMetricsPath is set, so a PodMonitor can target it by
name. Leave the Service alone — deliberately, per the existing docs guidance that
the diagnostics port must not be routed through anything internet-facing.
Verifiability: wrap the transport-port /metrics handler (mounted at pkg/runner/runner.go around the mountPrometheusHandlerOnTransportPort call)
with a request counter, so step 2 has something concrete to check — "requests to
the transport-port copy since startup: N" — before an operator turns it off.
Neither blocks #6371; raised there as informational.
I'd like to take part 1 of this (declare a named metrics container port on the workload pod when Prometheus is enabled, so a PodMonitor can target the diagnostics listener by name). I'll leave the Service alone per the guidance here, and leave part 2 (the transport-port request counter) out of scope for that change unless you'd like it bundled. Opening a PR shortly.
Activity
Address review: real aliasing bug, doc trims, one duplicate helper
Expose the metrics migration switch to CLI and operator (#6371)
suantea commentedon Oct 11, 2026
I'd like to take part 1 of this (declare a named
metricscontainer port on the workload pod when Prometheus is enabled, so a PodMonitor can target the diagnostics listener by name). I'll leave the Service alone per the guidance here, and leave part 2 (the transport-port request counter) out of scope for that change unless you'd like it bundled. Opening a PR shortly.