Log4j2Metrics does not work with multiple registries and non-root loggers #5893
Labels
bug
A general bug
instrumentation
An issue that is related to instrumenting a component
module: micrometer-core
An issue that is related to our core module
Milestone
While reading the code while looking at #5810 I saw another issue in this fix (or rather, this does not fully support binding to multiple
MeterRegistry
). The issue is that it only works onrootLoggerConfig
, for all other logger configs the second filter will not be added.Here is a modified test from the test added in this PR that does not pass as the non-root logger configuration is not tracked for the second
MeterRegistry
:The issue is the
instanceof
checks inLog4j2Metrics
, it needs to check the correct instance ofMetricsFilter
to properly support registering multipleMeterRegistry
(which is a very odd case anyway).Originally posted by @pativa in #5818 (comment)
The text was updated successfully, but these errors were encountered: