palantir / atlasdb

Transactional Distributed Database Layer

Home Page:https://palantir.github.io/atlasdb/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow ConnectionConfig to be provided a custom metric registry for the Hikari data source

mccheah opened this issue · comments

Currently, ConnectionConfig#getHikariConfig bootstraps a MetricsRegistry via SharedMetricRegistries#getOrCreate (see .here However, some users may have their own MetricRegistry that they wish to bootstrap into the config. We can use HikariConfig#setMetricRegistry after the ConnectionConfig has returned the HikariConfig, but in doing so we leave the redundant MetricRegistry hanging in SharedMetricRegistries. We should provide a means for ConnectionConfig to be provided the MetricRegistry directly when creating the HikariConfig.