From ee252a3285d4dc2d04cb99ec7449e0e7c0b701a8 Mon Sep 17 00:00:00 2001 From: izeye Date: Thu, 4 Jun 2015 13:41:38 +0900 Subject: [PATCH 1/2] Document `spring.metrics.export.*` properties See gh-3110 --- .../appendix-application-properties.adoc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index 375a0c79b81..00677ca07c4 100644 --- a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -229,7 +229,7 @@ content into your application; rather pick only the properties that you need. spring.mustache.check-template-location=true spring.mustache.content-type=UTF-8 spring.mustache.enabled=true # enable MVC view resolution - spring.mustache.prefix + spring.mustache.prefix= spring.mustache.suffix=.html spring.mustache.view-names= # whitelist of view names that can be resolved @@ -652,6 +652,21 @@ content into your application; rather pick only the properties that you need. shell.auth.simple.user.name= shell.auth.simple.user.password= shell.auth.spring.roles= + + # METRICS EXPORT ({sc-spring-boot-actuator}/metrics/export/MetricExportProperties.{sc-ext}[MetricExportProperties]) + spring.metrics.export.enabled=true # Flag to disable all metric exports (assuming any MetricWriters are available). + spring.metrics.export.delay-millis=5000 # Delay in milliseconds between export ticks. + spring.metrics.export.send-latest=true # Flag to switch off any available optimizations based on not exporting unchanged metric values. + spring.metrics.export.includes= # List of patterns for metric names to include. + spring.metrics.export.excludes= # List of patterns for metric names to exclude. Applied after the includes. + spring.metrics.export.redis.prefix=spring.metrics # Prefix for redis repository if active. + spring.metrics.export.redis.key=keys.spring.metrics # Key for redis repository export (if active). + spring.metrics.export.triggers..names= # Names (or patterns) for bean names that this configuration applies to. + spring.metrics.export.triggers..enabled=true + spring.metrics.export.triggers..delay-millis=5000 + spring.metrics.export.triggers..send-latest=true + spring.metrics.export.triggers..includes= + spring.metrics.export.triggers..excludes= # SENDGRID ({sc-spring-boot-autoconfigure}/sendgrid/SendGridAutoConfiguration.{sc-ext}[SendGridAutoConfiguration]) spring.sendgrid.username= # SendGrid account username From f6115a07130309c12bc2aaf072e84ed9e0ce790c Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Thu, 4 Jun 2015 14:49:13 +0200 Subject: [PATCH 2/2] polish Closes gh-3110 --- .../export/MetricExportProperties.java | 3 +++ .../appendix-application-properties.adoc | 21 +++++++------------ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/export/MetricExportProperties.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/export/MetricExportProperties.java index f77891894bd..764677e3d0b 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/export/MetricExportProperties.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/export/MetricExportProperties.java @@ -35,6 +35,9 @@ import org.springframework.util.StringUtils; @ConfigurationProperties("spring.metrics.export") public class MetricExportProperties extends TriggerProperties { + /** + * Specific trigger properties per MetricWriter bean name. + */ private Map triggers = new LinkedHashMap(); diff --git a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index 00677ca07c4..fb18eedc25c 100644 --- a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -654,19 +654,14 @@ content into your application; rather pick only the properties that you need. shell.auth.spring.roles= # METRICS EXPORT ({sc-spring-boot-actuator}/metrics/export/MetricExportProperties.{sc-ext}[MetricExportProperties]) - spring.metrics.export.enabled=true # Flag to disable all metric exports (assuming any MetricWriters are available). - spring.metrics.export.delay-millis=5000 # Delay in milliseconds between export ticks. - spring.metrics.export.send-latest=true # Flag to switch off any available optimizations based on not exporting unchanged metric values. - spring.metrics.export.includes= # List of patterns for metric names to include. - spring.metrics.export.excludes= # List of patterns for metric names to exclude. Applied after the includes. - spring.metrics.export.redis.prefix=spring.metrics # Prefix for redis repository if active. - spring.metrics.export.redis.key=keys.spring.metrics # Key for redis repository export (if active). - spring.metrics.export.triggers..names= # Names (or patterns) for bean names that this configuration applies to. - spring.metrics.export.triggers..enabled=true - spring.metrics.export.triggers..delay-millis=5000 - spring.metrics.export.triggers..send-latest=true - spring.metrics.export.triggers..includes= - spring.metrics.export.triggers..excludes= + spring.metrics.export.enabled=true # flag to disable all metric exports (assuming any MetricWriters are available) + spring.metrics.export.delay-millis=5000 # delay in milliseconds between export ticks + spring.metrics.export.send-latest=true # flag to switch off any available optimizations based on not exporting unchanged metric values + spring.metrics.export.includes= # list of patterns for metric names to include + spring.metrics.export.excludes= # list of patterns for metric names to exclude. Applied after the includes + spring.metrics.export.redis.prefix=spring.metrics # prefix for redis repository if active + spring.metrics.export.redis.key=keys.spring.metrics # key for redis repository export (if active) + spring.metrics.export.triggers.*= # specific trigger properties per MetricWriter bean name # SENDGRID ({sc-spring-boot-autoconfigure}/sendgrid/SendGridAutoConfiguration.{sc-ext}[SendGridAutoConfiguration]) spring.sendgrid.username= # SendGrid account username