Google Cloud Professional Cloud Architect — Question 85
A small number of API requests to your microservices-based application take a very long time. You know that each request to the API can traverse many services.
You want to know which service takes the longest in those cases.
What should you do?
Answer options
- A. Set timeouts on your application so that you can fail requests faster
- B. Send custom metrics for each of your requests to Stackdriver Monitoring
- C. Use Stackdriver Monitoring to look for insights that show when your API latencies are high
- D. Instrument your application with Stackdriver Trace in order to break down the request latencies at each microservice
Correct answer: D
Explanation
The correct answer is D because Stackdriver Trace allows you to measure and visualize the latency of requests across all microservices, helping you pinpoint where delays occur. Option A does not help identify the slow service, while B provides metrics but lacks the detailed breakdown needed. Option C offers insights into high latencies but does not specifically trace them back to individual services.