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?
Click on the arrows to vote for the correct answer
A. B. C. D.C.
The recommended approach for setting up monitoring for a new application to be deployed in Google Kubernetes Engine (GKE) while minimizing the amount of work required is option 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.
Option A is incorrect because although Stackdriver Monitoring API is a service that can be used to collect and observe metrics, it requires custom code to be written to publish various metrics from the application directly to the API. This approach would require more work to be done than necessary and could result in more complicated monitoring.
Option B is also incorrect because although Cloud Pub/Sub can be used to push metrics to various topics, it would require additional configuration and setup of Pub/Sub, which could result in more work than necessary.
Option D is incorrect because although Stackdriver Logging can be used to collect and observe metrics in the form of application-specific log messages, it is not the recommended approach for collecting application-level metrics. Additionally, this approach would require custom code to be written to emit all metrics in the form of log messages, which could result in additional complexity and more work than necessary.
Therefore, option C is the recommended approach because it utilizes OpenTelemetry client libraries, which are an open-source set of tools used for collecting, processing, and exporting telemetry data from various sources, including applications running in GKE. OpenTelemetry provides an abstraction layer for instrumentation, which allows for easier and more consistent instrumentation of applications. By configuring Stackdriver as the export destination for the metrics, it eliminates the need for custom code to be written to publish metrics and enables the metrics to be easily observed in Stackdriver. Overall, this approach reduces the amount of work required to set up monitoring for the new application.