Add richer OTel MCP span attributes #2387
Open
Claude / Claude Code Review
completed
Apr 3, 2026 in 14m 5s
Code review found 1 potential issue
Found 5 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | tests/shared/test_otel.py:53-80 |
mcp.session.id span attribute is untested; promised test does not exist |
Annotations
Check warning on line 80 in tests/shared/test_otel.py
claude / Claude Code Review
mcp.session.id span attribute is untested; promised test does not exist
The PR description instructs running pytest with a filter for resource_read_spans_include_session_id, but no such test exists anywhere in the test suite. As a result, the mcp.session.id span attribute added in _handle_request has zero test coverage: all new tests use the in-process Client(server) transport where message.message_metadata carries no HTTP request context, so session_id is always None and the attribute-setting branch is never exercised. A regression in the header extraction logic wo
Loading