Skip to content

Latest commit

 

History

History
183 lines (149 loc) · 16 KB

changelog.adoc

File metadata and controls

183 lines (149 loc) · 16 KB

Release Notes

Changes marked with [bolt] are breaking changes relative to previous versions of the spec.

Changes in 2.3

A full list of changes may be found on the MicroProfile Metrics 2.3 Milestone

API/SPI Changes

  • Introduced the simple timer (@SimplyTimed) metric. (#496)

  • Added withOptional* methods to the MetadataBuilder, they don’t fail when null values are passed to them (#464)

  • Added the MetricID.getTagsAsArray() method to the API. (#457)

  • Added the method MetricType.fromClassName (#455)

Functional Changes

  • 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)

Specification Changes

  • 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)

  • Added ProcessCpuTime as a new optional base metric. (#442)

TCK enhancement

  • Improved TCK - Use WebArchive for deployment

Changes in 2.2

A full list of changes may be found on the MicroProfile Metrics 2.2.1 Milestone

API/SPI Changes

  • Reverted a problematic change from 2.1 where Gauges were required to return subclasses of java.lang.Number

Functional Changes

  • 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)

Specification Changes

  • (2.2.1) Added ProcessCpuTime as a new optional base metric. (#480)

Changes in 2.1

A full list of changes may be found on the MicroProfile Metrics 2.1 Milestone and MicroProfile Metrics 2.1.1 Milestone

API/SPI Changes

  • 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)

  • Added the reusable(boolean) method for MetadataBuilder (#407)

Functional Changes

  • (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)

Specification Changes

  • (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)

TCK enhancement

  • TCKs are updated to use RestAssured 4.0

Miscellaneous

  • Explicitly excluded the transitive dependency on javax.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)

Changes in 2.0

API/SPI Changes

  • [bolt] Refactoring of Counters, as the old @Counted was misleading in practice. (#290)

    • Counters via @Counted are now always monotonic, the monotonic attribute is gone. The Counted interface lost the dec() 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 from org.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 a MetadataBuilder. (#228)

  • Introduced a Tag object which represents a singular tag key/value pair. (#238)

  • MetricFilter modified to filter with MetricID instead of name. (#238)

Functional Changes

  • (2.0.3) Added ProcessCpuTime as a new optional base metric. (#454)

  • [bolt] Metadata is now immutable and built via a MetadataBuilder. (#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

    • Reserved characters in OpenMetrics format must be escaped. (#238)

    • [bolt] In OpenMetrics output format, the separator between scope and metric name is now a _ instead of a :. (#279)

    • [bolt] Metric names with camelCase are no longer converted to snake_case for OpenMetrics output. (#357)

  • [bolt] The default value of the reusable attribute for metric objects created programmatically (not via annotations) is now true (#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)

Specification Changes

  • (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, the monotonic attribute is gone. The Counted interface lost the dec() 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

    • Reserved characters in OpenMetrics format must be escaped. (#238)

    • [bolt] In OpenMetrics output format, the separator between scope and metric name is now a _ instead of a :. (#279)

    • [bolt] Metric names with camelCase are no longer converted to snake_case for OpenMetrics output. (#357)

  • [bolt] The default value of the reusable attribute for metric objects created programmatically (not via annotations) is now true (#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)

Changes in 1.1

A full list of changes may be found on the MicroProfile Metrics 1.1 Milestone

API/SPI Changes

  • org.eclipse.microprofile.metrics.MetricRegistry.register(String name, Metric, Metadata) is deprecated. Use org.eclipse.microprofile.metrics.MetricRegistry.register(Metadata, Metric) instead, where Metadata already has a field for the name.

Functional Changes

  • org.eclipse.microprofile.metrics.MetricRegistry.register(String name, Metric, Metadata) is deprecated. Use org.eclipse.microprofile.metrics.MetricRegistry.register(Metadata, Metric) instead, where Metadata 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)

Specification Changes

  • Annotations and Metadata can now have a flag reusable that indicates that the metric name can be registered more than once. Default is false as in Metrics 1.0. See architecture.adoc.

TCK enhancement

  • Improved TCK