From 0785357a8b24641aaa77bc5133aecc67736e1893 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Wed, 14 Oct 2015 15:36:36 +0200 Subject: [PATCH] Add a note related to StatsdMetricWriter dependency Closes gh-3862 --- .../src/main/asciidoc/production-ready-features.adoc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 85e3619abf..ce9b61d0e3 100644 --- a/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc @@ -1173,9 +1173,11 @@ curl localhost:4242/api/query?start=1h-ago&m=max:counter.status.200.root [[production-ready-metric-writers-export-to-statsd]] ==== Example: Export to Statsd -To export metrics to Statsd add a `spring.metrics.export.statsd.host` value to your -`application.properties` file. Connections will be opened to port `8125` unless a -`spring.metrics.export.statsd.port` override is provided. You can use +To export metrics to Statsd, make sure first that you have added +`com.timgroup:java-statsd-client` as a dependency of your project (Spring Boot +provides a dependency management for it). Then add a `spring.metrics.export.statsd.host` +value to your `application.properties` file. Connections will be opened to port `8125` +unless a `spring.metrics.export.statsd.port` override is provided. You can use `spring.metrics.export.statsd.prefix` if you want a custom prefix. Alternatively, you can provide a `@Bean` of type `StatsdMetricWriter` and mark it