-
Notifications
You must be signed in to change notification settings - Fork 41.1k
DataSource metrics are not auto-configured when using lazy initialization #30282
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
Comments
Thanks for the report. I think this affects all DataSource metrics, not just when using Hikari. You can work around the Hikari metrics problem with the following exclude filter:
|
DataSource metrics are currently bound via some slightly unusual If |
In the current arrangement we have a We considered switching those to implement |
Thanks, @snicoll. A |
We're going to merge the above fix, but only in 2.7 since there's some risk involved. For 2.5 and 2.6, please use the workaround above. |
spring boot version: 2.6.4
After setting
spring.main.lazy-initialization=true
, hikari related metric disappeared from metric list. Although HikariDataSource is created during application context initialization, it was confirmed that HikariDataSourceMetricsConfiguration is not set. I have confirmed that HikariDataSourceMetricsConfiguration is the target of autoconfiguration as follows.The text was updated successfully, but these errors were encountered: