AZ-204 Exam QuestionsBrowse all questions from this exam

AZ-204 Exam - Question 77


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?

Show Answer
Correct Answer: A

The correct approach to ensure that the customer ID of the signed-in user is associated with all operations throughout the overall system is to add the customer ID to the CorrelationContext in the web application. The CorrelationContext is specifically designed to carry contextual information such as user identifiers, which can be propagated through different components of the system. This allows for effective correlation of logs and telemetry data across various services and components, ensuring that the customer ID is consistently tracked.

Discussion

12 comments
Sign in to comment
1989jay
Jul 10, 2024

This question was on exam. 09/01/2024. Passed 872.

neelkanthsOption: A
Oct 28, 2024

Got it on 20 April 2024...Marks > 950...answer is correct....all questions from examtopics 400 question bank

willchenxaOption: A
Mar 4, 2023

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

warchoon
Aug 22, 2023

Agree https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-enable?tabs=java#set-the-user-id-or-authenticated-user-id

applepie
Jan 30, 2024

got this question today, answer A - 7/30/2023, score 895/1000

imanonionOption: A
Jul 8, 2023

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.

imanonion
Jul 8, 2023

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."

Puja079888
Aug 23, 2024

good explanation

Puja079888
Aug 23, 2024

good explanation

Akiu
Apr 23, 2023

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

nt_arOption: A
Oct 25, 2022

That's correct

lhy904
Nov 14, 2022

Why not B?

warchoon
Aug 22, 2023

"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

chessace2000Option: B
Apr 19, 2023

It has to be OpenTelemetry compliant. This means using W3C correlation spec. CorrelationContext (A) is legacy correlation spec not W3C.

warchoon
Aug 22, 2023

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.

OPT_001122Option: A
May 19, 2023

A. Add the customer ID for the signed in user to the CorrelationContext in the web application

finnishrOption: B
Mar 2, 2023

The correct answer is B.

DonH
Dec 12, 2023

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?

raja33Option: A
Apr 20, 2025

Got this in the exam today! Apr 19, 2025