11

I'm working with Spring Boot, and I want to annotate some of my @Service methods with @Timed so I could view their statistics calling the metrics endpoint.

I've read from the Spring documentation that is can use dropwizard registry, but I can't find any example in which it uses dropwizar annotations.

How can I configure my Spring Boot app so each method annotated with @Timed automatically publishes its statistics using the build-in Spring actuator module?

th3morg
  • 4,321
  • 1
  • 32
  • 45
jfcorugedo
  • 9,793
  • 8
  • 39
  • 47

1 Answers1

1

Have you had a look at: http://www.ryantenney.com/metrics-spring/

Seems that you need to include that library if you want to use Spring with Metrics 3.0 / 3.1.

Shawn Clark
  • 3,330
  • 2
  • 18
  • 30
  • Sorry, it doesn't work. I've included the dependency, but my service method doesn't appear when I call /metrics endpoint – jfcorugedo May 05 '15 at 07:48
  • Have you taken a look at: http://stackoverflow.com/questions/24571282/trying-to-integrate-coda-hale-metrics-in-spring-boot-not-seing-the-metrics-in – Shawn Clark May 06 '15 at 09:18