Skip to content

fix(operator): warn when VirtualMCPServer inline telemetry is ignored - #6408

Merged
blkt merged 4 commits into
stacklok:mainfrom
RaviTharuma:fix/vmcp-inline-telemetry-warning
Sep 2, 2026
Merged

fix(operator): warn when VirtualMCPServer inline telemetry is ignored#6408
blkt merged 4 commits into
stacklok:mainfrom
RaviTharuma:fix/vmcp-inline-telemetry-warning

Conversation

@RaviTharuma

Copy link
Copy Markdown
Contributor

Follow-up from #6276 after closing #6277. Operator ignores spec.config.telemetry and emits a one-shot Warning (InlineTelemetryIgnored) when it is set without telemetryConfigRef. Docs no longer claim inline still works for operator vMCP. /metrics stays unregistered without the ref (HTTP 406).

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.17%. Comparing base (ee527be) to head (730f0ed).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6408      +/-   ##
==========================================
+ Coverage   78.13%   78.17%   +0.03%     
==========================================
  Files         768      768              
  Lines       74649    74660      +11     
==========================================
+ Hits        58324    58362      +38     
+ Misses      16320    16293      -27     
  Partials        5        5              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread cmd/thv-operator/controllers/virtualmcpserver_vmcpconfig.go Outdated
@cursor
cursor Bot force-pushed the fix/vmcp-inline-telemetry-warning branch from fc67cfa to c25df52 Compare August 30, 2026 13:02
RaviTharuma and others added 2 commits September 2, 2026 10:21
Signed-off-by: Ravi Tharuma <RaviTharuma@users.noreply.github.com>
Review asked emitInlineTelemetryIgnoredEvent to take only
the VirtualMCPServer and evaluate Spec.Config.Telemetry
and Spec.TelemetryConfigRef inside the helper.

Co-authored-by: Ravi Tharuma <RaviTharuma@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 2, 2026 10:21
@cursor
cursor Bot force-pushed the fix/vmcp-inline-telemetry-warning branch from c25df52 to 102a76a Compare September 2, 2026 10:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses the operator-managed VirtualMCPServer footgun where spec.config.telemetry is ignored by documenting the behavior and emitting a Warning event (InlineTelemetryIgnored) when inline telemetry is set without spec.telemetryConfigRef, helping users understand why /metrics is not registered (and scrapes hit the MCP handler with HTTP 406).

Changes:

  • Add a one-shot-style Warning event emission path in the VirtualMCPServer reconciler for ignored inline telemetry.
  • Update operator and general observability docs to state that inline telemetry is an operator no-op for VirtualMCPServer and to describe the 406 scrape symptom.
  • Add unit test coverage for the new event emission behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
docs/operator/virtualmcpserver-observability.md Updates vMCP operator observability docs to explain inline telemetry is ignored and that the operator emits a warning.
docs/observability.md Updates general observability docs to distinguish inline telemetry behavior across resource types, including vMCP operator no-op.
cmd/thv-operator/controllers/virtualmcpserver_vmcpconfig.go Emits the inline-telemetry-ignored Warning during VMCP config reconciliation.
cmd/thv-operator/controllers/virtualmcpserver_controller.go Adds emitInlineTelemetryIgnoredEvent helper for Warning event emission.
cmd/thv-operator/controllers/virtualmcpserver_controller_test.go Adds unit tests for the new Warning event emission behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread cmd/thv-operator/controllers/virtualmcpserver_controller.go Outdated
Comment thread cmd/thv-operator/controllers/virtualmcpserver_controller_test.go
Comment thread docs/observability.md Outdated
Comment thread docs/operator/virtualmcpserver-observability.md Outdated
The unit-test job failed on TestUpstreamTokenRefresher_RowIdentity,
which this PR does not touch. Retrigger so required checks can go green.

Co-authored-by: Ravi Tharuma <RaviTharuma@users.noreply.github.com>
@RaviTharuma

Copy link
Copy Markdown
Contributor Author

@blkt the nit is in (emitInlineTelemetryIgnoredEvent takes only vmcp and computes usesIgnoredInline internally). Thread is resolved. Please re-review.

Document that the event is not strictly one-shot, drop the 50ms timeout from the recorder test, and stop claiming CEL rejects inline telemetry plus telemetryConfigRef.
@blkt
blkt merged commit 6e6c67b into stacklok:main Sep 2, 2026
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants