I followed the indication that adding the coda hale metrics library to the classpath will automatically automatically configure the metrics.
This works, I get the entered metricRegistry bean.
However, how do I show these new metrics at the endpoint / metric?
Thank!
, . Codahale , Spring Boot, API- Codahale , . Boot Gauge Counter .
UPDATE: Spring Boot Codahale /metrics 1.2.0 (. MetricRegistryMetricReader).
MetricRegistryMetricReader
- , http://www.ryantenney.com/metrics-spring/, /health.
/health
compile 'com.ryantenney.metrics:metrics-spring:3.0.0-RC2'
"enableMetrics"
@EnableMetrics public class ApplicationConfiguration { ...
@timed:
@timed
@Timed @RequestMapping(method=RequestMethod.GET) public @ResponseBody Foo foo() { ...
MetricRegistry /health.
MetricRegistry
, :
https://github.com/benschw/consul-cluster-puppet/tree/master/demo
: http://txt.fliglio.com/2014/10/spring-boot-actuator/
I am updating the bar chart with spring-boot as follows:
gauge.submit("histogram." + name + ".millis", durationMillis);