Skip to content

feat(attributes): align MCP conventions and OAuth client identity - #671

Merged
betegon merged 4 commits into
mainfrom
feat/mcp-oauth-client-name
Oct 7, 2026
Merged

betegon merged 4 commits into
mainfrom
feat/mcp-oauth-client-name

Conversation

@betegon

@betegon betegon commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Description

Consolidate the MCP attribute contract before SDKs adopt canonical OpenTelemetry keys. Add gen_ai.prompt.variable.<key> and the Sentry-specific mcp.auth.client.name, and correct metadata that currently treats a transport implementation name or resource URI scheme as a network attribute.

Provenance is based on OpenTelemetry MCP conventions at e07f4eb and its MCP registry. These conventions are in Development; the repository imports core semantic conventions v1.44.0.

Provenance Attributes and treatment
OTel MCP registry mcp.method.name, mcp.protocol.version, mcp.session.id, and mcp.resource.uri. Keep their OTel flags; clarify that operations need not belong to a session.
Other OTel attributes used by MCP JSON-RPC IDs, network metadata, client address/port, GenAI tool/prompt names and tool arguments/results already exist. Add only the missing prompt-variable template, with automatic scrubbing and opt-in capture documented.
Sentry extensions MCP implementation identity, registered OAuth client name, transport implementation name, resource URI scheme, progress metadata, and legacy readiness. Preserve is_in_otel: false.
Span naming vs operations Keep OTel-compatible name templates marked as such, while explicitly identifying mcp.server and directional notification operations as Sentry categorizations.

mcp.transport preserves custom class names and is not an alias of network.transport. mcp.resource.protocol identifies the resource URI scheme, independently of the server's network protocol. Remove both incorrect deprecations and their aliases in both directions while keeping valid network aliases. Progress current/total accept fractional values, as required by the MCP progress specification. Request IDs correlate requests and responses without requiring session-scoped uniqueness; readiness remains specific to the legacy handshake.

OAuth client_name comes from client registration metadata, not MCP clientInfo. It remains distinct from mcp.client.name and is omitted when unavailable.

Generated JavaScript/Python exports and search metadata are included. This PR must be published before canonical SDK attribute adoption #25060 and OAuth capture #24508 can merge. The mechanical SDK imports #25059 use existing published constants and can proceed independently.

PR Checklist

  • I have run yarn test and verified that the tests pass.
  • I have run yarn generate to generate and format code and docs.
  • New attributes are namespaced and have explicit scrubbing policies.
  • Existing changelog history is preserved; this PR adds no deprecations.

Co-Authored-By: GPT-6 (Codex) <codex@openai.com>
@betegon betegon self-assigned this Oct 5, 2026
@vercel

vercel Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sentry-conventions Ready Ready Preview Oct 7, 2026 5:53pm UTC

Request Review

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Attributes

  • Align MCP conventions and OAuth client identity by betegon in #671
  • Add AWS service instrumentation attributes by pabloDeputter in #672
  • Add gen_ai memory conventions by ArthurKnaus in #653

Other

  • (model) Add metric model by giortzisg in #649
  • Add enum_values entries to shorten attribute briefs by alexander-alderman-webb in #685

Bug Fixes 🐛

Attributes

  • Add search_alias to sentry.link.type attribute by Lms24 in #687
  • Remove any as valid attribute type by Lms24 in #677

Internal Changes 🔧

Deps

  • Bump sharp from 0.35.4 to 0.35.5 by dependabot in #683
  • Bump source-map-js from 1.2.1 to 1.2.2 by dependabot in #675
  • Bump smol-toml from 1.8.0 to 1.9.0 by dependabot in #674
  • Bump postcss-selector-parser from 7.1.4 to 7.1.6 by dependabot in #676

Other

  • (deps-dev) Bump oxfmt to 0.72.0 to pull in patched tinypool by Lms24 in #682
  • (docs) Add link preview meta tags by Lms24 in #667
  • (publish) Stop npm version from rewriting yarn.lock by Lms24 in #678
  • Deprecate mcp.tool.result.content_count by alexander-alderman-webb in #669

🤖 This preview updates automatically when you update the PR.

Co-Authored-By: GPT-6 (Codex) <codex@openai.com>
@betegon betegon changed the title feat(attributes): add MCP OAuth client name feat(attributes): align MCP conventions and OAuth client identity Oct 5, 2026
Co-Authored-By: GPT-6 (Codex) <codex@openai.com>
Comment thread model/attributes/mcp/mcp__transport.json
@betegon
betegon merged commit 664f7b4 into main Oct 7, 2026
18 checks passed
@betegon
betegon deleted the feat/mcp-oauth-client-name branch October 7, 2026 17:56

This branch was successfully deployed

1 active deployment
Preview — 7d49f00a Deployed Oct 7, 2026 by vercel[bot]
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.

3 participants