Skip to content

Debug request logging. #925

New issue

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

Open
cirvladimir opened this issue Jun 13, 2023 · 2 comments
Open

Debug request logging. #925

cirvladimir opened this issue Jun 13, 2023 · 2 comments

Comments

@cirvladimir
Copy link

I'm trying to debug why Prometheus isn't pulling metrics from my client. Is there some way I can get this library to log each incoming http request, including the IP of the request?

Ideally it would be something like start_http_server(log_level="debug"), and then each request will be printed to stdout.

@csmarchbanks
Copy link
Member

That is not available today, I am not sure how I feel about the feature as a whole. I guess it would depend on the added complexity as we try to keep start_http_server very minimal. It should be pretty easy to create your own http server that has logging how you want it and use something like make_wsgi_app from this library to serve the results though?

Usually there is information in the Prometheus server for if you are not seeing metrics as well, either looking in Status > Targets, or enabling debug logging on the Prometheus server.

@cirvladimir
Copy link
Author

I resorted to debugging by just standing up a simple http server with python.

I guess there are workarounds, and the feature I requested may not be useful to anyone else, so maybe this issue can be closed.

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

No branches or pull requests

2 participants