
Answer-first summary for fast verification
Answer: Add the X-Cloud-Trace-Context header to the request with the appropriate parameters.
To ensure a specific request is always traced, the most effective method is to add the `X-Cloud-Trace-Context` header to the request with the appropriate parameters. This header allows you to specify a trace ID and a sampling decision, ensuring that the request is traced regardless of the default sampling configuration. Waiting for automatic capture (Option A) or repeatedly sending requests (Option B) does not guarantee tracing. Using the Trace API to apply custom attributes (Option C) does not directly influence whether a request is traced.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
To ensure a specific request is always traced in your OpenTelemetry-instrumented application, what configuration or action should you implement to guarantee its latency is captured in Trace?
A
Wait 10 minutes, then verify that Trace captures those types of requests automatically.
B
Write a custom script that sends this type of request repeatedly from your dev project.
C
Use the Trace API to apply custom attributes to the trace.
D
Add the X-Cloud-Trace-Context header to the request with the appropriate parameters.
No comments yet.