eclipse-vertx / vert.x

Vert.x is a tool-kit for building reactive applications on the JVM
http://vertx.io
Other
14.26k stars 2.07k forks source link

Micrometer configuration lifecycle violation #5268

Closed jonatan-ivanov closed 1 month ago

jonatan-ivanov commented 1 month ago

Micrometer's MeterRegistry should be "configured" (see MeterRegistry.Config) before registering Meter instances to it. For example MeterFilters should be configured before a Meter has been registered to the registry.

Historically, Micrometer has allowed configuring MeterFilters after meters have been registered but due to certain performance optimizations with https://github.com/micrometer-metrics/micrometer/pull/4917 we took a step toward warning users about this situation.

See:

It seems in certain cases Vert.x configures a MeterFilter after a Meter has been registered to the registry causing the warning mentioned above. See https://github.com/micrometer-metrics/micrometer/issues/4920#issuecomment-2125854418 by @sanyarnd with a reproducer.

@sanyarnd could you please provide the Vert.x version you are using and any additional details you have?

vietj commented 1 month ago

@jonatan-ivanov can you re-create this issue in this repo please ? https://github.com/vert-x3/vertx-micrometer-metrics/issues/202

jonatan-ivanov commented 1 month ago

@vietj Of course: https://github.com/vert-x3/vertx-micrometer-metrics/issues/224