-
Notifications
You must be signed in to change notification settings - Fork 40.2k
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
MeterRegistryPostProcessor not ran when MeterRegistry injected in cache configuration beans #29053
Comments
Thanks for the sample. Running it leads to the following:
This is due to early initialization of A couple of remarks about the sample: there's no need to provide a version for Spring Data Redis or Lettuce, and using field autowiring on the |
Thanks @snicoll for the fix. Regarding your remarks, it is just because I copy/paste code from our actual prod application that use an older Spring / Spring boot version. |
I wanted to add some metrics provided by Lettuce for monitoring purpose of connections to Redis.
But when injecting MeterRegistry in our Configuration class, MeterRegistryProcessor is no longer called, hence MeterRegistry is not configured.
Similar issue has been reported here #18565, but only a fix for Spring Cloud Sleuth use case has been done.
I've built a minimal sample application to reproduce issue: https://github.com/Nik95/sample-spring-boot
The text was updated successfully, but these errors were encountered: