0
votes

im trying to get the concept of the spring boot actuator metrics. Actuator metrics are implemented by Micrometer. The dependency is already included in the actuator starter pom, I guess? There is a "/metrics" endpoint. But where is the data saved? For the hole time, my application is running?

I can add other monitoring systems like prometheus. It will scrape the data from the /prometheus endpoint. But, its just another format of the same data?

1

1 Answers

2
votes

The data in micrometer is saved in memory. Each metric has some information to store. Of course the data is not "added" per metric invocation, but rather the each metric in micrometer maintains a "minimal" mathematical model and handles all the relevant computations.

The registry is a global "collection" of available metrics.

Now, the actuator has a special metrics endpoint that goes to micrometers and asks for the "up-to-date" values of each metrics in the registry.

prometheus endpoint exposes this data in prometheus format so that the prometheus server could scrape the data.