2V0-72.22PSE · Question #23
Which two statements are correct regarding Spring Boot 2.x Actuator Metrics? (Choose two.)
The correct answer is C. Timer measures both the number of timed events and the total time of all events timed. D. Custom metrics can be measured using Meter primitives such as Counter, Gauge, Timer, and. C is correct because a Timer in Micrometer (Spring Boot's metrics facade) records both the count of events and the total duration, making it ideal for tracking latency and throughput simultaneously - for example, measuring how many HTTP requests were made and how long they…
Question
Which two statements are correct regarding Spring Boot 2.x Actuator Metrics? (Choose two.)
Options
- AAn external monitoring system must be used with Actuator.
- BThe metrics endpoint /actuator/metrics is exposed over HTTP by default.
- CTimer measures both the number of timed events and the total time of all events timed.
- DCustom metrics can be measured using Meter primitives such as Counter, Gauge, Timer, and
- EA metric must be created with one or more tags.
How the community answered
(40 responses)- A3% (1)
- B8% (3)
- C75% (30)
- E15% (6)
Explanation
C is correct because a Timer in Micrometer (Spring Boot's metrics facade) records both the count of events and the total duration, making it ideal for tracking latency and throughput simultaneously - for example, measuring how many HTTP requests were made and how long they collectively took.
D is correct because Micrometer exposes four core Meter primitives - Counter (monotonically increasing count), Gauge (current value snapshot), Timer (count + duration), and DistributionSummary - which developers use to instrument custom application metrics.
Why the distractors are wrong:
- A is false - Actuator can expose metrics via its own
/actuator/metricsHTTP endpoint without any external system; external systems (Prometheus, Datadog, etc.) are optional enhancements. - B is false - in Spring Boot 2.x, only
/actuator/healthand/actuator/infoare exposed over HTTP by default;/actuator/metricsmust be explicitly enabled viamanagement.endpoints.web.exposure.include. - E is false - tags are optional metadata for dimensional filtering; a metric can be created with zero tags.
Memory tip: Think "C = Count + Clock" (Timer counts events AND clocks their duration), and "D = Do-it-yourself metrics" using the four Meter types. For B, remember the "2 by default" rule: only 2 endpoints (health + info) are HTTP-exposed out of the box.
Topics
Community Discussion
No community discussion yet for this question.