korfuri / django-prometheus

Export Django monitoring metrics for Prometheus.io
Apache License 2.0
1.44k stars 244 forks source link

django_http_requests_before_middlewares_total,Shouldn't this indicator be a line that keeps rising? #419

Open luoxiaopeng opened 9 months ago

luoxiaopeng commented 9 months ago

django_http_requests_before_middlewares_total is a counter, but why sometimes it goes down? Xnip2023-12-07_13-38-16 Maybe this is not issue, just discuss.

luoxiaopeng commented 9 months ago

and also django_http_requests_latency_including_middlewares_seconds_sum

luoxiaopeng commented 9 months ago

Maybe this reason: https://github.com/korfuri/django-prometheus/blob/master/documentation/exports.md#exporting-metrics-in-a-wsgi-application-with-multiple-processes-globally

radekska commented 8 months ago

Hey @luoxiaopeng setting the PROMETHEUS_MULTIPROC_DIR=/tmp environment variable for my dockerized Django app solves the mentioned issue!