fix(operator): apply deprecated VirtualMCPServer inline telemetry - #6277
RaviTharuma wants to merge 2 commits into
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Awaiting reply to #6276 (comment) |
There was a problem hiding this comment.
Pull request overview
Restores operator support for the deprecated VirtualMCPServer.spec.config.telemetry by applying it as a fallback when spec.telemetryConfigRef is unset, so /metrics can be registered again for Prometheus scrapes while still preferring the shared MCPTelemetryConfig path.
Changes:
- Reintroduce inline telemetry normalization fallback (with a migration log message) when
telemetryConfigRefis absent. - Add/adjust unit tests to cover inline-telemetry application and ref-precedence behavior.
- Update observability docs to remove the incorrect “CEL mutual exclusion” claim and document the
/metrics→ MCP 406 failure mode when telemetry is not configured.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/operator/virtualmcpserver-observability.md | Updates vMCP telemetry docs to describe inline fallback + 406 scrape symptom when telemetry is unset. |
| docs/observability.md | Aligns general observability docs with vMCP telemetry fallback behavior and failure mode. |
| cmd/thv-operator/pkg/vmcpconfig/converter.go | Restores deprecated inline telemetry fallback and emits a migration log message. |
| cmd/thv-operator/pkg/vmcpconfig/converter_test.go | Updates/adds tests for inline telemetry application and TelemetryConfigRef precedence. |
| cmd/thv-operator/pkg/spectoconfig/telemetry.go | Clarifies function usage in comments now that inline fallback is restored. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Operator converter previously ignored spec.config.telemetry entirely after stacklok#4819, while docs still claimed the inline field worked. Setting only enablePrometheusMetricsPath then produced a silent no-op: the rendered vmcp config had no telemetry block, /metrics was never registered, and Prometheus scrapes received MCP streamable-HTTP 406 JSON-RPC. Restore a deprecated fallback that applies inline config.telemetry when TelemetryConfigRef is unset, logs a migration warning, and keeps TelemetryConfigRef preferred when both are set. Update unit tests and operator observability docs. Signed-off-by: Ravi Tharuma <RaviTharuma@users.noreply.github.com>
… Warning event - Remove per-reconcile Info log from converter.normalizeTelemetry - Add emitInlineTelemetryDeprecatedEvent controller method following emitPrimaryUpstreamProviderDeprecatedEvent pattern - Emit Warning event once per spec change when inline telemetry is used - Event guidance: migrate spec.config.telemetry to spec.telemetryConfigRef Co-authored-by: Ravi Tharuma <RaviTharuma@users.noreply.github.com>
e02f446 to
b5ab7e6
Compare
|
Closing this in favor of the maintainer direction on #6276. Restoring deprecated |
|
Closing per #6276: do not restore deprecated inline telemetry. Follow-up will add a Warning/validation + docs for the silent no-op. |
Summary
Fixes #6276: operator-managed VirtualMCPServer silently ignored
spec.config.telemetryafter #4819, soenablePrometheusMetricsPath: truenever registered/metrics. Prometheusscrapes then hit the MCP streamable-HTTP handler and got HTTP 406 JSON-RPC
(
Client must accept text/event-stream) instead of Prometheus text.This also unblocked collecting Go runtime series for #5860.
Changes
config.telemetryfallback whentelemetryConfigRefis unset (TelemetryConfigRef still wins when both set)MCPTelemetryConfigwhen telemetry is not configured
Preferred long-term path (unchanged)
with
spec.telemetryConfigRefon VirtualMCPServer.Test plan
go test ./cmd/thv-operator/pkg/vmcpconfig/ -run 'TestConverter_InlineTelemetry|TestConverter_TelemetryConfigRefWins|TestConverter_TelemetryNil'enablePrometheusMetricsPath: trueshould render
telemetryinto the vmcp ConfigMap and serve HTTP 200 onGET /metricswithAccept: text/plainSecurity
No secrets, private hostnames, or customer data in this PR or linked issues.