Skip to content

feat(core): Emit low cardinality mcp.server span names - #23569

Draft
andreiborza wants to merge 3 commits into
developfrom
ab/mcp-server-low-cardinality-span-names
Draft

feat(core): Emit low cardinality mcp.server span names#23569
andreiborza wants to merge 3 commits into
developfrom
ab/mcp-server-low-cardinality-span-names

Conversation

@andreiborza

@andreiborza andreiborza commented Aug 25, 2026

Copy link
Copy Markdown
Member

What

With span streaming enabled, mcp.server spans for resource methods are named after the method alone (resources/read), instead of appending the resource URI. Tool and prompt names are unchanged, since those come from a bounded registry.

Why

Span names must be low cardinality when span streaming is enabled, and a resource URI is supplied by the client. The URI remains available on the mcp.resource.uri attribute.

Closes: #23529

@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 28.57 kB - -
@sentry/browser - with treeshaking flags 26.92 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 26.82 kB - -
@sentry/browser (incl. Tracing) 48.5 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.52 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.43 kB - -
@sentry/browser (incl. Tracing, Replay) 87.89 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.35 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 92.59 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 105.3 kB - -
@sentry/browser (incl. Feedback) 45.81 kB - -
@sentry/browser (incl. sendFeedback) 33.36 kB - -
@sentry/browser (incl. FeedbackAsync) 38.47 kB - -
@sentry/browser (incl. Metrics) 29.52 kB - -
@sentry/browser (incl. Logs) 29.8 kB - -
@sentry/browser (incl. Metrics & Logs) 30.45 kB - -
@sentry/react 30.33 kB - -
@sentry/react (incl. Tracing) 50.71 kB - -
@sentry/vue 35.64 kB - -
@sentry/vue (incl. Tracing) 50.73 kB - -
@sentry/svelte 28.6 kB - -
CDN Bundle 30.32 kB - -
CDN Bundle (incl. Tracing) 49.02 kB - -
CDN Bundle (incl. Logs, Metrics) 32.54 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 50.89 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 72.91 kB - -
CDN Bundle (incl. Tracing, Replay) 86.47 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 88.33 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 92.22 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 94.17 kB - -
CDN Bundle - uncompressed 89.94 kB - -
CDN Bundle (incl. Tracing) - uncompressed 146.64 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 96.23 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 152.33 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 225.18 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 265.92 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 271.6 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.62 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 285.28 kB - -
@sentry/nextjs (client) 53.23 kB - -
@sentry/sveltekit (client) 48.92 kB - -
@sentry/core/server 65.19 kB +0.13% +79 B 🔺
@sentry/core/browser 52.27 kB - -
@sentry/node 121.58 kB +0.02% +16 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 85.18 kB - -
@sentry/node - without tracing 87.46 kB +0.03% +23 B 🔺
@sentry/aws-serverless 95.86 kB +0.03% +25 B 🔺
@sentry/cloudflare (withSentry) - minified 196.9 kB - -
@sentry/cloudflare (withSentry) 487.47 kB - -

View base workflow run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e5e58e4. Configure here.

andreiborza and others added 3 commits August 25, 2026 15:31
With span streaming enabled, resource methods are named after the method
alone, so the client-supplied resource URI stays out of the span name.
Tool and prompt names are unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013bjBXkGkJo8eL8hkz48byi
@andreiborza
andreiborza force-pushed the ab/mcp-server-low-cardinality-span-names branch from e5e58e4 to b2153ff Compare August 25, 2026 13:32
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.

Emit low cardinality mcp server span names

1 participant