Skip to content

Releases: prometheus/client_java

1.0.0-alpha-4 / 2023-09-07

07 Sep 11:20
Compare
Choose a tag to compare
Pre-release

This is the current pre-release for the upcoming 1.0.0 version.

It adds the prometheus-metrics-instrumentation-jvm module, which is a port of the simpleclient default exports to the new metrics library:

JvmMetrics
        .newBuilder()
        .register();

If a unit is present, the new metrics library requires the unit to be the last part of the metric name, as defined in Prometheus Metric and Label Naming. Therefore we had to rename a few default metrics:

  • jvm_memory_bytes_init -> jvm_memory_init_bytes
  • jvm_memory_bytes_committed -> jvm_memory_committed_bytes
  • jvm_memory_bytes_max -> jvm_memory_max_bytes
  • jvm_memory_bytes_used -> jvm_memory_used_bytes
  • jvm_memory_pool_bytes_init -> jvm_memory_pool_init_bytes
  • jvm_memory_pool_bytes_committed -> jvm_memory_pool_committed_bytes
  • jvm_memory_pool_bytes_max -> jvm_memory_pool_max_bytes
  • jvm_memory_pool_bytes_used -> jvm_memory_pool_used_bytes

Apart from that, jvm_info was renamed to jvm_runtime_info.

If these breaking changes are an issue: There will be a compatibility module that will allow you to use the old simpleclient default exports with the new metrics library.

There still isn't much documentation yet, but for each new module there's an end-to-end example and a README in the examples/ directory (on the 1.0.x branch).

The next features on the roadmap towards 1.0.0 is a backwards-compatibility module for existing simpleclient.

1.0.0-alpha-3 / 2023-08-29

29 Aug 21:32
Compare
Choose a tag to compare
Pre-release

This is the current pre-release for the upcoming 1.0.0 version.

It adds two major new modules:

  • prometheus-metrics-exporter-httpserver is a built-in HTTP server for exposing Promtheus metrics (this is a port of simpleclient_httpserver).
  • prometheus-metrics-exporter-opentelemetry is an exporter for pushing metrics to an OpenTelemetry endpoint in OTLP format.

In addition to these new features, there was a lot of internal refactoring.

There isn't much documentation yet, but for each new module there's an end-to-end example and a README in the examples/ directory (on the 1.0.x branch).

The next features on the roadmap towards 1.0.0 are a port of the built-in JVM metrics, and a backwards-compatibility module for existing simpleclient.

1.0.0-alpha-2 / 2023-07-27

27 Jul 15:23
Compare
Choose a tag to compare
Pre-release

This release is an internal refactoring to prepare for better integration with OpenTelemetry metrics in the future.

User facing functionality like API and exposition formats are the same as in 1.0.0-alpha-1.

We also started adding more documentation

The source code is on the 1.0.x branch.

1.0.0-alpha-1 / 2023-07-17

17 Jul 13:29
Compare
Choose a tag to compare
Pre-release

First pre-release of the upcoming Prometheus metrics library. The main feature is support for the new Prometheus native histograms. This release contains the following modules:

  • prometheus-metrics-core - core metric library.
  • prometheus-metrics-model - data model for read-only immutable Prometheus metrics snapshots.
  • prometheus-metrics-exposition-formats - text format, OpenMetrics format, Prometheus protobuf format.
  • prometheus-metrics-config - runtime configuration, e.g. for configuring new histogram buckets at runtime.
  • prometheus-metrics-exporter-servlet-jakarta - exporter servlet.

These modules are currently independent of the existing simpleclient modules. Before releasing 1.0.0 we will implement a bridge from simpleclient_* to prometheus-metrics-* for backwards compatibility.

The source code is on the 1.0.x branch.

There is a tomcat-servlet-example project for trying the new metrics library (see README).

0.16.0 / 2022-06-15

15 Jun 22:08
Compare
Choose a tag to compare

