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

mixin: add native cortex_request_duration_seconds in Reads dashboard #8752

Merged
merged 15 commits into from
Jul 18, 2024

Conversation

krajorama
Copy link
Contributor

@krajorama krajorama commented Jul 17, 2024

What this PR does

Enable switching between showing results from cortex_request_duration_seconds classic and native metric.

Which issue(s) this PR fixes or relates to

Related to #7154
Depends on grafana/jsonnet-libs#1285

Checklist

  • N/A Tests updated.
  • N/A Documentation added.
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX].
  • N/A about-versioning.md updated with experimental features.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
@krajorama krajorama force-pushed the krajo/native-histogram-mixin branch from dba33b2 to 8fba27b Compare July 17, 2024 12:11
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
@krajorama krajorama marked this pull request as ready for review July 18, 2024 06:42
@krajorama krajorama requested a review from a team as a code owner July 18, 2024 06:42
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
# Conflicts:
#	CHANGELOG.md
#	operations/helm/charts/mimir-distributed/CHANGELOG.md
#	operations/mimir-mixin/dashboards/dashboard-queries.libsonnet
#	operations/mimir-mixin/jsonnetfile.lock.json
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
@@ -38,26 +39,13 @@ local filename = 'mimir-reads.json';
showTitle: false,
})
.addPanel(
local addRuleEvalRate(q) = {
local ruleEvalRate = ' + sum(rate(cortex_prometheus_rule_evaluations_total{' + $.jobMatcher($._config.job_names.ruler) + '}[$__rate_interval]))',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note to reviewers: sum(x or y) is the same as sum(x)+sum(y) because x and y have different metric names.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the other hand it means that the new query is actually more truthful since it's not going drop data in case labels excluding __name__ line up.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Copy link
Contributor

@duricanikolic duricanikolic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thank you

@krajorama krajorama enabled auto-merge (squash) July 18, 2024 12:20
@krajorama krajorama merged commit 9c5d037 into main Jul 18, 2024
31 checks passed
@krajorama krajorama deleted the krajo/native-histogram-mixin branch July 18, 2024 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants