Bird
0
0

If Prometheus scrapes metrics from a Spring Boot app at /actuator/prometheus, what HTTP status code should it receive if the endpoint is correctly exposed?

medium📝 Predict Output Q5 of 15
Spring Boot - Actuator
If Prometheus scrapes metrics from a Spring Boot app at /actuator/prometheus, what HTTP status code should it receive if the endpoint is correctly exposed?
A500 Internal Server Error
B200 OK
C404 Not Found
D403 Forbidden
Step-by-Step Solution
Solution:
  1. Step 1: Understand HTTP status codes

    A 200 OK status means the request succeeded and the endpoint is available.
  2. Step 2: Confirm endpoint exposure

    If /actuator/prometheus is exposed correctly, Prometheus scraping will get a 200 OK with metrics data.
  3. Final Answer:

    200 OK -> Option B
  4. Quick Check:

    Successful scrape = 200 OK [OK]
Quick Trick: 200 means endpoint is reachable and working [OK]
Common Mistakes:
  • Expecting 404 if endpoint is exposed
  • Confusing 403 with successful access
  • Assuming 500 means success

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes