Browse Source

Polish micrometer configuration key descriptions

Closes gh-10890
pull/11016/merge
Stephane Nicoll 8 years ago
parent
commit
401fe7e1e2
  1. 10
      spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/StepRegistryProperties.java
  2. 14
      spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/atlas/AtlasProperties.java
  3. 11
      spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/datadog/DatadogProperties.java
  4. 16
      spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/ganglia/GangliaProperties.java
  5. 12
      spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/graphite/GraphiteProperties.java
  6. 16
      spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/influx/InfluxProperties.java
  7. 2
      spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/prometheus/PrometheusProperties.java
  8. 2
      spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/simple/SimpleProperties.java
  9. 16
      spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/statsd/StatsdProperties.java
  10. 73
      spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc

10
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/StepRegistryProperties.java

@ -29,7 +29,7 @@ import java.time.Duration; @@ -29,7 +29,7 @@ import java.time.Duration;
public abstract class StepRegistryProperties {
/**
* The step size (reporting frequency) to use.
* Step size (i.e. reporting frequency) to use.
*/
private Duration step = Duration.ofMinutes(1);
@ -39,22 +39,22 @@ public abstract class StepRegistryProperties { @@ -39,22 +39,22 @@ public abstract class StepRegistryProperties {
private Boolean enabled;
/**
* The connection timeout for requests to the backend.
* Connection timeout for requests to the backend.
*/
private Duration connectTimeout;
/**
* The read timeout for requests to the backend.
* Read timeout for requests to the backend.
*/
private Duration readTimeout;
/**
* The number of threads to use with the metrics publishing scheduler.
* Number of threads to use with the metrics publishing scheduler.
*/
private Integer numThreads;
/**
* The number of measurements per request to use for the backend. If more measurements
* Number of measurements per request to use for the backend. If more measurements
* are found, then multiple requests will be made.
*/
private Integer batchSize;

14
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/atlas/AtlasProperties.java

@ -31,13 +31,13 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @@ -31,13 +31,13 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
public class AtlasProperties extends StepRegistryProperties {
/**
* The URI for the Atlas backend.
* URI of the Atlas server.
*/
private String uri;
/**
* The TTL for meters that do not have any activity. After this period the meter will
* be considered expired and will not get reported.
* Time to love 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;
@ -47,22 +47,22 @@ public class AtlasProperties extends StepRegistryProperties { @@ -47,22 +47,22 @@ public class AtlasProperties extends StepRegistryProperties {
private Boolean lwcEnabled;
/**
* The frequency for refreshing config settings from the LWC service.
* Frequency for refreshing config settings from the LWC service.
*/
private Duration configRefreshFrequency;
/**
* The TTL for subscriptions from the LWC service.
* Time to live for subscriptions from the LWC service.
*/
private Duration configTimeToLive;
/**
* The URI for the Atlas LWC endpoint to retrieve current subscriptions.
* URI for the Atlas LWC endpoint to retrieve current subscriptions.
*/
private String configUri;
/**
* The URI for the Atlas LWC endpoint to evaluate the data for a subscription.
* URI for the Atlas LWC endpoint to evaluate the data for a subscription.
*/
private String evalUri;

11
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/datadog/DatadogProperties.java

@ -29,20 +29,19 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @@ -29,20 +29,19 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
public class DatadogProperties extends StepRegistryProperties {
/**
* Your API key, found in your account settings at datadoghq. This property is
* required.
* Datadog API key.
*/
private String apiKey;
/**
* The tag that will be mapped to "host" when shipping metrics to datadog, or
* {@code null} if host should be omitted on publishing.
* Tag that will be mapped to "host" when shipping metrics to Datadog. Can be
* omitted of host should be omitted on publishing.
*/
private String hostTag;
/**
* The URI to ship metrics to. If you need to publish metrics to an internal proxy
* en-route to datadoghq, you can define the location of the proxy with this.
* 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;

16
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/ganglia/GangliaProperties.java

@ -33,22 +33,22 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @@ -33,22 +33,22 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
public class GangliaProperties {
/**
* Enable publishing to the backend.
* Enable publishing to Ganglia.
*/
private Boolean enabled;
/**
* The step size (reporting frequency) to use.
* Step size (i.e. reporting frequency) to use.
*/
private Duration step;
/**
* The base time unit used to report rates.
* Base time unit used to report rates.
*/
private TimeUnit rateUnits;
/**
* The base time unit used to report durations.
* Base time unit used to report durations.
*/
private TimeUnit durationUnits;
@ -58,22 +58,22 @@ public class GangliaProperties { @@ -58,22 +58,22 @@ public class GangliaProperties {
private String protocolVersion;
/**
* The UDP addressing mode, either unicast or multicast.
* UDP addressing mode, either unicast or multicast.
*/
private GMetric.UDPAddressingMode addressingMode;
/**
* The TTL for metrics on Ganglia.
* Time to live for metrics on Ganglia.
*/
private Integer timeToLive;
/**
* Ganglia host used for publishing.
* Host of the Ganglia server to receive exported metrics.
*/
private String host;
/**
* Ganglia port used for publishing.
* Port of the Ganglia server to receive exported metrics.
*/
private Integer port;

12
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/graphite/GraphiteProperties.java

@ -33,32 +33,32 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @@ -33,32 +33,32 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
public class GraphiteProperties {
/**
* Enable publishing to the backend.
* Enable publishing to Graphite.
*/
private Boolean enabled;
/**
* The step size (reporting frequency) to use.
* Step size (i.e. reporting frequency) to use.
*/
private Duration step;
/**
* The base time unit used to report rates.
* Base time unit used to report rates.
*/
private TimeUnit rateUnits;
/**
* The base time unit used to report durations.
* Base time unit used to report durations.
*/
private TimeUnit durationUnits;
/**
* Graphite host used for publishing.
* Host of the Graphite server to receive exported metrics.
*/
private String host;
/**
* Graphite port used for publishing.
* Port of the Graphite server to receive exported metrics.
*/
private Integer port;

16
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/influx/InfluxProperties.java

@ -31,34 +31,34 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @@ -31,34 +31,34 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
public class InfluxProperties extends StepRegistryProperties {
/**
* The tag that will be mapped to "host" when shipping metrics to Influx, or
* {@code null} if host should be omitted on publishing.
* Tag that will be mapped to "host" when shipping metrics to Influx. Can be
* omitted of host should be omitted on publishing.
*/
private String db;
/**
* The write consistency for each point.
* Write consistency for each point.
*/
private InfluxConsistency consistency;
/**
* Authenticate requests with this user. If not specified, the registry will not
* attempt to present credentials to Influx.
* Login user of the Influx server.
*/
private String userName;
/**
* Authenticate requests with this password.
* Login password of the Influx server.
*/
private String password;
/**
* Influx writes to the DEFAULT retention policy if one is not specified.
* Retention policy to use (Influx writes to the DEFAULT retention policy if one is
* not specified).
*/
private String retentionPolicy;
/**
* The URI for the Influx backend.
* URI of the Influx server.
*/
private String uri;

2
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/prometheus/PrometheusProperties.java

@ -41,7 +41,7 @@ public class PrometheusProperties { @@ -41,7 +41,7 @@ public class PrometheusProperties {
private Boolean descriptions;
/**
* The step size (reporting frequency) to use.
* Step size (i.e. reporting frequency) to use.
*/
private Duration step;

2
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/simple/SimpleProperties.java

@ -38,7 +38,7 @@ public class SimpleProperties { @@ -38,7 +38,7 @@ public class SimpleProperties {
private boolean enabled;
/**
* The step size (reporting frequency) to use.
* Step size (i.e. reporting frequency) to use.
*/
private Duration step = Duration.ofSeconds(10);

16
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/statsd/StatsdProperties.java

@ -26,28 +26,29 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @@ -26,28 +26,29 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* {@link ConfigurationProperties} for configuring StatsD metrics export.
*
* @author Jon Schneider
* @author Stephane Nicoll
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "spring.metrics.export.statsd")
public class StatsdProperties {
/**
* Enable publishing to the backend.
* Export metrics to StatsD.
*/
private Boolean enabled;
/**
* Variant of the StatsD line protocol to use.
* StatsD line protocol to use.
*/
private StatsdFlavor flavor = StatsdFlavor.Datadog;
/**
* Host name of the StatsD agent.
* Host of the StatsD server to receive exported metrics.
*/
private String host = "localhost";
/**
* UDP port of the StatsD agent.
* Port of the StatsD server to receive exported metrics.
*/
private Integer port = 8125;
@ -57,14 +58,13 @@ public class StatsdProperties { @@ -57,14 +58,13 @@ public class StatsdProperties {
private Integer maxPacketLength = 1400;
/**
* Determines how often gauges will be polled. When a gauge is polled, its value is
* recalculated. If the value has changed, it is sent to the StatsD server.
* 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.
*/
private Duration pollingFrequency = Duration.ofSeconds(10);
/**
* Governs the maximum size of the queue of items waiting to be sent to a StatsD agent
* over UDP.
* Maximum size of the queue of items waiting to be sent to the StatsD server.
*/
private Integer queueSize = Integer.MAX_VALUE;

73
spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc

@ -1295,19 +1295,74 @@ content into your application; rather pick only the properties that you need. @@ -1295,19 +1295,74 @@ content into your application; rather pick only the properties that you need.
management.trace.include=request-headers,response-headers,cookies,errors # Items to be included in the trace.
# METRICS
spring.metrics.use-global-registry=true # Whether or not auto-configured MeterRegistry implementations should be bound to the global static registry on Metrics
spring.metrics.export.atlas.enabled=true # Whether not exporting of metrics to Atlas is enabled.
spring.metrics.export.ganglia.enabled=true # Whether not exporting of metrics to Ganglia is enabled.
spring.metrics.export.graphite.enabled=true # Whether not exporting of metrics to Graphite is enabled.
spring.metrics.export.influx.enabled=true # Whether not exporting of metrics to InfluxDB is enabled.
spring.metrics.export.jmx.enabled=true # Whether not exporting of metrics to JMX is enabled.
spring.metrics.export.prometheus.enabled=true # Whether not exporting of metrics to Prometheus is enabled.
spring.metrics.export.simple.enabled=true # Whether not exporting of metrics to a simple in-memory store is enabled.
spring.metrics.use-global-registry=true # Whether or not auto-configured MeterRegistry implementations should be bound to the global static registry on 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= # Enable publishing to the backend.
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 love 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=1 # 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= # Enable publishing to the backend.
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=1 # 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= # Enable publishing to Ganglia.
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= # Enable publishing to Graphite.
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 of host should be omitted on publishing.
spring.metrics.export.influx.enabled= # Enable publishing to the backend.
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=1 # 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= # Enable publishing to Prometheus.
spring.metrics.export.prometheus.step= # Step size (i.e. reporting frequency) to use.
spring.metrics.export.simple.enabled=false # Enable publishing to the backend.
spring.metrics.export.simple.step=10 # Step size (i.e. reporting frequency) to use.
spring.metrics.export.statsd.enabled= # Export metrics to StatsD.
spring.metrics.export.statsd.flavor= # 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=10 # 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= # 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.web.client.record-request-percentiles=false # Whether or not 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 or not requests handled by Spring MVC or WebFlux should be automatically timed.
spring.metrics.web.server.auto-time-requests=true # Whether or not requests handled by Spring MVC or WebFlux should be automatically timed.
spring.metrics.web.server.record-request-percentiles=false # Whether or not 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.

Loading…
Cancel
Save