nerdexam
Google

PROFESSIONAL-CLOUD-DEVELOPER · Question #137

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

The correct answer is D. Export the Prometheus metrics and use Cloud Monitoring to view them as external metrics.. The correct approach is to export Prometheus metrics into Cloud Monitoring as external metrics. Cloud Monitoring natively integrates with both Cloud Logging (for log-based metrics and log correlation) and Prometheus (via the Managed Service for Prometheus or the external metrics

Monitoring, Logging, and Debugging

Question

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?

Options

  • ACreate custom metrics from the Cloud Logging logs, and use Prometheus to import the results
  • BExport the Cloud Logging logs and the Prometheus metrics to Cloud Bigtable. Run a query to join
  • CExport the Cloud Logging logs and stream the Prometheus metrics to BigQuery. Run a recurring
  • DExport the Prometheus metrics and use Cloud Monitoring to view them as external metrics.

How the community answered

(26 responses)
  • A
    4% (1)
  • B
    4% (1)
  • C
    8% (2)
  • D
    85% (22)

Explanation

The correct approach is to export Prometheus metrics into Cloud Monitoring as external metrics. Cloud Monitoring natively integrates with both Cloud Logging (for log-based metrics and log correlation) and Prometheus (via the Managed Service for Prometheus or the external metrics API), providing a unified observability platform. It supports real-time alerting policies at no extra query cost beyond ingestion. This minimizes cost compared to exporting to data warehouses. Option A reverses the data flow (logs → Prometheus doesn't make sense for alert correlation). Option B (Cloud Bigtable) is expensive, not designed for ad-hoc analytical queries or real-time alerting, and requires custom join logic. Option C (BigQuery with recurring queries) adds latency and cost-BigQuery is optimized for batch analytics, not real-time alerting, and query costs accumulate with frequent scheduled queries.

Topics

#Cloud Monitoring#Prometheus Integration#Logging and Metrics#GKE Observability

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVELOPER Practice