Skip to content

Commit

Permalink
fix: add support for Hikari pool metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
netroms committed Sep 4, 2024
1 parent 19248a9 commit 2a47fbe
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,11 @@ private String getDataSourceName(String beanName) {
public Collection<PoolMetadataProvider> dataSourceMetadataProvider() {
return List.of(
dataSource -> {
if (dataSource instanceof ComboPooledDataSource comboPooledDataSource) {
if (dataSource instanceof ComboPooledDataSource) {
ComboPooledDataSource comboPooledDataSource = (ComboPooledDataSource) dataSource;
return new C3p0MetadataProvider(comboPooledDataSource);
} else if (dataSource instanceof HikariDataSource hikariDataSource) {
} else if (dataSource instanceof HikariDataSource) {
HikariDataSource hikariDataSource = (HikariDataSource) dataSource;
return new HikariMetadataProvider(hikariDataSource);
} else {
throw new IllegalArgumentException(
Expand Down

0 comments on commit 2a47fbe

Please sign in to comment.