From e232e7c837c8733fed94ba76be016e0ead2c6dda Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Fri, 2 Oct 2015 14:51:50 +0100 Subject: [PATCH] Add warning about export of metrics being switched off E.g. just adding Dropwizard to the classpath switches it off which might be surprising. We need a @ExportMetricReader to do the export. --- .../src/main/asciidoc/production-ready-features.adoc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc b/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc index db667ac3c96..c11f95c387a 100644 --- a/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc @@ -1061,7 +1061,6 @@ hooked up to an `Exporter` and fed metric updates every 5 seconds (configured vi `spring.metrics.export.delay-millis`). In addition, any `MetricReader` that you define and mark as `@ExportMetricReader` will have its values exported by the default exporter. - The default exporter is a `MetricCopyExporter` which tries to optimize itself by not copying values that haven't changed since it was last called (the optimization can be switched off using a flag `spring.metrics.export.send-latest`). Note also that the @@ -1074,6 +1073,10 @@ values for specific `MetricWriters` can be set as `spring.metrics.export.triggers..*` where `` is a bean name (or pattern for matching bean names). +WARNING: The automatic export of metrics is disabled if you switch off the +default `MetricRepository` (e.g. by using Dropwizard metrics). You can get back the +same functionality be declaring a bean of your own of type `MetricReader` and +declaring it to be `@ExportMetricReader`. [[production-ready-metric-writers-export-to-redis]]