feat(core): Emit low cardinality mcp.server span names - #23569
Conversation
size-limit report 📦
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e5e58e4. Configure here.
b2153ff to
e847530
Compare
e847530 to
9ab0be3
Compare
With span streaming enabled, resource methods are named after the method alone, so the client-supplied resource URI stays out of the span name. Tool and prompt names are unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013bjBXkGkJo8eL8hkz48byi
9ab0be3 to
42074e9
Compare
Lms24
left a comment
There was a problem hiding this comment.
LGTM! Since we briefly talked yesterday that this "breaks" the MCP dashboard, I stand corrected: The dashboard I had in mind groups by span description which still has a rule ton infer the URI based on the mcp.resource.uri which we send. So, name changes are not affecting this.
And even if we'd not be consistent with the description, it's probably not the end of the world. So good to merge from my PoV!
| "@langchain/core": "^0.3.80", | ||
| "@langchain/openai": "^0.5.0", | ||
| "@langchain/langgraph": "^0.2.32", | ||
| "@modelcontextprotocol/client": "2.0.0", |
There was a problem hiding this comment.
This matches our other mcp apps, I just followed suite tbh. We could loosen it.
There was a problem hiding this comment.
Makes sense. Loosening it wouldn't be a bad idea though.- not a PR blocker
There was a problem hiding this comment.
Will do in a follow-up.
## What The MCP v2 test dependencies (`@modelcontextprotocol/client`, `@modelcontextprotocol/node`, `@modelcontextprotocol/server`) now use `^2.0.0` instead of an exact `2.0.0`, across the node integration tests and the `node-express-mcp-v2` and `cloudflare-mcp` e2e apps. `cloudflare-mcp-agent` keeps its exact `@modelcontextprotocol/sdk` pin, because `agents` depends on that specific version. ## Why The exact pins were copied from app to app rather than chosen, and nothing here needs a frozen version. Follow-up to #23569. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>

What
With span streaming enabled,
mcp.serverspans for resource methods are named after the method alone (resources/read), instead of appending the resource URI. Tool and prompt names are unchanged, since those come from a bounded registry.Why
Span names must be low cardinality when span streaming is enabled, and a resource URI is supplied by the client. The URI remains available on the
mcp.resource.uriattribute.Closes: #23529