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
Micrometer allows for customization of its MeterRegistry via MeterFilters.
Filters can be used for various things, but one important capability is to omit, rewrite, or add tags to all metrics.
In order for MeterFilters to work, they need to be registered before all Meters. Because Alpine does a large chunk of initialization at class loading time, it is currently not possible to add filters in a way that guarantees that they'll be applied to all Meters.
ExecutorService metrics for example are registered in a static { } block. If the EventService class is loaded prior to the class adding filters to the registry, the filters will not be applied to ExecutorService metrics.
Because it is crucial that filters are registered *before* the individual meters, `ServiceLoader` is used to load and apply all customizations immediately after the registry is created.
Closesstevespringett#500
Signed-off-by: nscuro <nscuro@protonmail.com>
Because it is crucial that filters are registered *before* the individual meters, `ServiceLoader` is used to load and apply all customizations immediately after the registry is created.
Closesstevespringett#500
Signed-off-by: nscuro <nscuro@protonmail.com>
Micrometer allows for customization of its
MeterRegistry
viaMeterFilter
s.Filters can be used for various things, but one important capability is to omit, rewrite, or add tags to all metrics.
In order for
MeterFilter
s to work, they need to be registered before allMeter
s. Because Alpine does a large chunk of initialization at class loading time, it is currently not possible to add filters in a way that guarantees that they'll be applied to allMeter
s.ExecutorService
metrics for example are registered in astatic { }
block. If theEventService
class is loaded prior to the class adding filters to the registry, the filters will not be applied toExecutorService
metrics.Alpine/alpine-infra/src/main/java/alpine/event/framework/EventService.java
Lines 53 to 56 in 7615930
Provide a mechanism similar to Spring Boot's
MeterRegistryCustomizer
.The text was updated successfully, but these errors were encountered: