Spring Actuator - metrics aggregation from docker containers Spring Actuator - metrics aggregation from docker containers docker docker

Spring Actuator - metrics aggregation from docker containers


You need to export the metrics to a central system.

Spring Boot provides a couple of implementations of a marker interface called Exporter which can be used to copy metric readings from the in-memory buffers to a place where they can be analyzed and displayed.

More specifically personally I like exporting metrics to statsD

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.

The information above is all from the Spring Boot documentation on metrics: https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-metrics.html