-
Notifications
You must be signed in to change notification settings - Fork 658
Description
What is the problem you are trying to solve?
Give a tool to users to be able to migrate from classic histograms to native histograms with their dashboards.
Following the guideline in https://grafana.com/docs/mimir/latest/send/native-histograms/#migrate-from-classic-histograms .
Inputs:
- Grafana dashboard json
- List of metric names (without magic _bucket, _count, _sum suffixes)
Support the following operations:
- add toggle
- migrate
Support the following migration modes:
- replace
- toggle
The add toggle mode would add a dashboard variable called histogram_metrics (for example, maybe configurable).
The migrate operation would either replace classic histogram queries on the metric or add a native histogram version next to the classic version in toggle mode.
In toggle mode the two queries are equivalent except one works on native histograms. Both queries will be logical AND with the query to enable/disable based on the toggle variable. The tool should not assume the order of the native/classic queries , but it can assume that they are next to each other in the JSON.
Migration operation should be idempotent.
Which solution do you envision (roughly)?
Needs to work on parsed expressions and logic should be in upstream Prometheus for converting/matching expressions.
Have you considered any alternatives?
Do nothing
Let users do this manually
Grafana
Implement in Grafana. This would still be an option based on this tooling.
Any additional context to share?
I'm a little afraid of how the maintenance of dashboards that were migrated with the "toggle" mode would look like. If someone goes in and manually changes one query, the tool will not be able tell that the classic and native query are the same anymore and it would regenerate the native version.
Maybe the also generate a comment string to warn against changing queries independently? Rather let the user change one of the queries and delete the other.
How long do you think this would take to be developed?
Medium (~2 months dev)
What are the documentation dependencies?
No response
Proposer?
No response