Google Professional Cloud DevOps Engineer Question 261
Single answerGoogle Cloud PlatformYou are a DevOps engineer at a company that operates a microservices-based application hosted on Google Kubernetes Engine (GKE). Users are reporting high latency in one of your services. You want to identify the root cause by analyzing the performance of your services and tracking requests as they travel through multiple services. How can you achieve this using Cloud Trace?
- A
Instrument your application with Cloud Trace SDKs to collect trace data and use the Cloud Console to analyze the latency.
- B
Enable Cloud Trace export to BigQuery and write SQL queries to identify latency issues.
- C
Use the default Cloud Logging integration in GKE to analyze latency by searching for slow logs.
- D
Install a third-party APM tool to collect trace data, as Cloud Trace does not support distributed tracing.
Show answer and explanation
Correct answer: A
Explanation
Cloud Trace is a GCP service designed specifically for distributed tracing and latency analysis across microservices. By instrumenting your application with Cloud Trace SDKs, you can collect detailed trace data and use the Cloud Console to visualize and diagnose performance bottlenecks. This approach is tailored to the use case of tracking requests and analyzing latency in a microservices-based architecture.
- A. Correct.
This is the correct answer. Cloud Trace SDKs allow you to instrument your application to collect trace data. This enables you to track requests across services and analyze latency using the Cloud Console.
- B. Incorrect.
Although exporting trace data to BigQuery is possible, it is not the optimal approach for real-time latency analysis. Cloud Trace is specifically designed for this purpose.
- C. Incorrect.
Cloud Logging is not sufficient for distributed tracing and analyzing request latencies across multiple services. It focuses more on log data rather than tracing requests.
- D. Incorrect.
This is incorrect because Cloud Trace natively supports distributed tracing, and a third-party APM tool is unnecessary for this use case.