Version 3.0 of the popular open-source monitoring system Prometheus has been released, marking the tool's first major update in seven years. A variety of new features have been added, with improvements aimed at enhancing the user experience and streamlining workflows.
The completely revamped user interface (UI) is one of the most noticeable changes in Prometheus 3.0. The redesigned UI is intended to remove clutter and is based on a newer underlying technical stack (Mantine UI) for future-proofing. It has a PromLens-style tree view for more straightforward navigation, a better metrics explorer, and an "Explain" tab on metric search results, which can give behavioural insights too. For now, the old UI is still accessible via a feature flag, but the team recommends users switch to the new UI for a better experience.
In a video on the Better Stack YouTube channel, James Shopland explains how PromQL highlighting is now available outside of the group page, where previously Prometheus would just show the appropriate snippet YAML. The new UI also allows users to visualise PromQL queries as a tree of sub-expressions and see metric results by hovering over parts of the query, in a feature adopted from the PromLens query builder for Prometheus.
Explaining how users can now drill down into metrics and see new contextual information, Shopland says:
"This is a massive upgrade when we compare it to 2.0; when you clicked all you could see was just the list of metrics themselves and no information."
- James Shopland
In a video on the OpenObservability Talks YouTube channel, Dotan Horovits and Julius Volz discuss broader plans to improve UI and UX in Prometheus by unifying the UI experience across Prometheus components, particularly between the main Prometheus UI and the Alert Manager. Currently, these have different looks and technical foundations, with Alert Manager using Elm while the new Prometheus UI uses React. There is a shared vision to rebuild the Alert Manager UI using the same framework and style as the new Prometheus UI, but this hasn't happened yet due to the project's volunteer-driven nature. The speakers explain this is an opportunity for frontend developers to contribute to the project.
Outside of the UI, Prometheus 3.0 adds several features to support their recent commitment to OpenTelemetry. These include OTLP Ingestion, so Prometheus can now natively and directly receive metrics using the OpenTelemetry Metrics Protocol (OTLP), and UTF-8 normalisation allows users to store and query OpenTelemetry metrics without encountering issues like automatic conversion of dots to underscores in metric names.
Other new features include:
- Remote Write 2.0: Remote Write allows Prometheus instances to actively send the metrics they collect or receive to other instances. Version 2 of this protocol offers enhanced capabilities like native support for metadata, exemplars, timestamps, and histograms. In a deep dive at Kubecon NA 2024, Richard Hartman and Josh Abreu explain how Remote Write 2.0 uses string interning and symbol table techniques to optimise data transfer, resulting in a 60% reduction in messages over the wire, 90% reduction in memory allocation and 70% reduction in CPU utilisation.
- Native Histograms: This experimental feature introduces a new metric type that offers a more efficient and cost-effective alternative to classic histograms. While still under development, native histograms hold promise for simplifying data management. In the same deep dive, Hartman and Abreu explain how native histograms provide higher-resolution data than traditional histograms and are more efficient, requiring less mental overhead to implement. They can reveal previously hidden patterns and eliminate the need to pre-define perfect bucket boundaries.
- UTF-8 Support: By default, Prometheus 3.0 allows all valid UTF-8 characters in metric and label names, providing greater flexibility and eliminating the need for manual encoding. Writing on BlueSky, Julius Volz does urge caution on the latter point, stressing the importance of escaping UTF-8 characters.
It's important to note that Prometheus 3.0 introduces a few breaking changes, primarily focused on housekeeping and streamlining. These include removing some deprecated feature flags, and requires some configuration file adjustments, PromQL syntax, and scrape protocols. The Prometheus team recommends reviewing the migration guide to ensure a smooth upgrade process and identify any potential adjustments needed for users' specific setups. The announcement advises users to follow the recommended upgrade path carefully. Users are advised to upgrade to v2.55 of Prometheus 2.x before transitioning to v3.0. It's also important to note that rollback from v3.0 is only possible to v2.55, not to earlier versions.
Further future changes to Prometheus will add support for Delta temporality (allowing sending only changed counter values instead of total amounts), and other changes. Prometheus 3.0 is available for download now, and the blog post concludes by referring to the official Prometheus blog posts and documentation for detailed information on the new features, breaking changes, and upgrade instructions.