Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix point-in-time Prometheus metrics. (#4948)
Fixes #4532. The metrics for pending queries and active mutations would report "1" or "-1" because the metrics view was set to LastValue. This change fixes this by changing the view to a Sum so measurements of "1" and "-1" would accumulate the metrics as expected. There were also metrics whose values were separated by tags when they should be treated as a single metric. This made metrics that were incremented and decremented show up as seperate metrics, e.g.: dgraph_pending_queries_total{method="Server.Query",status=""} 100 dgraph_pending_queries_total{method="Server.Query",status="ok"} -100 For these metrics, the tags are excluded from the view so the metrics are shown correctly: dgraph_pending_queries_total 0 (cherry picked from commit 6538fce)
- Loading branch information