Rename micrometer instrumentation flags

Closes gh-11667
pull/11674/head
Stephane Nicoll 7 years ago
parent 49b5fe0c29
commit 5cb6c086b6

@ -32,7 +32,7 @@ import org.springframework.context.annotation.Import;
*/
@Configuration
@ConditionalOnBean(CacheManager.class)
@ConditionalOnProperty(value = "management.metrics.cache.instrument-cache", matchIfMissing = true)
@ConditionalOnProperty(value = "management.metrics.cache.instrument", matchIfMissing = true)
@EnableConfigurationProperties(CacheMetricsProperties.class)
@Import({ CacheMeterBinderProvidersConfiguration.class,
CacheMetricsRegistrarConfiguration.class })

@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -43,7 +43,7 @@ import org.springframework.util.StringUtils;
*/
@Configuration
@ConditionalOnBean({ DataSource.class, DataSourcePoolMetadataProvider.class })
@ConditionalOnProperty(value = "management.metrics.jdbc.instrument-datasource", matchIfMissing = true)
@ConditionalOnProperty(value = "management.metrics.jdbc.instrument", matchIfMissing = true)
@EnableConfigurationProperties(JdbcMetricsProperties.class)
public class DataSourcePoolMetricsConfiguration {

@ -216,7 +216,7 @@
"defaultValue": true
},
{
"name": "management.metrics.cache.instrument-cache",
"name": "management.metrics.cache.instrument",
"type": "java.lang.Boolean",
"description": "Instrument all available caches.",
"defaultValue": true
@ -228,7 +228,7 @@
"defaultValue": true
},
{
"name": "management.metrics.jdbc.instrument-datasource",
"name": "management.metrics.jdbc.instrument",
"type": "java.lang.Boolean",
"description": "Instrument all available data sources.",
"defaultValue": true

@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -80,7 +80,7 @@ public class MetricsAutoConfigurationTests {
.withConfiguration(
AutoConfigurations.of(DataSourceAutoConfiguration.class))
.withPropertyValues("spring.datasource.generate-unique-name=true",
"management.metrics.jdbc.instrument-datasource=false")
"management.metrics.jdbc.instrument=false")
.run((context) -> {
context.getBean(DataSource.class).getConnection().getMetaData();
MeterRegistry registry = context.getBean(MeterRegistry.class);

@ -85,7 +85,7 @@ public class CacheMetricsConfigurationTests {
@Test
public void cacheInstrumentationCanBeDisabled() {
this.contextRunner
.withPropertyValues("management.metrics.cache.instrument-cache=false",
.withPropertyValues("management.metrics.cache.instrument=false",
"spring.cache.type=caffeine", "spring.cache.cache-names=cache1")
.run((context) -> {
MeterRegistry registry = context.getBean(MeterRegistry.class);

@ -1282,7 +1282,7 @@ content into your application. Rather, pick only the properties that you need.
management.metrics.binders.processor.enabled=true # Whether to enable processor metrics.
management.metrics.binders.uptime.enabled=true # Whether to enable uptime metrics.
management.metrics.cache.cache-metric-name=cache # Name of the metric for cache usage.
management.metrics.cache.instrument-cache=true # Instrument all available caches.
management.metrics.cache.instrument=true # Instrument all available caches.
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.
@ -1352,7 +1352,7 @@ content into your application. Rather, pick only the properties that you need.
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.jdbc.instrument=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.

Loading…
Cancel
Save