After almost 4 years of development, Prometheus has reached 1.0. Hot on the heels of 0.20.0, this release brings new features and more importantly guarantees.

Stable API

The big thing with 1.0.0 isn't the features, it's the stability guarantees. We promise that until 2.0 we won't make any breaking changes to the APIs of the Prometheus server. That means that anything you can do now in terms of PromQL, alerting rules, ingestion, config file and the HTTP API will continue to work.

There are places where we may make breaking changes and improvements, such as around experimental service discovery methods, performance. metrics and the UI of Prometheus itself.

PromQL

There's a number of additions to PromQL.

topk and bottomk have been upgraded from functions to aggregators, meaning you can now find the busiest server per shard all in one query.

The new count_values aggregator allows for counting up how many of each value a metric has. This could be used to count up how many servers are running a particular version if it were exposed as a gauge.

Lists of labels can now be empty. The main benefit of this is when you want to match two single-timeseries vectors without caring about labels you now do on() rather than having to workaround with on(dummy).

There's a new power/exponentiation binary operator, so you can do things like my_metric{job="my_job"} ^ 2 to square your metric.

Other Changes

As part of offering a stable API, technical debt that has accumulated over the years has been removed. The legacy HTTP API, JSON exposition format, old alert statement, keeping_extra keyword and target_groups config file field have been removed. Replacements for all of these have been available in previous releases.

There's a variety of other changes. Kubernetes service discovery now has a mandatory role field to select which type of discovery to do. The Consul service discovery uses the service address if possible. The new -web.route-prefix flag allows for deploying Prometheus behind more complicated reverse proxies, such as those employed by Kubernetes. On top of that there's the usual bug fixes and tweaks.

A full list of changes can be found in the release notes.