Commit fea22f7
refactor(mcp): match Python MCP client instrumentation exactly
Reverted enhancements to match the Python MCP client implementation
precisely. The Python client instrumentation does NOT set:
- TRACELOOP_WORKFLOW_NAME on any spans
- TRACELOOP_SPAN_KIND on generic method spans (only on tool calls)
- TRACELOOP_ENTITY_NAME on generic method spans (only on tool calls)
Changes:
1. Session span:
- Use "session" string literal instead of enum
- Remove TRACELOOP_WORKFLOW_NAME
2. Tool call spans:
- Use "tool" string literal instead of enum
- Keep TRACELOOP_ENTITY_NAME (tool name)
- Remove TRACELOOP_WORKFLOW_NAME
3. Generic method spans (tools/list, resources/read, etc):
- Remove TRACELOOP_SPAN_KIND
- Remove TRACELOOP_ENTITY_NAME
- Keep TRACELOOP_ENTITY_INPUT/OUTPUT
All 6 tests passing ✓
Sample app verified ✓
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 9b9ea4b commit fea22f7
File tree
2 files changed
+10
-51
lines changed- packages/instrumentation-mcp
- src
- test
2 files changed
+10
-51
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
| |||
247 | 246 | | |
248 | 247 | | |
249 | 248 | | |
250 | | - | |
| 249 | + | |
251 | 250 | | |
252 | 251 | | |
253 | 252 | | |
254 | 253 | | |
255 | 254 | | |
256 | 255 | | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | 256 | | |
268 | 257 | | |
269 | 258 | | |
| |||
332 | 321 | | |
333 | 322 | | |
334 | 323 | | |
335 | | - | |
| 324 | + | |
336 | 325 | | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | 326 | | |
341 | 327 | | |
342 | 328 | | |
343 | | - | |
344 | | - | |
345 | 329 | | |
346 | 330 | | |
347 | | - | |
348 | | - | |
349 | 331 | | |
350 | 332 | | |
351 | 333 | | |
| |||
360 | 342 | | |
361 | 343 | | |
362 | 344 | | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
378 | 350 | | |
379 | 351 | | |
380 | 352 | | |
| |||
Lines changed: 3 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | 257 | | |
262 | 258 | | |
263 | 259 | | |
| |||
331 | 327 | | |
332 | 328 | | |
333 | 329 | | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
| 330 | + | |
339 | 331 | | |
340 | 332 | | |
341 | 333 | | |
342 | 334 | | |
343 | 335 | | |
344 | 336 | | |
345 | 337 | | |
346 | | - | |
| 338 | + | |
347 | 339 | | |
348 | 340 | | |
349 | 341 | | |
350 | 342 | | |
351 | 343 | | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | 344 | | |
358 | 345 | | |
359 | 346 | | |
| |||
0 commit comments