Google Professional Cloud Developer exam dumps

Google Professional Cloud Developer practice question 61 of 481

Professional Cloud Developer. Professional level, Google Cloud. Free question with the correct answer and a full explanation.

Google Professional Cloud Developer Question 61

Select 3Google Cloud Platform

You are developing a microservices-based application hosted on Google Kubernetes Engine (GKE). To monitor the performance and troubleshoot issues, you need to implement observability using Google Cloud’s tools. Which of the following actions should you take to instrument your code to produce metrics, logs, and traces effectively?

  1. A

    Use the Cloud Logging client library to write structured logs directly from your application.

  2. B

    Add OpenTelemetry SDK to your application to capture distributed traces and export them to Cloud Trace.

  3. C

    Use the Compute Engine API to export application performance metrics.

  4. D

    Instrument your application with the Cloud Monitoring client library to record custom metrics.

  5. E

    Configure IAM roles for your application to directly write to Stackdriver logs without using client libraries.

Show answer and explanation

Correct answers: A, B, D

Explanation

To achieve effective observability in a Google Cloud environment, developers must use appropriate tools and libraries. Structured logs can be sent to Cloud Logging using the Cloud Logging client library, while distributed traces can be captured with OpenTelemetry and sent to Cloud Trace. For custom metrics, the Cloud Monitoring client library is the correct approach. Compute Engine APIs and IAM roles, while useful for other purposes, are not directly relevant to instrumenting application code for metrics, logs, and traces.

  • A. Correct.

    Correct. Cloud Logging client libraries allow applications to write structured logs directly to Cloud Logging, which is essential for observability.

  • B. Correct.

    Correct. OpenTelemetry SDK is a widely used library for capturing distributed traces and exporting them to Cloud Trace in Google Cloud.

  • C. Incorrect.

    Incorrect. While Compute Engine APIs can be used for VM management, they are unrelated to instrumenting application code for metrics or logs.

  • D. Correct.

    Correct. The Cloud Monitoring client library enables applications to record custom metrics, which can then be visualized and monitored in Google Cloud Monitoring.

  • E. Incorrect.

    Incorrect. While configuring IAM roles is important for permissions, Stackdriver (now Cloud Logging) requires client libraries or APIs to send logs, and IAM roles alone cannot handle this.

Timed practice exam

Take a Google Professional Cloud Developer practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam