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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionio.micrometer.core.instrument.binder.MeterBinder
dataSourceMeterBinder
(String dataSourceName, io.micronaut.jdbc.metadata.DataSourcePoolMetadata dataSourcePoolMetadata) Wires beans for each DataSource.
-
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 datasourcedataSourcePoolMetadata
- The datasource metadata object to use for the binder- Returns:
- MeterDinders for each configured
DataSourcePoolMetadata
-