Return to site

🍃🎓 SPRING CERTIFICATION QUESTION: Actuator custom metrics: What are they?

· spring,vcp,java

Custom metrics can be measured using Micrometer classes such as ?

Choose the right suggestions.

* Counter

* Gauge

* MeterWatch

* Timer

* DistributionSummary.

#spring #certificationquestion #vcp

In Spring Boot Actuator, custom metrics can be measured using Micrometer classes. Micrometer is a metrics library that provides a simple facade over the instrumentation clients for various monitoring systems. Among the Micrometer classes, the following options are relevant for measuring custom metrics:

Counter: Counters monitor monotonically increasing values.

Counters may never be reset to a lesser value.

Gauge: A gauge tracks a value that may go up or down.

The value that is published for gauges is an instantaneous sample of the gauge at publishing time.

Timer: Timer intended to track of a large number of short running events.

Example would be something like an HTTP request.

DistributionSummary: Track the sample distribution of events.

An example would be the response sizes for requests hitting and http server.

There is no Micrometer class called "MeterWatch."

Micrometer provides various classes for different types of metrics, but "MeterWatch" is not a standard class in Micrometer.

So, the correct suggestions for Micrometer classes that can be used to measure custom metrics are:

Counter

Gauge

Timer

DistributionSummary