What does it mean "streaming" φ-quantiles of summary in prometheus

Viewed 105

I'm reading Histogram Vs Summary to learn about what's different between histogram and summary.

I've got that quantile is being calculated on the client side when it comes to the summary.

but still don't understand what exactly "streaming" means when saying "streaming" φ-quantiles.

1 Answers

It's "streaming" because there's a rolling buffer that's maintained rather than calculating the quantile over the entire time series.

From Robust Perception:

If it's the quantile since the processes started, then the samples get less and less relevant to current conditions as time goes on. [...] How Prometheus client libraries generally do it is to keep 10 quantile objects in memory. All observation are sent to all 10 objects, each tracking observations starting 1 minute from the next, and the oldest of these will contain up to 10 minutes worth of samples. Once the oldest is too old it is removed, and an empty quantile object started. The net effect of this is that quantiles returned by a Prometheus client library summary are over the observations in the last 10 minutes or so, with 1 minute of granularity. If there are no samples in a time period then NaN will be returned for the quantiles, as would be the same with dividing the _sum by the _count above.

You can see this in the Go client on GitHub.

Related