From dc38c0ef24e64349709ac25b78f53bf08400dbb3 Mon Sep 17 00:00:00 2001 From: George Krajcsovits Date: Mon, 2 Dec 2024 07:45:06 +0100 Subject: [PATCH] fix(docs): update native histograms migration guide (#10052) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(docs): update native histograms migration guide Send/Native Histograms: update the migration guide with the corrected dashboard query for switching between classic or native histograms queries. Due to https://github.com/prometheus/prometheus/pull/15245 invalidating the old method. Signed-off-by: György Krajcsovits Co-authored-by: Taylor C <41653732+tacole02@users.noreply.github.com> --- CHANGELOG.md | 2 ++ docs/sources/mimir/send/native-histograms/_index.md | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25245783749..8ddc55794d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -142,6 +142,8 @@ ### Documentation +* [BUGFIX] Send native histograms: update the migration guide with the corrected dashboard query for switching between classic and native histograms queries. #10052 + ### Tools * [FEATURE] `splitblocks`: add new tool to split blocks larger than a specified duration into multiple blocks. #9517, #9779 diff --git a/docs/sources/mimir/send/native-histograms/_index.md b/docs/sources/mimir/send/native-histograms/_index.md index 51fd2d8885c..6dbd519dc06 100644 --- a/docs/sources/mimir/send/native-histograms/_index.md +++ b/docs/sources/mimir/send/native-histograms/_index.md @@ -250,14 +250,14 @@ To ease the migration process, you can keep the custom bucket definition of a cl - Add a dashboard variable to your dashboard to enable switching between classic histograms and native histograms. There isn't support for selectively enabling and disabling queries in Grafana ([issue 79848](https://github.com/grafana/grafana/issues/79848)). As a workaround, add the dashboard variable `latency_metrics`, for example, and assign it a value of either `-1` or `1`. Then, add the following two queries to the panel: ``` - < ($latency_metrics * +Inf) + () and on() (vector($latency_metrics) == 1) ``` ``` - < ($latency_metrics * -Inf) + () and on() (vector($latency_metrics) == -1) ``` - Where `classic_query` is the original query and `native_query` is the same query using native histogram query syntax. This technique is employed in Mimir's dashboards. For an example, refer to the [Overview dashboard](https://github.com/grafana/mimir/blob/main/operations/mimir-mixin-compiled/dashboards/mimir-overview.json) in the Mimir repository. + Where `classic_query` is the original query and `native_query` is the same query using native histogram query syntax placed inside parentheses. Mimir dashboards use this technique. For an example, refer to the [Overview dashboard](https://github.com/grafana/mimir/blob/main/operations/mimir-mixin-compiled/dashboards/mimir-overview.json) in the Mimir repository. This solution allows users to switch between the classic histogram and the native histogram without going to a different dashboard.