Repository navigation
Conversation
Contributor
Codecov Results 📊✅ 133246 passed | ❌ 1 failed | ⏭️ 7298 skipped | Total: 140545 | Pass Rate: 94.81% | Execution Time: 437m 16s 📊 Comparison with Base Branch
➕ New Tests (1)View new tests
❌ Failed Tests
|
| File | Patch % | Lines |
|---|---|---|
| sentry_sdk/integrations/mcp.py | 100.00% |
Coverage diff
@@ Coverage Diff @@
## master #PR +/-##
==========================================
- Coverage 90.37% 90.35% -0.02%
==========================================
Files 202 202 —
Lines 26552 26573 +21
Branches 9854 9864 +10
==========================================
+ Hits 23995 24008 +13
- Misses 2557 2565 +8
- Partials 1495 1499 +4Generated by Codecov Action
This branch has not been deployed
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.
Description
Keep MCP transport implementation identity separate from OpenTelemetry network metadata, following getsentry/sentry-conventions#671. HTTP and SSE spans now record the concrete transport class, including custom subclasses, and read the HTTP protocol/version from each request's ASGI scope. HTTP/3 records
quic.Missing HTTP context no longer implies stdio/pipe, and HTTP headers no longer imply TCP. Stdio and independent custom stream transports remain without transport attributes until their actual transport boundary can be instrumented reliably.
Deploy getsentry/relay#6483 with the corrected conventions before releasing this change: older Relay can backfill the class name into an absent
network.transport.Validated against MCP 1.30.0 and 2.3.0 with static and streamed spans (111 and 117 tests passed respectively), plus Ruff and mypy. Real HTTP/SSE tests cover custom subclasses, HTTP versions and missing metadata. The sibling FastMCP expectations are aligned too; Python 3.12 / FastMCP 2.14.7 passes all 80 tests. Local FastMCP 3.4.8 and 4.0.11 setup was blocked by HTTP 403 from the configured package security proxy, so those versions still require CI verification.
Issues
Related: getsentry/sentry-conventions#671. No separate issue.
Reminders
uv run ruff.feat:,fix:,ref:,meta:)