
Answer-first summary for fast verification
Answer: Configure CPU to be always-allocated.
The issue of inconsistent trace collection in Cloud Run when using an OpenTelemetry agent can be attributed to the CPU allocation setting. Cloud Run, by default, allocates CPU only during request processing, which can lead to incomplete trace data collection because the OpenTelemetry agent may not have enough CPU resources to send all trace data before the CPU is deallocated. Configuring the CPU to be always-allocated ensures that the OpenTelemetry agent has continuous access to CPU resources, allowing it to consistently send trace data to Cloud Trace. Therefore, the correct action is to configure CPU to be always-allocated. Options A, C, and D do not directly address the root cause of inconsistent trace collection.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Your team is deploying a new API on Cloud Run that utilizes an OpenTelemetry agent to export distributed tracing data to Cloud Trace for monitoring request latency. However, trace collection is inconsistent. How would you address this issue?
A
Use an HTTP health check.
B
Configure CPU to be always-allocated.
C
Increase the CPU limit in Cloud Run from 2 to 4.
D
Configure CPU to be allocated only during request processing.
No comments yet.