Slide 14
Slide 14 text
MicroProfile Metrics
REST endpoints for measured data
/metrics/{application|base|vendor}/name
Formats: OpenMetrics (Prometheus), JSON
Custom metrics
14
@GET
@Timed(name = "personList", absolute = true)
public List getAll() {
@POST
@Counted(name = "createPerson", absolute = true)
public Response createPerson(Person Person) {
@Gauge(name = "answerToLifeUniverseAndEverything", absolute = true,
unit = MetricUnits.NONE)
public long getAnswerToLifeUniverseAndEverything() {
return 42;
{
"personList" : {
"count": 5,
"min": 1670500.0,
"mean": 8909118.276749168,
"max": 3.73522E7,
…
}
}
gedoplan.de
Take MicroProfile to the Clouds with Quarkus