Skip to content

Conversation

@alphabetc1
Copy link
Contributor

@alphabetc1 alphabetc1 commented Dec 20, 2025

Motivation

Uvicorn access logs can get flooded by high-frequency polling endpoints (especially /metrics which is printed every 5 seconds, leads to an overload of logs), making operational logs noisy and harder to use for debugging.

Similar work is also being worked on in vLLM, see #29023.

Modifications

Adds configurable path-based filtering for Uvicorn access logs to suppress noisy endpoints.
Introduces/uses ServerArgs knobs:

  • --uvicorn-access-log-exclude-prefixes ...: a list of path prefixes to exclude from access logs (space-separated).
  • --disable-uvicorn-access-log-filter: disables the feature entirely and restores the original behavior.

(By default, --uvicorn-access-log-exclude-prefixes is set to /metrics)

Usage examples

  • Exclude both /metrics(by default):
    --uvicorn-access-log-exclude-prefixes /metrics
  • Exclude both /metrics and /health:
    --uvicorn-access-log-exclude-prefixes /metrics /health
  • Disable filtering:
    --disable-uvicorn-access-log-filter

Accuracy Tests

Benchmarking and Profiling

Checklist

@gemini-code-assist
Copy link
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

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.

1 participant