-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dgraph is not recording metrics correctly #4532
Labels
status/accepted
We accept to investigate/work on it.
Comments
danielmai
added a commit
that referenced
this issue
Mar 19, 2020
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
danielmai
added a commit
that referenced
this issue
Mar 19, 2020
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
danielmai
added a commit
that referenced
this issue
Mar 19, 2020
(cherry-pick of #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
danielmai
added a commit
that referenced
this issue
Mar 20, 2020
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)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Dgraph are you using?
Latest
Have you tried reproducing the issue with the latest release?
Yes
What is the hardware spec (RAM, OS)?
N/A
Steps to reproduce the issue (command/config used to run Dgraph).
N/A
Expected behaviour and actual result.
Currently all metrics in Dgraph are recorded as measurements. As per the the opencensus godoc,
Measure represents a single numeric value to be tracked and recorded. For example, latency, request bytes, and response bytes could be measures to collect from a server.
Some of metrics such as NumQueries, NumMutations, ActiveMutations, are not measurements. We should audit all metrics and record them correctly.
The text was updated successfully, but these errors were encountered: