Skip to content
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

release/v1.2: Fix point-in-time Prometheus metrics. #4978

Merged
merged 1 commit into from
Mar 19, 2020

Conversation

danielmai
Copy link
Contributor

@danielmai danielmai commented 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

This change is Reviewable

Docs Preview: Dgraph Preview

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 danielmai requested a review from manishrjain as a code owner March 19, 2020 05:09
@danielmai danielmai requested a review from a team March 19, 2020 05:09
@danielmai danielmai merged commit 63957f9 into release/v1.2 Mar 19, 2020
@danielmai danielmai deleted the danielmai/v1.2-fix-metrics branch March 19, 2020 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant