DRAFT: Rename telemetry span attributes to OTEL MCP semantic conventions - #3734
Closed
ChrisJBurns wants to merge 1 commit into
Closed
ChrisJBurns wants to merge 1 commit into
ChrisJBurns wants to merge 1 commit into
Conversation
This was referenced Feb 9, 2026
ChrisJBurns
requested review from
amirejaz,
eleftherias,
jhrozek,
lujunsan and
rdimitrov
as code owners
February 10, 2026 14:17
Rename existing span attributes to align with the OpenTelemetry HTTP and MCP semantic conventions, with dual emission of both old and new names controlled by the UseLegacyAttributes flag (defaults to true). Attribute renames: - HTTP: http.method → http.request.method, http.url → url.full, etc. - MCP: mcp.method → mcp.method.name, mcp.request.id → jsonrpc.request.id - Tools: mcp.tool.name → gen_ai.tool.name, mcp.prompt.name → gen_ai.prompt.name - Transport: mcp.transport → network.transport - Response: http.status_code → http.response.status_code When UseLegacyAttributes is true (the default), both old and new attribute names are emitted for backward compatibility with existing dashboards. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ChrisJBurns
force-pushed
the
otel/pr2a-attribute-rename
branch
from
February 10, 2026 14:25
329ed9e to
2aa273b
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3734 +/- ##
==========================================
+ Coverage 66.31% 66.40% +0.09%
==========================================
Files 427 427
Lines 41800 41860 +60
==========================================
+ Hits 27718 27796 +78
+ Misses 11971 11953 -18
Partials 2111 2111 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Collaborator
Author
|
Superseded by #3747 and #3748 — split into two smaller, more reviewable PRs:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
UseLegacyAttributes=true(the default)mapTransporthelper to convert MCP transport types to OTELnetwork.transportvaluesmcp.tools/call→tools/call github_search(method + resource target)Key attribute renames:
http.methodhttp.request.methodmcp.methodmcp.method.namemcp.request.idjsonrpc.request.idmcp.tool.namegen_ai.tool.namemcp.transportnetwork.transportSee
docs/telemetry-migration.mdfor the full mapping and migration guide.Stacked on #3729 (adds the
UseLegacyAttributesflag).Test plan
mapTransporthelperUseLegacyAttributes=trueverifies both old and new names presentUseLegacyAttributes=falseverifies only new names presenttask lintpassestask testpasses🤖 Generated with Claude Code