Metrics with Micrometer — Concept Check
Questions on Metrics with Micrometer. Micrometer provides a vendor-neutral metrics facade; counters, gauges, and timers feed Prometheus, Datadog, or CloudWatch with dimensional time-series data.
Questions in this quiz
8 questions on Metrics with Micrometer — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A service using Micrometer shows an unexpected increase in 'orders.placed' counter. What could be a possible reason?
- AA bug causing multiple increments per order
- BPrometheus scraping interval is too short
- CThe 'Gauge' metric is misconfigured
- DThe 'Timer' metric is misconfigured
2.A developer notices that the 'payment.latency' metric is not appearing in Prometheus. What should they check first?
- ACheck if the 'Counter' is incremented
- BVerify the 'Gauge' metric is configured
- CEnsure the 'Timer' is registered with the MeterRegistry
- DConfirm Prometheus is scraping the correct endpoint
3.What happens if you forget to add tags to your metrics in Micrometer?
- AMetrics will not be collected by Prometheus
- BMetrics will automatically use default tags
- CMetrics will throw an error at runtime
- DMetrics lack dimensions for filtering
4.A developer uses a 'Gauge' to track queue depth but notices it always shows zero. What might be wrong?
- APrometheus is scraping too frequently
- BThe 'Counter' is not incrementing
- CThe lambda function for the 'Gauge' is incorrect
- DThe 'Timer' is not recording duration
5.In Micrometer, which metric type would you use to measure the time taken by an API call?
- ACounter
- BGauge
- CTimer
- DDistributionSummary
6.A developer adds a new metric but it doesn't appear in Prometheus. What might be the issue?
- AThe 'Gauge' is not configured
- BThe 'Counter' is not incremented
- CPrometheus is scraping the wrong endpoint
- DThe metric is not registered with MeterRegistry
7.How does Prometheus convert Micrometer's 'orders.placed' counter name?
- Aorders.placed_total
- Borders_placed_total
- Corders.placed_count
- Dorders_placed
8.What is the role of the @Timed annotation in Micrometer?
- ATracks the current value of a variable
- BAutomatically records execution time of methods
- CRegisters a metric with a custom description
- DIncrements a counter on each method call