Google Professional Cloud DevOps Engineer Question 260
Select 3Google Cloud PlatformYour team is deploying a microservices-based application to Google Cloud and needs to implement application instrumentation to monitor performance and identify bottlenecks. The application is written in Python and uses the OpenTelemetry library. What steps should you take to ensure proper instrumentation of your application for monitoring and observability in Google Cloud?
- A
Integrate the OpenTelemetry SDK into your application and configure it to export telemetry data to Google Cloud's operations suite (Cloud Monitoring and Cloud Trace).
- B
Manually instrument each function in your application to send logs to a custom logging solution instead of Google Cloud Logging.
- C
Use built-in OpenTelemetry instrumentation for Python libraries and frameworks, such as HTTP clients or database drivers, to automatically collect telemetry data.
- D
Enable the Google Cloud Trace agent on your Compute Engine instances to automatically trace all microservices within your application.
- E
Configure sampling rates in OpenTelemetry to balance between data granularity and application performance.
Show answer and explanation
Correct answers: A, C, E
Explanation
To properly instrument your application for monitoring and observability in Google Cloud, you need to integrate the OpenTelemetry SDK, leverage its built-in instrumentation capabilities, and configure sampling rates. These steps ensure efficient and effective collection of telemetry data for use in Google Cloud's operations suite. Avoid using custom solutions or relying solely on components like the Google Cloud Trace agent when a standardized tool like OpenTelemetry is in use.
- A. Correct.
This is correct because integrating the OpenTelemetry SDK and exporting telemetry data to Google Cloud's operations suite is a key step for monitoring and observability in Google Cloud.
- B. Incorrect.
This is incorrect because sending logs to a custom logging solution bypasses Google Cloud's native observability tools, which are optimized for integration with Google Cloud resources.
- C. Correct.
This is correct because OpenTelemetry provides built-in instrumentation for many common libraries and frameworks, reducing the need for extensive manual instrumentation.
- D. Incorrect.
This is incorrect because enabling the Google Cloud Trace agent on Compute Engine instances is not sufficient in a microservices-based application, especially if it is not running on Compute Engine or if OpenTelemetry is being used.
- E. Correct.
This is correct because configuring sampling rates in OpenTelemetry can help optimize performance while still collecting sufficient telemetry data for monitoring and debugging.