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
Problem with prometheus metrics and mongodb #40128
Comments
Thanks for the report. If you'd like us to spend some time investigating, please take the time to provide a complete minimal sample (something that we can unzip or git clone, build, and deploy) that reproduces the problem. |
I have tried to create small repro using spring initializr, but unfortunately basic project doesn't help. Not sure what exactly causes out of order processing in my application, it looks like this: One thought was that premature execution of BTW #26665 (comment) this workaround also works in my case, so no need to disable mongo metrics in the end. |
A breakpoint in I suspect something in the application is using the |
You are right, after I have carefully investigated call stack from the Thanks @mhalbritter |
I noticed that common tags are not applied on service that uses MongoDB. In debugging I see that for some reason
MongoMetricsConnectionPoolListener
logic kicks (and interacts withMeterRegistry
) beforeMetricsAutoConfiguration
had a chance to configure and applyMeterRegistryPostProcessor
(spring boot v3.2.3).Might be related to #26665
For now I just disabled (
exclude = [MongoMetricsAutoConfiguration::class]
) mongo metrics and it fixes behavior.The text was updated successfully, but these errors were encountered: