starlette_exporter icon indicating copy to clipboard operation
starlette_exporter copied to clipboard

How to see python_*** metrics

Open dennys opened this issue 3 years ago • 1 comments

I can use starlette_exporter to generate starlette_request_*** metrics now, but I don't see python_*** metrics. Is there a flag to enable it? (Sorry, I cannot find related information in issues and code... If I miss anything, please let me know, thanks.)

dennys avatar Sep 05 '22 09:09 dennys

I think it's still due to Multiprocess mode, when I changed the worker to 1, it shows the python_*** metrics

dennys avatar Sep 06 '22 05:09 dennys

hi @dennys , any luck with this issue? I tried a basic test FastAPI app and the following commands:

export PROMETHEUS_MULTIPROCESS_DIR=/tmp/
gunicorn app:app -w 2 -b 0.0.0.0:8080 -k uvicorn.workers.UvicornWorker

I'm able to see both python_* and process_* metrics. Do you have some config/code that I might be able to reproduce with?

stephenhillier avatar Sep 24 '22 03:09 stephenhillier

Closing due to inactivity

stephenhillier avatar Jan 18 '23 06:01 stephenhillier