Google Cloud Professional Cloud Developer — Question 188
You are building an application that uses a distributed microservices architecture. You want to measure the performance and system resource utilization in one of the microservices written in Java. What should you do?
Answer options
- A. Instrument the service with Cloud Profiler to measure CPU utilization and method-level execution times in the service.
- B. Instrument the service with Debugger to investigate service errors.
- C. Instrument the service with Cloud Trace to measure request latency.
- D. Instrument the service with OpenCensus to measure service latency, and write custom metrics to Cloud Monitoring.
Correct answer: A
Explanation
The correct answer is A because Cloud Profiler is specifically designed to measure CPU utilization and execution times, providing detailed insights into the performance of Java microservices. Options B, C, and D do not focus on CPU and method-level metrics; B is for debugging errors, C measures request latency but not CPU utilization, and D focuses on service latency and custom metrics instead of performance profiling.