Skip to content

Match derived OpenTelemetry exclusions against ASGI route paths - #416

Merged
lesnik512 merged 1 commit into
mainfrom
fix/392-otel-exclusions
Nov 3, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
fix/392-otel-exclusions

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Closes #392.

FastAPI and FastMCP match derived OpenTelemetry exclusions against the ASGI route path, accounting for root_path. Configured and environment URL regexes retain their existing behavior.

Both FastAPI regressions failed before the fix and now pass. A slash in Host no longer hides a work request from tracing, and health checks under /api stay excluded. Raw HTTP probes confirmed that Uvicorn 0.54.0 with h11 and httptools, and Hypercorn 0.18.0, pass the slash-containing Host header through.

Local verification passed with 620 tests, 100% coverage, lint, and type checking.

@lesnik512
lesnik512 merged commit da26f87 into main Nov 3, 2026
35 checks passed
@lesnik512
lesnik512 deleted the fix/392-otel-exclusions branch November 3, 2026 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stop OpenTelemetry exclusions from matching the Host header and missing root_path

1 participant