Hi,

So on one hand, there's two ways to get query stats about a specific query
or all queries:

a) When appending "&stats=1" to the PromQL HTTP API call, like
https://demo.promlabs.com/api/v1/query?query=up&timestamp=1644357133.302&stats=1,
the returned JSON includes some timing statistics,
b) When enabling the query log file (config option global.query_log_file),
the query log file contains those stats for every executed query.

However, these stats currently don't include the number of touched samples
:(

But the PromQL engine is already tracking the total number of touched
samples as part of making sure that the maximum configured sample limit
(flag "--query.max-samples") is not exceeded. So it would probably not be
hard to expose those stats as well, it's just not done yet.

Cheers,
Julius

On Tue, Feb 8, 2022 at 5:33 PM '[email protected]' via Prometheus Users <
[email protected]> wrote:

> Or queries on average?
>
> Thanks,
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/f9353c9a-2054-4bf0-b9ee-4619fde45ffen%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/f9353c9a-2054-4bf0-b9ee-4619fde45ffen%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Julius Volz
PromLabs - promlabs.com

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAObpH5zUtW6wZeM9U32nNPUR216VD5Wpm4k7zt3JTdynALqCow%40mail.gmail.com.

Reply via email to