Creating custom metrics

Every program manager loves metrics. In fact, a popular company (Netflix) is so well known in this arena that people describe it as a metrics-gathering company that happens to stream video.

When it comes to Spring Boot, metrics are a prime piece of Spring Boot Actuator functionality. If we visit /application/metrics, we can see a list of metrics:

    {      "names": [        "jvm.buffer.memory.used",        "jvm.memory.used",        "jvm.buffer.count",        "",        "process.uptime",        "jvm.memory.committed",        "http.server.requests",        "",        "jvm.memory.max",        "process.starttime"      ]    }

This lists all sorts of stuff--memory, garbage collection, heap versus nonheap, threads, and more. That's nice, but what's usually needed is ...

Get Developing Java Applications with Spring and Spring Boot now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.