Skip to content

Support MetricsQL (VictoriaMetrics version of PromQL) alongside PromQL #542

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nick-kentik opened this issue Dec 18, 2024 · 3 comments
Open

Comments

@nick-kentik
Copy link

nick-kentik commented Dec 18, 2024

First, thanks for Sloth!

This issue is like #280 in concept, just for a different fork of PromQL - https://docs.victoriametrics.com/metricsql/

Trying to use MetricsQL-only functions in Sloth results in an error. The actual promparse errors are not passed to the user, but if you wire up the promql parser manually, you can get them. Depending on the query, you might see, e.g.:

1:1: parse error: unknown function with name "histogram_share"

The issue is exacerbated relative to LogQL as victoriametrics pushes its own custom histograms (a bit similar to the new prometheus native histogram) which use a vmrange label instead of le: https://valyala.medium.com/improving-histogram-usability-for-prometheus-and-grafana-bc7e5df0e350

To get an le-labeled equivalent, you need to use the MetricsQL-specific function prometheus_buckets, so building a good latency SLI against anything using a victoriametrics-format histogram - including victoriametrics itself - seems to be impossible at the moment.

Another alternative suggested on in the LogQL issue would be to add a flag allowing validation to be skipped. Happy to work on either approach, and on making the parse errors more visible, if a fix would be welcomed.

@nixargh
Copy link

nixargh commented Jan 23, 2025

Hi, I was just passing by. We use VM and added this functionality to our fork ostrovok-tech/sloth. Maybe it will be usefull for you.

Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.

@github-actions github-actions bot added the stale label Mar 27, 2025
robbat2 added a commit to robbat2/sloth that referenced this issue Apr 11, 2025
Introduce a "query dialect" concept to extend the expression validation.

First two dialects:
- PromQL
- VictoriaMetrics MetricsQL

Future dialects:
- LogQL [would need additional work]
- PromQL w/ experimental functions [grafana/mimir#10991]

Based-on: https://github.com/ostrovok-tech/sloth/blob/main/CHANGELOG.md#added-2
Reference: slok#542
Reference: slok#280
Signed-off-by: Robin H. Johnson <[email protected]>
Copy link

This issue was closed because it has been stale for 15 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 13, 2025
@slok slok reopened this Apr 13, 2025
@slok slok removed the stale label Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants