private static HikariConfig initMetrics(final HikariConfig config) {
    final MetricRegistry registry = Metrics.getRegistry();
    if (registry != null) {
      config.setMetricRegistry(registry);
    }
    return config;
  }
DataSourceProvider for the HikariCP connection pool.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/datasource/HikariCPDataSourceProvider.java