Skip to content

MCP semantic conventions#2083

Merged
lmolkova merged 28 commits intoopen-telemetry:mainfrom
lmolkova:mcp
Jan 12, 2026
Merged

MCP semantic conventions#2083
lmolkova merged 28 commits intoopen-telemetry:mainfrom
lmolkova:mcp

Conversation

@lmolkova
Copy link
Copy Markdown
Member

@lmolkova lmolkova commented Apr 10, 2025

Comment thread docs/attributes-registry/mcp.md Outdated
Comment thread docs/gen-ai/mcp.md Outdated
Comment thread docs/gen-ai/mcp.md Outdated
Comment thread docs/gen-ai/mcp.md Outdated
Comment thread docs/gen-ai/mcp.md Outdated
Comment thread docs/gen-ai/mcp.md
Comment thread docs/gen-ai/mcp.md Outdated
Comment thread docs/attributes-registry/mcp.md Outdated
@github-actions github-actions Bot added the enhancement New feature or request label Apr 17, 2025
@lmolkova lmolkova changed the title [WIP] MCP semantic conventions MCP semantic conventions Apr 17, 2025
@lmolkova lmolkova moved this from Untriaged to Awaiting SIG approval in Semantic Conventions Triage Apr 17, 2025
@lmolkova lmolkova marked this pull request as ready for review April 17, 2025 05:19
@lmolkova lmolkova requested review from a team as code owners April 17, 2025 05:19
Comment thread docs/gen-ai/mcp.md
Comment thread model/mcp/common.yaml Outdated
Comment thread model/mcp/registry.yaml Outdated
Comment thread model/mcp/registry.yaml Outdated
Comment thread model/mcp/common.yaml Outdated
Comment thread docs/gen-ai/mcp.md
@lmolkova lmolkova requested a review from Copilot May 5, 2025 22:27

This comment was marked as outdated.

Comment thread .github/ISSUE_TEMPLATE/bug_report.yaml
Copy link
Copy Markdown

@brunobat brunobat left a comment

Choose a reason for hiding this comment

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

Thanks!
In general this seems reasonable.
Just added 2 comments.

Comment thread docs/gen-ai/mcp.md Outdated
Comment thread model/mcp/metrics.yaml
Copy link
Copy Markdown
Member

@aabmass aabmass left a comment

Choose a reason for hiding this comment

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

Thank you for driving this!

Comment thread docs/gen-ai/mcp.md Outdated
Comment thread docs/gen-ai/mcp.md Outdated
Comment thread docs/gen-ai/mcp.md Outdated
Comment thread model/mcp/metrics.yaml
Comment thread docs/gen-ai/mcp.md Outdated
Comment thread docs/gen-ai/mcp.md
lmolkova and others added 5 commits December 29, 2025 11:42
Co-authored-by: Aaron Abbott <aaronabbott@google.com>
Co-authored-by: Aaron Abbott <aaronabbott@google.com>
Co-authored-by: Aaron Abbott <aaronabbott@google.com>
@lmolkova
Copy link
Copy Markdown
Member Author

lmolkova commented Jan 5, 2026

Copy link
Copy Markdown
Contributor

@jsuereth jsuereth left a comment

Choose a reason for hiding this comment

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

Nice! I like how you've worded the context propagation component to be forward compatible.

@jsuereth jsuereth moved this from Needs More Approval to Ready to be Merged in Semantic Conventions Triage Jan 7, 2026
@github-project-automation github-project-automation Bot moved this from Ready to be Merged to Needs More Approval in Semantic Conventions Triage Jan 12, 2026
@lmolkova lmolkova added this pull request to the merge queue Jan 12, 2026
Merged via the queue into open-telemetry:main with commit c840084 Jan 12, 2026
21 checks passed
@lmolkova lmolkova deleted the mcp branch January 12, 2026 18:04
Copilot AI added a commit to modelcontextprotocol/csharp-sdk that referenced this pull request Jan 12, 2026
…en-telemetry/semantic-conventions#2083

- Change mcp.tool.name to gen_ai.tool.name
- Change mcp.prompt.name to gen_ai.prompt.name
- Change mcp.request.id to jsonrpc.request.id
- Change rpc.jsonrpc.error_code to rpc.response.status_code
- Update network.transport values from 'stdio' to 'pipe' and 'sse'/'http' to 'tcp'
- Add gen_ai.operation.name attribute (value: 'execute_tool' for tools/call)
- Update histogram bucket boundaries to match semantic conventions spec
- Update tests to verify new attribute names

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
chrisguidry added a commit to PrefectHQ/fastmcp that referenced this pull request Jan 15, 2026
Updates FastMCP's telemetry to align with the new MCP semantic conventions
from open-telemetry/semantic-conventions#2083. This gives us interoperability
with other MCP implementations while keeping fastmcp.* attributes for things
unique to our framework.

Changes:
- Span names now follow `{method} {target}` format (e.g., `tools/call greet`)
- Added `mcp.method.name` and `mcp.resource.uri` attributes
- Renamed `fastmcp.session.id` to standard `mcp.session.id`
- Kept fastmcp.* attributes for server name, component info, provider details

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vola-trebla
Copy link
Copy Markdown

Hey! We built a TypeScript implementation of these MCP semantic conventions in toad-eye — an open-source observability toolkit for MCP servers.

What we implemented based on this spec:

  • Span names: tools/call {name}, resources/read {uri}, prompts/get {name}, sampling/createMessage {model}
  • Attributes: mcp.method.name, mcp.session.id, mcp.protocol.version, network.transport
  • SpanKind.SERVER for server-side, SpanKind.CLIENT for client-side
  • W3C traceparent propagation via _meta field for distributed tracing across MCP client → server

Also added MCP-specific metrics (gen_ai.mcp.tool.calls, .errors, .duration, .resource.reads, .session.active) and a tool hallucination counter (JSON-RPC -32601 detection).

11 Grafana dashboards auto-provisioned, including 3 MCP-specific ones.

Happy to share feedback on the spec from an implementer's perspective if that's useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Semantic conventions for Model Context Protocol