Skip to content

Exclude infrastructure endpoints from Prometheus HTTP metrics - #424

Merged
lesnik512 merged 1 commit into
mainfrom
fix/399-prometheus-exclusions
Nov 3, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
fix/399-prometheus-exclusions

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Closes #399.

Exclude health checks and metrics scrapes from HTTP metrics on FastAPI, FastMCP, and Litestar. Preserve user-defined exclusions and verify that normal routes still increment request counters.

Breaking changes

Health checks and metrics scrapes no longer count in Prometheus HTTP metrics. The 2.x migration guide describes the impact on dashboards and alerts.

Verification

  • Regression tests reproduced unwanted request metrics on all three frameworks before the fix.
  • just lint-ci, just test-ci (636 tests, 100% coverage), and just docs-build passed.

@lesnik512
lesnik512 merged commit 671f490 into main Nov 3, 2026
35 checks passed
@lesnik512
lesnik512 deleted the fix/399-prometheus-exclusions branch November 3, 2026 17:34
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.

Exclude health and metrics requests from Prometheus HTTP metrics on every framework

1 participant