Springboot with Spring-cloud-aws and cloudwatch metrics

Johny19 picture Johny19 · Aug 3, 2017 · Viewed 8.6k times · Source

I would like to start using metrics in my Springboot app and I would also like to publish them my amazon cloudwatch

I know that with Springboot we can activate spring-actuator that provides in memory metrics and published them to the /metrics endpoint.

I stumbled across Spring-cloud that seems to have some lib to periodically publish these metrics to Cloudwatch, however I have no clue how to set them up? There is absolutely 0 examples of how to use it.

Anyone could explain what are the step to enable the metric to be sent to cloudwatch?

Answer

dawid picture dawid · Oct 29, 2017

You can check my article here:

https://dkublik.github.io/2017/10/28/springboot-metrics-with-servo-and-aws-cloudwatch.html

I wrote it after setting this up in my project.

From header:

"Article explains how to send Spring Boot and Netflix Servo metrics to AWS CloudWatch. Morover it describes mechanisms making it happen. It also mentions problems I run into trying to do the same with Spring Boot and Spectator."

EDIT: new version: https://dkublik.github.io/2018/08/26/springboot-metrics-with-micrometer-and-aws-cloudwatch.html