2V0-72.22PSE · Question #95
What are two ways to display http.server.requests metric using built-in tags? (Choose two.)
The correct answer is C. Display information on HTTP requests whose response status is 404. D. Display information on HTTP requests whose HTTP method is POST. Options C and D are correct because http.server.requests in Spring Boot (via Micrometer) automatically attaches several built-in tags to every recorded request, two of which are status (the HTTP response code, e.g., 404) and method (the HTTP verb, e.g., POST). These tags let…
Question
What are two ways to display http.server.requests metric using built-in tags? (Choose two.)
Options
- ADisplay information on HTTP requests whose HTTP Accept request header value is
- BDisplay information on HTTP requests whose response time is below a certain threshold.
- CDisplay information on HTTP requests whose response status is 404.
- DDisplay information on HTTP requests whose HTTP method is POST.
- EDisplay information on HTTP requests whose throughput is above a certain threshold.
How the community answered
(39 responses)- B5% (2)
- C92% (36)
- E3% (1)
Explanation
Options C and D are correct because http.server.requests in Spring Boot (via Micrometer) automatically attaches several built-in tags to every recorded request, two of which are status (the HTTP response code, e.g., 404) and method (the HTTP verb, e.g., POST). These tags let you slice and filter the metric by those dimensions without any custom code.
Why the distractors are wrong:
- A - The HTTP
Acceptrequest header is not a built-in tag; you would need to register a customMeterFilterorWebMvcTagsContributorto capture it. - B and E - Response time and throughput are measured values derived from the timer metric itself, not tags. Tags are categorical labels used for filtering/grouping, not numeric thresholds on measurements.
Memory tip: Think of built-in tags as the "W's" of a request - What method (method) and What status (status), plus uri, outcome, and exception. If the dimension is a label on the request (not a number you'd compare against a threshold), it's likely a tag.
Topics
Community Discussion
No community discussion yet for this question.