Adopt OpenTelemetry MCP semantic conventions#2886
Conversation
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>
WalkthroughThis pull request standardizes telemetry span naming across the MCP implementation to follow MCP semantic conventions. Span names are updated from "tool", "resource", and "prompt" to "tools/call", "resources/read", and "prompts/get" respectively in client, server, and proxy implementations. A new optional Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (6)
🧰 Additional context used📓 Path-based instructions (2)**/*.py📄 CodeRabbit inference engine (AGENTS.md)
Files:
docs/**/*.mdx📄 CodeRabbit inference engine (docs/.cursor/rules/mintlify.mdc)
Files:
🧠 Learnings (4)📓 Common learnings📚 Learning: 2026-01-12T16:24:55.006ZApplied to files:
📚 Learning: 2026-01-12T16:24:55.006ZApplied to files:
📚 Learning: 2026-01-12T16:24:55.006ZApplied to files:
🧬 Code graph analysis (3)src/fastmcp/client/telemetry.py (1)
src/fastmcp/client/client.py (3)
src/fastmcp/server/telemetry.py (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
🔇 Additional comments (15)
✏️ Tip: You can disable this entire section by setting Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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:
{method} {target}format (e.g.,tools/call greet,resources/read config://app)mcp.method.nameandmcp.resource.uristandard attributesfastmcp.session.idto standardmcp.session.idfastmcp.*attributes for server name, component info, and provider details🤖 Generated with Claude Code