Class DataSourcePoolMetricsBinderFactory

java.lang.Object
io.micronaut.configuration.metrics.binder.datasource.DataSourcePoolMetricsBinderFactory

@Factory @RequiresMetrics @Requires(property="micronaut.metrics.binders.jdbc.enabled", notEquals="false") public class DataSourcePoolMetricsBinderFactory extends Object
Instruments Micronaut related JDBC pool metrics via Micrometer.
Since:
1.0
Author:
Christian Oestreich
  • Constructor Details

    • DataSourcePoolMetricsBinderFactory

      public DataSourcePoolMetricsBinderFactory()
  • Method Details

    • dataSourceMeterBinder

      @EachBean(io.micronaut.jdbc.metadata.DataSourcePoolMetadata.class) @Requires(beans=io.micronaut.jdbc.metadata.DataSourcePoolMetadata.class) public io.micrometer.core.instrument.binder.MeterBinder dataSourceMeterBinder(@Parameter String dataSourceName, io.micronaut.jdbc.metadata.DataSourcePoolMetadata dataSourcePoolMetadata)
      Wires beans for each DataSource.
      Parameters:
      dataSourceName - The parameterized name of the datasource
      dataSourcePoolMetadata - The datasource metadata object to use for the binder
      Returns:
      MeterDinders for each configured DataSourcePoolMetadata