-
Notifications
You must be signed in to change notification settings - Fork 885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix micrometer bridge auto configuration annotation #13083
base: main
Are you sure you want to change the base?
fix micrometer bridge auto configuration annotation #13083
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think a test could be added for this?
yes - I even found the test that I broke with this PR. |
a888249
to
b9a2ab1
Compare
testing { | ||
suites { | ||
val testPrometheus by registering(JvmTestSuite::class) { | ||
dependencies { | ||
runtimeOnly("io.micrometer:micrometer-registry-prometheus:1.14.3") | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the failure for this test without your change to OpenTelemetryMeterRegistry
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just tried... there is no failure - which confirms that the error does not always appear
but I've improved the test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the failure now (without your change to OpenTelemetryMeterRegistry
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@trask the test is still passing with the unchanged code
I don't know how to force spring to use a different resolution order from the provided constraints
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the test is still passing the old code - but I don't have an idea how to make a better test - you'd have to force spring to randomize the bean order within the provided constraints
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, makes sense
@AutoConfigureAfter(SimpleMetricsExportAutoConfiguration.class) | ||
@AutoConfigureAfter({ | ||
SimpleMetricsExportAutoConfiguration.class, | ||
PrometheusMetricsExportAutoConfiguration.class |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a way to do this generically for all other MeterRegistries? (not only simple and prometheus?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you want to add more different configs that load different metric registries? sounds too much - @jeanbisutti what's your take?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, asking if there's a way to do it generically, so that it loads after all other MeterRegistries, without having to hard-code specific meter registries
Fixes #12719 - hopefully