-
This release aligns with Jakarta EE 10, so it won’t work with earlier versions of Jakarta or Java EE
-
Removed SimpleTimer class and SimplyTimed annotation
-
Removed ConcurrentGauge class and ConcurrentGauge annotation
-
Removed Meter class and Metered annotation
-
Removed Metered interface
-
Updated Timer class
-
Removed
getFifteenMinuteRate()
method -
Removed
getFiveMinuteRate()
method -
Removed
getMeanRate()
method -
Removed
getOneMinuteRate()
method -
Removed
getStdDev()
method
-
-
Updated MetricRegistry class
-
Removed
register(String name, T metric)
method -
Removed
register(Metadata metadata, T metric)
method -
Removed
register(Metadata metadata, T metric, Tag… tags)
method -
Removed
concurrentGauge(String name)
method -
Removed
concurrentGauge(String name, Tag… tags)
method -
Removed
concurrentGauge(MetricID metricID)
method -
Removed
concurrentGauge(Metadata metadata)
method -
Removed
concurrentGauge(Metadata metadata, Tag… tags)
method -
Removed
meter(String name)
method -
Removed
meter(String name, Tag… tags)
method -
Removed
meter(MetricID metricID)
method -
Removed
meter(Metadata metadata)
method -
Removed
meter(Metadata metadata, Tag… tags)
method -
Removed
simpleTimer(String name)
method -
Removed
simpleTimer(String name, Tag… tags)
method -
Removed
simpleTimer(MetricID metricID)
method -
Removed
simpleTimer(Metadata metadata)
method -
Removed
simpleTimer(Metadata metadata, Tag… tags)
method -
Removed
getConcurrentGauge(MetricID metricID)
method -
Removed
getConcurrentGauges()
method -
Removed
getConcurrentGauges(MetricFilter filter)
method -
Removed
getMeter(MetricID metricID)
method -
Removed
getMeters()
method -
Removed
getMeters(MetricFilter filter)
method -
Removed
getSimpleTimer(MetricID metricID)
method -
Removed
getSimpleTimers()
method -
Removed
getSimpleTimers(MetricFilter filter)
method
-
-
Updated DefaultMetadata class
-
Removed displayName from constructor
-
Removed
getDisplayname()
method -
Removed
displayName()
method
-
-
Updated Metadata class
-
Removed
getDisplayname()
method -
Removed
displayName()
method
-
-
Updated MetadataBuilder class
-
Removed
withDisplayName(String displayName)
method
-
-
Updated Snapshot class
-
Removed
getValue(double quantile)
method -
Removed
getValues()
method -
Removed
get75thPercentile()
method -
Removed
get95thPercentile()
method -
Removed
get98thPercentile()
method -
Removed
get999thPercentile()
method -
Removed
get99thPercentile()
method -
Removed
getMedian()
method -
Removed
getMin()
method -
Removed
getStdDev()
method -
Modified
size()
method to return long -
Modified
getMax()
method to return double
-
-
Updated Gauge class
-
can now only work with types that extend Number
-
-
Updated MetricType class
-
Removed
CONCURRENT_GAUGE
enum -
Removed
METERED
enum -
Removed
SIMPLE_TIMER
enum
-
-
Updated Snapshot class
-
Added
percentileValues()
method -
Added Snapshot.PercentileValue inner class
-
-
Added concept of custom scopes for metrics (677)
-
added tagging of all metrics with mp_scope=value
-
changed /metrics/base to /metrics?scope=base (692)
-
changed /metrics/vendor to /metrics?scope=vendor (692)
-
changed /metrics/application to /metrics?scope=application (692)
-
added /metrics?scope=myScope for custom scoped metrics (677)
-
added ability for applications to add metrics to a custom scope (677)
-
added ability to use custom scope names with @RegistryScope annotation (677)
-
replaced @RegistryType with @RegistryScope (677)
-
-
Other changes
-
removed requirement to convert metrics to base units for Prometheus output
-
changed from prepending scope to the metric name to putting the scope in mp_scope tag
-
clarified that implementations of /metrics endpoint must support Prometheus text-based exposition format, and may also support OpenMetrics exposition format. (678)
-
removed JSON format for /metrics output (685)
-
added restriction to block apps from adding metric IDs with the reserved mp_scope and mp_app tag names (700)
-
changed _app tag name to mp_app (705)
-
added mp_scope tag to indicate metric scope
-
added configuration recommendations for vendors implementing the API with Micrometer libraries
-
added rule that metrics of the same name must all contain the same label set (721)
-
changed REST.request metric from SimpleTimer to Timer type
-
changed the base metrics to be optional (680)
-
-
This release aligns with Jakarta EE 9.1, so it won’t work with earlier versions of Jakarta or Java EE (#639)
-
Removed everything related to reusability from the API code. All metrics are now considered reusable.
-
CDI producers annotated with
@Metric
no longer trigger metric registration. If these metrics should be registered, it must be done differently (for example using theMetricRegistry
methods) -
MetricRegistry
changed fromabstract class
tointerface
-
Changed
Timer.update(long duration, java.util.concurrent.TimeUnit)
toTimer.update(java.time.Duration duration)
-
Removed
MetadataBuilder.withOptional*
methods, the remainingwith*
methods do acceptnull
value (considered not present) exceptwithName
which does not acceptnull
or""
-
Changed
Metadata.getDescription()
andMetadata.getUnit()
to returnString
instead ofOptional<String>
and addedMetadata.description()
andMetadata.unit()
that returnOptional<String>
-
Updated dependencies scopes and versions to align with Jakarta EE 8
-
MetricRegistry
changed fromabstract class
tointerface
-
Added the
MetricRegistry.getType()
method -
Added the
MetricRegistry.counter(MetricID)
method -
Added the
MetricRegistry.concurrentGauge(MetricID)
method -
Added the
MetricRegistry.gauge(String, Object, Function, Tag[])
method -
Added the
MetricRegistry.gauge(MetricID, Object, Function)
method -
Added the
MetricRegistry.gauge(Metadata, Object, Function, Tag[])
method -
Added the
MetricRegistry.gauge(String, Supplier, Tag[])
method -
Added the
MetricRegistry.gauge(MetricID, Supplier)
method -
Added the
MetricRegistry.gauge(Metadata), Supplier, Tag[])
method -
Added the
MetricRegistry.histogram(MetricID)
method -
Added the
MetricRegistry.meter(MetricID)
method -
Added the
MetricRegistry.timer(MetricID)
method -
Added the
MetricRegistry.simpleTimer(MetricID)
method -
Added the
MetricRegistry.getMetric(MetricID)
method -
Added the
MetricRegistry.getMetric(MetricID metricID, Class)
method -
Added the
MetricRegistry.getCounter(MetricID)
method -
Added the
MetricRegistry.getConcurrentGauge(MetricID)
method -
Added the
MetricRegistry.getGauge(MetricID)
method -
Added the
MetricRegistry.getHistogram(MetricID)
method -
Added the
MetricRegistry.getMeter(MetricID)
method -
Added the
MetricRegistry.getTimer(MetricID)
method -
Added the
MetricRegistry.getSimpleTimer(MetricID)
method -
Added the
MetricRegistry.getMetadata(String)
method -
Added the
MetricRegistry.getMetrics(MetricFilter)
method -
Added the
MetricRegistry.getMetrics(Class, MetricFilter)
method -
Added
SimpleTimer.getMinTimeDuration()
andSimpleTimer.getMaxTimeDuration()
methods which return ajava.time.Duration
object (#523) -
Timer class updated (#524)
-
Changed
Timer.update(long duration, java.util.concurrent.TimeUnit)
toTimer.update(java.time.Duration duration)
-
Added
Timer.getElapsedTime()
which returnsjava.time.Duration
-
-
Removed
MetadataBuilder.withOptional*
methods -
Global tags and
_app
tag are no longer handled automatically by theMetricID
class, the implementation is expected to add them by itself, for example during metric export -
Added the
Histogram.getSum()
which returnslong
(#597)
-
Simple Timer metrics now track the highest and lowest recorded timing duration of the previous completed minute (#523)
-
Timer now exposes total elapsed time duration as a metric value. (#524)
-
Clarified that the existing REST metric
REST.request
will not monitor and track a REST request to a REST endpoint if an unmapped exception occurs. -
Introduced a new base REST metric
REST.request.unmappedException.total
that counts the occurrences of unmapped exceptions for each REST endpoint (#533) -
Histogram now exposes the total sum of recorded values as a
sum
value (#597)-
In JSON format it is exposed as a
sum
value -
In OpenMetrics format it is exposed as a
sum
value under thesummary
type
-
-
Timer now exposes the
elapsedTime
metric value assum
under thesummary
type in OpenMetrics format (#597)
-
Removed the concept of reusability
-
CDI producers annotated with
@Metric
no longer trigger metric registration -
Clarified how the implementation must handle metrics applied via CDI stereotypes
-
The implementation is required to sanitize
Metadata
passed by the application in cases when it does not contain an explicit type, but the type is implied by the name of the registration method that is being called. -
Clarified that the existing REST metric
REST.request
will not monitor and track a REST request to a REST endpoint if an unmapped exception occurs -
Introduced a new base REST metric
REST.request.unmappedException.total
that counts the occurrences of unmapped exceptions for each REST endpoint (#533) -
Histogram now exposes the total sum of recorded values as a
sum
value (#597)-
In JSON format it is exposed as a
sum
value -
In OpenMetrics format it is exposed as a
sum
value under thesummary
type
-
-
Timer now exposes the
elapsedTime
metric value assum
under thesummary
type in OpenMetrics format (#597)
A full list of changes may be found on the MicroProfile Metrics 2.3 Milestone
-
Introduced a new base metric derived from RESTful stats into the base scope.
-
REST.request
: Tracks the total count of requests and total elapsed time spent at the REST endpoint
-
-
Introduced the simple timer (
@SimplyTimed
) metric. (#496) -
The API code no longer requires a correctly configured MP Config implementation to be available at runtime, so it is possible to slim down deployments if MP Config is not necessary (#466)
A full list of changes may be found on the MicroProfile Metrics 2.2.1 Milestone
-
Reverted a problematic change from 2.1 where Gauges were required to return subclasses of
java.lang.Number
-
Reverted a problematic change from 2.1 where Gauges were required to return subclasses of
java.lang.Number
-
(2.2.1) Added ProcessCpuTime as a new optional base metric. (#480)
-
(2.2.1) Added ProcessCpuTime as a new optional base metric. (#480)
A full list of changes may be found on the MicroProfile Metrics 2.1 Milestone and MicroProfile Metrics 2.1.1 Milestone
-
(2.1.1) Added ProcessCpuTime as a new optional base metric. (#454)
-
Clarified in the API code that Gauges must return values that extend
java.lang.Number
. [NOTE: this caused issues with backward compatibility and was reverted in 2.2] (#304) -
Clarified that implementations can, for JSON export of scopes containing no metrics, omit them, or that they can be present with an empty value. (#416)
-
Clarified that metrics should not be created for private methods when a class is annotated (the TCK asserted this in 2.0 anyway) (#416)
-
Added the
reusable(boolean)
method for MetadataBuilder (#407)
-
(2.1.1) Added ProcessCpuTime as a new optional base metric. (#454)
-
Clarified that metric registry implementations are required to be thread-safe. (#300)
-
Clarified that implementations can, for JSON export of scopes containing no metrics, omit them, or that they can be present with an empty value. (#416)
-
Clarified that metrics should not be created for private methods when a class is annotated (the TCK asserted this in 2.0 anyway) (#416)
-
Added some text to the specification about programmatic creation of metrics (without annotations) (#399)
-
Explicitly excluded the transitive dependency on
jakarta.el-api
from the build of the specification. It wasn’t actually used anywhere in the build so there should be no impact. Implementations can still support the Expression Language if they choose to. (#417)
A full list of changes may be found on the MicroProfile Metrics 2.0 Milestone and MicroProfile Metrics 2.0.1 Milestone and MicroProfile Metrics 2.0.2 Milestone
Changes marked with [bolt] are breaking changes relative to previous versions of the spec.
-
[bolt] Refactoring of Counters, as the old
@Counted
was misleading in practice. (#290)-
Counters via
@Counted
are now always monotonic, themonotonic
attribute is gone. TheCounted
interface lost thedec()
methods. -
Former non-monotonic counters are now
@ConcurrentGauge
and also in the output reported as gauges. (#290) -
See Migration hints about migration of applications using MicroProfile Metrics. (#290)
-
-
Removed unnecessary
@InterceptorBinding
annotation fromorg.eclipse.microprofile.metrics.annotation.Metric
. (#188) -
[bolt] Removed deprecated
org.eclipse.microprofile.metrics.MetricRegistry.register(String name, Metric, Metadata)
(#268) -
[bolt]
Metadata
is now immutable and built via aMetadataBuilder
. (#228) -
Introduced a Tag object which represents a singular tag key/value pair. (#238)
-
MetricFilter modified to filter with MetricID instead of name. (#238)
-
(2.0.3) Added ProcessCpuTime as a new optional base metric. (#454)
-
[bolt]
Metadata
is now immutable and built via aMetadataBuilder
. (#228) -
[bolt] Metrics are now uniquely identified by a MetricID (combination of the metric’s name and tags). (#238)
-
MetricFilter modified to filter with MetricID instead of name. (#238)
-
The 'Metadata' is mapped to a unique metric name in the
MetricRegistry
and this relationship is immutable. (#238) -
Tag key names for labels are restricted to match the regex
[a-zA-Z_][a-zA-Z0-9_]*
. (#238) -
Tag values defined through MP_METRICS_TAGS must escape equal signs
=
and commas,
with a backslash\
. (#238) -
[bolt] JSON output format for GET requests now appends tags along with the metric in
metricName;tag=value;tag=value
format. JSON format for OPTIONS requests have been modified such that the 'tags' attribute is a list of nested lists which holds tags from different metrics that are associated with the metadata. (#381) -
OpenMetrics format - formerly called Prometheus format
-
[bolt] The default value of the
reusable
attribute for metric objects created programmatically (not via annotations) is nowtrue
(#328) -
[bolt] Some base metrics' names have changed to follow the convention of ending the name of accumulating counters with
total
. (#375) -
[bolt] Some base metrics' types have changed from Counter to Gauge since Counters must now count monotonically. (#375)
-
[bolt] Some base metrics' names have changed because they now use tags to distinguish metrics for multiple JVM objects. For example, each existing garbage collector now has its own
gc.total
metric with the name of the garbage collector being in a tag. Names of some base metrics in the OpenMetrics output are also affected by the removal of conversion from camelCase to snake_case. (#375)
-
(2.0.3) Added ProcessCpuTime as a new optional base metric. (#454)
-
[bolt] Refactoring of Counters, as the old
@Counted
was misleading in practice. (#290)-
Counters via
@Counted
are now always monotonic, themonotonic
attribute is gone. TheCounted
interface lost thedec()
methods. -
Former non-monotonic counters are now
@ConcurrentGauge
and also in the output reported as gauges. (#290) -
See Migration hints about migration of applications using MicroProfile Metrics. (#290)
-
-
[bolt] Metrics are now uniquely identified by a MetricID (combination of the metric’s name and tags). (#238)
-
The 'Metadata' is mapped to a unique metric name in the
MetricRegistry
and this relationship is immutable. (#238) -
Tag key names for labels are restricted to match the regex
[a-zA-Z_][a-zA-Z0-9_]*
. (#238) -
Tag values defined through MP_METRICS_TAGS must escape equal signs
=
and commas,
with a backslash\
. (#238) -
OpenMetrics format - formerly called Prometheus format
-
[bolt] The default value of the
reusable
attribute for metric objects created programmatically (not via annotations) is nowtrue
(#328) -
[bolt] Some base metrics' names have changed to follow the convention of ending the name of accumulating counters with
total
. (#375) -
[bolt] Some base metrics' types have changed from Counter to Gauge since Counters must now count monotonically. (#375)
-
[bolt] Some base metrics' names have changed because they now use tags to distinguish metrics for multiple JVM objects. For example, each existing garbage collector now has its own
gc.total
metric with the name of the garbage collector being in a tag. Names of some base metrics in the OpenMetrics output are also affected by the removal of conversion from camelCase to snake_case. (#375) -
Added a set of recommendations how application servers with multiple deployed applications should behave if they support MP Metrics. (#240)
A full list of changes may be found on the MicroProfile Metrics 1.1 Milestone
-
org.eclipse.microprofile.metrics.MetricRegistry.register(String name, Metric, Metadata)
is deprecated. Useorg.eclipse.microprofile.metrics.MetricRegistry.register(Metadata, Metric)
instead, whereMetadata
already has a field for the name.
-
org.eclipse.microprofile.metrics.MetricRegistry.register(String name, Metric, Metadata)
is deprecated. Useorg.eclipse.microprofile.metrics.MetricRegistry.register(Metadata, Metric)
instead, whereMetadata
already has a field for the name. -
Global tags are now supplied via the means of MicroProfile Config (the env variable is still valid). (#165)
-
Annotations and
Metadata
can now have a flagreusable
that indicates that the metric name can be registered more than once. Default isfalse
as in Metrics 1.0. See architecture.adoc.