django-commons/django-prometheus

django_http_requests_latency_seconds_by_view_method_bucket wrong calculation

Closed this issue · 0 comments

Hi folks, the issue's title says wrong but I am not 100% sure that it's a wrong calculation. I created 2 views to make it easier for whoever will deal with. One of functions is named "slow" which expected to respond more than 10 seconds the other is named fast is expected to respond less than 1 second. Here the result I am seeing from the exported data.

django_http_requests_latency_seconds_by_view_method_bucket{le="0.0",method="GET",view="example.views.fast"} 0.0
django_http_requests_latency_seconds_by_view_method_bucket{le="1.0",method="GET",view="example.views.fast"} 5.0
django_http_requests_latency_seconds_by_view_method_bucket{le="2.0",method="GET",view="example.views.fast"} 5.0
django_http_requests_latency_seconds_by_view_method_bucket{le="4.0",method="GET",view="example.views.fast"} 5.0
django_http_requests_latency_seconds_by_view_method_bucket{le="8.0",method="GET",view="example.views.fast"} 5.0
django_http_requests_latency_seconds_by_view_method_bucket{le="10.0",method="GET",view="example.views.fast"} 5.0
django_http_requests_latency_seconds_by_view_method_bucket{le="+Inf",method="GET",view="example.views.fast"} 5.0
django_http_requests_latency_seconds_by_view_method_count{method="GET",view="example.views.fast"} 5.0
django_http_requests_latency_seconds_by_view_method_sum{method="GET",view="example.views.fast"} 0.5081610679999962


django_http_requests_latency_seconds_by_view_method_bucket{le="0.0",method="GET",view="example.views.slow"} 0.0
django_http_requests_latency_seconds_by_view_method_bucket{le="1.0",method="GET",view="example.views.slow"} 0.0
django_http_requests_latency_seconds_by_view_method_bucket{le="2.0",method="GET",view="example.views.slow"} 0.0
django_http_requests_latency_seconds_by_view_method_bucket{le="4.0",method="GET",view="example.views.slow"} 0.0
django_http_requests_latency_seconds_by_view_method_bucket{le="8.0",method="GET",view="example.views.slow"} 0.0
django_http_requests_latency_seconds_by_view_method_bucket{le="10.0",method="GET",view="example.views.slow"} 0.0
django_http_requests_latency_seconds_by_view_method_bucket{le="+Inf",method="GET",view="example.views.slow"} 1.0
django_http_requests_latency_seconds_by_view_method_count{method="GET",view="example.views.slow"} 1.0
django_http_requests_latency_seconds_by_view_method_sum{method="GET",view="example.views.slow"} 10.004169673