
Answer-first summary for fast verification
Answer: 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.
To set up monitoring for a new application deployed in Google Kubernetes Engine (GKE) with minimal setup effort and using Google Cloud Platform services, the best approach is to use OpenTelemetry client libraries. OpenTelemetry is a collection of tools, APIs, and SDKs used to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) for analysis. By installing the OpenTelemetry client libraries in the application and configuring Stackdriver as the export destination for the metrics, you can efficiently collect and observe the application's metrics in Stackdriver. This method is recommended because it is designed for cloud-native applications and integrates seamlessly with GCP services like Stackdriver, reducing the amount of manual setup and configuration required. Option A involves more manual work to publish metrics directly to the Stackdriver Monitoring API. Option B is not the most efficient way to collect metrics as it involves an unnecessary step of pushing metrics to Cloud Pub/Sub topics. Option D is not ideal because converting metrics into log messages can lead to inefficiencies and difficulties in metric analysis.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
How can you implement centralized monitoring for application-level metrics in a Google Kubernetes Engine (GKE) deployment using Google Cloud Platform services with minimal setup effort?
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.