Prometheus 2.5.0 is now out, following on from 2.4.0 back in September with many fixes and improvements.

This is the second release on the new 6 week schedule. The first big feature is that there is now unit testing for rules and alerts within promtool, based on the syntax that we use internally for unit testing PromQL itself. Prometheus will now also catch some alert templating errors when it loads the configuration file, rather than when the template is evaluated.

The second feature is that there is now a limit on the number of samples a query can have in memory at once, making it possible to stop massive queries that take too much RAM and threaten to OOM your Prometheus. This can be adjusted with the --query.max-samples flag. Each sample uses 16 bytes of memory, however keep in mind there's more than just active samples in memory for a query.

The third notable features is that this is the first release that has support for scraping the OpenMetrics format. The format is still in draft and this is thus experimental within Prometheus. Right now only the Prometheus Python client can produce this format, but if you're using the latest versions of both then OpenMetrics rather than Prometheus Text format will be used.

Remote read had a few improvements, reduced memory usage, new metrics, and a concurrency limit. In terms of service discovery OpenStack can now discover from all projects, discover all network interfaces, and use TLS. Triton SD can filter by groups, and has associated new metadata. Kubernetes SD and SD generally both gained some new metrics.

Finally there's a bug fix that will mostly affect users misusing matchers on metric names. If you're doing something like rate({__name__=~"som.*thing"}[5m]) this will now fail as the rate would produce two time series with the same labels once the metric name is removed, which doesn't make sense and was causing problems. How to handle this properly has been covered previously.


There’s also a number of improvements, bug fixes and other changes, see the release notes for more detail.


Wondering how to upgrade? Contact us.