Review polish: changelog entry, comment dedupe, semconv note, 404 route test

- Add the missing changelog bullet for the HTTP request span - the most
  user-visible signal in the stack had no entry.
- State the deliberate deviation on server.address: it is the verbatim
  Host header including any :port, not the semconv address/port split.
- Deduplicate the is_recording()-vs-is_valid rationale: the middleware
  fast path keeps the full telling, request_span() now points at it.
- Trim the http.route regex rationale in the docs intro to a pointer at
  the attribute description, halve the httpx raw_path digression, drop
  a comment that restated the call below it, and leave client-IP policy
  to the privacy section instead of the user_agent description.
- Assert the routed 404 still carries http.route and an enriched span
  name - route enrichment must not be gated on a successful response.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012U7coQfVu8nK2R4q2mCULA
This commit is contained in:
Alex Garcia 2026-09-02 11:27:06 -07:00
commit 347cac7a04
5 changed files with 18 additions and 21 deletions

View file

@ -354,6 +354,9 @@ async def test_a_404_is_not_an_error(ds, otel_spans):
assert server[0].attributes["http.response.status_code"] == 404
assert "error.type" not in server[0].attributes
assert server[0].status.status_code is StatusCode.UNSET
# Route enrichment must not be gated on a successful response.
assert "http.route" in server[0].attributes
assert server[0].name != "GET"
@pytest.mark.asyncio