alexgervais / ambassador-grafana

Ambassador API Gateway Dashboard for Prometheus
1 stars 2 forks source link

[Question] Request Count label should be RPS (request per second) instead of RPM (request per minute) #3

Closed ocind closed 1 year ago

ocind commented 1 year ago

Hi @alexgervais

First of all, thanks for creating/maintaining this dashboard!

I wanted to ask regarding the metrics that is used for RPM calculation under Envoy Upsteam Completed Request panel.

I saw that we are using this PromQL

sum(rate(envoy_cluster_upstream_rq_completed{}[$__rate_interval])) by (envoy_cluster_name)

doesn't this mean that the resulting value is request per second (RPS) instead of RPM?

Rate function returns the average increase per second, yeah?

I am new to PromQL and I might be misunderstanding. Hoping you can clarify! Thanks!

alexgervais commented 1 year ago

Hi @ocind, thanks for reaching out!

I believe you are right:

rate(v range-vector) calculates the per-second average rate of increase of the time series in the range vector.

https://prometheus.io/docs/prometheus/latest/querying/functions/#rate

So it does mean the axis label should read 'RPS', keeping in mind the precision will fluctuate given the approximation by $__rate_interval and the frequency at which metrics are scraped from Envoy.

ocind commented 1 year ago

hi @alexgervais thanks for the clarification! sorry I missed the reply somehow... I created a PR for this!

alexgervais commented 1 year ago

Thanks @ocind ! I've gone ahead and merged your PR. Until it gets published on grafana.com, you can of course install the updated dashboard in Grafana directly from source.