Move metrics properties to "management.metrics"
Closes gh-11340
This commit is contained in:
parent
de8fe7550f
commit
ef78cb33b3
|
@ -37,7 +37,7 @@ import org.springframework.context.annotation.Configuration;
|
|||
class MeterBindersConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(value = "spring.metrics.binders.jvmmemory.enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(value = "management.metrics.binders.jvmmemory.enabled", matchIfMissing = true)
|
||||
@ConditionalOnMissingBean(JvmMemoryMetrics.class)
|
||||
public JvmMemoryMetrics jvmMemoryMetrics() {
|
||||
return new JvmMemoryMetrics();
|
||||
|
@ -45,21 +45,21 @@ class MeterBindersConfiguration {
|
|||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(LogbackMetrics.class)
|
||||
@ConditionalOnProperty(value = "spring.metrics.binders.logback.enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(value = "management.metrics.binders.logback.enabled", matchIfMissing = true)
|
||||
@ConditionalOnClass(name = "ch.qos.logback.classic.Logger")
|
||||
public LogbackMetrics logbackMetrics() {
|
||||
return new LogbackMetrics();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(value = "spring.metrics.binders.uptime.enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(value = "management.metrics.binders.uptime.enabled", matchIfMissing = true)
|
||||
@ConditionalOnMissingBean(UptimeMetrics.class)
|
||||
public UptimeMetrics uptimeMetrics() {
|
||||
return new UptimeMetrics();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(value = "spring.metrics.binders.processor.enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(value = "management.metrics.binders.processor.enabled", matchIfMissing = true)
|
||||
@ConditionalOnMissingBean(ProcessorMetrics.class)
|
||||
public ProcessorMetrics processorMetrics() {
|
||||
return new ProcessorMetrics();
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
|||
* @author Jon Schneider
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@ConfigurationProperties("spring.metrics")
|
||||
@ConfigurationProperties("management.metrics")
|
||||
public class MetricsProperties {
|
||||
|
||||
private Web web = new Web();
|
||||
|
|
|
@ -47,7 +47,7 @@ public class AtlasExportConfiguration {
|
|||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(value = "spring.metrics.export.atlas.enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(value = "management.metrics.export.atlas.enabled", matchIfMissing = true)
|
||||
public MetricsExporter atlasExporter(AtlasConfig atlasConfig, Clock clock) {
|
||||
return () -> new AtlasMeterRegistry(atlasConfig, clock);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
|||
* @since 2.0.0
|
||||
* @author Jon Schneider
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "spring.metrics.export.atlas")
|
||||
@ConfigurationProperties(prefix = "management.metrics.export.atlas")
|
||||
public class AtlasProperties extends StepRegistryProperties {
|
||||
|
||||
/**
|
||||
|
|
|
@ -36,7 +36,7 @@ import org.springframework.context.annotation.Configuration;
|
|||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass(DatadogMeterRegistry.class)
|
||||
@ConditionalOnProperty("spring.metrics.export.datadog.api-key")
|
||||
@ConditionalOnProperty("management.metrics.export.datadog.api-key")
|
||||
@EnableConfigurationProperties(DatadogProperties.class)
|
||||
public class DatadogExportConfiguration {
|
||||
|
||||
|
@ -47,7 +47,7 @@ public class DatadogExportConfiguration {
|
|||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(value = "spring.metrics.export.datadog.enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(value = "management.metrics.export.datadog.enabled", matchIfMissing = true)
|
||||
public MetricsExporter datadogExporter(DatadogConfig datadogConfig, Clock clock) {
|
||||
return () -> new DatadogMeterRegistry(datadogConfig, clock);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
|||
* @author Jon Schneider
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "spring.metrics.export.datadog")
|
||||
@ConfigurationProperties(prefix = "management.metrics.export.datadog")
|
||||
public class DatadogProperties extends StepRegistryProperties {
|
||||
|
||||
/**
|
||||
|
|
|
@ -47,7 +47,7 @@ public class GangliaExportConfiguration {
|
|||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(value = "spring.metrics.export.ganglia.enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(value = "management.metrics.export.ganglia.enabled", matchIfMissing = true)
|
||||
public MetricsExporter gangliaExporter(GangliaConfig gangliaConfig,
|
||||
HierarchicalNameMapper nameMapper, Clock clock) {
|
||||
return () -> new GangliaMeterRegistry(gangliaConfig, nameMapper, clock);
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
|||
* @author Jon Schneider
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "spring.metrics.export.ganglia")
|
||||
@ConfigurationProperties(prefix = "management.metrics.export.ganglia")
|
||||
public class GangliaProperties {
|
||||
|
||||
/**
|
||||
|
|
|
@ -47,7 +47,7 @@ public class GraphiteExportConfiguration {
|
|||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(value = "spring.metrics.export.graphite.enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(value = "management.metrics.export.graphite.enabled", matchIfMissing = true)
|
||||
public MetricsExporter graphiteExporter(GraphiteConfig graphiteConfig,
|
||||
HierarchicalNameMapper nameMapper, Clock clock) {
|
||||
return () -> new GraphiteMeterRegistry(graphiteConfig, nameMapper, clock);
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
|||
* @author Jon Schneider
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "spring.metrics.export.graphite")
|
||||
@ConfigurationProperties(prefix = "management.metrics.export.graphite")
|
||||
public class GraphiteProperties {
|
||||
|
||||
/**
|
||||
|
|
|
@ -46,7 +46,7 @@ public class InfluxExportConfiguration {
|
|||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(value = "spring.metrics.export.influx.enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(value = "management.metrics.export.influx.enabled", matchIfMissing = true)
|
||||
public MetricsExporter influxExporter(InfluxConfig influxConfig, Clock clock) {
|
||||
return () -> new InfluxMeterRegistry(influxConfig, clock);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
|||
* @author Jon Schneider
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "spring.metrics.export.influx")
|
||||
@ConfigurationProperties(prefix = "management.metrics.export.influx")
|
||||
public class InfluxProperties extends StepRegistryProperties {
|
||||
|
||||
/**
|
||||
|
|
|
@ -38,7 +38,7 @@ import org.springframework.context.annotation.Configuration;
|
|||
public class JmxExportConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(value = "spring.metrics.export.jmx.enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(value = "management.metrics.export.jmx.enabled", matchIfMissing = true)
|
||||
public MetricsExporter jmxExporter(HierarchicalNameMapper nameMapper, Clock clock) {
|
||||
return () -> new JmxMeterRegistry(nameMapper, clock);
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public class PrometheusExportConfiguration {
|
|||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(value = "spring.metrics.export.prometheus.enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(value = "management.metrics.export.prometheus.enabled", matchIfMissing = true)
|
||||
public MetricsExporter prometheusExporter(PrometheusConfig prometheusConfig,
|
||||
CollectorRegistry collectorRegistry, Clock clock) {
|
||||
return () -> new PrometheusMeterRegistry(prometheusConfig, collectorRegistry,
|
||||
|
|
|
@ -26,7 +26,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
|||
* @author Jon Schneider
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "spring.metrics.export.prometheus")
|
||||
@ConfigurationProperties(prefix = "management.metrics.export.prometheus")
|
||||
public class PrometheusProperties {
|
||||
|
||||
/**
|
||||
|
|
|
@ -38,7 +38,7 @@ import org.springframework.context.annotation.Configuration;
|
|||
public class SimpleExportConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(value = "spring.metrics.export.simple.enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(value = "management.metrics.export.simple.enabled", matchIfMissing = true)
|
||||
@ConditionalOnMissingBean(MetricsExporter.class)
|
||||
public MetricsExporter simpleExporter(SimpleConfig config, Clock clock) {
|
||||
return () -> new SimpleMeterRegistry(config, clock);
|
||||
|
|
|
@ -30,7 +30,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
|||
* @author Jon Schneider
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "spring.metrics.export.simple")
|
||||
@ConfigurationProperties(prefix = "management.metrics.export.simple")
|
||||
public class SimpleProperties {
|
||||
|
||||
/**
|
||||
|
|
|
@ -47,7 +47,7 @@ public class StatsdExportConfiguration {
|
|||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(value = "spring.metrics.export.statsd.enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(value = "management.metrics.export.statsd.enabled", matchIfMissing = true)
|
||||
public MetricsExporter statsdExporter(StatsdConfig statsdConfig,
|
||||
HierarchicalNameMapper hierarchicalNameMapper, Clock clock) {
|
||||
return () -> new StatsdMeterRegistry(statsdConfig, hierarchicalNameMapper, clock);
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
|||
* @author Stephane Nicoll
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "spring.metrics.export.statsd")
|
||||
@ConfigurationProperties(prefix = "management.metrics.export.statsd")
|
||||
public class StatsdProperties {
|
||||
|
||||
/**
|
||||
|
|
|
@ -43,7 +43,7 @@ import org.springframework.util.StringUtils;
|
|||
*/
|
||||
@Configuration
|
||||
@ConditionalOnBean({ DataSource.class, DataSourcePoolMetadataProvider.class })
|
||||
@ConditionalOnProperty(value = "spring.metrics.jdbc.instrument-datasource", matchIfMissing = true)
|
||||
@ConditionalOnProperty(value = "management.metrics.jdbc.instrument-datasource", matchIfMissing = true)
|
||||
@EnableConfigurationProperties(JdbcMetricsProperties.class)
|
||||
public class DataSourcePoolMetricsConfiguration {
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
|||
* @author Stephane Nicoll
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@ConfigurationProperties("spring.metrics.jdbc")
|
||||
@ConfigurationProperties("management.metrics.jdbc")
|
||||
public class JdbcMetricsProperties {
|
||||
|
||||
/**
|
||||
|
|
|
@ -186,31 +186,31 @@
|
|||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"name": "spring.metrics.binders.jvmmemory.enabled",
|
||||
"name": "management.metrics.binders.jvmmemory.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether to enable JVM memory metrics.",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"name": "spring.metrics.binders.logback.enabled",
|
||||
"name": "management.metrics.binders.logback.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether to enable Logback metrics.",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"name": "spring.metrics.binders.processor.enabled",
|
||||
"name": "management.metrics.binders.processor.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether to enable processor metrics.",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"name": "spring.metrics.binders.uptime.enabled",
|
||||
"name": "management.metrics.binders.uptime.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether to enable uptime metrics.",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"name": "spring.metrics.jdbc.instrument-datasource",
|
||||
"name": "management.metrics.jdbc.instrument-datasource",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Instrument all available data sources.",
|
||||
"defaultValue": true
|
||||
|
@ -1516,7 +1516,6 @@
|
|||
"description": "Key for redis repository export (if active). Should be globally unique for a\n system sharing a redis repository across multiple processes.",
|
||||
"defaultValue": "keys.spring.metrics",
|
||||
"deprecation": {
|
||||
"replacement": "spring.sendgrid.api-key",
|
||||
"reason": "Metrics support is now using Micrometer.",
|
||||
"level": "error"
|
||||
}
|
||||
|
@ -1540,6 +1539,25 @@
|
|||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.metrics.export.statsd.host",
|
||||
"type": "java.lang.String",
|
||||
"description": "Host of a statsd server to receive exported metrics.",
|
||||
"deprecation": {
|
||||
"replacement": "management.metrics.export.statsd.host",
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.metrics.export.statsd.port",
|
||||
"type": "java.lang.Integer",
|
||||
"description": "Port of a statsd server to receive exported metrics.",
|
||||
"defaultValue": 8125,
|
||||
"deprecation": {
|
||||
"replacement": "management.metrics.export.statsd.port",
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.metrics.export.statsd.prefix",
|
||||
"type": "java.lang.String",
|
||||
|
|
|
@ -70,14 +70,14 @@ public class WebEndpointsAutoConfigurationIntegrationTests {
|
|||
return new WebApplicationContextRunner()
|
||||
.withConfiguration(
|
||||
UserConfigurations.of(WebEndpointTestApplication.class))
|
||||
.withPropertyValues("spring.metrics.export.statsd.enabled:false");
|
||||
.withPropertyValues("management.metrics.export.statsd.enabled:false");
|
||||
}
|
||||
|
||||
private ReactiveWebApplicationContextRunner reactiveWebRunner() {
|
||||
return new ReactiveWebApplicationContextRunner()
|
||||
.withConfiguration(
|
||||
UserConfigurations.of(WebEndpointTestApplication.class))
|
||||
.withPropertyValues("spring.metrics.export.statsd.enabled:false");
|
||||
.withPropertyValues("management.metrics.export.statsd.enabled:false");
|
||||
}
|
||||
|
||||
@EnableAutoConfiguration(exclude = { FlywayAutoConfiguration.class,
|
||||
|
|
|
@ -67,7 +67,7 @@ import static org.springframework.test.web.client.response.MockRestResponseCreat
|
|||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, classes = MetricsAutoConfigurationIntegrationTests.MetricsApp.class)
|
||||
@TestPropertySource(properties = "spring.metrics.use-global-registry=false")
|
||||
@TestPropertySource(properties = "management.metrics.use-global-registry=false")
|
||||
public class MetricsAutoConfigurationIntegrationTests {
|
||||
|
||||
@Autowired
|
||||
|
|
|
@ -50,7 +50,7 @@ public class MetricsAutoConfigurationTests {
|
|||
.withConfiguration(
|
||||
AutoConfigurations.of(DataSourceAutoConfiguration.class))
|
||||
.withPropertyValues("spring.datasource.generate-unique-name=true",
|
||||
"spring.metrics.use-global-registry=false")
|
||||
"management.metrics.use-global-registry=false")
|
||||
.run((context) -> {
|
||||
context.getBean(DataSource.class).getConnection().getMetaData();
|
||||
MeterRegistry registry = context.getBean(MeterRegistry.class);
|
||||
|
@ -65,8 +65,8 @@ public class MetricsAutoConfigurationTests {
|
|||
.withConfiguration(
|
||||
AutoConfigurations.of(DataSourceAutoConfiguration.class))
|
||||
.withPropertyValues("spring.datasource.generate-unique-name=true",
|
||||
"spring.metrics.jdbc.datasource-metric-name=custom.name",
|
||||
"spring.metrics.use-global-registry=false")
|
||||
"management.metrics.jdbc.datasource-metric-name=custom.name",
|
||||
"management.metrics.use-global-registry=false")
|
||||
.run((context) -> {
|
||||
context.getBean(DataSource.class).getConnection().getMetaData();
|
||||
MeterRegistry registry = context.getBean(MeterRegistry.class);
|
||||
|
@ -81,8 +81,8 @@ public class MetricsAutoConfigurationTests {
|
|||
.withConfiguration(
|
||||
AutoConfigurations.of(DataSourceAutoConfiguration.class))
|
||||
.withPropertyValues("spring.datasource.generate-unique-name=true",
|
||||
"spring.metrics.jdbc.instrument-datasource=false",
|
||||
"spring.metrics.use-global-registry=false")
|
||||
"management.metrics.jdbc.instrument-datasource=false",
|
||||
"management.metrics.use-global-registry=false")
|
||||
.run((context) -> {
|
||||
context.getBean(DataSource.class).getConnection().getMetaData();
|
||||
MeterRegistry registry = context.getBean(MeterRegistry.class);
|
||||
|
|
|
@ -39,14 +39,14 @@ public class SimpleExportConfigurationTests {
|
|||
@Test
|
||||
public void simpleMeterRegistryIsInTheCompositeWhenNoOtherRegistryIs() {
|
||||
new ApplicationContextRunner()
|
||||
.withPropertyValues("spring.metrics.export.atlas.enabled=false",
|
||||
"spring.metrics.export.datadog.enabled=false",
|
||||
"spring.metrics.export.ganglia.enabled=false",
|
||||
"spring.metrics.export.graphite.enabled=false",
|
||||
"spring.metrics.export.influx.enabled=false",
|
||||
"spring.metrics.export.jmx.enabled=false",
|
||||
"spring.metrics.export.prometheus.enabled=false",
|
||||
"spring.metrics.export.statsd.enabled=false")
|
||||
.withPropertyValues("management.metrics.export.atlas.enabled=false",
|
||||
"management.metrics.export.datadog.enabled=false",
|
||||
"management.metrics.export.ganglia.enabled=false",
|
||||
"management.metrics.export.graphite.enabled=false",
|
||||
"management.metrics.export.influx.enabled=false",
|
||||
"management.metrics.export.jmx.enabled=false",
|
||||
"management.metrics.export.prometheus.enabled=false",
|
||||
"management.metrics.export.statsd.enabled=false")
|
||||
.withConfiguration(AutoConfigurations.of(MetricsAutoConfiguration.class))
|
||||
.run((context) -> {
|
||||
CompositeMeterRegistry meterRegistry = context
|
||||
|
|
|
@ -1246,89 +1246,88 @@ content into your application. Rather, pick only the properties that you need.
|
|||
management.jolokia.enabled=false # Whether to enable Jolokia.
|
||||
management.jolokia.path=/jolokia # Path at which Jolokia is available.
|
||||
|
||||
# METRICS
|
||||
management.metrics.binders.jvmmemory.enabled=true # Whether to enable JVM memory metrics.
|
||||
management.metrics.binders.logback.enabled=true # Whether to enable Logback metrics.
|
||||
management.metrics.binders.processor.enabled=true # Whether to enable processor metrics.
|
||||
management.metrics.binders.uptime.enabled=true # Whether to enable uptime metrics.
|
||||
management.metrics.export.atlas.batch-size= # Number of measurements per request to use for the backend. If more measurements are found, then multiple requests will be made.
|
||||
management.metrics.export.atlas.config-refresh-frequency= # Frequency for refreshing config settings from the LWC service.
|
||||
management.metrics.export.atlas.config-time-to-live= # Time to live for subscriptions from the LWC service.
|
||||
management.metrics.export.atlas.config-uri= # URI for the Atlas LWC endpoint to retrieve current subscriptions.
|
||||
management.metrics.export.atlas.connect-timeout= # Connection timeout for requests to the backend.
|
||||
management.metrics.export.atlas.enabled= # Whether exporting of metrics to this backend is enabled.
|
||||
management.metrics.export.atlas.eval-uri= # URI for the Atlas LWC endpoint to evaluate the data for a subscription.
|
||||
management.metrics.export.atlas.lwc-enabled= # Enable streaming to Atlas LWC.
|
||||
management.metrics.export.atlas.meter-time-to-live= # Time to live for meters that do not have any activity. After this period the meter will be considered expired and will not get reported.
|
||||
management.metrics.export.atlas.num-threads= # Number of threads to use with the metrics publishing scheduler.
|
||||
management.metrics.export.atlas.read-timeout= # Read timeout for requests to the backend.
|
||||
management.metrics.export.atlas.step=1m # Step size (i.e. reporting frequency) to use.
|
||||
management.metrics.export.atlas.uri= # URI of the Atlas server.
|
||||
management.metrics.export.datadog.api-key= # Datadog API key.
|
||||
management.metrics.export.datadog.batch-size= # Number of measurements per request to use for the backend. If more measurements are found, then multiple requests will be made.
|
||||
management.metrics.export.datadog.connect-timeout= # Connection timeout for requests to the backend.
|
||||
management.metrics.export.datadog.enabled= # Whether exporting of metrics to this backend is enabled.
|
||||
management.metrics.export.datadog.host-tag= # Tag that will be mapped to "host" when shipping metrics to Datadog. Can be omitted if host should be omitted on publishing.
|
||||
management.metrics.export.datadog.num-threads= # Number of threads to use with the metrics publishing scheduler.
|
||||
management.metrics.export.datadog.read-timeout= # Read timeout for requests to the backend.
|
||||
management.metrics.export.datadog.step=1m # Step size (i.e. reporting frequency) to use.
|
||||
management.metrics.export.datadog.uri= # URI to ship metrics to. If you need to publish metrics to an internal proxy en-route to Datadog, you can define the location of the proxy with this.
|
||||
management.metrics.export.ganglia.addressing-mode= # UDP addressing mode, either unicast or multicast.
|
||||
management.metrics.export.ganglia.duration-units= # Base time unit used to report durations.
|
||||
management.metrics.export.ganglia.enabled= # Whether exporting of metrics to Ganglia is enabled.
|
||||
management.metrics.export.ganglia.host= # Host of the Ganglia server to receive exported metrics.
|
||||
management.metrics.export.ganglia.port= # Port of the Ganglia server to receive exported metrics.
|
||||
management.metrics.export.ganglia.protocol-version= # Ganglia protocol version. Must be either 3.1 or 3.0.
|
||||
management.metrics.export.ganglia.rate-units= # Base time unit used to report rates.
|
||||
management.metrics.export.ganglia.step= # Step size (i.e. reporting frequency) to use.
|
||||
management.metrics.export.ganglia.time-to-live= # Time to live for metrics on Ganglia.
|
||||
management.metrics.export.graphite.duration-units= # Base time unit used to report durations.
|
||||
management.metrics.export.graphite.enabled= # Whether exporting of metrics to Graphite is enabled.
|
||||
management.metrics.export.graphite.host= # Host of the Graphite server to receive exported metrics.
|
||||
management.metrics.export.graphite.port= # Port of the Graphite server to receive exported metrics.
|
||||
management.metrics.export.graphite.protocol= # Protocol to use while shipping data to Graphite.
|
||||
management.metrics.export.graphite.rate-units= # Base time unit used to report rates.
|
||||
management.metrics.export.graphite.step= # Step size (i.e. reporting frequency) to use.
|
||||
management.metrics.export.influx.batch-size= # Number of measurements per request to use for the backend. If more measurements are found, then multiple requests will be made.
|
||||
management.metrics.export.influx.compressed= # Enable GZIP compression of metrics batches published to Influx.
|
||||
management.metrics.export.influx.connect-timeout= # Connection timeout for requests to the backend.
|
||||
management.metrics.export.influx.consistency= # Write consistency for each point.
|
||||
management.metrics.export.influx.db= # Tag that will be mapped to "host" when shipping metrics to Influx. Can be omitted if host should be omitted on publishing.
|
||||
management.metrics.export.influx.enabled= # Whether exporting of metrics to this backend is enabled.
|
||||
management.metrics.export.influx.num-threads= # Number of threads to use with the metrics publishing scheduler.
|
||||
management.metrics.export.influx.password= # Login password of the Influx server.
|
||||
management.metrics.export.influx.read-timeout= # Read timeout for requests to the backend.
|
||||
management.metrics.export.influx.retention-policy= # Retention policy to use (Influx writes to the DEFAULT retention policy if one is not specified).
|
||||
management.metrics.export.influx.step=1m # Step size (i.e. reporting frequency) to use.
|
||||
management.metrics.export.influx.uri= # URI of the Influx server.
|
||||
management.metrics.export.influx.user-name= # Login user of the Influx server.
|
||||
management.metrics.export.prometheus.descriptions= # Enable publishing descriptions as part of the scrape payload to Prometheus. Turn this off to minimize the amount of data sent on each scrape.
|
||||
management.metrics.export.prometheus.enabled= # Whether exporting of metrics to Prometheus is enabled.
|
||||
management.metrics.export.prometheus.step= # Step size (i.e. reporting frequency) to use.
|
||||
management.metrics.export.simple.enabled=false # Whether exporting of metrics to a simple in-memory store is enabled.
|
||||
management.metrics.export.simple.mode=cumulative # Counting mode.
|
||||
management.metrics.export.simple.step=10s # Step size (i.e. reporting frequency) to use.
|
||||
management.metrics.export.statsd.enabled= # Export metrics to StatsD.
|
||||
management.metrics.export.statsd.flavor=datadog # StatsD line protocol to use.
|
||||
management.metrics.export.statsd.host=localhost # Host of the StatsD server to receive exported metrics.
|
||||
management.metrics.export.statsd.max-packet-length=1400 # Total length of a single payload should be kept within your network's MTU.
|
||||
management.metrics.export.statsd.polling-frequency=10s # How often gauges will be polled. When a gauge is polled, its value is recalculated and if the value has changed, it is sent to the StatsD server.
|
||||
management.metrics.export.statsd.port=8125 # Port of the StatsD server to receive exported metrics.
|
||||
management.metrics.export.statsd.queue-size=2147483647 # Maximum size of the queue of items waiting to be sent to the StatsD server.
|
||||
management.metrics.jdbc.datasource-metric-name=data.source # Name of the metric for data source usage.
|
||||
management.metrics.jdbc.instrument-datasource=true # Instrument all available data sources.
|
||||
management.metrics.use-global-registry=true # Whether auto-configured MeterRegistry implementations should be bound to the global static registry on Metrics.
|
||||
management.metrics.web.client.record-request-percentiles=false # Whether instrumented requests record percentiles histogram buckets by default.
|
||||
management.metrics.web.client.requests-metric-name=http.client.requests # Name of the metric for sent requests.
|
||||
management.metrics.web.server.auto-time-requests=true # Whether requests handled by Spring MVC or WebFlux should be automatically timed.
|
||||
management.metrics.web.server.record-request-percentiles=false # Whether instrumented requests record percentiles histogram buckets by default.
|
||||
management.metrics.web.server.requests-metric-name=http.server.requests # Name of the metric for received requests.
|
||||
|
||||
# TRACING ({sc-spring-boot-actuator-autoconfigure}/trace/TraceEndpointProperties.{sc-ext}[TraceEndpointProperties])
|
||||
management.trace.filter.enabled=true # Whether to enable the trace servlet filter.
|
||||
management.trace.include=request-headers,response-headers,cookies,errors # Items to be included in the trace.
|
||||
|
||||
# METRICS
|
||||
spring.metrics.binders.jvmmemory.enabled=true # Whether to enable JVM memory metrics.
|
||||
spring.metrics.binders.logback.enabled=true # Whether to enable Logback metrics.
|
||||
spring.metrics.binders.processor.enabled=true # Whether to enable processor metrics.
|
||||
spring.metrics.binders.uptime.enabled=true # Whether to enable uptime metrics.
|
||||
spring.metrics.export.atlas.batch-size= # Number of measurements per request to use for the backend. If more measurements are found, then multiple requests will be made.
|
||||
spring.metrics.export.atlas.config-refresh-frequency= # Frequency for refreshing config settings from the LWC service.
|
||||
spring.metrics.export.atlas.config-time-to-live= # Time to live for subscriptions from the LWC service.
|
||||
spring.metrics.export.atlas.config-uri= # URI for the Atlas LWC endpoint to retrieve current subscriptions.
|
||||
spring.metrics.export.atlas.connect-timeout= # Connection timeout for requests to the backend.
|
||||
spring.metrics.export.atlas.enabled= # Whether exporting of metrics to this backend is enabled.
|
||||
spring.metrics.export.atlas.eval-uri= # URI for the Atlas LWC endpoint to evaluate the data for a subscription.
|
||||
spring.metrics.export.atlas.lwc-enabled= # Enable streaming to Atlas LWC.
|
||||
spring.metrics.export.atlas.meter-time-to-live= # Time to live for meters that do not have any activity. After this period the meter will be considered expired and will not get reported.
|
||||
spring.metrics.export.atlas.num-threads= # Number of threads to use with the metrics publishing scheduler.
|
||||
spring.metrics.export.atlas.read-timeout= # Read timeout for requests to the backend.
|
||||
spring.metrics.export.atlas.step=1m # Step size (i.e. reporting frequency) to use.
|
||||
spring.metrics.export.atlas.uri= # URI of the Atlas server.
|
||||
spring.metrics.export.datadog.api-key= # Datadog API key.
|
||||
spring.metrics.export.datadog.batch-size= # Number of measurements per request to use for the backend. If more measurements are found, then multiple requests will be made.
|
||||
spring.metrics.export.datadog.connect-timeout= # Connection timeout for requests to the backend.
|
||||
spring.metrics.export.datadog.enabled= # Whether exporting of metrics to this backend is enabled.
|
||||
spring.metrics.export.datadog.host-tag= # Tag that will be mapped to "host" when shipping metrics to Datadog. Can be omitted if host should be omitted on publishing.
|
||||
spring.metrics.export.datadog.num-threads= # Number of threads to use with the metrics publishing scheduler.
|
||||
spring.metrics.export.datadog.read-timeout= # Read timeout for requests to the backend.
|
||||
spring.metrics.export.datadog.step=1m # Step size (i.e. reporting frequency) to use.
|
||||
spring.metrics.export.datadog.uri= # URI to ship metrics to. If you need to publish metrics to an internal proxy en-route to Datadog, you can define the location of the proxy with this.
|
||||
spring.metrics.export.ganglia.addressing-mode= # UDP addressing mode, either unicast or multicast.
|
||||
spring.metrics.export.ganglia.duration-units= # Base time unit used to report durations.
|
||||
spring.metrics.export.ganglia.enabled= # Whether exporting of metrics to Ganglia is enabled.
|
||||
spring.metrics.export.ganglia.host= # Host of the Ganglia server to receive exported metrics.
|
||||
spring.metrics.export.ganglia.port= # Port of the Ganglia server to receive exported metrics.
|
||||
spring.metrics.export.ganglia.protocol-version= # Ganglia protocol version. Must be either 3.1 or 3.0.
|
||||
spring.metrics.export.ganglia.rate-units= # Base time unit used to report rates.
|
||||
spring.metrics.export.ganglia.step= # Step size (i.e. reporting frequency) to use.
|
||||
spring.metrics.export.ganglia.time-to-live= # Time to live for metrics on Ganglia.
|
||||
spring.metrics.export.graphite.duration-units= # Base time unit used to report durations.
|
||||
spring.metrics.export.graphite.enabled= # Whether exporting of metrics to Graphite is enabled.
|
||||
spring.metrics.export.graphite.host= # Host of the Graphite server to receive exported metrics.
|
||||
spring.metrics.export.graphite.port= # Port of the Graphite server to receive exported metrics.
|
||||
spring.metrics.export.graphite.protocol= # Protocol to use while shipping data to Graphite.
|
||||
spring.metrics.export.graphite.rate-units= # Base time unit used to report rates.
|
||||
spring.metrics.export.graphite.step= # Step size (i.e. reporting frequency) to use.
|
||||
spring.metrics.export.influx.batch-size= # Number of measurements per request to use for the backend. If more measurements are found, then multiple requests will be made.
|
||||
spring.metrics.export.influx.compressed= # Enable GZIP compression of metrics batches published to Influx.
|
||||
spring.metrics.export.influx.connect-timeout= # Connection timeout for requests to the backend.
|
||||
spring.metrics.export.influx.consistency= # Write consistency for each point.
|
||||
spring.metrics.export.influx.db= # Tag that will be mapped to "host" when shipping metrics to Influx. Can be omitted if host should be omitted on publishing.
|
||||
spring.metrics.export.influx.enabled= # Whether exporting of metrics to this backend is enabled.
|
||||
spring.metrics.export.influx.num-threads= # Number of threads to use with the metrics publishing scheduler.
|
||||
spring.metrics.export.influx.password= # Login password of the Influx server.
|
||||
spring.metrics.export.influx.read-timeout= # Read timeout for requests to the backend.
|
||||
spring.metrics.export.influx.retention-policy= # Retention policy to use (Influx writes to the DEFAULT retention policy if one is not specified).
|
||||
spring.metrics.export.influx.step=1m # Step size (i.e. reporting frequency) to use.
|
||||
spring.metrics.export.influx.uri= # URI of the Influx server.
|
||||
spring.metrics.export.influx.user-name= # Login user of the Influx server.
|
||||
spring.metrics.export.prometheus.descriptions= # Enable publishing descriptions as part of the scrape payload to Prometheus. Turn this off to minimize the amount of data sent on each scrape.
|
||||
spring.metrics.export.prometheus.enabled= # Whether exporting of metrics to Prometheus is enabled.
|
||||
spring.metrics.export.prometheus.step= # Step size (i.e. reporting frequency) to use.
|
||||
spring.metrics.export.simple.enabled=false # Whether exporting of metrics to a simple in-memory store is enabled.
|
||||
spring.metrics.export.simple.mode=cumulative # Counting mode.
|
||||
spring.metrics.export.simple.step=10s # Step size (i.e. reporting frequency) to use.
|
||||
spring.metrics.export.statsd.enabled= # Export metrics to StatsD.
|
||||
spring.metrics.export.statsd.flavor=datadog # StatsD line protocol to use.
|
||||
spring.metrics.export.statsd.host=localhost # Host of the StatsD server to receive exported metrics.
|
||||
spring.metrics.export.statsd.max-packet-length=1400 # Total length of a single payload should be kept within your network's MTU.
|
||||
spring.metrics.export.statsd.polling-frequency=10s # How often gauges will be polled. When a gauge is polled, its value is recalculated and if the value has changed, it is sent to the StatsD server.
|
||||
spring.metrics.export.statsd.port=8125 # Port of the StatsD server to receive exported metrics.
|
||||
spring.metrics.export.statsd.queue-size=2147483647 # Maximum size of the queue of items waiting to be sent to the StatsD server.
|
||||
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.use-global-registry=true # Whether auto-configured MeterRegistry implementations should be bound to the global static registry on Metrics.
|
||||
spring.metrics.web.client.record-request-percentiles=false # Whether instrumented requests record percentiles histogram buckets by default.
|
||||
spring.metrics.web.client.requests-metric-name=http.client.requests # Name of the metric for sent requests.
|
||||
spring.metrics.web.server.auto-time-requests=true # Whether requests handled by Spring MVC or WebFlux should be automatically timed.
|
||||
spring.metrics.web.server.record-request-percentiles=false # Whether instrumented requests record percentiles histogram buckets by default.
|
||||
spring.metrics.web.server.requests-metric-name=http.server.requests # Name of the metric for received requests.
|
||||
|
||||
|
||||
|
||||
# ----------------------------------------
|
||||
# DEVTOOLS PROPERTIES
|
||||
|
|
|
@ -934,12 +934,12 @@ its https://micrometer.io/docs[reference documentation].
|
|||
[[production-ready-metrics-spring-mvc]]
|
||||
=== Spring MVC Metrics
|
||||
Auto-configuration enables the instrumentation of requests handled by Spring MVC. When
|
||||
`spring.metrics.web.server.auto-time-requests` is `true`, this instrumentation occurs for
|
||||
all requests. Alternatively, when set to `false`, you can enable instrumentation by
|
||||
`management.metrics.web.server.auto-time-requests` is `true`, this instrumentation occurs
|
||||
for all requests. Alternatively, when set to `false`, you can enable instrumentation by
|
||||
adding `@Timed` to a request-handling method.
|
||||
|
||||
By default, metrics are generated with the name, `http.server.requests`. The name can be
|
||||
customized by setting the `spring.metrics.web.server.requests-metrics-name` property.
|
||||
customized by setting the `management.metrics.web.server.requests-metrics-name` property.
|
||||
|
||||
|
||||
|
||||
|
@ -962,7 +962,7 @@ controllers. You can also use a helper class, `RouterFunctionMetrics`, to instru
|
|||
applications that use WebFlux's functional programming model.
|
||||
|
||||
By default, metrics are generated with the name `http.server.requests`. You can customize
|
||||
the name by setting the `spring.metrics.web.server.requests-metrics-name` property.
|
||||
the name by setting the `management.metrics.web.server.requests-metrics-name` property.
|
||||
|
||||
|
||||
|
||||
|
@ -997,7 +997,7 @@ instrumentation of its requests. `MetricsRestTemplateCustomizer` can be used to
|
|||
your own `RestTemplate` instances.
|
||||
|
||||
By default, metrics are generated with the name, `http.client.requests`. The name can be
|
||||
customized by setting the `spring.metrics.web.client.requests-metrics-name` property.
|
||||
customized by setting the `management.metrics.web.client.requests-metrics-name` property.
|
||||
|
||||
|
||||
|
||||
|
@ -1019,7 +1019,7 @@ Auto-configuration will enable the instrumentation of all available ``DataSource
|
|||
metric named `data.source`. Data source instrumentation results in gauges representing
|
||||
the currently active, maximum allowed, and minimum allowed connections in the pool. Each
|
||||
of these gauges has a name which is prefixed by `data.source` by default. The prefix can
|
||||
be customized by using the `spring.metrics.jdbc.datasource-metric-name` property.
|
||||
be customized by using the `management.metrics.jdbc.datasource-metric-name` property.
|
||||
|
||||
Metrics will also be tagged by the name of the `DataSource` computed based on the bean
|
||||
name.
|
||||
|
|
Loading…
Reference in New Issue