spring-boot metrics vs spring-cloud metrics
<p>I've been playing with metrics in spring-boot and run into a bit of confusion around how spring-cloud seems to change the behavior.</p>

<p>A simple minimal spring-boot 1.3.3.RELEASE application with actuator and with a single controller:</p>

<pre><code>@RestController
public class HelloController {

    @Autowired
    private CounterService counterService;

    @RequestMapping("/hello")
    public String sayHello(@RequestParam("name") String name) {
        counterService.increment("counter.calls.hello");
        return "Hello, " + name;
    }
}
</code></pre>

<p>the metrics endpoint for this application has </p>

<pre><code>...
gauge.response.hello: 5,
gauge.response.metrics: 69,
gauge.response.star-star.favicon.ico: 2,
counter.status.200.star-star.favicon.ico: 4,
counter.status.200.metrics: 1,
counter.calls.hello: 5,
counter.status.200.hello: 5
</code></pre>

<p>which is as described in spring-boot docs. My custom counter (counter.calls.hello) functions as a counter as expected.</p>

<p>Now if I add spring-cloud-starter-eureka (Brixton.RC1) to my pom and don't change anything else, the metrics endpoint has </p>

<pre><code>...
gauge.servo.counter.calls.hello: 1,
normalized.servo.rest.totaltime: 0,
normalized.servo.rest.count: 0,
gauge.servo.rest.min: 0,
gauge.servo.rest.max: 0,
gauge.servo.response.hello: 7,
gauge.servo.response.star-star.favicon.ico: 2,
</code></pre>

<p>the normal MVC metrics are gone. Where's the response code info? My custom counter is being reported as gauge.servo.counter.calls.hello, but it no longer works as a counter, it seems to just show a value of 1 even if I've made 5 calls to HelloController. A little debugging and searching led me to change the counter metric name to meter.calls.hello, which results in counter.servo.calls.hello in the metrics response, and restores counter functionality.</p>

<p>Further reading indicates that spring-cloud is defaulting servo for metrics and indicates that if I'm using java 8, I should be using spectator. Adding spring-cloud-starter-spectator to my pom, and going back to "counter.calls.hello" as the counter metric name, the metrics endpoint has </p>

<pre><code>...
counter.calls.hello(): 3,
response.hello(): 7,
response.metrics(): 9,
response.star-star.favicon.ico(): 2,
</code></pre>

<p>this has even less built-in info about the rest endpoint, but my custom counter does seem to function.</p>

<p>Spring-cloud docs about metrics seem to indicate that I should be using ServoRegistry whether using servo or spectator. Terminology in the spectator metrics section is different. A counter doesn't work the way I'd expect. When I publish a simple hit counter using ServoRegistry as described in docs, I get back some kind of rate in the metrics endpoint. </p>

<p>Is there some added value in servo and/or spectator over what's provided by spring-boot? Spring-cloud docs indicate that there is more information being recorded to default controller metrics, but they're not showing up in /metrics. Should I just exclude ServoMetricsAutoConfiguration and use the spring-boot implementation?</p>