Google Professional Cloud Developer Question 65
Select 3Google Cloud PlatformYou are developing a cloud-native application deployed on Google Kubernetes Engine (GKE). The application is experiencing performance issues, and you need to collect actionable insights to diagnose the problem. Which actions should you take to instrument your application for observability?
- A
Use OpenTelemetry to implement distributed tracing across services.
- B
Configure application logs to output to Cloud Logging with structured log entries.
- C
Manually write performance metrics to a custom database for analysis.
- D
Expose custom application metrics in Prometheus format and configure Cloud Monitoring to scrape them.
- E
Enable the default GKE observability suite without modifying your application.
Show answer and explanation
Correct answers: A, B, D
Explanation
To properly instrument your application for observability, you should use frameworks like OpenTelemetry for distributed tracing, structured logging for better log analysis, and Prometheus-compatible metrics for Cloud Monitoring. These practices provide deep insights into the application's performance and help diagnose issues effectively. The default GKE observability suite is helpful but insufficient for advanced use cases, and manually managing metrics is unnecessary when better tools are available.
- A. Correct.
OpenTelemetry is a widely used framework for generating traces, and it can help you track distributed requests across microservices to identify performance bottlenecks.
- B. Correct.
Structured logging helps in creating logs that are easier to query and analyze in Cloud Logging, making it easier to pinpoint issues.
- C. Incorrect.
Manually writing performance metrics to a custom database is inefficient and not recommended when using Google Cloud's native observability tools.
- D. Correct.
Exposing application metrics in Prometheus format is a standard way to make metrics available for Cloud Monitoring, enabling you to create dashboards and alerts.
- E. Incorrect.
While the default GKE observability suite provides some insights, it does not replace the need for instrumenting your application with metrics, logs, and traces for detailed diagnostics.