Google Professional Cloud Developer exam dumps

Google Professional Cloud Developer practice question 64 of 481

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

Google Professional Cloud Developer Question 64

Select 3Google Cloud Platform

You are developing a microservices-based application on Google Cloud. To effectively monitor and debug the application, you need to instrument your code to produce metrics, logs, and traces. Which steps should you take to achieve this using Google Cloud's tools?

  1. A

    Add OpenTelemetry SDK to your application and configure it to export traces to Cloud Trace.

  2. B

    Use the Cloud Logging client library to write custom log entries directly from your application.

  3. C

    Embed Stackdriver Profiler API calls in your application code to capture traces.

  4. D

    Define custom metrics in your application and export them to Cloud Monitoring using the Cloud Monitoring API.

  5. E

    Install the Cloud Logging agent on your application instance to automatically collect traces.

Show answer and explanation

Correct answers: A, B, D

Explanation

To properly instrument your code for metrics, logs, and traces in Google Cloud, you should use the OpenTelemetry SDK for tracing, the Cloud Logging client library for custom logs, and the Cloud Monitoring API for exporting custom metrics. These tools together provide a comprehensive observability solution for your application.

  • A. Correct.

    Correct. OpenTelemetry is a standard for distributed tracing and can be integrated with Google Cloud by exporting traces to Cloud Trace.

  • B. Correct.

    Correct. The Cloud Logging client library allows you to programmatically write custom log entries from your application.

  • C. Incorrect.

    Incorrect. Stackdriver Profiler is used for performance profiling, not for generating traces.

  • D. Correct.

    Correct. Custom metrics can be defined in your application and exported to Cloud Monitoring for better observability.

  • E. Incorrect.

    Incorrect. The Cloud Logging agent is used to collect logs, not traces, and is generally used for VM-based environments rather than application-level instrumentation.

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