PROFESSIONAL-CLOUD-DEVELOPER · Question #225
PROFESSIONAL-CLOUD-DEVELOPER Question #225: Real Exam Question with Answer & Explanation
The correct answer is D: Add the X-Cloud-Trace-Context header to the request with the appropriate parameters.. https://cloud.google.com/trace/docs/setup#force-trace Cloud Trace doesn't sample every request. To force a specific request to be traced, add an X-Cloud-Trace-Context header to the request.
Question
You have recently instrumented a new application with OpenTelemetry, and you want to check the latency of your application requests in Trace. You want to ensure that a specific request is always traced. What should you do?
Options
- AWait 10 minutes, then verify that Trace captures those types of requests automatically.
- BWrite a custom script that sends this type of request repeatedly from your dev project.
- CUse the Trace API to apply custom attributes to the trace.
- DAdd the X-Cloud-Trace-Context header to the request with the appropriate parameters.
Explanation
https://cloud.google.com/trace/docs/setup#force-trace Cloud Trace doesn't sample every request. To force a specific request to be traced, add an X-Cloud-Trace-Context header to the request.
Topics
Community Discussion
No community discussion yet for this question.