exam questions

Exam AZ-203 All Questions

View all questions & answers for the AZ-203 exam

Exam AZ-203 topic 5 question 7 discussion

Actual exam question from Microsoft's AZ-203
Question #: 7
Topic #: 5
[All AZ-203 Questions]

DRAG DROP -
You are developing an ASP.NET Core Web API web service that uses Azure Application Insights to monitor performance and track events.
You need to enable logging and ensure that log messages can be correlated to events tracked by Application Insights.
How should you complete the code? To answer, drag the appropriate code segments to the correct locations. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer: Explanation
Box 1: ApplicationInsightsLoggerOptions
If you want to include the EventId and EventName properties, then add the following to the ConfigureServices method: services
.AddOptions<ApplicationInsightsLoggerOptions>()
.Configure(o => o.IncludeEventId = true);

Box 2: IncludeEventID -

Box 3: ApplicationServices -
In Asp.Net core apps it turns out that trace logs do not show up in Application Insights out of the box. We need to add the following code snippet to our Configure method in Startup.cs: loggerFactory.AddApplicationInsights(app.ApplicationServices, logLevel);
References:
https://blog.computedcloud.com/enabling-application-insights-trace-logging-in-asp-net-core/

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
sien
Highly Voted 4 years, 12 months ago
Correct answer can be found here: https://blog.computedcloud.com/enabling-application-insights-trace-logging-in-asp-net-core/
upvoted 21 times
Ummara
4 years, 10 months ago
you are a star
upvoted 3 times
...
...
sinh
Highly Voted 4 years, 7 months ago
https://freedumps.certqueen.com/wp-content/uploads/2020/06/image006-12.jpg
upvoted 11 times
...
Larry616
Most Recent 4 years, 9 months ago
Box1: ApplicationInsightsLoggerOptions Box2: IncludeEventId Box3: ApplicationServices
upvoted 8 times
...
xstoashish
4 years, 10 months ago
how the answer will reflect in exam ? wil it be some drop down or drag drop
upvoted 1 times
...
Steve_az
4 years, 10 months ago
Options: https://i.postimg.cc/NFbG20Kc/image.png
upvoted 4 times
...
bulve
5 years, 1 month ago
Options: https://postimg.cc/ctgGV079
upvoted 6 times
...
Rishi_22
5 years, 2 months ago
Options please.
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 ...