-
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
Fix point-in-time Prometheus metrics. #4948
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the build issue but otherwise it
Reviewed 2 of 2 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @danielmai and @manishrjain)
edgraph/server.go, line 805 at r1 (raw file):
} isGraphQL, _ := ctx.Value(isGraphQL).(bool)
Build is failing with: ../edgraph/server.go:805:15: no new variables on left side of :=
PendingProposals now measures the current IOU count.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @manishrjain and @martinmr)
edgraph/server.go, line 805 at r1 (raw file):
Previously, martinmr (Martin Martinez Rivera) wrote…
Build is failing with:
../edgraph/server.go:805:15: no new variables on left side of :=
Done.
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-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
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)
Fixes #4532.
Changed metrics:
dgraph_pending_queries_total
dgraph_active_mutations_total
dgraph_alpha_health_status
dgraph_pending_proposals_total
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. For these metrics, the tags are excluded from the view so the metrics are shown correctly:
Example
Before:
After:
This change is