Skip to content

ref(core): use shared MCP attribute conventions - #25059

Open
betegon wants to merge 3 commits into
developfrom
bt/mcp-conventions-imports
Open

betegon wants to merge 3 commits into
developfrom
bt/mcp-conventions-imports

Conversation

@betegon

@betegon betegon commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Use @sentry/conventions/attributes for registered MCP keys, including all singleton and indexed result fields. The branch now uses published conventions 0.27.0 from develop, so both local result prefixes can be removed.

Before, the SDK constructed mcp.tool.result.0.content from a local prefix. After, MCP_TOOL_RESULT_KEY_CONTENT.replace('<key>', '0') produces that same key. Singleton keys, values, original array indexes, and input/output capture behavior remain unchanged. Deprecated tool-result fields stay emitted for compatibility; this change adds no aliases or backfill.

This is the mechanical base for network metadata (#24506), OAuth attribution (#24508), and canonical OpenTelemetry attributes (#25060). The latter separately adds complete serialized results in gen_ai.tool.call.result.

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.83 kB - -
@sentry/browser - with treeshaking flags 27.96 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.87 kB - -
@sentry/browser (incl. Tracing) 52.02 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 52.02 kB - -
@sentry/browser (incl. Tracing, Profiling) 54.96 kB - -
@sentry/browser (incl. Tracing, Replay) 91.75 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 80.62 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 96.47 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 109.43 kB - -
@sentry/browser (incl. Feedback) 47.35 kB - -
@sentry/browser (incl. sendFeedback) 34.89 kB - -
@sentry/browser (incl. FeedbackAsync) 40 kB - -
@sentry/browser (incl. Metrics) 30.85 kB - -
@sentry/browser (incl. Logs) 31.13 kB - -
@sentry/browser (incl. Metrics & Logs) 31.78 kB - -
@sentry/react 31.64 kB - -
@sentry/react (incl. Tracing) 54.34 kB - -
@sentry/vue 37.98 kB - -
@sentry/vue (incl. Tracing) 54.95 kB - -
@sentry/svelte 29.86 kB - -
@sentry/remix (Remix 3 client bundle) 57.02 kB - -
CDN Bundle 31.56 kB - -
CDN Bundle (incl. Tracing) 52.52 kB - -
CDN Bundle (incl. Logs, Metrics) 33.77 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 54.46 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 74.7 kB - -
CDN Bundle (incl. Tracing, Replay) 90.19 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 92.11 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 96.34 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 98.28 kB - -
CDN Bundle - uncompressed 92.98 kB - -
CDN Bundle (incl. Tracing) - uncompressed 155.83 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 99.52 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 161.79 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 229.56 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 276 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 281.94 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 289.7 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 295.63 kB - -
@sentry/nextjs (client) 56.75 kB - -
@sentry/sveltekit (client) 52.41 kB - -
@sentry/core/server 41.12 kB +0.32% +131 B 🔺
@sentry/core/browser 13.81 kB - -
@sentry/node 151.98 kB +0.02% +24 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.78 kB - -
@sentry/node - without tracing 94.54 kB +0.01% +4 B 🔺
@sentry/node - without channel injection 130.18 kB +0.04% +46 B 🔺
@sentry/aws-serverless 102.69 kB +0.01% +8 B 🔺
@sentry/cloudflare (withSentry) - minified 210.38 kB - -
@sentry/cloudflare (withSentry) 521.61 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 228.06 kB - -

View base workflow run

@betegon
betegon marked this pull request as ready for review October 8, 2026 10:49
@betegon
betegon force-pushed the bt/mcp-conventions-imports branch from e6adecb to 6459be3 Compare October 8, 2026 10:49
@betegon
betegon requested review from JPeer264 and Lms24 October 8, 2026 11:04

@JPeer264 JPeer264 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks for splitting this into its own PR. Btw is there a follow up planned for the ones which are not used by the conventions, such as MCP_TOOL_RESULT_PREFIX?

betegon commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

i thought we couldn't do anything with prefixes / indexes. great call out, here it is: getsentry/sentry-conventions#689

@betegon
betegon force-pushed the bt/mcp-conventions-imports branch from 901e5c8 to a6f65bf Compare October 13, 2026 08:51

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.

2 participants