Google Cloud Professional Cloud DevOps Engineer — Question 31
Your team is designing a new application for deployment into Google Kubernetes Engine (GKE). You need to set up monitoring to collect and aggregate various application-level metrics in a centralized location. You want to use Google Cloud Platform services while minimizing the amount of work required to set up monitoring. What should you do?
Answer options
- A. Publish various metrics from the application directly to the Stackdriver Monitoring API, and then observe these custom metrics in Stackdriver.
- B. Install the Cloud Pub/Sub client libraries, push various metrics from the application to various topics, and then observe the aggregated metrics in Stackdriver.
- C. Install the OpenTelemetry client libraries in the application, configure Stackdriver as the export destination for the metrics, and then observe the application's metrics in Stackdriver.
- D. Emit all metrics in the form of application-specific log messages, pass these messages from the containers to the Stackdriver logging collector, and then observe metrics in Stackdriver.
Correct answer: C
Explanation
The correct answer is C because using OpenTelemetry simplifies the integration of application metrics with Stackdriver, allowing for efficient configuration and monitoring. Options A and D involve more manual steps and indirect methods for collecting metrics, while option B introduces unnecessary complexity by utilizing Cloud Pub/Sub instead of directly exporting to Stackdriver.