You need to measure CPU usage and method-level execution times in a Java microservice within a distributed application. Which instrumentation should you use?
Choose an answer
Tap an option to check your answer.
Correct answer: Instrument the service with Cloud Profiler to measure CPU utilization and method-level execution times in the service..
Why this is the answer
Cloud Profiler is the correct choice because it is specifically designed to continuously collect and analyze CPU usage and method-level execution times (profiling data) from applications, including Java microservices. This directly addresses the requirement to measure CPU usage and method-level execution times. Debugger is used for inspecting application state and debugging errors, not for performance profiling. Cloud Trace is used for tracking request latency across distributed systems, not for detailed CPU or method-level profiling within a single service. While OpenCensus (or its successor OpenTelemetry) can collect custom metrics and traces, Cloud Profiler offers a more integrated and specialized solution for continuous CPU and method-level profiling.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed