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?
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.
According to the Professional Google Cloud Developer documentation, to ensure that a specific request is always traced, the X-Cloud-Trace-Context header must be added to the request with the appropriate parameters. This header ensures that all requests made to the application are traced and added to the Trace list. Additionally, the documentation explains that the Trace ID and Span ID must be included in the header to ensure that the request is correctly attributed to the trace. By using this method, developers can easily monitor and analyze the latency and performance of their applications using Trace.
D is the answer.
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.
upvoted 2 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
__rajan__
3 months, 1 week agopurushi
4 months, 3 weeks agoOleksii_ki
6 months agoTNT87
1 year agozellck
1 year ago