exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 2 question 39 discussion

Actual exam question from Microsoft's AZ-204
Question #: 39
Topic #: 2
[All AZ-204 Questions]

You are developing a web application that runs as an Azure Web App. The web application stores data in Azure SQL Database and stores files in an Azure
Storage account. The web application makes HTTP requests to external services as part of normal operations.
The web application is instrumented with Application Insights. The external services are OpenTelemetry compliant.
You need to ensure that the customer ID of the signed in user is associated with all operations throughout the overall system.
What should you do?

  • A. Add the customer ID for the signed in user to the CorrelationContext in the web application
  • B. On the current SpanContext, set the TraceId to the customer ID for the signed in user
  • C. Set the header Ocp-Apim-Trace to the customer ID for the signed in user
  • D. Create a new SpanContext with the TraceFlags value set to the customer ID for the signed in user
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
1989jay
Highly Voted 10 months, 1 week ago
This question was on exam. 09/01/2024. Passed 872.
upvoted 13 times
...
neelkanths
Highly Voted 6 months, 2 weeks ago
Selected Answer: A
Got it on 20 April 2024...Marks > 950...answer is correct....all questions from examtopics 400 question bank
upvoted 8 times
...
raja33
Most Recent 3 weeks, 4 days ago
Selected Answer: A
Got this in the exam today! Apr 19, 2025
upvoted 1 times
...
applepie
1 year, 3 months ago
got this question today, answer A - 7/30/2023, score 895/1000
upvoted 5 times
...
imanonion
1 year, 10 months ago
Selected Answer: A
Answer by ChatGPT, which I think looks legit: "I would choose option A, Add the customer ID for the signed in user to the CorrelationContext in the web application. The CorrelationContext is a way to associate contextual information with a request as it flows through the system. It allows you to track a request as it passes through different components of the system, and to identify related log entries and telemetry data. By adding the customer ID to the CorrelationContext in the web application, you can ensure that it is associated with all operations throughout the overall system. This will allow you to track the request and identify related log entries and telemetry data for a specific customer.
upvoted 4 times
imanonion
1 year, 10 months ago
Option B, On the current SpanContext, set the TraceId to the customer ID for the signed in user, is not correct because the TraceId is a unique identifier for a trace, and it is not meant to be used to store contextual information about the request. Option C, Set the header Ocp-Apim-Trace to the customer ID for the signed in user, is not correct because the Ocp-Apim-Trace header is used by Azure API Management to track requests as they pass through the API gateway, and it is not related to application instrumentation or tracing. Option D, Create a new SpanContext with the TraceFlags value set to the customer ID for the signed in user, is not correct because the TraceFlags value is used to indicate the state of the trace and is not meant to be used to store contextual information about the request."
upvoted 7 times
Puja079888
8 months, 3 weeks ago
good explanation
upvoted 1 times
...
...
...
OPT_001122
1 year, 12 months ago
Selected Answer: A
A. Add the customer ID for the signed in user to the CorrelationContext in the web application
upvoted 2 times
...
Akiu
2 years ago
OpenTelemetry uses correlation context and it fits the requirements: Correlation context carries user-defined properties. These properties are typically data that you would like to eventually aggregate for correlation analysis or use to filter your trace data, such as a customer identifier, ... https://lightstep.com/opentelemetry/context-propagation
upvoted 3 times
...
chessace2000
2 years ago
Selected Answer: B
It has to be OpenTelemetry compliant. This means using W3C correlation spec. CorrelationContext (A) is legacy correlation spec not W3C.
upvoted 2 times
warchoon
1 year, 8 months ago
tracestate: Carries system-specific tracing context. It is a part of correlation headers using W3C TraceContext. Correlation-Context is deprecated. But this is the same as the Request-Context which is currently in use.
upvoted 1 times
...
...
willchenxa
2 years, 2 months ago
Selected Answer: A
A SpanContext represents the portion of a Span which must be serialized and propagated along side of a Baggage. https://open-telemetry.github.io/opentelemetry-js-api/interfaces/spancontext.html
upvoted 5 times
warchoon
1 year, 8 months ago
Agree https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-enable?tabs=java#set-the-user-id-or-authenticated-user-id
upvoted 1 times
...
...
finnishr
2 years, 2 months ago
Selected Answer: B
The correct answer is B.
upvoted 1 times
DonH
1 year, 5 months ago
This answer is useless without any explanation. Come on guys this is annoying and NOT helpfull. Please clarify WHY it is the correct answer. Now we have a group of people stating A is correct and an other group stating B is correct. How are we suppose to know what is correct?
upvoted 3 times
...
...
lhy904
2 years, 6 months ago
Why not B?
upvoted 2 times
warchoon
1 year, 8 months ago
"The value of trace-id SHOULD be globally unique. One recommended method to ensure global uniqueness, as well as to address some privacy and security considerations, to a satisfactory degree of certainty is to randomly (or pseudo-randomly) generate the trace-id. Implementers SHOULD use a trace-id generation method which randomly (or pseudo-randomly) generates at least the right-most 7 bytes of the ID." by specs ChatGPT is lying (as usual) that you can't use it to request, but you can't use TraceId with all operations throughout the overall system
upvoted 2 times
...
...
nt_ar
2 years, 6 months ago
Selected Answer: A
That's correct
upvoted 2 times
...
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.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago