Add auto-configuration for DataSources
This commit automatically instruments all available data sources with a configurable metric name. The instrumentation can be disabled in case more control is needed. Closes gh-10295
This commit is contained in:
@@ -1302,6 +1302,8 @@ content into your application; rather pick only the properties that you need.
|
||||
spring.metrics.ganglia.enabled=true # Whether not exporting of metrics to Ganglia is enabled.
|
||||
spring.metrics.graphite.enabled=true # Whether not exporting of metrics to Graphite is enabled.
|
||||
spring.metrics.influx.enabled=true # Whether not exporting of metrics to InfluxDB is enabled.
|
||||
spring.metrics.jdbc.datasource-metric-name=data.source # Name of the metric for data source usage.
|
||||
spring.metrics.jdbc.instrument-datasource=true # Instrument all available data sources.
|
||||
spring.metrics.jmx.enabled=true # Whether not exporting of metrics to JMX is enabled.
|
||||
spring.metrics.prometheus.enabled=true # Whether not exporting of metrics to Prometheus is enabled.
|
||||
spring.metrics.simple.enabled=true # Whether not exporting of metrics to a simple in-memory store is enabled.
|
||||
|
||||
@@ -960,6 +960,16 @@ the following:
|
||||
|
||||
|
||||
|
||||
[[production-ready-metrics-jdbc]]
|
||||
=== DataSource metrics
|
||||
Auto-configuration will enable the instrumentation of all available `DataSources` with a
|
||||
metric named `data.source`. The name can be customized using the
|
||||
`spring.metrics.jdbc.datasource-metric-name`.
|
||||
|
||||
Metrics will be tagged by the name of the `DataSource` computed based on the bean name.
|
||||
|
||||
|
||||
|
||||
[[production-ready-metrics-integration]]
|
||||
=== Spring Integration metrics
|
||||
Auto-configuration will enable binding of a number of Spring Integration-related
|
||||
|
||||
Reference in New Issue
Block a user