Google Cloud Professional Cloud Developer — Question 126
You deployed a new application to Google Kubernetes Engine and are experiencing some performance degradation. Your logs are being written to Cloud
Logging, and you are using a Prometheus sidecar model for capturing metrics. You need to correlate the metrics and data from the logs to troubleshoot the performance issue and send real-time alerts while minimizing costs. What should you do?
Answer options
- A. Create custom metrics from the Cloud Logging logs, and use Prometheus to import the results using the Cloud Monitoring REST API.
- B. Export the Cloud Logging logs and the Prometheus metrics to Cloud Bigtable. Run a query to join the results, and analyze in Google Data Studio.
- C. Export the Cloud Logging logs and stream the Prometheus metrics to BigQuery. Run a recurring query to join the results, and send notifications using Cloud Tasks.
- D. Export the Prometheus metrics and use Cloud Monitoring to view them as external metrics. Configure Cloud Monitoring to create log-based metrics from the logs, and correlate them with the Prometheus data.
Correct answer: D
Explanation
Option D is correct because it allows you to visualize Prometheus metrics as external metrics in Cloud Monitoring while also creating log-based metrics from Cloud Logging, enabling effective correlation for troubleshooting. Options A, B, and C involve additional complexity and costs by using external services like Bigtable and BigQuery, which may not be necessary for real-time alerting and analysis.