Title: mcp-server integration: align attribute names to current OTel GenAI/MCP semconv · Issue #21482 · getsentry/sentry-javascript · GitHub
Open Graph Title: mcp-server integration: align attribute names to current OTel GenAI/MCP semconv · Issue #21482 · getsentry/sentry-javascript
X Title: mcp-server integration: align attribute names to current OTel GenAI/MCP semconv · Issue #21482 · getsentry/sentry-javascript
Description: The MCP server integration's attributes.ts is pinned to an old draft of the OTel MCP spec (commit 3097fb0 in the now-deprecated open-telemetry/semantic-conventions repo). The spec has since moved to open-telemetry/semantic-conventions-ge...
Open Graph Description: The MCP server integration's attributes.ts is pinned to an old draft of the OTel MCP spec (commit 3097fb0 in the now-deprecated open-telemetry/semantic-conventions repo). The spec has since moved t...
X Description: The MCP server integration's attributes.ts is pinned to an old draft of the OTel MCP spec (commit 3097fb0 in the now-deprecated open-telemetry/semantic-conventions repo). The spec has since mov...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/21482
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mcp-server integration: align attribute names to current OTel GenAI/MCP semconv","articleBody":"The MCP server integration's `attributes.ts` is pinned to an old draft of the OTel MCP spec ([commit `3097fb0`](https://github.com/open-telemetry/semantic-conventions/blob/3097fb0af5b9492b0e3f55dc5f6c21a3dc2be8df/docs/gen-ai/mcp.md) in the now-deprecated `open-telemetry/semantic-conventions` repo). The spec has since moved to [`open-telemetry/semantic-conventions-genai`](https://github.com/open-telemetry/semantic-conventions-genai) and the attribute names have materially changed.\n\n## Wrong attribute names\n\nThe following SDK constants emit the wrong attribute key. Each has a verified spec equivalent.\n\n| SDK constant | Emits | Should emit | Requirement level | Source |\n|---|---|---|---|---|\n| `MCP_TOOL_NAME_ATTRIBUTE` | `mcp.tool.name` | `gen_ai.tool.name` | Conditionally required (tool calls) | [common.yaml](https://github.com/open-telemetry/semantic-conventions-genai/blob/main/model/mcp/common.yaml) |\n| `MCP_PROMPT_NAME_ATTRIBUTE` | `mcp.prompt.name` | `gen_ai.prompt.name` | Conditionally required (prompt ops) | [common.yaml](https://github.com/open-telemetry/semantic-conventions-genai/blob/main/model/mcp/common.yaml) |\n| `MCP_REQUEST_ID_ATTRIBUTE` | `mcp.request.id` | `jsonrpc.request.id` | Conditionally required (requests) | [spans.yaml](https://github.com/open-telemetry/semantic-conventions-genai/blob/main/model/mcp/spans.yaml) |\n| `MCP_TRANSPORT_ATTRIBUTE` | `mcp.transport` | `network.transport` | Recommended | [common.yaml](https://github.com/open-telemetry/semantic-conventions-genai/blob/main/model/mcp/common.yaml) |\n| `MCP_REQUEST_ARGUMENT` (prefix) | `mcp.request.argument.\u003ckey>` | `gen_ai.tool.call.arguments` (single attr) | Opt-in | [spans.yaml](https://github.com/open-telemetry/semantic-conventions-genai/blob/main/model/mcp/spans.yaml) |\n| `MCP_TOOL_RESULT_CONTENT_ATTRIBUTE` | `mcp.tool.result.content` | `gen_ai.tool.call.result` (single attr) | Opt-in | [spans.yaml](https://github.com/open-telemetry/semantic-conventions-genai/blob/main/model/mcp/spans.yaml) |\n| `MCP_TOOL_RESULT_IS_ERROR_ATTRIBUTE` | `mcp.tool.result.is_error` | `error.type = \"tool_error\"` | Conditionally required | [common.yaml](https://github.com/open-telemetry/semantic-conventions-genai/blob/main/model/mcp/common.yaml) |\n\nNotes:\n- `network.transport` values SHOULD be `tcp` or `quic` for HTTP transport and `pipe` for stdio — not the MCP-level transport name.\n- `gen_ai.tool.call.arguments` and `gen_ai.tool.call.result` are single serialized attributes, not per-key prefixes.\n- `mcp.tool.result.content_count` has no spec equivalent at all.\n\n## Missing attributes\n\n| Attribute | Requirement level | Source | Notes |\n|---|---|---|---|\n| `gen_ai.operation.name` | Recommended | [common.yaml](https://github.com/open-telemetry/semantic-conventions-genai/blob/main/model/mcp/common.yaml) | SHOULD be `execute_tool` on tool call spans; allows consumers to treat MCP tool spans like other GenAI tool spans |\n| `rpc.response.status_code` | Conditionally required | [common.yaml](https://github.com/open-telemetry/semantic-conventions-genai/blob/main/model/mcp/common.yaml) | When response contains a JSON-RPC error code |\n| `jsonrpc.protocol.version` | Recommended | [common.yaml](https://github.com/open-telemetry/semantic-conventions-genai/blob/main/model/mcp/common.yaml) | When not `2.0` |\n\n## Custom attributes with no spec equivalent\n\nThese are Sentry-invented attributes that don't appear in the OTel spec. They may be worth keeping as explicit Sentry extensions, but should be documented as such and should not use namespaces that conflict with or extend spec-owned ones:\n\n- `mcp.client.name`, `mcp.client.title`, `mcp.client.version`\n- `mcp.server.name`, `mcp.server.title`, `mcp.server.version`\n- `mcp.logging.level`, `mcp.logging.logger`, `mcp.logging.data_type`, `mcp.logging.message`\n- `mcp.prompt.result.description`, `mcp.prompt.result.message_count`, `mcp.prompt.result.message_role`, `mcp.prompt.result.message_content`\n\nThe `mcp.*` namespace in the spec covers only: `mcp.method.name`, `mcp.session.id`, `mcp.resource.uri`, `mcp.protocol.version`. Anything else under `mcp.*` risks colliding with future spec attributes.\n\n## Spec references\n\n- [open-telemetry/semantic-conventions-genai — model/mcp/](https://github.com/open-telemetry/semantic-conventions-genai/tree/main/model/mcp) (current authoritative source)\n- [common.yaml](https://github.com/open-telemetry/semantic-conventions-genai/blob/main/model/mcp/common.yaml) — shared attributes including `gen_ai.tool.name`, `gen_ai.prompt.name`, `gen_ai.operation.name`\n- [spans.yaml](https://github.com/open-telemetry/semantic-conventions-genai/blob/main/model/mcp/spans.yaml) — span definitions with `gen_ai.tool.call.arguments`, `gen_ai.tool.call.result`\n- [registry.yaml](https://github.com/open-telemetry/semantic-conventions-genai/blob/main/model/mcp/registry.yaml) — full `mcp.*` attribute registry (only 4 attributes)","author":{"url":"https://github.com/dcramer","@type":"Person","name":"dcramer"},"datePublished":"2026-06-11T23:03:06Z","url":"https://github.com/getsentry/sentry-javascript/issues/21482"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b0134150-fc41-2c80-f9e7-1278f2bc9d1b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D6E2:212AFB:B26ED6:F50785:6B045545 |
| html-safe-nonce | f122e23367e517efbf571e6eccddb75c11ce171e4a9048c65610c3640c27f92b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENkUyOjIxMkFGQjpCMjZFRDY6RjUwNzg1OjZCMDQ1NTQ1IiwidmlzaXRvcl9pZCI6IjM4MjU2NzM5NzU3MzU0NzMzMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6b071bef6a2c6b8e16f244fa7cdba77844ce3ecdb734839035c62096d28d6b75 |
| hovercard-subject-tag | issue:4644821105 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/21482/issue_layout |
| twitter:image | https://opengraph.githubassets.com/943c647a6136ca0a551a727e04975b95b002e3dca0bfe13d6e131b7dc61a6b01/getsentry/sentry-javascript/issues/21482 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/943c647a6136ca0a551a727e04975b95b002e3dca0bfe13d6e131b7dc61a6b01/getsentry/sentry-javascript/issues/21482 |
| og:image:alt | The MCP server integration's attributes.ts is pinned to an old draft of the OTel MCP spec (commit 3097fb0 in the now-deprecated open-telemetry/semantic-conventions repo). The spec has since moved t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dcramer |
| hostname | github.com |
| expected-hostname | github.com |
| None | 910ca0e260cfec6aff11407d8dc6a0d3a4cd381a2ec9ada56627b063426892a0 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e086f9b7e88322eb2b41885a6ad425b215737fa5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width