Skip to content

fix(core): capture accurate MCP network attributes - #24506

Draft
betegon wants to merge 1 commit into
developfrom
bt/fix-mcp-network-attributes
Draft

betegon wants to merge 1 commit into
developfrom
bt/fix-mcp-network-attributes

Conversation

@betegon

@betegon betegon commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

MCP spans currently report JSON-RPC 2.0 as the network protocol version, even for stdio. Capture HTTP metadata from each request when available, and omit unknown network versions and transports instead of inferring TCP from a class name, following the OpenTelemetry MCP transport conventions.

Preserve mcp.transport as the implementation class name and capture request-local user_agent.original with both MCP SDK majors, including discovery and unsupported methods. Cloudflare request metadata supplies the actual HTTP version and distinguishes TCP from QUIC; ordinary Web Requests leave those attributes unset.

Fixes #24507

@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.24 kB - -
@sentry/browser - with treeshaking flags 27.5 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.4 kB - -
@sentry/browser (incl. Tracing) 51.15 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 51.17 kB - -
@sentry/browser (incl. Tracing, Profiling) 54.18 kB - -
@sentry/browser (incl. Tracing, Replay) 90.76 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 79.86 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 95.46 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 108.41 kB - -
@sentry/browser (incl. Feedback) 46.76 kB - -
@sentry/browser (incl. sendFeedback) 34.3 kB - -
@sentry/browser (incl. FeedbackAsync) 39.41 kB - -
@sentry/browser (incl. Metrics) 30.25 kB - -
@sentry/browser (incl. Logs) 30.51 kB - -
@sentry/browser (incl. Metrics & Logs) 31.18 kB - -
@sentry/react 31 kB - -
@sentry/react (incl. Tracing) 53.45 kB - -
@sentry/vue 36.74 kB - -
@sentry/vue (incl. Tracing) 53.7 kB - -
@sentry/svelte 29.26 kB - -
CDN Bundle 30.93 kB - -
CDN Bundle (incl. Tracing) 51.69 kB - -
CDN Bundle (incl. Logs, Metrics) 33.2 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 53.66 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 73.92 kB - -
CDN Bundle (incl. Tracing, Replay) 89.28 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 91.25 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 95.45 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 97.42 kB - -
CDN Bundle - uncompressed 91.4 kB - -
CDN Bundle (incl. Tracing) - uncompressed 153.77 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 97.97 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 159.73 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 227.54 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 273.5 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 279.44 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 287.2 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 293.13 kB - -
@sentry/nextjs (client) 55.77 kB - -
@sentry/sveltekit (client) 51.59 kB - -
@sentry/core/server 40.15 kB +0.51% +203 B 🔺
@sentry/core/browser 13.63 kB - -
@sentry/node 136.65 kB +0.02% +14 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 82.56 kB - -
@sentry/node - without tracing 90.58 kB +0.02% +15 B 🔺
@sentry/node - without channel injection 115.09 kB +0.01% +9 B 🔺
@sentry/aws-serverless 98.85 kB +0.01% +1 B 🔺
@sentry/cloudflare (withSentry) - minified 206.49 kB - -
@sentry/cloudflare (withSentry) 513.73 kB - -

View base workflow run

Co-Authored-By: GPT-6 (Codex) <codex@openai.com>
@betegon
betegon force-pushed the bt/fix-mcp-network-attributes branch from 9177afa to 64d1e58 Compare September 25, 2026 19:45

This branch has not been deployed

No deployments
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.

MCP spans report JSON-RPC as a network version and infer transports from class names

1 participant