Commit 0785357a authored by Stephane Nicoll's avatar Stephane Nicoll

Add a note related to StatsdMetricWriter dependency

Closes gh-3862
parent 85d6b499
...@@ -1173,9 +1173,11 @@ curl localhost:4242/api/query?start=1h-ago&m=max:counter.status.200.root ...@@ -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]] [[production-ready-metric-writers-export-to-statsd]]
==== Example: Export to Statsd ==== Example: Export to Statsd
To export metrics to Statsd add a `spring.metrics.export.statsd.host` value to your To export metrics to Statsd, make sure first that you have added
`application.properties` file. Connections will be opened to port `8125` unless a `com.timgroup:java-statsd-client` as a dependency of your project (Spring Boot
`spring.metrics.export.statsd.port` override is provided. You can use 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. `spring.metrics.export.statsd.prefix` if you want a custom prefix.
Alternatively, you can provide a `@Bean` of type `StatsdMetricWriter` and mark it Alternatively, you can provide a `@Bean` of type `StatsdMetricWriter` and mark it
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment