AZ-204 · Question #341
You are developing an ASP.NET Core Web API web service. The web service uses Azure Application Insights for all telemetry and dependency tracking. The web service reads and writes data to a database…
The correct answer is B. Telemetry.Id D. Telemetry.Context.Operation.Id. public async Task Enqueue(string payload) // StartOperation is a helper method that initializes the telemetry item // and allows correlation of this operation with its parent and children. var operation = telemetryClient.StartOperation<DependencyTelemetry>("enqueue " +…
Question
Options
- ATelemetry.Context.Cloud.RoleInstance
- BTelemetry.Id
- CTelemetry.Name
- DTelemetry.Context.Operation.Id
- ETelemetry.Context.Session.Id
How the community answered
(33 responses)- A6% (2)
- B76% (25)
- C3% (1)
- E15% (5)
Explanation
public async Task Enqueue(string payload) // StartOperation is a helper method that initializes the telemetry item // and allows correlation of this operation with its parent and children. var operation = telemetryClient.StartOperation<DependencyTelemetry>("enqueue " + queueName); operation.Telemetry.Type = "Azure Service Bus"; operation.Telemetry.Data = "Enqueue " + queueName; var message = new BrokeredMessage(payload); // Service Bus queue allows the property bag to pass along with the message. // We will use them to pass our correlation identifiers (and other context) // to the consumer. message.Properties.Add("ParentId", operation.Telemetry.Id); message.Properties.Add("RootId", operation.Telemetry.Context.Operation.Id); https://docs.microsoft.com/en-us/azure/azure-monitor/app/custom-operations-tracking
Topics
Community Discussion
No community discussion yet for this question.