Open faevourite opened 4 months ago
Thanks! Great request. 💪🏽
The main challenge is to map internal workings of Google Cloud Monitoring PromQL engine to those stats which assumes Prometheus' TSDB PromQL engine.
We could make it work, at the minimum level, so tools like [pint](https://cloudflare.github.io/pint/checks/query/cost.html could work OR we could contribute to pint to make sure it's more generic. Anyway, the acceptance criteria here:
Prometheus supports
stats=1
as part of the/api/v1/query
andapi/v1/query_range
endpoints. It returns an additional json field called "stats" with some execution timings. For/query
:Right now this parameter causes gmp-frontend to return an error:
This means we can't make use of some excellent Prometheus tooling out there like pint to lint for expensive queries, because it relies on the
stats=1
parameter (and not just for that one check, but all that call Prometheus APIs). Is it possible to increase compatibility with Prometheus and start supporting this param?