Currently, we maintain all the PromQL queries and strings, and the label matcher methods have to parse and then re-serialize on label matcher additions.
This is a little fragile, plus any global matcher config needs to be a string concat for certain things.
Given we maintain all this in Go, we can use https://github.com/perses/promql-builder/tree/main
The additional benefit to something like this, is that we can probably expose this somehow on dashboard methods, so that downstream users can use the same dashboard "structure" but different queries based on their own exotic setups.
cc: @Nexucis @nicolastakashi
Currently, we maintain all the PromQL queries and strings, and the label matcher methods have to parse and then re-serialize on label matcher additions.
This is a little fragile, plus any global matcher config needs to be a string concat for certain things.
Given we maintain all this in Go, we can use https://github.com/perses/promql-builder/tree/main
The additional benefit to something like this, is that we can probably expose this somehow on dashboard methods, so that downstream users can use the same dashboard "structure" but different queries based on their own exotic setups.
cc: @Nexucis @nicolastakashi