Spring Boot Does not use Codahale Metrics (yet). The plan is to support it as an option if it is on the classpath. If you prefer to do it that way then a MetricRegistry
will be in the application context and you can simply @Autowire
it and use it. You can see that work in progress on a branch in my fork.
The Boot interfaces for adding metrics are GaugeService
and CounterService
. You inject those and use them to record measurements. When Codahale gets support then this will be the recommended entry point for that as well, so you can get started using it now and add the Codahale stuff later if you want.