Specify default micrometer values

This commit adds micrometer's default values for each monitoring
system with tests that validate those defaults are consistent. This
makes sure that those defaults are part of the metadata and any tooling
support that uses it.

Closes gh-12089
pull/12121/head
Stephane Nicoll 7 years ago
parent 202ed7b72b
commit 1e932860c4

@ -24,8 +24,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* {@link ConfigurationProperties} for configuring Atlas metrics export.
*
* @since 2.0.0
* @author Jon Schneider
* @author Stephane Nicoll
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.metrics.export.atlas")
public class AtlasProperties extends StepRegistryProperties {
@ -33,38 +34,38 @@ public class AtlasProperties extends StepRegistryProperties {
/**
* URI of the Atlas server.
*/
private String uri;
private String uri = "http://localhost:7101/api/v1/publish";
/**
* 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.
*/
private Duration meterTimeToLive;
private Duration meterTimeToLive = Duration.ofMinutes(15);
/**
* Enable streaming to Atlas LWC.
* Whether to enable streaming to Atlas LWC.
*/
private Boolean lwcEnabled;
private boolean lwcEnabled;
/**
* Frequency for refreshing config settings from the LWC service.
*/
private Duration configRefreshFrequency;
private Duration configRefreshFrequency = Duration.ofSeconds(10);
/**
* Time to live for subscriptions from the LWC service.
*/
private Duration configTimeToLive;
private Duration configTimeToLive = Duration.ofSeconds(150);
/**
* URI for the Atlas LWC endpoint to retrieve current subscriptions.
*/
private String configUri;
private String configUri = "http://localhost:7101/lwc/api/v1/expressions/local-dev";
/**
* URI for the Atlas LWC endpoint to evaluate the data for a subscription.
*/
private String evalUri;
private String evalUri = "http://localhost:7101/lwc/api/v1/evaluate";
public String getUri() {
return this.uri;
@ -82,11 +83,11 @@ public class AtlasProperties extends StepRegistryProperties {
this.meterTimeToLive = meterTimeToLive;
}
public Boolean getLwcEnabled() {
public boolean isLwcEnabled() {
return this.lwcEnabled;
}
public void setLwcEnabled(Boolean lwcEnabled) {
public void setLwcEnabled(boolean lwcEnabled) {
this.lwcEnabled = lwcEnabled;
}
@ -121,4 +122,5 @@ public class AtlasProperties extends StepRegistryProperties {
public void setEvalUri(String evalUri) {
this.evalUri = evalUri;
}
}

@ -47,7 +47,7 @@ class AtlasPropertiesConfigAdapter extends PropertiesConfigAdapter<AtlasProperti
@Override
public boolean enabled() {
return get(AtlasProperties::getEnabled, AtlasConfig.super::enabled);
return get(AtlasProperties::isEnabled, AtlasConfig.super::enabled);
}
@Override
@ -82,7 +82,7 @@ class AtlasPropertiesConfigAdapter extends PropertiesConfigAdapter<AtlasProperti
@Override
public boolean lwcEnabled() {
return get(AtlasProperties::getLwcEnabled, AtlasConfig.super::lwcEnabled);
return get(AtlasProperties::isLwcEnabled, AtlasConfig.super::lwcEnabled);
}
@Override

@ -23,6 +23,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* {@link ConfigurationProperties} for configuring Datadog metrics export.
*
* @author Jon Schneider
* @author Stephane Nicoll
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.metrics.export.datadog")
@ -43,19 +44,18 @@ public class DatadogProperties extends StepRegistryProperties {
* Whether to publish descriptions metadata to Datadog. Turn this off to minimize the
* amount of metadata sent.
*/
private Boolean descriptions;
private boolean descriptions = true;
/**
* Tag that will be mapped to "host" when shipping metrics to Datadog. Can be omitted
* if host should be omitted on publishing.
* Tag that will be mapped to "host" when shipping metrics to Datadog.
*/
private String hostTag;
private String hostTag = "instance";
/**
* 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.
*/
private String uri;
private String uri = "https://app.datadoghq.com";
public String getApiKey() {
return this.apiKey;
@ -73,11 +73,11 @@ public class DatadogProperties extends StepRegistryProperties {
this.applicationKey = applicationKey;
}
public Boolean getDescriptions() {
public boolean isDescriptions() {
return this.descriptions;
}
public void setDescriptions(Boolean descriptions) {
public void setDescriptions(boolean descriptions) {
this.descriptions = descriptions;
}

@ -56,7 +56,7 @@ class DatadogPropertiesConfigAdapter extends
@Override
public boolean descriptions() {
return get(DatadogProperties::getDescriptions, DatadogConfig.super::descriptions);
return get(DatadogProperties::isDescriptions, DatadogConfig.super::descriptions);
}
}

@ -27,61 +27,63 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* {@link ConfigurationProperties} for configuring Ganglia metrics export.
*
* @author Jon Schneider
* @author Stephane Nicoll
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.metrics.export.ganglia")
public class GangliaProperties {
/**
* Whether exporting of metrics to this backend is enabled.
* Whether exporting of metrics to Ganglia is enabled.
*/
private Boolean enabled;
private boolean enabled = true;
/**
* Step size (i.e. reporting frequency) to use.
*/
private Duration step;
private Duration step = Duration.ofMinutes(1);
/**
* Base time unit used to report rates.
*/
private TimeUnit rateUnits;
private TimeUnit rateUnits = TimeUnit.SECONDS;
/**
* Base time unit used to report durations.
*/
private TimeUnit durationUnits;
private TimeUnit durationUnits = TimeUnit.MILLISECONDS;
/**
* Ganglia protocol version. Must be either 3.1 or 3.0.
*/
private String protocolVersion;
private String protocolVersion = "3.1";
/**
* UDP addressing mode, either unicast or multicast.
*/
private GMetric.UDPAddressingMode addressingMode;
private GMetric.UDPAddressingMode addressingMode = GMetric.UDPAddressingMode.MULTICAST;
/**
* Time to live for metrics on Ganglia.
* Time to live for metrics on Ganglia. Set the multi-cast Time-To-Live to be one
* greater than the number of hops (routers) between the hosts.
*/
private Integer timeToLive;
private Integer timeToLive = 1;
/**
* Host of the Ganglia server to receive exported metrics.
*/
private String host;
private String host = "localhost";
/**
* Port of the Ganglia server to receive exported metrics.
*/
private Integer port;
private Integer port = 8649;
public Boolean getEnabled() {
public boolean isEnabled() {
return this.enabled;
}
public void setEnabled(Boolean enabled) {
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}

@ -44,7 +44,7 @@ class GangliaPropertiesConfigAdapter extends PropertiesConfigAdapter<GangliaProp
@Override
public boolean enabled() {
return get(GangliaProperties::getEnabled, GangliaConfig.super::enabled);
return get(GangliaProperties::isEnabled, GangliaConfig.super::enabled);
}
@Override

@ -27,57 +27,58 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* {@link ConfigurationProperties} for configuring Graphite metrics export.
*
* @author Jon Schneider
* @author Stephane Nicoll
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.metrics.export.graphite")
public class GraphiteProperties {
/**
* Whether exporting of metrics to this backend is enabled.
* Whether exporting of metrics to Graphite is enabled.
*/
private Boolean enabled;
private boolean enabled = true;
/**
* Step size (i.e. reporting frequency) to use.
*/
private Duration step;
private Duration step = Duration.ofMinutes(1);
/**
* Base time unit used to report rates.
*/
private TimeUnit rateUnits;
private TimeUnit rateUnits = TimeUnit.SECONDS;
/**
* Base time unit used to report durations.
*/
private TimeUnit durationUnits;
private TimeUnit durationUnits = TimeUnit.MILLISECONDS;
/**
* Host of the Graphite server to receive exported metrics.
*/
private String host;
private String host = "localhost";
/**
* Port of the Graphite server to receive exported metrics.
*/
private Integer port;
private Integer port = 2004;
/**
* Protocol to use while shipping data to Graphite.
*/
private GraphiteProtocol protocol;
private GraphiteProtocol protocol = GraphiteProtocol.PICKLED;
/**
* For the default naming convention, turn the specified tag keys into part of the
* metric prefix.
*/
private String[] tagsAsPrefix;
private String[] tagsAsPrefix = new String[0];
public Boolean getEnabled() {
public boolean isEnabled() {
return this.enabled;
}
public void setEnabled(Boolean enabled) {
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}

@ -44,7 +44,7 @@ class GraphitePropertiesConfigAdapter extends PropertiesConfigAdapter<GraphitePr
@Override
public boolean enabled() {
return get(GraphiteProperties::getEnabled, GraphiteConfig.super::enabled);
return get(GraphiteProperties::isEnabled, GraphiteConfig.super::enabled);
}
@Override

@ -25,21 +25,21 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* {@link ConfigurationProperties} for configuring Influx metrics export.
*
* @author Jon Schneider
* @author Stephane Nicoll
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.metrics.export.influx")
public class InfluxProperties extends StepRegistryProperties {
/**
* Tag that will be mapped to "host" when shipping metrics to Influx. Can be omitted
* if host should be omitted on publishing.
* Tag that will be mapped to "host" when shipping metrics to Influx.
*/
private String db;
private String db = "mydb";
/**
* Write consistency for each point.
*/
private InfluxConsistency consistency;
private InfluxConsistency consistency = InfluxConsistency.ONE;
/**
* Login user of the Influx server.
@ -60,18 +60,18 @@ public class InfluxProperties extends StepRegistryProperties {
/**
* URI of the Influx server.
*/
private String uri;
private String uri = "http://localhost:8086";
/**
* Enable GZIP compression of metrics batches published to Influx.
* Whether to enable GZIP compression of metrics batches published to Influx.
*/
private Boolean compressed;
private boolean compressed = true;
/**
* Whether to create the Influx database if it does not exist before attempting to
* publish metrics to it.
*/
private Boolean autoCreateDb;
private boolean autoCreateDb = true;
public String getDb() {
return this.db;
@ -121,19 +121,20 @@ public class InfluxProperties extends StepRegistryProperties {
this.uri = uri;
}
public Boolean getCompressed() {
public boolean isCompressed() {
return this.compressed;
}
public void setCompressed(Boolean compressed) {
public void setCompressed(boolean compressed) {
this.compressed = compressed;
}
public Boolean getAutoCreateDb() {
public boolean isAutoCreateDb() {
return this.autoCreateDb;
}
public void setAutoCreateDb(Boolean autoCreateDb) {
public void setAutoCreateDb(boolean autoCreateDb) {
this.autoCreateDb = autoCreateDb;
}
}

@ -67,12 +67,12 @@ class InfluxPropertiesConfigAdapter extends
@Override
public boolean compressed() {
return get(InfluxProperties::getCompressed, InfluxConfig.super::compressed);
return get(InfluxProperties::isCompressed, InfluxConfig.super::compressed);
}
@Override
public boolean autoCreateDb() {
return get(InfluxProperties::getAutoCreateDb, InfluxConfig.super::autoCreateDb);
return get(InfluxProperties::isAutoCreateDb, InfluxConfig.super::autoCreateDb);
}
}

@ -24,28 +24,16 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* {@link ConfigurationProperties} for configuring JMX metrics export.
*
* @author Jon Schneider
* @author Stephane Nicoll
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.metrics.export.jmx")
public class JmxProperties {
/**
* Whether exporting of metrics to this backend is enabled.
*/
private Boolean enabled;
/**
* Step size (i.e. reporting frequency) to use.
*/
private Duration step;
public Boolean getEnabled() {
return this.enabled;
}
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
private Duration step = Duration.ofMinutes(1);
public Duration getStep() {
return this.step;

@ -24,6 +24,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
*
* @author Jon Schneider
* @author Andy Wilkinson
* @author Stephane Nicoll
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.metrics.export.newrelic")
@ -40,9 +41,9 @@ public class NewRelicProperties extends StepRegistryProperties {
private String accountId;
/**
* Optional custom URI for the New Relic Insights API.
* URI to ship metrics to.
*/
private String uri;
private String uri = "https://insights-collector.newrelic.com";
public String getApiKey() {
return this.apiKey;

@ -24,40 +24,28 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* {@link ConfigurationProperties} for configuring metrics export to Prometheus.
*
* @author Jon Schneider
* @author Stephane Nicoll
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.metrics.export.prometheus")
public class PrometheusProperties {
/**
* Whether exporting of metrics to this backend is enabled.
* Whether to enable publishing descriptions as part of the scrape payload to
* Prometheus. Turn this off to minimize the amount of data sent on each scrape.
*/
private Boolean enabled;
/**
* Enable publishing descriptions as part of the scrape payload to Prometheus. Turn
* this off to minimize the amount of data sent on each scrape.
*/
private Boolean descriptions;
private boolean descriptions = true;
/**
* Step size (i.e. reporting frequency) to use.
*/
private Duration step;
public Boolean getEnabled() {
return this.enabled;
}
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
private Duration step = Duration.ofMinutes(1);
public Boolean getDescriptions() {
public boolean isDescriptions() {
return this.descriptions;
}
public void setDescriptions(Boolean descriptions) {
public void setDescriptions(boolean descriptions) {
this.descriptions = descriptions;
}

@ -42,7 +42,7 @@ class PrometheusPropertiesConfigAdapter extends
@Override
public boolean descriptions() {
return get(PrometheusProperties::getDescriptions,
return get(PrometheusProperties::isDescriptions,
PrometheusConfig.super::descriptions);
}

@ -24,6 +24,7 @@ import java.time.Duration;
*
* @author Jon Schneider
* @author Andy Wilkinson
* @author Stephane Nicoll
* @since 2.0.0
*/
public abstract class StepRegistryProperties {
@ -36,28 +37,28 @@ public abstract class StepRegistryProperties {
/**
* Whether exporting of metrics to this backend is enabled.
*/
private Boolean enabled;
private boolean enabled = true;
/**
* Connection timeout for requests to this backend.
*/
private Duration connectTimeout;
private Duration connectTimeout = Duration.ofSeconds(1);
/**
* Read timeout for requests to this backend.
*/
private Duration readTimeout;
private Duration readTimeout = Duration.ofSeconds(10);
/**
* Number of threads to use with the metrics publishing scheduler.
*/
private Integer numThreads;
private Integer numThreads = 2;
/**
* Number of measurements per request to use for this backend. If more measurements
* are found, then multiple requests will be made.
*/
private Integer batchSize;
private Integer batchSize = 10000;
public Duration getStep() {
return this.step;
@ -67,11 +68,11 @@ public abstract class StepRegistryProperties {
this.step = step;
}
public Boolean getEnabled() {
public boolean isEnabled() {
return this.enabled;
}
public void setEnabled(Boolean enabled) {
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}

@ -52,7 +52,7 @@ public abstract class StepRegistryPropertiesConfigAdapter<T extends StepRegistry
@Override
public boolean enabled() {
return get(T::getEnabled, StepRegistryConfig.super::enabled);
return get(T::isEnabled, StepRegistryConfig.super::enabled);
}
@Override

@ -16,6 +16,8 @@
package org.springframework.boot.actuate.autoconfigure.metrics.export.signalfx;
import java.time.Duration;
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;
@ -24,20 +26,26 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
*
* @author Jon Schneider
* @author Andy Wilkinson
* @author Stephane Nicoll
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.metrics.export.signalfx")
public class SignalFxProperties extends StepRegistryProperties {
/**
* Step size (i.e. reporting frequency) to use.
*/
private Duration step = Duration.ofSeconds(10);
/**
* SignalFX access token.
*/
private String accessToken;
/**
* Optional custom URI for the SignalFX API.
* URI to ship metrics to.
*/
private String uri;
private String uri = "https://ingest.signalfx.com";
/**
* Uniquely identifies the app instance that is publishing metrics to SignalFx.
@ -45,6 +53,16 @@ public class SignalFxProperties extends StepRegistryProperties {
*/
private String source;
@Override
public Duration getStep() {
return this.step;
}
@Override
public void setStep(Duration step) {
this.step = step;
}
public String getAccessToken() {
return this.accessToken;
}

@ -28,6 +28,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* {@link SimpleMeterRegistry}.
*
* @author Jon Schneider
* @author Stephane Nicoll
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.metrics.export.simple")
@ -36,7 +37,7 @@ public class SimpleProperties {
/**
* Step size (i.e. reporting frequency) to use.
*/
private Duration step = Duration.ofSeconds(10);
private Duration step = Duration.ofMinutes(1);
/**
* Counting mode.

@ -33,9 +33,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
public class StatsdProperties {
/**
* Whether exporting of metrics to this backend is enabled.
* Whether exporting of metrics to StatsD is enabled.
*/
private Boolean enabled;
private boolean enabled = true;
/**
* StatsD line protocol to use.
@ -70,15 +70,15 @@ public class StatsdProperties {
private Integer queueSize = Integer.MAX_VALUE;
/**
* Send unchanged meters to the StatsD server.
* Whether to send unchanged meters to the StatsD server.
*/
private Boolean publishUnchangedMeters;
private boolean publishUnchangedMeters = true;
public Boolean getEnabled() {
public boolean isEnabled() {
return this.enabled;
}
public void setEnabled(Boolean enabled) {
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
@ -130,11 +130,11 @@ public class StatsdProperties {
this.queueSize = queueSize;
}
public Boolean getPublishUnchangedMeters() {
public boolean isPublishUnchangedMeters() {
return this.publishUnchangedMeters;
}
public void setPublishUnchangedMeters(Boolean publishUnchangedMeters) {
public void setPublishUnchangedMeters(boolean publishUnchangedMeters) {
this.publishUnchangedMeters = publishUnchangedMeters;
}

@ -48,7 +48,7 @@ public class StatsdPropertiesConfigAdapter
@Override
public boolean enabled() {
return get(StatsdProperties::getEnabled, StatsdConfig.super::enabled);
return get(StatsdProperties::isEnabled, StatsdConfig.super::enabled);
}
@Override
@ -80,7 +80,7 @@ public class StatsdPropertiesConfigAdapter
@Override
public boolean publishUnchangedMeters() {
return get(StatsdProperties::getPublishUnchangedMeters,
return get(StatsdProperties::isPublishUnchangedMeters,
StatsdConfig.super::publishUnchangedMeters);
}

@ -17,6 +17,7 @@
package org.springframework.boot.actuate.autoconfigure.metrics.export.wavefront;
import java.net.URI;
import java.time.Duration;
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;
@ -30,10 +31,15 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
@ConfigurationProperties("management.metrics.export.wavefront")
public class WavefrontProperties extends StepRegistryProperties {
/**
* Step size (i.e. reporting frequency) to use.
*/
private Duration step = Duration.ofSeconds(10);
/**
* URI to ship metrics to.
*/
private URI uri;
private URI uri = URI.create("https://longboard.wavefront.com");
/**
* Unique identifier for the app instance that is the source of metrics being
@ -61,6 +67,16 @@ public class WavefrontProperties extends StepRegistryProperties {
this.uri = uri;
}
@Override
public Duration getStep() {
return this.step;
}
@Override
public void setStep(Duration step) {
this.step = step;
}
public String getSource() {
return this.source;
}

@ -215,12 +215,64 @@
"description": "Whether to enable uptime metrics.",
"defaultValue": true
},
{
"name": "management.metrics.export.jmx.enabled",
"type": "java.lang.Boolean",
"description": "Whether exporting of metrics to JMX is enabled.",
"defaultValue": true
},
{
"name": "management.metrics.export.ganglia.addressing-mode",
"defaultValue": "multicast"
},
{
"name": "management.metrics.export.ganglia.duration-units",
"defaultValue": "milliseconds"
},
{
"name": "management.metrics.export.ganglia.rate-units",
"defaultValue": "seconds"
},
{
"name": "management.metrics.export.graphite.duration-units",
"defaultValue": "milliseconds"
},
{
"name": "management.metrics.export.graphite.protocol",
"defaultValue": "pickled"
},
{
"name": "management.metrics.export.graphite.rate-units",
"defaultValue": "seconds"
},
{
"name": "management.metrics.export.influx.consistency",
"defaultValue": "one"
},
{
"name": "management.metrics.export.prometheus.enabled",
"type": "java.lang.Boolean",
"description": "Whether exporting of metrics to Prometheus is enabled.",
"defaultValue": true
},
{
"name": "management.metrics.export.simple.enabled",
"type": "java.lang.Boolean",
"description": "Whether, in the absence of any other exporter, exporting of metrics to an in-memory backend is enabled.",
"defaultValue": true
},
{
"name": "management.metrics.export.simple.mode",
"defaultValue": "cumulative"
},
{
"name": "management.metrics.export.statsd.flavor",
"defaultValue": "datadog"
},
{
"name": "management.metrics.export.statsd.queue-size",
"defaultValue": 2147483647
},
{
"name": "management.trace.http.enabled",
"type": "java.lang.Boolean",

@ -0,0 +1,51 @@
/*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.metrics.export.atlas;
import com.netflix.spectator.atlas.AtlasConfig;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for {@link AtlasProperties}.
*
* @author Stephane Nicoll
*/
public class AtlasPropertiesTests {
@Test
public void defaultValuesAreConsistent() {
AtlasProperties properties = new AtlasProperties();
AtlasConfig config = (k) -> null;
assertThat(properties.getStep()).isEqualTo(config.step());
assertThat(properties.isEnabled()).isEqualTo(config.enabled());
assertThat(properties.getConnectTimeout()).isEqualTo(config.connectTimeout());
assertThat(properties.getReadTimeout()).isEqualTo(config.readTimeout());
assertThat(properties.getNumThreads()).isEqualTo(config.numThreads());
assertThat(properties.getBatchSize()).isEqualTo(config.batchSize());
assertThat(properties.getUri()).isEqualTo(config.uri());
assertThat(properties.getMeterTimeToLive()).isEqualTo(config.meterTTL());
assertThat(properties.isLwcEnabled()).isEqualTo(config.lwcEnabled());
assertThat(properties.getConfigRefreshFrequency())
.isEqualTo(config.configRefreshFrequency());
assertThat(properties.getConfigTimeToLive()).isEqualTo(config.configTTL());
assertThat(properties.getConfigUri()).isEqualTo(config.configUri());
assertThat(properties.getEvalUri()).isEqualTo(config.evalUri());
}
}

@ -0,0 +1,41 @@
/*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.metrics.export.datadog;
import io.micrometer.datadog.DatadogConfig;
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryPropertiesTests;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for {@link DatadogProperties}.
*
* @author Stephane Nicoll
*/
public class DatadogPropertiesTests extends StepRegistryPropertiesTests {
@Override
public void defaultValuesAreConsistent() {
DatadogProperties properties = new DatadogProperties();
DatadogConfig config = DatadogConfig.DEFAULT;
assertStepRegistryDefaultValues(properties, config);
assertThat(properties.isDescriptions()).isEqualTo(config.descriptions());
assertThat(properties.getHostTag()).isEqualTo(config.hostTag());
assertThat(properties.getUri()).isEqualTo(config.uri());
}
}

@ -0,0 +1,46 @@
/*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.metrics.export.ganglia;
import io.micrometer.ganglia.GangliaConfig;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for {@link GangliaProperties}.
*
* @author Stephane Nicoll
*/
public class GangliaPropertiesTests {
@Test
public void defaultValuesAreConsistent() {
GangliaProperties properties = new GangliaProperties();
GangliaConfig config = GangliaConfig.DEFAULT;
assertThat(properties.isEnabled()).isEqualTo(config.enabled());
assertThat(properties.getStep()).isEqualTo(config.step());
assertThat(properties.getRateUnits()).isEqualTo(config.rateUnits());
assertThat(properties.getDurationUnits()).isEqualTo(config.durationUnits());
assertThat(properties.getProtocolVersion()).isEqualTo(config.protocolVersion());
assertThat(properties.getAddressingMode()).isEqualTo(config.addressingMode());
assertThat(properties.getTimeToLive()).isEqualTo(config.ttl());
assertThat(properties.getHost()).isEqualTo(config.host());
assertThat(properties.getPort()).isEqualTo(config.port());
}
}

@ -0,0 +1,45 @@
/*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.metrics.export.graphite;
import io.micrometer.graphite.GraphiteConfig;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for {@link GraphiteProperties}.
*
* @author Stephane Nicoll
*/
public class GraphitePropertiesTests {
@Test
public void defaultValuesAreConsistent() {
GraphiteProperties properties = new GraphiteProperties();
GraphiteConfig config = GraphiteConfig.DEFAULT;
assertThat(properties.isEnabled()).isEqualTo(config.enabled());
assertThat(properties.getStep()).isEqualTo(config.step());
assertThat(properties.getRateUnits()).isEqualTo(config.rateUnits());
assertThat(properties.getDurationUnits()).isEqualTo(config.durationUnits());
assertThat(properties.getHost()).isEqualTo(config.host());
assertThat(properties.getPort()).isEqualTo(config.port());
assertThat(properties.getProtocol()).isEqualTo(config.protocol());
assertThat(properties.getTagsAsPrefix()).isEqualTo(config.tagsAsPrefix());
}
}

@ -0,0 +1,47 @@
/*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.metrics.export.influx;
import io.micrometer.influx.InfluxConfig;
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryPropertiesTests;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for {@link InfluxProperties}.
*
* @author Stephane Nicoll
*/
public class InfluxPropertiesTests extends StepRegistryPropertiesTests {
@Override
public void defaultValuesAreConsistent() {
InfluxProperties properties = new InfluxProperties();
InfluxConfig config = InfluxConfig.DEFAULT;
assertStepRegistryDefaultValues(properties, config);
assertThat(properties.getDb()).isEqualTo(config.db());
assertThat(properties.getConsistency()).isEqualTo(config.consistency());
assertThat(properties.getUserName()).isEqualTo(config.userName());
assertThat(properties.getPassword()).isEqualTo(config.password());
assertThat(properties.getRetentionPolicy()).isEqualTo(config.retentionPolicy());
assertThat(properties.getUri()).isEqualTo(config.uri());
assertThat(properties.isCompressed()).isEqualTo(config.compressed());
assertThat(properties.isAutoCreateDb()).isEqualTo(config.autoCreateDb());
}
}

@ -0,0 +1,38 @@
/*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.metrics.export.jmx;
import io.micrometer.jmx.JmxConfig;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for {@link JmxProperties}.
*
* @author Stephane Nicoll
*/
public class JmxPropertiesTests {
@Test
public void defaultValuesAreConsistent() {
JmxProperties properties = new JmxProperties();
JmxConfig config = JmxConfig.DEFAULT;
assertThat(properties.getStep()).isEqualTo(config.step());
}
}

@ -0,0 +1,41 @@
/*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.metrics.export.newrelic;
import io.micrometer.newrelic.NewRelicConfig;
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryPropertiesTests;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for {@link NewRelicProperties}.
*
* @author Stephane Nicoll
*/
public class NewRelicPropertiesTests extends StepRegistryPropertiesTests {
@Override
public void defaultValuesAreConsistent() {
NewRelicProperties properties = new NewRelicProperties();
NewRelicConfig config = NewRelicConfig.DEFAULT;
assertStepRegistryDefaultValues(properties, config);
// apiKey and account are mandatory
assertThat(properties.getUri()).isEqualTo(config.uri());
}
}

@ -0,0 +1,39 @@
/*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.metrics.export.prometheus;
import io.micrometer.prometheus.PrometheusConfig;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for {@link PrometheusProperties}.
*
* @author Stephane Nicoll
*/
public class PrometheusPropertiesTests {
@Test
public void defaultValuesAreConsistent() {
PrometheusProperties properties = new PrometheusProperties();
PrometheusConfig config = PrometheusConfig.DEFAULT;
assertThat(properties.isDescriptions()).isEqualTo(config.descriptions());
assertThat(properties.getStep()).isEqualTo(config.step());
}
}

@ -0,0 +1,44 @@
/*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.metrics.export.properties;
import io.micrometer.core.instrument.step.StepRegistryConfig;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Base tests for {@link StepRegistryProperties} implementation.
*
* @author Stephane Nicoll
*/
public abstract class StepRegistryPropertiesTests {
protected void assertStepRegistryDefaultValues(StepRegistryProperties properties,
StepRegistryConfig config) {
assertThat(properties.getStep()).isEqualTo(config.step());
assertThat(properties.isEnabled()).isEqualTo(config.enabled());
assertThat(properties.getConnectTimeout()).isEqualTo(config.connectTimeout());
assertThat(properties.getReadTimeout()).isEqualTo(config.readTimeout());
assertThat(properties.getNumThreads()).isEqualTo(config.numThreads());
assertThat(properties.getBatchSize()).isEqualTo(config.batchSize());
}
@Test
public abstract void defaultValuesAreConsistent();
}

@ -0,0 +1,42 @@
/*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.metrics.export.signalfx;
import io.micrometer.signalfx.SignalFxConfig;
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryPropertiesTests;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for {@link SignalFxProperties}.
*
* @author Stephane Nicoll
*/
public class SignalFxPropertiesTests extends StepRegistryPropertiesTests {
@Override
public void defaultValuesAreConsistent() {
SignalFxProperties properties = new SignalFxProperties();
SignalFxConfig config = SignalFxConfig.DEFAULT;
assertStepRegistryDefaultValues(properties, config);
// access token is mandatory
assertThat(properties.getUri()).isEqualTo(config.uri());
// source has no static default value
}
}

@ -0,0 +1,38 @@
/*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.metrics.export.simple;
import io.micrometer.core.instrument.simple.SimpleConfig;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
/**
*
* @author Stephane Nicoll
*/
public class SimplePropertiesTests {
@Test
public void defaultValuesAreConsistent() {
SimpleProperties properties = new SimpleProperties();
SimpleConfig config = SimpleConfig.DEFAULT;
assertThat(properties.getStep()).isEqualTo(config.step());
assertThat(properties.getMode()).isEqualTo(config.mode());
}
}

@ -0,0 +1,46 @@
/*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.metrics.export.statsd;
import io.micrometer.statsd.StatsdConfig;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for {@link StatsdProperties}.
*
* @author Stephane Nicoll
*/
public class StatsdPropertiesTests {
@Test
public void defaultValuesAreConsistent() {
StatsdProperties properties = new StatsdProperties();
StatsdConfig config = StatsdConfig.DEFAULT;
assertThat(properties.isEnabled()).isEqualTo(config.enabled());
assertThat(properties.getFlavor()).isEqualTo(config.flavor());
assertThat(properties.getHost()).isEqualTo(config.host());
assertThat(properties.getPort()).isEqualTo(config.port());
assertThat(properties.getMaxPacketLength()).isEqualTo(config.maxPacketLength());
assertThat(properties.getPollingFrequency()).isEqualTo(config.pollingFrequency());
assertThat(properties.getQueueSize()).isEqualTo(config.queueSize());
assertThat(properties.isPublishUnchangedMeters())
.isEqualTo(config.publishUnchangedMeters());
}
}

@ -0,0 +1,43 @@
/*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.metrics.export.wavefront;
import io.micrometer.wavefront.WavefrontConfig;
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryPropertiesTests;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for {@link WavefrontProperties}.
*
* @author Stephane Nicoll
*/
public class WavefrontPropertiesTests extends StepRegistryPropertiesTests {
@Override
public void defaultValuesAreConsistent() {
WavefrontProperties properties = new WavefrontProperties();
WavefrontConfig config = WavefrontConfig.DEFAULT_DIRECT;
assertStepRegistryDefaultValues(properties, config);
assertThat(properties.getUri().toString()).isEqualTo(config.uri());
// source has no static default value
assertThat(properties.getApiToken()).isEqualTo(config.apiToken());
assertThat(properties.getGlobalPrefix()).isEqualTo(config.globalPrefix());
}
}

@ -1305,98 +1305,105 @@ content into your application. Rather, pick only the properties that you need.
management.metrics.distribution.percentiles.*= # Specific computed non-aggregable percentiles to ship to the backend for meter IDs starting-with the specified name.
management.metrics.distribution.sla.*= Specific SLA boundaries for meter IDs starting-with the specified name. The longest match wins, the key `all` can also be used to configure all meters.
management.metrics.enable.*= # Whether meter IDs starting-with the specified name should be enabled. The longest match wins, the key `all` can also be used to configure all meters.
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.batch-size=10000 # Number of measurements per request to use for this backend. If more measurements are found, then multiple requests will be made.
management.metrics.export.atlas.config-refresh-frequency=10s # Frequency for refreshing config settings from the LWC service.
management.metrics.export.atlas.config-time-to-live=150s # Time to live for subscriptions from the LWC service.
management.metrics.export.atlas.config-uri=http://localhost:7101/lwc/api/v1/expressions/local-dev # URI for the Atlas LWC endpoint to retrieve current subscriptions.
management.metrics.export.atlas.connect-timeout=1s # Connection timeout for requests to this backend.
management.metrics.export.atlas.enabled=true # Whether exporting of metrics to this backend is enabled.
management.metrics.export.atlas.eval-uri=http://localhost:7101/lwc/api/v1/evaluate # URI for the Atlas LWC endpoint to evaluate the data for a subscription.
management.metrics.export.atlas.lwc-enabled=false # Whether to enable streaming to Atlas LWC.
management.metrics.export.atlas.meter-time-to-live=15m # 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=2 # Number of threads to use with the metrics publishing scheduler.
management.metrics.export.atlas.read-timeout=10s # Read timeout for requests to this 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.atlas.uri=http://localhost:7101/api/v1/publish # URI of the Atlas server.
management.metrics.export.datadog.api-key= # Datadog API key.
management.metrics.export.datadog.application-key= # Datadog application 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.descriptions= # Whether to publish descriptions metadata to Datadog. Turn this off to minimize the amount of metadata sent.
management.metrics.export.datadog.application-key= # Datadog application key. Not strictly required, but improves the Datadog experience by sending meter descriptions, types, and base units to Datadog.
management.metrics.export.datadog.batch-size=10000 # Number of measurements per request to use for this backend. If more measurements are found, then multiple requests will be made.
management.metrics.export.datadog.connect-timeout=1s # Connection timeout for requests to this backend.
management.metrics.export.datadog.descriptions=true # Whether to publish descriptions metadata to Datadog. Turn this off to minimize the amount of metadata sent.
management.metrics.export.datadog.enabled=true # 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.host-tag=instance # Tag that will be mapped to "host" when shipping metrics to Datadog.
management.metrics.export.datadog.num-threads=2 # Number of threads to use with the metrics publishing scheduler.
management.metrics.export.datadog.read-timeout=10s # Read timeout for requests to this 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 this backend 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 this backend 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.datadog.uri=https://app.datadoghq.com # 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=multicast # UDP addressing mode, either unicast or multicast.
management.metrics.export.ganglia.duration-units=milliseconds # Base time unit used to report durations.
management.metrics.export.ganglia.enabled=true # Whether exporting of metrics to Ganglia is enabled.
management.metrics.export.ganglia.host=localhost # Host of the Ganglia server to receive exported metrics.
management.metrics.export.ganglia.port=8649 # Port of the Ganglia server to receive exported metrics.
management.metrics.export.ganglia.protocol-version=3.1 # Ganglia protocol version. Must be either 3.1 or 3.0.
management.metrics.export.ganglia.rate-units=seconds # Base time unit used to report rates.
management.metrics.export.ganglia.step=1m # Step size (i.e. reporting frequency) to use.
management.metrics.export.ganglia.time-to-live=1 # Time to live for metrics on Ganglia. Set the multi-cast Time-To-Live to be one greater than the number of hops (routers) between the hosts.
management.metrics.export.graphite.duration-units=milliseconds # Base time unit used to report durations.
management.metrics.export.graphite.enabled=true # Whether exporting of metrics to Graphite is enabled.
management.metrics.export.graphite.host=localhost # Host of the Graphite server to receive exported metrics.
management.metrics.export.graphite.port=2004 # Port of the Graphite server to receive exported metrics.
management.metrics.export.graphite.protocol=pickled # Protocol to use while shipping data to Graphite.
management.metrics.export.graphite.rate-units=seconds # Base time unit used to report rates.
management.metrics.export.graphite.step=1m # Step size (i.e. reporting frequency) to use.
management.metrics.export.graphite.tags-as-prefix= # For the default naming convention, turn the specified tag keys into part of the metric prefix.
management.metrics.export.influx.auto-create-db= # Whether to create the Influx database if it does not exist before attempting to publish metrics to it.
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.auto-create-db=true # Whether to create the Influx database if it does not exist before attempting to publish metrics to it.
management.metrics.export.influx.batch-size=10000 # Number of measurements per request to use for this backend. If more measurements are found, then multiple requests will be made.
management.metrics.export.influx.compressed=true # Whether to enable GZIP compression of metrics batches published to Influx.
management.metrics.export.influx.connect-timeout=1s # Connection timeout for requests to this backend.
management.metrics.export.influx.consistency=one # Write consistency for each point.
management.metrics.export.influx.db=mydb # Tag that will be mapped to "host" when shipping metrics to Influx.
management.metrics.export.influx.enabled=true # Whether exporting of metrics to this backend is enabled.
management.metrics.export.influx.num-threads=2 # 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.read-timeout=10s # Read timeout for requests to this 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.uri=http://localhost:8086 # URI of the Influx server.
management.metrics.export.influx.user-name= # Login user of the Influx server.
management.metrics.export.jmx.enabled= # Whether exporting of metrics to this backend is enabled.
management.metrics.export.jmx.step= # Step size (i.e. reporting frequency) to use.
management.metrics.export.jmx.enabled=true # Whether exporting of metrics to JMX is enabled.
management.metrics.export.jmx.step=1m # Step size (i.e. reporting frequency) to use.
management.metrics.export.newrelic.account-id= # New Relic account ID.
management.metrics.export.newrelic.api-key= # New Relic API key.
management.metrics.export.newrelic.batch-size= # Number of measurements per request to use for this backend. If more measurements are found, then multiple requests will be made.
management.metrics.export.newrelic.connect-timeout= # Connection timeout for requests to this backend.
management.metrics.export.newrelic.enabled= # Whether exporting of metrics to this backend is enabled.
management.metrics.export.newrelic.num-threads= # Number of threads to use with the metrics publishing scheduler.
management.metrics.export.newrelic.read-timeout= # Read timeout for requests to this backend.
management.metrics.export.newrelic.batch-size=10000 # Number of measurements per request to use for this backend. If more measurements are found, then multiple requests will be made.
management.metrics.export.newrelic.connect-timeout=1s # Connection timeout for requests to this backend.
management.metrics.export.newrelic.enabled=true # Whether exporting of metrics to this backend is enabled.
management.metrics.export.newrelic.num-threads=2 # Number of threads to use with the metrics publishing scheduler.
management.metrics.export.newrelic.read-timeout=10s # Read timeout for requests to this backend.
management.metrics.export.newrelic.step=1m # Step size (i.e. reporting frequency) to use.
management.metrics.export.newrelic.uri= # Optional custom URI for the New Relic Insights API.
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=true # Whether exporting of metrics to this backend is enabled.
management.metrics.export.prometheus.step= # Step size (i.e. reporting frequency) to use.
management.metrics.export.newrelic.uri=https://insights-collector.newrelic.com # URI to ship metrics to.
management.metrics.export.prometheus.descriptions=true # Whether to 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=true # Whether exporting of metrics to Prometheus is enabled.
management.metrics.export.prometheus.step=1m # Step size (i.e. reporting frequency) to use.
management.metrics.export.signalfx.access-token= # SignalFX access token.
management.metrics.export.signalfx.batch-size= # Number of measurements per request to use for this backend. If more measurements are found, then multiple requests will be made.
management.metrics.export.signalfx.connect-timeout= # Connection timeout for requests to this backend.
management.metrics.export.signalfx.enabled= # Whether exporting of metrics to this backend is enabled.
management.metrics.export.signalfx.num-threads= # Number of threads to use with the metrics publishing scheduler.
management.metrics.export.signalfx.read-timeout= # Read timeout for requests to this backend.
management.metrics.export.signalfx.batch-size=10000 # Number of measurements per request to use for this backend. If more measurements are found, then multiple requests will be made.
management.metrics.export.signalfx.connect-timeout=1s # Connection timeout for requests to this backend.
management.metrics.export.signalfx.enabled=true # Whether exporting of metrics to this backend is enabled.
management.metrics.export.signalfx.num-threads=2 # Number of threads to use with the metrics publishing scheduler.
management.metrics.export.signalfx.read-timeout=10s # Read timeout for requests to this backend.
management.metrics.export.signalfx.source= # Uniquely identifies the app instance that is publishing metrics to SignalFx. Defaults to the local host name.
management.metrics.export.signalfx.step=1m # Step size (i.e. reporting frequency) to use.
management.metrics.export.signalfx.uri= # Optional custom URI for the SignalFX API.
management.metrics.export.signalfx.step=10s # Step size (i.e. reporting frequency) to use.
management.metrics.export.signalfx.uri=https://ingest.signalfx.com # URI to ship metrics to.
management.metrics.export.simple.enabled=true # Whether, in the absence of any other exporter, exporting of metrics to an in-memory backend 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=true # Whether, in the absence of any other exporter, exporting of metrics to an in-memory backend is enabled.
management.metrics.export.simple.step=1m # Step size (i.e. reporting frequency) to use.
management.metrics.export.statsd.enabled=true # Whether exporting of metrics to StatsD is enabled.
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.polling-frequency=10s # How often gauges will be polled. When a gauge is polled, its value is recalculated and if the value has changed (or publishUnchangedMeters is true), 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.publish-unchanged-meters=true # Whether to send unchanged meters to the StatsD server.
management.metrics.export.statsd.queue-size=2147483647 # Maximum size of the queue of items waiting to be sent to the StatsD server.
management.metrics.export.wavefront.api-token= # API token used when publishing metrics directly to the Wavefront API host.
management.metrics.export.wavefront.enabled= # Whether exporting of metrics to this backend is enabled.
management.metrics.export.wavefront.batch-size=10000 # Number of measurements per request to use for this backend. If more measurements are found, then multiple requests will be made.
management.metrics.export.wavefront.connect-timeout=1s # Connection timeout for requests to this backend.
management.metrics.export.wavefront.enabled=true # Whether exporting of metrics to this backend is enabled.
management.metrics.export.wavefront.global-prefix= # Global prefix to separate metrics originating from this app's white box instrumentation from those originating from other Wavefront integrations when viewed in the Wavefront UI.
management.metrics.export.wavefront.num-threads=2 # Number of threads to use with the metrics publishing scheduler.
management.metrics.export.wavefront.read-timeout=10s # Read timeout for requests to this backend.
management.metrics.export.wavefront.source= # Unique identifier for the app instance that is the source of metrics being published to Wavefront. Defaults to the local host name.
management.metrics.export.wavefront.uri= # URI to ship metrics to.
management.metrics.export.wavefront.step=10s # Step size (i.e. reporting frequency) to use.
management.metrics.export.wavefront.uri=https://longboard.wavefront.com # URI to ship metrics to.
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.max-uri-tags=100 # Maximum number of unique URI tag values allowed. After the max number of tag values is reached, metrics with additional tag values are denied by filter.
management.metrics.web.client.record-request-percentiles=false # Whether instrumented requests record percentiles histogram buckets by default.

Loading…
Cancel
Save