The future is looking stable: Prometheus 2.33 promotes PromQL experiments and remote write receivers

The future is looking stable: Prometheus 2.33 promotes PromQL experiments and remote write receivers

Over the last couple of years, the monitoring system and time series database Prometheus has slowly but surely become one of the staple tools of the cloud native space. For the just released version 2.33, the core team largely focussed on advancing experimental features and improving performance, ensuring the software stays a reliable option.

Top of the list of newly stabilised features is the remote write receiver added in Prometheus 2.25. Before promoting it, the team fitted the component with functionality to log time series details for various errors, improved sharding to speed up backlog clearing, and reduced the time it spent collecting garbage, so the receiver should be in a well enough state for general use.

Project query language PromQL also sports two freshly stabilised features in the form of the @ modifier for anchoring selectors to absolute timestamps and negative offsets. Both are now enabled by default and allow users to write selectors that can look back from a timestamp of their choosing or select data from a future point in time relative to a timestamp, thus breaking the longstanding rule that PromQL expressions can only look into the (relative) past.

Stabilisations aside, the update comes with a couple of interesting under-the-hood enhancements looking to improve performance. The project’s time-series database TSDB for instance should now be quicker when matching labels and ingesting exemplars, and avoid allocations when popping from the intersected postings heap. It has also been reworked to make sure chunk writing doesn’t lead to blockage, so that latency spikes in remote-writes are avoided.

Looking into more user-facing changes, Prometheus 2.33 includes a new template function called stripPort. It was added in a bid to give developers a chance to construct more concise alerts, as it lets users split strings into a host and a port component, and only extract the host information for further processing steps.

Other than that, Prometheus’ service discovery and target page have been fitted with infinite scrolling capabilities to reduce load times for large setups, and a search bar to compensate for the accompanying loss of searchability using the ctrl+f shortcut. The service discovery component also learned to find targets in the Kubernetes namespace the Prometheus pod runs in, and add provider ID labels when using Kubernetes on cloud providers.

Prometheus 2.33 also fixes a couple of UI, TSDB, and promtool bugs so that for instance click targets shouldn’t overlap, and simultaneous garbage collection and write processes won’t lead to deadlocks anymore. Details are available in the release notes.