fix: include _internal/mcp in observability tracing paths#4144
Open
ecthelion77 wants to merge 1 commit intoIBM:mainfrom
Open
fix: include _internal/mcp in observability tracing paths#4144ecthelion77 wants to merge 1 commit intoIBM:mainfrom
ecthelion77 wants to merge 1 commit intoIBM:mainfrom
Conversation
Contributor
Author
|
Suggested labels: |
479336e to
b8ca51e
Compare
58810c3 to
2356112
Compare
Signed-off-by: Olivier Gintrand <olivier.gintrand@forterro.com>
2356112 to
3ccf338
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🐛 Bug-fix PR
🔗 Issue
Closes #4152
📌 Summary
The
_internal/mcpendpoint path is not included in the observability tracing include patterns, causing internal MCP calls between gateway components to be invisible in distributed traces. This makes it impossible to trace the full request flow when meta-servers or virtual servers invoke internal MCP endpoints.🔁 Reproduction Steps
/_internal/mcp//_internal/mcpleg is missing from the trace🐞 Root Cause
The
OTEL_TRACE_INCLUDE_PATTERNSdefault inconfig.pylists explicit path patterns for tracing (/servers/*/sse,/servers/*/message,/a2a), but/_internal/mcpwas omitted.💡 Fix Description
Add
r"^/_internal/mcp(?:/|$)"to the defaultOTEL_TRACE_INCLUDE_PATTERNSlist inSettings, so internal MCP calls are traced by default.🧪 Verification
make lintmake testmake coverage/_internal/mcpspans📐 MCP Compliance (if relevant)
✅ Checklist
make black isort pre-commit)