Bird
0
0

You added Spring Boot Actuator but get a 404 error when accessing '/actuator/metrics'. What is the most likely cause?

medium📝 Troubleshoot Q6 of 15
Spring Boot - Actuator
You added Spring Boot Actuator but get a 404 error when accessing '/actuator/metrics'. What is the most likely cause?
AThe metrics endpoint is deprecated and removed
BThe 'management.endpoints.web.exposure.include' property does not include 'metrics'
CThe application is missing the Spring Web dependency
DThe actuator endpoints require a database connection
Step-by-Step Solution
Solution:
  1. Step 1: Check endpoint exposure settings

    By default, only some endpoints are exposed; 'metrics' must be included.
  2. Step 2: Exclude unrelated causes

    Web dependency is usually present; metrics endpoint is not deprecated; no DB needed.
  3. Final Answer:

    The 'management.endpoints.web.exposure.include' property does not include 'metrics' -> Option B
  4. Quick Check:

    404 cause = C [OK]
Quick Trick: Expose endpoints explicitly to avoid 404 errors [OK]
Common Mistakes:
  • Assuming metrics endpoint is removed
  • Thinking database is required for metrics
  • Ignoring endpoint exposure configuration

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes