Skip to content

Commit

Permalink
fix(docs): update native histograms migration guide (#10052)
Browse files Browse the repository at this point in the history
* 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 prometheus/prometheus#15245 invalidating
the old method.

Signed-off-by: György Krajcsovits <[email protected]>
Co-authored-by: Taylor C <[email protected]>
  • Loading branch information
krajorama and tacole02 authored Dec 2, 2024
1 parent 05d4b57 commit dc38c0e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions docs/sources/mimir/send/native-histograms/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

```
<classic_query> < ($latency_metrics * +Inf)
(<classic_query>) and on() (vector($latency_metrics) == 1)
```
```
<native_query> < ($latency_metrics * -Inf)
(<native_query>) 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.
Expand Down

0 comments on commit dc38c0e

Please sign in to comment.