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-genai and the attribute names have materially changed.
Wrong attribute names
The following SDK constants emit the wrong attribute key. Each has a verified spec equivalent.
| SDK constant |
Emits |
Should emit |
Requirement level |
Source |
MCP_TOOL_NAME_ATTRIBUTE |
mcp.tool.name |
gen_ai.tool.name |
Conditionally required (tool calls) |
common.yaml |
MCP_PROMPT_NAME_ATTRIBUTE |
mcp.prompt.name |
gen_ai.prompt.name |
Conditionally required (prompt ops) |
common.yaml |
MCP_REQUEST_ID_ATTRIBUTE |
mcp.request.id |
jsonrpc.request.id |
Conditionally required (requests) |
spans.yaml |
MCP_TRANSPORT_ATTRIBUTE |
mcp.transport |
network.transport |
Recommended |
common.yaml |
MCP_REQUEST_ARGUMENT (prefix) |
mcp.request.argument.<key> |
gen_ai.tool.call.arguments (single attr) |
Opt-in |
spans.yaml |
MCP_TOOL_RESULT_CONTENT_ATTRIBUTE |
mcp.tool.result.content |
gen_ai.tool.call.result (single attr) |
Opt-in |
spans.yaml |
MCP_TOOL_RESULT_IS_ERROR_ATTRIBUTE |
mcp.tool.result.is_error |
error.type = "tool_error" |
Conditionally required |
common.yaml |
Notes:
network.transport values SHOULD be tcp or quic for HTTP transport and pipe for stdio — not the MCP-level transport name.
gen_ai.tool.call.arguments and gen_ai.tool.call.result are single serialized attributes, not per-key prefixes.
mcp.tool.result.content_count has no spec equivalent at all.
Missing attributes
| Attribute |
Requirement level |
Source |
Notes |
gen_ai.operation.name |
Recommended |
common.yaml |
SHOULD be execute_tool on tool call spans; allows consumers to treat MCP tool spans like other GenAI tool spans |
rpc.response.status_code |
Conditionally required |
common.yaml |
When response contains a JSON-RPC error code |
jsonrpc.protocol.version |
Recommended |
common.yaml |
When not 2.0 |
Custom attributes with no spec equivalent
These 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:
mcp.client.name, mcp.client.title, mcp.client.version
mcp.server.name, mcp.server.title, mcp.server.version
mcp.logging.level, mcp.logging.logger, mcp.logging.data_type, mcp.logging.message
mcp.prompt.result.description, mcp.prompt.result.message_count, mcp.prompt.result.message_role, mcp.prompt.result.message_content
The 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.
Spec references
The MCP server integration's
attributes.tsis pinned to an old draft of the OTel MCP spec (commit3097fb0in the now-deprecatedopen-telemetry/semantic-conventionsrepo). The spec has since moved toopen-telemetry/semantic-conventions-genaiand the attribute names have materially changed.Wrong attribute names
The following SDK constants emit the wrong attribute key. Each has a verified spec equivalent.
MCP_TOOL_NAME_ATTRIBUTEmcp.tool.namegen_ai.tool.nameMCP_PROMPT_NAME_ATTRIBUTEmcp.prompt.namegen_ai.prompt.nameMCP_REQUEST_ID_ATTRIBUTEmcp.request.idjsonrpc.request.idMCP_TRANSPORT_ATTRIBUTEmcp.transportnetwork.transportMCP_REQUEST_ARGUMENT(prefix)mcp.request.argument.<key>gen_ai.tool.call.arguments(single attr)MCP_TOOL_RESULT_CONTENT_ATTRIBUTEmcp.tool.result.contentgen_ai.tool.call.result(single attr)MCP_TOOL_RESULT_IS_ERROR_ATTRIBUTEmcp.tool.result.is_errorerror.type = "tool_error"Notes:
network.transportvalues SHOULD betcporquicfor HTTP transport andpipefor stdio — not the MCP-level transport name.gen_ai.tool.call.argumentsandgen_ai.tool.call.resultare single serialized attributes, not per-key prefixes.mcp.tool.result.content_counthas no spec equivalent at all.Missing attributes
gen_ai.operation.nameexecute_toolon tool call spans; allows consumers to treat MCP tool spans like other GenAI tool spansrpc.response.status_codejsonrpc.protocol.version2.0Custom attributes with no spec equivalent
These 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:
mcp.client.name,mcp.client.title,mcp.client.versionmcp.server.name,mcp.server.title,mcp.server.versionmcp.logging.level,mcp.logging.logger,mcp.logging.data_type,mcp.logging.messagemcp.prompt.result.description,mcp.prompt.result.message_count,mcp.prompt.result.message_role,mcp.prompt.result.message_contentThe
mcp.*namespace in the spec covers only:mcp.method.name,mcp.session.id,mcp.resource.uri,mcp.protocol.version. Anything else undermcp.*risks colliding with future spec attributes.Spec references
gen_ai.tool.name,gen_ai.prompt.name,gen_ai.operation.namegen_ai.tool.call.arguments,gen_ai.tool.call.resultmcp.*attribute registry (only 4 attributes)