Not a good one that I can think of. Can you do this on the client side (the 
API consumer?)

Any complex PromQL expression on a range involves resampling it with a 
subquery, which is usually not desirable, and you'll lose the exact 
timestamps at which the scrapes took place.

e.g.    (foo != foo offset 15s)[10m:15s]

On Wednesday, 5 March 2025 at 11:04:27 UTC Suvendu Nayak wrote:

> Hi - As Prometheus collects the metrics in every 15 secs, when we do a 
> range query for some of the metrics the repeated values comes (which is 
> expected). Is there a way that we can filter only  the change data values.
>  Example:
> Time.     Label Value
> 10:10:15 a b c 1
> 10:10:30 a b c 1
> 10:10:45 a b c 1
> 10:11:00 d b c 2
> 10:11:15 d b c 2
>
>  for every 15 seconds, we want
> Time.      Label Value
> 10:10:15 a b c 1
> 10:11:00 d b c 2
>

-- 
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 prometheus-users+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/prometheus-users/d31b15cb-9915-47d9-a8a2-2ee3119d4030n%40googlegroups.com.

Reply via email to