We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am using PrometheusMiddleware from starlette_prometheus ever second or the, it keeps generating log, this grows the log file.
PrometheusMiddleware
starlette_prometheus
How do i disable this log, this specific?
INFO: 127.0.0.1:57304 - "GET /metrics HTTP/1.1" 200 OK INFO: 127.0.0.1:57310 - "GET /metrics HTTP/1.1" 200 OK INFO: 127.0.0.1:57304 - "GET /metrics HTTP/1.1" 200 OK INFO: 127.0.0.1:57310 - "GET /metrics HTTP/1.1" 200 OK INFO: 127.0.0.1:57304 - "GET /metrics HTTP/1.1" 200 OK INFO: 127.0.0.1:57310 - "GET /metrics HTTP/1.1" 200 OK INFO: 127.0.0.1:57304 - "GET /metrics HTTP/1.1" 200 OK INFO: 127.0.0.1:57310 - "GET /metrics HTTP/1.1" 200 OK ............several million times ............................. INFO: 127.0.0.1:57310 - "GET /metrics HTTP/1.1" 200 OK
The text was updated successfully, but these errors were encountered:
Hey @Delvify The log is not generated by PrometheusMiddleware. You could achieve this by using a log filter.
// example with uvicorn logger = logging.getLogger('uvicorn.access') logger.addFilter(lambda record: 'GET /metrics' not in record.getMessage())
Sorry, something went wrong.
No branches or pull requests
I am using
PrometheusMiddleware
fromstarlette_prometheus
ever second or the, it keeps generating log, this grows the log file.
How do i disable this log, this specific?
The text was updated successfully, but these errors were encountered: