prometheus-net-contrib
                                
                                 prometheus-net-contrib copied to clipboard
                                
                                    prometheus-net-contrib copied to clipboard
                            
                            
                            
                        Add more ASP.NET metrics
This PR adds aspnetcore_requests_total as well as aspnetcore_requests_current_total metrics.
/cc @gr-liam
I think you forgot to increase the metrics, and we might not need the counteraspnetcore_requests_total because we already have this infoaspnetcore_requests_duration_seconds_count. But the concurrent connections gauge is very handy :)
I think you forgot to increase the metrics
Thanks, added the missing inc/dec. Not too sure how to test this properly though..
and we might not need the counter
aspnetcore_requests_totalbecause we already have this infoaspnetcore_requests_duration_seconds_count
Are you saying that Histogram.Count would be equivalent to a Total Requests counter?
Thanks, added the missing inc/dec. Not too sure how to test this properly though..
Yeah, testing might be challenging right now, maybe adding black-box testing or introducing interfaces, but these are major changes. I am waiting for @alexvaluyskiy to listen to his plan.
Are you saying that
Histogram.Countwould be equivalent to aTotal Requestscounter?
Yes, if you measure the latency of every request then you are also measuring the number of requests.
You can try this.
sum(rate(aspnetcore_requests_duration_seconds_count{namespace="$namespace", service="$service", code=~"[2-3]..", pod=~"$pod"}[$interval])) by (service, namespace, route, method, code)