History

Stamp client identity on MCP execution spans (#1621)

Rhys Sullivan committed 2 months ago

Commit 86c68af1 parent 6dff8916 files · +263 −4Browse files

Showing the changes to .changeset (1 of 6 files). Show all

Unified · Split

.changeset/mcp-client-span-attribution.md+8−0
@@ -0,0 +1,8 @@
1---
2"@executor-js/host-mcp": patch
3"@executor-js/cloudflare": patch
4---
5
6**MCP execution spans now carry the client identity (`mcp.client.*`)**
7
8The `clientInfo` a client self-reports at `initialize` (or in a modern request's `_meta`) previously existed only on the initialize request itself, which has no session id yet, so execution telemetry could not be segmented by client. Execute, execute-action, and resume spans (and their descendants) now carry `mcp.client.name` / `mcp.client.version` / `mcp.client.title` alongside the existing session join keys. Cloudflare session Durable Objects persist the reported identity in session meta, so attribution survives cold restores; it feeds telemetry only, never behavior.