You built a serverless application by using Cloud Run and deployed the application to your production environment. You want to identify the resource utilization of the application for cost optimization. What should you do?
A. Use Cloud Trace with distributed tracing to monitor the resource utilization of the application.
B. Use Cloud Profiler with Ops Agent to monitor the CPU and memory utilization of the application.
C. Use Cloud Monitoring to monitor the container CPU and memory utilization of the application.
D. Use Cloud Ops to create logs-based metrics to monitor the resource utilization of the application.
Disclaimer
This is a practice question. There is no guarantee of coming this question in the certification exam.
Answer
C
Explanation
A. Use Cloud Trace with distributed tracing to monitor the resource utilization of the application.
(Cloud Trace is used for measuring latency.)
B. Use Cloud Profiler with Ops Agent to monitor the CPU and memory utilization of the application.
(As per documentation cloud profiler not supported for cloud run environment.)
C. Use Cloud Monitoring to monitor the container CPU and memory utilization of the application.
(Cloud Monitoring provides comprehensive monitoring capabilities, allowing you to track container CPU and memory utilization effectively. Specifically tailored for containerized environments like Cloud Run, Cloud Monitoring provides insights into key metrics, enabling you to analyze resource consumption, identify potential bottlenecks, and optimize costs based on observed utilization patterns.
By monitoring container CPU and memory metrics, you gain valuable data for making informed decisions about resource allocation, ensuring efficient usage, and ultimately optimizing the cost of running the serverless application in your production environment.)
D. Use Cloud Ops to create logs-based metrics to monitor the resource utilization of the application.
(We don’t need log-based metrics, as monitoring for Cloud Run containers are in-built capabilities.)