exam questions

Exam AZ-400 All Questions

View all questions & answers for the AZ-400 exam

Exam AZ-400 topic 2 question 35 discussion

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

You have an Azure web app named webapp1 that uses the .NET Core runtime stack. You have an Azure Application Insights resource named AppInsights1. Webapp1 sends telemetry data to AppInsights1.

You need to ensure that webapp1 sends the telemetry data at a fixed sampling rate.

What should you do?

  • A. From the code repository of webapp1, modify the ApplicationInsights.config file.
  • B. From the code repository of webapp1, modify the Startup.cs file.
  • C. From AppInsights1, modify the Usage and estimated costs settings.
  • D. From AppInsights1, configure the Continuous export settings.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
lugia4000
Highly Voted 2 years, 2 months ago
Right now 36% voted A and that is completely wrong. NET Core does not have applicationinsights.config, as it says here: https://learn.microsoft.com/en-us/azure/azure-monitor/app/configuration-with-applicationinsights-config "The ApplicationInsights.config and .xml instructions don't apply to the .NET Core SDK. To configure .NET Core applications, follow the instructions in Application Insights for ASP.NET Core applications." The answer is either B or as Net Core 6, Program.cs
upvoted 24 times
...
renzoku
Highly Voted 1 year, 9 months ago
Selected Answer: B
.NET Core application -> Startup.cs .NET Framework applications -> ApplicationInsights.config
upvoted 12 times
...
Dankho
Most Recent 5 months ago
Selected Answer: C
Both B and C work but C doesn't require redeployment.
upvoted 1 times
...
ozbonny
1 year, 2 months ago
Selected Answer: B
B since in the documentation specify the configuration for net, net core and java. https://learn.microsoft.com/en-us/azure/azure-monitor/app/sampling-classic-api
upvoted 1 times
...
peekingpicker
1 year, 7 months ago
Selected Answer: B
Add AddApplicationInsightsTelemetry() to your startup.cs or program.cs class. https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core?tabs=netcorenew%2Cnetcore6
upvoted 2 times
...
AymanAkk
1 year, 7 months ago
Selected Answer: B
.Net core so you need to change in startup.cs file
upvoted 1 times
...
WH16
1 year, 7 months ago
Selected Answer: B
On exam 2023-09-06, selected B. From the code repository of webapp1, modify the Startup.cs file. Score 933
upvoted 9 times
...
yana_b
1 year, 8 months ago
Selected Answer: B
Provided answer is correct. Following the link pasted by zellck, we can see the answer clearly stated there, as referred to also in his comment,.
upvoted 1 times
...
zellck
1 year, 11 months ago
Selected Answer: B
B is the answer. https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core?tabs=netcorenew%2Cnetcore6#configure-the-application-insights-sdk For ASP.NET Core, make almost all configuration changes in the ConfigureServices() method of your Startup.cs class, unless you're directed otherwise.
upvoted 3 times
...
cluqueg
2 years ago
Selected Answer: B
B is the correct option.
upvoted 3 times
...
MSlave
2 years ago
Selected Answer: B
https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core?tabs=netcorenew%2Cnetcore6#enable-application-insights-server-side-telemetry-no-visual-studio "Add AddApplicationInsightsTelemetry() to your startup.cs or program.cs class. The choice depends on your .NET Core version."
upvoted 2 times
...
jojorabbit2021
2 years, 1 month ago
Selected Answer: B
B. From the code repository of webapp1, modify the Startup.cs file.
upvoted 4 times
...
Hieronimusov
2 years, 2 months ago
Selected Answer: B
that uses the .NET Core runtime stack. .NET Core 6 uses Program.cs not Startup.cs. BUT .NET Core 5 and earlier uses Startup.cs https://learn.microsoft.com/en-us/azure/azure-monitor/app/sampling?tabs=net-core-old#tabpanel_1_net-core-old Answer B is correct one.
upvoted 2 times
...
imanonion
2 years, 2 months ago
I was unable to find "Startup.cs" in the documentation. However, I found Program.cs. If option B is changed to Program.cs, then B would be the correct answer.
upvoted 3 times
...
jojorabbit2021
2 years, 2 months ago
Selected Answer: B
B correct
upvoted 2 times
...
surensaluka
2 years, 2 months ago
Selected Answer: B
B Correct
upvoted 2 times
...
AKhalid
2 years, 3 months ago
Selected Answer: B
Answer is B . Two things to consider .NET Core and Fixed Rate Sampling. Because it's asked for .NET Core applications so it can only be done programmatically(startup.cs) . For ASP.NET applications it can be done via config or code in startup.cs. Check here : https://learn.microsoft.com/en-gb/azure/azure-monitor/app/sampling?tabs=net-core-new#types-of-sampling
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