From 5d91787bf927d1cacbdfbe23a915b68d7c23187a Mon Sep 17 00:00:00 2001 From: SuperQ Date: Mon, 20 Feb 2023 14:21:58 +0100 Subject: [PATCH] Update mixin for new histograms Update store dashboard for summary to histogram changes. * Followup to #6131 * Update changelog to note breaking changes. Signed-off-by: SuperQ --- CHANGELOG.md | 2 +- examples/dashboards/store.json | 18 +++++++++--------- mixin/dashboards/store.libsonnet | 18 +++++++++--------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc5be175c3..2ea0ca443f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,7 +40,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re - [#5887](https://github.com/thanos-io/thanos/pull/5887) Tracing: Make sure rate limiting sampler is the default, as was the case in version pre-0.29.0. - [#5997](https://github.com/thanos-io/thanos/pull/5997) Rule: switch to miekgdns DNS resolver as the default one. - [#6035](https://github.com/thanos-io/thanos/pull/6035) Replicate: Support all types of matchers to match blocks for replication. Change matcher parameter from string slice to a single string. -- [#6131](https://github.com/thanos-io/thanos/pull/6131) Store: Use Histograms for bucket metrics. +- [#6131](https://github.com/thanos-io/thanos/pull/6131) Store: *breaking :warning:* Use Histograms for bucket metrics. ## [v0.30.2](https://github.com/thanos-io/thanos/tree/release-0.30) - 28.01.2023 diff --git a/examples/dashboards/store.json b/examples/dashboards/store.json index c932bb958e..7f3b614cfb 100644 --- a/examples/dashboards/store.json +++ b/examples/dashboards/store.json @@ -1677,7 +1677,7 @@ "step": 10 }, { - "expr": "histogram_quantile(0.99, sum by (job, le) (rate(thanos_bucket_store_sent_chunk_size_bytes_bucket{job=~\"$job\"}[$__rate_interval])))", + "expr": "histogram_quantile(0.50, sum by (job, le) (rate(thanos_bucket_store_sent_chunk_size_bytes_bucket{job=~\"$job\"}[$__rate_interval])))", "format": "time_series", "intervalFactor": 2, "legendFormat": "P50", @@ -1765,7 +1765,7 @@ "steppedLine": false, "targets": [ { - "expr": "thanos_bucket_store_series_blocks_queried{job=~\"$job\", quantile=\"0.99\"}", + "expr": "histogram_quantile(0.99, sum by (le) (rate(thanos_bucket_store_series_blocks_queried{job=~\"$job\"}[$__rate_interval])))", "format": "time_series", "intervalFactor": 2, "legendFormat": "P99", @@ -1781,7 +1781,7 @@ "step": 10 }, { - "expr": "thanos_bucket_store_series_blocks_queried{job=~\"$job\", quantile=\"0.50\"}", + "expr": "histogram_quantile(0.50, sum by (le) (rate(thanos_bucket_store_series_blocks_queried{job=~\"$job\"}[$__rate_interval])))", "format": "time_series", "intervalFactor": 2, "legendFormat": "P50", @@ -1858,7 +1858,7 @@ "steppedLine": false, "targets": [ { - "expr": "thanos_bucket_store_series_data_fetched{job=~\"$job\", quantile=\"0.99\"}", + "expr": "histogram_quantile(0.99, sum by (le) (rate(thanos_bucket_store_series_data_fetched{job=~\"$job\"}[$__rate_interval])))", "format": "time_series", "intervalFactor": 2, "legendFormat": "P99: {{data_type}} / {{job}}", @@ -1874,7 +1874,7 @@ "step": 10 }, { - "expr": "thanos_bucket_store_series_data_fetched{job=~\"$job\", quantile=\"0.50\"}", + "expr": "histogram_quantile(0.50, sum by (le) (rate(thanos_bucket_store_series_data_fetched{job=~\"$job\"}[$__rate_interval])))", "format": "time_series", "intervalFactor": 2, "legendFormat": "P50: {{data_type}} / {{job}}", @@ -1951,7 +1951,7 @@ "steppedLine": false, "targets": [ { - "expr": "thanos_bucket_store_series_data_touched{job=~\"$job\", quantile=\"0.99\"}", + "expr": "histogram_quantile(0.99, sum by (le) (rate(thanos_bucket_store_series_data_touched{job=~\"$job\"}[$__rate_interval])))", "format": "time_series", "intervalFactor": 2, "legendFormat": "P99: {{data_type}} / {{job}}", @@ -1967,7 +1967,7 @@ "step": 10 }, { - "expr": "thanos_bucket_store_series_data_touched{job=~\"$job\", quantile=\"0.50\"}", + "expr": "histogram_quantile(0.50, sum by (le) (rate(thanos_bucket_store_series_data_touched{job=~\"$job\"}[$__rate_interval])))", "format": "time_series", "intervalFactor": 2, "legendFormat": "P50: {{data_type}} / {{job}}", @@ -2043,7 +2043,7 @@ "steppedLine": false, "targets": [ { - "expr": "thanos_bucket_store_series_result_series{job=~\"$job\",quantile=\"0.99\"}", + "expr": "histogram_quantile(0.99, sum by (le) (rate(thanos_bucket_store_series_result_series{job=~\"$job\"}[$__rate_interval])))", "format": "time_series", "intervalFactor": 2, "legendFormat": "P99", @@ -2059,7 +2059,7 @@ "step": 10 }, { - "expr": "thanos_bucket_store_series_result_series{job=~\"$job\",quantile=\"0.50\"}", + "expr": "histogram_quantile(0.50, sum by (le) (rate(thanos_bucket_store_series_result_series{job=~\"$job\"}[$__rate_interval])))", "format": "time_series", "intervalFactor": 2, "legendFormat": "P50", diff --git a/mixin/dashboards/store.libsonnet b/mixin/dashboards/store.libsonnet index f6c175368e..1733e51b23 100644 --- a/mixin/dashboards/store.libsonnet +++ b/mixin/dashboards/store.libsonnet @@ -150,7 +150,7 @@ local utils = import '../lib/utils.libsonnet'; [ 'histogram_quantile(0.99, sum by (%s) (rate(thanos_bucket_store_sent_chunk_size_bytes_bucket{%s}[$__rate_interval])))' % [utils.joinLabels([thanos.store.dashboard.dimensions, 'le']), thanos.store.dashboard.selector], 'sum by (%(dimensions)s) (rate(thanos_bucket_store_sent_chunk_size_bytes_sum{%(selector)s}[$__rate_interval])) / sum by (%(dimensions)s) (rate(thanos_bucket_store_sent_chunk_size_bytes_count{%(selector)s}[$__rate_interval]))' % thanos.store.dashboard, - 'histogram_quantile(0.99, sum by (%s) (rate(thanos_bucket_store_sent_chunk_size_bytes_bucket{%s}[$__rate_interval])))' % [utils.joinLabels([thanos.store.dashboard.dimensions, 'le']), thanos.store.dashboard.selector], + 'histogram_quantile(0.50, sum by (%s) (rate(thanos_bucket_store_sent_chunk_size_bytes_bucket{%s}[$__rate_interval])))' % [utils.joinLabels([thanos.store.dashboard.dimensions, 'le']), thanos.store.dashboard.selector], ], [ 'P99', @@ -167,9 +167,9 @@ local utils = import '../lib/utils.libsonnet'; g.panel('Block queried') + g.queryPanel( [ - 'thanos_bucket_store_series_blocks_queried{%s, quantile="0.99"}' % thanos.store.dashboard.selector, + 'histogram_quantile(0.99, sum by (le) (rate(thanos_bucket_store_series_blocks_queried{%s}[$__rate_interval])))' % thanos.store.dashboard.selector, 'sum by (%(dimensions)s) (rate(thanos_bucket_store_series_blocks_queried_sum{%(selector)s}[$__rate_interval])) / sum by (%(dimensions)s) (rate(thanos_bucket_store_series_blocks_queried_count{%(selector)s}[$__rate_interval]))' % thanos.store.dashboard, - 'thanos_bucket_store_series_blocks_queried{%s, quantile="0.50"}' % thanos.store.dashboard.selector, + 'histogram_quantile(0.50, sum by (le) (rate(thanos_bucket_store_series_blocks_queried{%s}[$__rate_interval])))' % thanos.store.dashboard.selector, ], [ 'P99', 'mean {{job}}', @@ -181,9 +181,9 @@ local utils = import '../lib/utils.libsonnet'; g.panel('Data Fetched', 'Show the size of data fetched') + g.queryPanel( [ - 'thanos_bucket_store_series_data_fetched{%s, quantile="0.99"}' % thanos.store.dashboard.selector, + 'histogram_quantile(0.99, sum by (le) (rate(thanos_bucket_store_series_data_fetched{%s}[$__rate_interval])))' % thanos.store.dashboard.selector, 'sum by (%s) (rate(thanos_bucket_store_series_data_fetched_sum{%s}[$__rate_interval])) / sum by (%s) (rate(thanos_bucket_store_series_data_fetched_count{%s}[$__rate_interval]))' % [dataSizeDimensions, thanos.store.dashboard.selector, dataSizeDimensions, thanos.store.dashboard.selector], - 'thanos_bucket_store_series_data_fetched{%s, quantile="0.50"}' % thanos.store.dashboard.selector, + 'histogram_quantile(0.50, sum by (le) (rate(thanos_bucket_store_series_data_fetched{%s}[$__rate_interval])))' % thanos.store.dashboard.selector, ], [ 'P99: {{data_type}} / {{job}}', 'mean: {{data_type}} / {{job}}', @@ -196,9 +196,9 @@ local utils = import '../lib/utils.libsonnet'; g.panel('Data Touched', 'Show the size of data touched') + g.queryPanel( [ - 'thanos_bucket_store_series_data_touched{%s, quantile="0.99"}' % thanos.store.dashboard.selector, + 'histogram_quantile(0.99, sum by (le) (rate(thanos_bucket_store_series_data_touched{%s}[$__rate_interval])))' % thanos.store.dashboard.selector, 'sum by (%s) (rate(thanos_bucket_store_series_data_touched_sum{%s}[$__rate_interval])) / sum by (%s) (rate(thanos_bucket_store_series_data_touched_count{%s}[$__rate_interval]))' % [dataSizeDimensions, thanos.store.dashboard.selector, dataSizeDimensions, thanos.store.dashboard.selector], - 'thanos_bucket_store_series_data_touched{%s, quantile="0.50"}' % thanos.store.dashboard.selector, + 'histogram_quantile(0.50, sum by (le) (rate(thanos_bucket_store_series_data_touched{%s}[$__rate_interval])))' % thanos.store.dashboard.selector, ], [ 'P99: {{data_type}} / {{job}}', 'mean: {{data_type}} / {{job}}', @@ -211,9 +211,9 @@ local utils = import '../lib/utils.libsonnet'; g.panel('Result series') + g.queryPanel( [ - 'thanos_bucket_store_series_result_series{%s,quantile="0.99"}' % thanos.store.dashboard.selector, + 'histogram_quantile(0.99, sum by (le) (rate(thanos_bucket_store_series_result_series{%s}[$__rate_interval])))' % thanos.store.dashboard.selector, 'sum by (%(dimensions)s) (rate(thanos_bucket_store_series_result_series_sum{%(selector)s}[$__rate_interval])) / sum by (%(dimensions)s) (rate(thanos_bucket_store_series_result_series_count{%(selector)s}[$__rate_interval]))' % thanos.store.dashboard, - 'thanos_bucket_store_series_result_series{%s,quantile="0.50"}' % thanos.store.dashboard.selector, + 'histogram_quantile(0.50, sum by (le) (rate(thanos_bucket_store_series_result_series{%s}[$__rate_interval])))' % thanos.store.dashboard.selector, ], [ 'P99', 'mean {{job}}',