Replies: 1 comment
-
Is there a formal, versioned PDF document that is a specification of PromQL, or is the "official" documentation just webpages at https://prometheus.io/docs/prometheus/latest/querying/basics/ ? In https://prometheus.io/docs/prometheus/latest/querying/basics/ , there is a drop-down control that sets the version of the documentation, with "latest" equal to "3.2". As with so many grammars in grammars-v4, there is zero information as to what version the current grammar is intended to support. The first thing to do is to identify what version the promql grammar is currently trying to support. You can then make a PR to fix the grammar in one of two ways:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I recently validated around 72,000 Prometheus queries using both the ANTLR approach and the Prometheus API. The results showed discrepancies:
This suggests that the current PromQL grammar in ANTLR, which hasn’t been updated in over two years, may be outdated. To ensure compatibility with the latest Prometheus syntax, I recommend updating the grammar.
Below are a few example queries where the validation results differ:
Additionally, there are cases where the ANTLR-based validation marks certain queries as valid, while they should be considered invalid based on Prometheus API validation.
Would appreciate any insights or suggestions on updating the PromQL grammar!
Beta Was this translation helpful? Give feedback.
All reactions