Skip to content

Add richer OTel MCP span attributes

4564376
Select commit
Loading
Failed to load commit list.
Open

Add richer OTel MCP span attributes #2387

Add richer OTel MCP span attributes
4564376
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Apr 2, 2026 in 8m 45s

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 src/mcp/server/lowlevel/server.py:76 Duplicate MCP_SESSION_ID_HEADER constant

Annotations

Check warning on line 76 in src/mcp/server/lowlevel/server.py

See this annotation in the file changed.

@claude claude / Claude Code Review

Duplicate MCP_SESSION_ID_HEADER constant

This PR introduces a duplicate definition of `MCP_SESSION_ID_HEADER = "mcp-session-id"` at `src/mcp/server/lowlevel/server.py:76`, when the identical constant already exists in `src/mcp/server/streamable_http.py:51`. Since `server.py` already imports `EventStore` from `mcp.server.streamable_http`, adding `MCP_SESSION_ID_HEADER` to that import would be a one-line fix that eliminates a maintenance hazard.