eclipse / microprofile-metrics

microprofile-metrics
Apache License 2.0
100 stars 66 forks source link

[Potential] Re-instate @RegistryType and MetricRegistry.Type, but as deprecated instead. #746

Closed Channyboy closed 1 year ago

Channyboy commented 1 year ago

Bring back into MP Metrics 5.0 the @RegistryType qualifier annotation and the MetricRegistry.Type enum. These, however, will be in marked deprecated.

This is to accommodate MP Fault Tolerance.

Azquelt commented 1 year ago

More detail on the problems this causes for Fault Tolerance:

The Fault Tolerance TCK needs to check that implementations have registered the correct metrics and to do that it needs to get the MetricRegistry for the base scope.

Injecting a MetricRegistry with @RegistryType in 4.0 or @RegistryScope in 5.0 is the only way to do this which makes it very hard to support both versions of the Metrics API.

There aren't any compatibility problems with the Fault Tolerance API or spec, only with the TCK.