You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current approach in reactor is that FluxMetrics(Fuseable) (and other similar classes) accept a reference to a micrometer MeterRegistry, but in practice always use Metrics.globalRegistry from micrometer (to avoid exposing a micrometer class in the Flux API that would cause a class loading exception if micrometer is not on the classpath).
this doesn't give much flexibility to users, forcing the use of the one and only Metrics.globalRegistry when using reactor, which in turn often delegates to many registries.
The proposed solution is to introduce a way to configure the "registry to use with reactor", which by default could be Metrics.globalRegistry to remain backwards compatible. Tests could thus also pass in a throwaway registry per-test. This configuration option needs to be done in a way that doesn't trigger classloading of micrometer when not needed (and not present)
The text was updated successfully, but these errors were encountered:
This commit revisits the use of MicroMeter in project reactor by not
solely relying on MicroMeter's glogbalRegistry, but instead offering
a way to configure which registry to use prior to calling metrics().
The default value is still the globalRegistry, thus being fully backwards
compatible.
The current approach in reactor is that
FluxMetrics(Fuseable)
(and other similar classes) accept a reference to a micrometer MeterRegistry, but in practice always useMetrics.globalRegistry
from micrometer (to avoid exposing a micrometer class in the Flux API that would cause a class loading exception if micrometer is not on the classpath).This is problematic in two ways:
Metrics.globalRegistry
when using reactor, which in turn often delegates to many registries.The proposed solution is to introduce a way to configure the "registry to use with reactor", which by default could be
Metrics.globalRegistry
to remain backwards compatible. Tests could thus also pass in a throwaway registry per-test. This configuration option needs to be done in a way that doesn't trigger classloading of micrometer when not needed (and not present)The text was updated successfully, but these errors were encountered: