ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 135 - AZ-204 discussion

Report
Export

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 other than Microsoft SQL

Server.

You need to ensure that dependency tracking works for calls to the third-party database.

Which two dependency telemetry properties should you use? Each correct answer presents part of the solution.

NOTE: Each correct selection is worth one point.

A.
Telemetry.Context.Cloud.RoleInstance
Answers
A.
Telemetry.Context.Cloud.RoleInstance
B.
Telemetry.Id
Answers
B.
Telemetry.Id
C.
Telemetry.Name
Answers
C.
Telemetry.Name
D.
Telemetry.Context.Operation.Id
Answers
D.
Telemetry.Context.Operation.Id
E.
Telemetry.Context.Session.Id
Answers
E.
Telemetry.Context.Session.Id
Suggested answer: B, D

Explanation:

Example:

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);

Reference:

https://docs.microsoft.com/en-us/azure/azure-monitor/app/custom-operations-tracking

asked 02/10/2024
Micele Mercer
38 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first