[ENHANCEMENT] Environment variable PROMETHEUS_DISABLE_CREATED_SERIES=true for disabling _created metrics (#791). Thanks @mindw
[ENHANCEMENT] Support for OpenTelemetry trace sampling: Only traces that are sampled will be used as exemplars (#766). Thanks @fscellos
[ENHANCEMENT] Handle thread IDs <= 0. Apparently Apache Zookeeper generates negative thread IDs, which causes issues in jmx_exporter (#784). Thanks @dhoard
[ENHANCEMENT] Mark opentelemtry-api as optional to make it an optional dependency in OSGi (#790). Thanks @adessaigne.
[ENHANCEMENT] Move servlet adapters to an internal package to avoid duplicating classes when building OSGi bundles (#789). Thanks @adessaigne
[ENHANCEMENT] Extend the API of the HTTPServer.Builder to allow custom ExecutorService instances (#756). Thanks @dhoard
[ENHANCEMENT] Reduce the number of core threads in HTTPServer from 5 to 1. The HTTPServer will still start up to 5 threads on demand if there are parallel requests, but it will use only 1 thread as long as requests are sequential (#786).
[ENHANCEMENT] Optimize metric name sanitization: Replace the regular expression with a hard-coded optimized algorithm to improve performance (#777). Thanks @fwbrasil
[BUGFIX] Fix missing Dropwizard metrics in Vertx (#780). Thanks @yaronel.
[BUGFIX] Fix incorrect buffer size in the Servlet exporter (#794). Thanks @GreenRover for finding the issue and @dhoard for the fix.
[BUGFIX] Fix sample name filter for the JMX metric jvm_memory_bytes_committed (#768). Thanks @SvenssonWeb
[ENHANCEMENT] Lots of dependency version bumps.

0.15.0 / 2022-02-05

05 Feb 22:42
Compare
Choose a tag to compare

Major refactoring of Quantiles in Summary metrics. This will make them faster and use less memory. The new implementation also supports two corner cases that were not possible before: You can now use .quantile(0, 0) to track the minimum observed value and .quantile(1, 0) to track the maximum observed value. Thanks a lot @DieBauer! #755

In addition to that the release includes:

[ENHANCEMENT] Lots of dependency version bumps.
[BUGFIX] Apply ServletConfig during Servlet initialization in simpleclient_servlet and simpleclient_servlet_jakarta #739
[BUGFIX] HTTPServer: Don't send a Content-Length header when Transfer-Encoding is chunked #738. Thanks @dhoard
[BUGFIX] simpleclient_log4j set the log4j dependency scope as provided so that users don't accidentally pull the log4j version used in client_java. Note: This module is for monitoring log4j version 1, in simpleclient_log4j2 the dependency is already provided.
[BUGFIX] simpleclient_dropwizard set the Dropwizard dependency scope as provided so that users don't accidentally pull the Dropwizard version used in client_java.

0.14.1 / 2021-12-19

19 Dec 11:46
Compare
Choose a tag to compare

Bump the log4j version in simpleclient_log4j2 to 2.17.0. Apart from that this release is identical to 0.14.0.

0.14.0 / 2021-12-18

18 Dec 17:24
Compare
Choose a tag to compare

Yet another log4j version update in simpleclient_log4j2: This time to 2.16.0. Note that the log4j dependency in simpleclient_log4j2 has scope provided, i.e. simpleclient_log4j2 does not ship with log4j. simpleclient_log4j2 uses whatever log4j version the monitored application provides at runtime. Updating the log4j dependency in simpleclient_log4j2 helps getting rid of security scanner warnings (see #733), but in order to eliminate the log4j vulnerability you must make sure that the application you monitor ships with an up-to-date log4j version.

Apart from the log4j update we have a new feature:

[ENHANCEMENT] The HTTPServer can now be configured to use SSL (#695). Thanks @dhoard.

0.13.0 / 2021-12-13

13 Dec 22:24
Compare
Choose a tag to compare

We updated log4j to 2.15.0, which fixes the log4shell vulnerability (CVE-2021-44228) (#726). Technically simpleclient_log4j2 is not directly affected by the vulnerability, because as long as you update log4j in your monitored application simpleclient_log4j2 will pick up the updated version. However, it makes sense to remove the vulnerable versions from the dependency tree, therefore the update.

In addition to the log4j update in simpleclient_log4j2, this release contains the following enhancements and fixes:

[ENHANCEMENT] Allow passing a custom registry to the logback InstrumentedAppender (#690). Thanks @MatthewDolan.
[BUGFIX] Correct handling of HEAD requests (#688). Thanks @dhoard.
[ENHANCEMENT] Lots of more integration tests and tests with different Java versions.
[ENHANCEMENT] Make HTTPMetricHandler public so that users can use them in their own HttpServers (#722). Thanks @dhoard.
[ENHANCEMENT] Make Base64 encoding in the HTTP authentication for the PushGateway work with all Java versions (#698). Thanks @dhoard.

0.12.0 / 2021-08-29

29 Aug 21:47
Compare
Choose a tag to compare

This release has a (minor) breaking change in the simpleclient_hotspot module, fixing an incompatibility with OpenMetrics:

The metric jvm_classes_loaded from the ClassLoadingExports was renamed to jvm_classes_currently_loaded #681. The reason is that there is another metric named jvm_classes_loaded_total, and in OpenMetrics this resulted in a name conflict because the base name jvm_classes_loaded was the same, see github.com/prometheus/jmx_exporter/issues/621.

[ENHANCEMENT] add support for Jakarta Servlet, implemented in the new simpleclient_servlet_jakarta module #647. Thanks @mmadoo for the initial PR.
[ENHANCEMENT] provide a way for filtering metrics by name / name prefix. This can be configured either in the HTTPServer, or in the Servlet exporter (both javax and Jakarta). For example, if some JMX metrics cause performance issues, this can be used for excluding these metrics #680.
[ENHANCEMENT] for the Servlet filter (both javax and Jakarta): Add a parameter to strip the deployment path from the path label #639. Thanks @lapo-luchini !
[ENHANCEMENT] Add HTTP Authentication to the HTTPServer #682. Thanks @dhoard.
[BUGFIX] Use <packaging>bundle</packaging> everywhere so that client_java works with OSGI again #678. Thanks @bigmarvin.
[BUGFIX] use the correct name for the metric type gaugehistogram in OpenMetrics (previously this was wrongly named gauge_histogram)