Does Prometheus efficiently store and de-duplicate long repeats of identical sample values for a metric?
I'm working with a system where some of the inputs change at a low frequency - say every 30 minutes - but others change at a high frequency like 1/second or continuously. I need to capture high temporal resolution on the high frequency samples, and I'd like to know how Prometheus will handle the low frequency samples.
Say I have one series that changes at a 30 minute interval and another that changes 1/second. Prometheus scrapes at 1/second. So I have 600 identical samples of the slow series for each changed value.
What will Prometheus do with the identical samples? Does it just blindly store all 600 with their unique timestamps and "yup, still the same value"? Or is it smart enough to omit the duplicates and avoid storing all the pointless timestamps?
I can't find anything in the Prometheus docs that clearly explains how Prometheus handles metrics of different sample rates.
Lets say I'm scraping something where I cannot define separate scrape configs for the different metrics rates. How will Prometheus store my 600 identical metrics between value changes?
Do I need to use a recording rule to compact the metrics after collection, and delete the old ones? Say, match them using labels, and do temporal downsampling in post-processing? Or is prom smart enough to do this itself?