Advanced Spring Boot Actuator: Custom Metrics & Monitoring Mastery
Assess your expertise in creating and managing custom metrics with Spring Boot Actuator.
Questions in this quiz
10 questions on Advanced Spring Boot Actuator: Custom Metrics & Monitoring Mastery. Work through them here, then start the quiz to answer them and see your score.
1.In Spring Boot Actuator, which class would you extend to create a custom metric that tracks the number of active users?
- AMeterRegistry
- BGauge
- CCounter
- DTimer
2.How can you expose a custom metric to Prometheus using Spring Boot Actuator?
- ARegister the metric with MeterRegistry
- BModify application.properties
- CUse @Timed annotation
- DImplement a custom endpoint
3.Which of the following is NOT a valid way to create a custom metric in Spring Boot Actuator?
- AUsing @Timed annotation
- BUsing @Counted annotation
- CUsing @Gauge annotation
- DUsing MeterRegistry
4.What is the primary purpose of the 'Gauge' metric type in Spring Boot Actuator?
- ATo track a value that can go up or down
- BTo measure durations
- CTo count occurrences
- DTo record execution times
5.Which dependency is essential for enabling Spring Boot Actuator metrics in a project?
- Aspring-boot-starter-security
- Bspring-boot-starter-data-jpa
- Cspring-boot-starter-actuator
- Dspring-boot-starter-web
6.How can you customize the base path for actuator endpoints in a Spring Boot application?
- AUse @Endpoint annotation
- BModify application.yml
- COverride ActuatorConfig
- DSet management.endpoints.web.base-path
7.What is the role of the 'Timer' metric in Spring Boot Actuator?
- ATo record execution times and count occurrences
- BTo monitor application health
- CTo track a single value
- DTo measure the rate of events
8.Which interface would you implement to create a custom health indicator in Spring Boot Actuator?
- AHealthContributor
- BHealthIndicator
- CHealthRegistry
- DHealthEndpoint
9.In Spring Boot Actuator, how can you disable a specific endpoint, such as 'beans'?
- ARemove the actuator dependency
- BSet management.endpoints.web.exposure.exclude=beans
- CUse @DisableEndpoint annotation
- DSet management.endpoint.beans.enabled=false
10.What is the function of the 'Counter' metric type in Spring Boot Actuator?
- ATo monitor application status
- BTo measure time intervals
- CTo track a fluctuating value
- DTo count the number of events