exam questions

Exam AZ-400 All Questions

View all questions & answers for the AZ-400 exam

Exam AZ-400 topic 3 question 12 discussion

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

You are building an ASP.NET Core application.
You plan to create an application utilization baseline by capturing telemetry data.
You need to add code to the application to capture the telemetry data. The solution must minimize the costs of storing the telemetry data.
Which two actions should you perform? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point

  • A. Add the <InitialSamplingPercentage>99</InitialSamplingPercentage> parameter to the ApplicationInsights.config file.
  • B. From the code of the application, enable adaptive sampling.
  • C. From the code of the application, add Azure Application Insights telemetry.
  • D. Add the <MaxTelemetryItemsPerSecond>5</MaxTelemetryItemsPerSecond> parameter to the ApplicationInsights.config file.
  • E. From the code of the application, disable adaptive sampling.
Show Suggested Answer Hide Answer
Suggested Answer: CE 🗳️

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
077dammy
Highly Voted 4 years, 2 months ago
Ans should be C & E.
upvoted 58 times
nikolayivanov
3 months, 1 week ago
For this scenario, C & B (enable adaptive sampling and add Application Insights telemetry) remains the most cost-effective choice. C & E (disable adaptive sampling and use fixed-rate sampling) is valid if consistent sampling is a priority over dynamic adjustments to traffic volume. The statement you referenced is accurate for certain use cases, but adaptive sampling is generally better aligned with the requirement to minimize costs.
upvoted 4 times
...
MrMonkfish
3 years, 7 months ago
C & E Disable Adaptive Sampling and use Fixed Rate Sampling instead: "Fixed-rate sampling reduces the volume of telemetry sent from both your ASP.NET or ASP.NET Core or Java server and from your users' browsers. You set the rate. The client and server will synchronize their sampling so that, in Search, you can navigate between related page views and requests." https://docs.microsoft.com/en-us/azure/azure-monitor/app/sampling
upvoted 27 times
Dankho
3 months, 4 weeks ago
Reasoning against C & E (Disable Adaptive Sampling and Use Fixed-Rate Sampling): Cost Optimization: The primary requirement is to minimize the costs of storing telemetry data. Fixed-rate sampling, while predictable, can be inefficient: Over-sampling during low traffic: If you set the fixed rate too high, you'll collect and store more data than necessary when application traffic is low, leading to unnecessary costs. Under-sampling during high traffic: If you set the fixed rate too low to control costs, you risk losing valuable data during traffic spikes, potentially missing important performance issues or usage patterns. Difficult to determine the "right" rate: Finding the optimal fixed sampling rate that balances cost and data fidelity across varying traffic levels can be challenging and requires ongoing adjustments.
upvoted 2 times
...
cma2109
4 months, 1 week ago
but the question aks us to optimize cost. which cant be done wihtout adaptive sampling, hence B and C
upvoted 1 times
...
FunkyB
2 years, 11 months ago
MrMonkfish, thank you very much for providing the link. Thanks to everyone that is positive.
upvoted 4 times
...
...
prashantjoge
3 years, 1 month ago
https://docs.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core#enable-client-side-telemetry-for-web-applications C & E has to be correct. Adaptive sampling is turned on by default. So we need to first enable telemetry, then use fixed-rate sampling. (see other answers for why)
upvoted 4 times
prashantjoge
3 years, 1 month ago
This is an asp.net core application, so there is no applicationinsights.config file. D is definitely incorrect
upvoted 2 times
sha1979
2 years, 8 months ago
There is I believe, With ASP.NET Core and with Microsoft.ApplicationInsights.AspNetCore >= 2.15.0 you can configure AppInsights options via appsettings.json In ApplicationInsights.config, you can adjust several parameters in the AdaptiveSamplingTelemetryProcessor node. The figures shown are the default values: <MaxTelemetryItemsPerSecond>5</MaxTelemetryItemsPerSecond> The target rate of logical operations that the adaptive algorithm aims to collect on each server host. If your web app runs on many hosts, reduce this value so as to remain within your target rate of traffic at the Application Insights portal. https://docs.microsoft.com/en-us/azure/azure-monitor/app/sampling
upvoted 1 times
sha1979
2 years, 8 months ago
Okay... it applied to to ASP.NET applications, not to ASP.NET Core applications. Learn about configuring adaptive sampling for ASP.NET Core applications later in this document.
upvoted 1 times
...
...
...
...
saponazureguy
4 years, 2 months ago
Correct! The keywords here are "ASP.NET core application". There is no ApplicationInsights.config file in ASP.NET Core applications ( it exists only in ASP.NET) and any setting needs to be done through code itself. Also, Adaptive sampling is enabled by default for all ASP.NET core and ASP.NET applications. https://docs.microsoft.com/en-us/azure/azure-monitor/app/sampling
upvoted 5 times
HeyTN
3 years ago
it's not true https://docs.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core
upvoted 1 times
imanonion
2 years, 2 months ago
this article also proves that ASP.Net CORE apps do not use ApplicationInsights.config. please read it again.
upvoted 3 times
...
...
...
...
agueda
Highly Voted 4 years, 2 months ago
C and E https://docs.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core
upvoted 11 times
...
ehallak
Most Recent 6 months ago
Selected Answer: BC
To capture telemetry data while minimizing storage costs, you should: B. From the code of the application, enable adaptive sampling. C. From the code of the application, add Azure Application Insights telemetry. These actions ensure that you are collecting necessary telemetry data while using adaptive sampling to control the volume of data sent, thus reducing storage costs. Option E, which involves disabling adaptive sampling, would not minimize storage costs, which would mean that all telemetry data is sent without any adjustments, which could lead to higher storage costs and potentially overwhelm your telemetry system with too much data. Adaptive sampling helps reduce the volume of telemetry data sent by dynamically adjusting the sampling rate based on the traffic, thus lowering storage costs. https://learn.microsoft.com/en-us/azure/azure-monitor/app/sampling-classic-api
upvoted 2 times
...
Gooldmember
6 months ago
Selected Answer: BC
I would go B & C Yes adaptive sampling is enabled by default, but it does not makes sense to disable it. And yes the 'ApplicationInsights.config' is not present in an ASP.NET Core application.
upvoted 1 times
...
MrAZ105
6 months ago
Selected Answer: CE
Ans should be C & E.
upvoted 1 times
...
ozbonny
1 year, 2 months ago
Selected Answer: CE
C and E since Adaptive sampling is already true by default in dot net core
upvoted 1 times
...
vsvaid
1 year, 3 months ago
Normally these two steps would do it in combination but second step is not there. 1) Disable Adabptive Sampling 2) Changing Usage and estimated costs->Data Sampling in Azure
upvoted 1 times
ozbonny
1 year, 2 months ago
maybe is not there because the 2) is in azure and the question says "in code"
upvoted 1 times
...
...
vsvaid
1 year, 4 months ago
Selected Answer: CE
By disabling Adaptive Sampling, we can use the ingestion sampling. Then we can then set the sampling rate in the Usage and estimated costs.
upvoted 1 times
...
Joe_Mauma
1 year, 8 months ago
Selected Answer: BC
are building an ASP.NET Core application. You plan to create an application utilization baseline by capturing telemetry data. You need to add code to the application to capture the telemetry data. The solution must minimize the costs of storing the telemetry data. Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point A. Add the <InitialSamplingPercentage>99</InitialSamplingPercentage> parameter to the ApplicationInsights.config file. B. From the code of the application, enable adaptive sampling. C. From the code of the application, add Azure Application Insights telemetry. Most Voted D. Add the <MaxTelemetryItemsPerSecond>5</MaxTelemetryItemsPerSecond> parameter to the ApplicationInsights.config file. E. From the code of the application, disable adaptive sampling.
upvoted 2 times
varinder82
1 year, 4 months ago
You are 10000% wrong need to disable adaptive sampling
upvoted 1 times
...
...
ieboaix
1 year, 8 months ago
C&E. 1. Adaptive Sampling is by default which needed to be disabled. so, E is in and B is out 2.there is no ApplicationInsights.config in .NET Core app, so A and D are out. 3. C & E are the winer
upvoted 1 times
...
yana_b
1 year, 8 months ago
Selected Answer: CE
Ingestion sampling reduces the amount processed and retained (and charged for) by Application Insights. Set the sampling rate in the Usage and estimated costs page. Default setting is adaptive sampling, but in order to set ingestion sampling, you have to disable the adaptive sampling and set the sampling rate in the Usage and estimated costs page. Source: https://learn.microsoft.com/en-us/azure/azure-monitor/app/sampling
upvoted 1 times
...
flafernan
1 year, 9 months ago
I hope this sheds some light on why options A, C, and E are not the best choices for minimizing telemetry data storage costs. Options B and D are the correct answers to meet telemetry capture requirements with minimal costs.
upvoted 1 times
...
rick1010
1 year, 10 months ago
Configure sampling settings Use extension methods of TelemetryProcessorChainBuilder as shown below to customize sampling behavior. Important If you use this method to configure sampling, please make sure to set the aiOptions.EnableAdaptiveSampling property to false when calling AddApplicationInsightsTelemetry(). After making this change, you then need to follow the instructions in the code block below exactly in order to re-enable adaptive sampling with your customizations in place. Failure to do so can result in excess data ingestion. Always test post changing sampling settings, and set an appropriate daily data cap to help control your costs. builder.Services.AddApplicationInsightsTelemetry(new ApplicationInsightsServiceOptions { EnableAdaptiveSampling = false, });
upvoted 1 times
...
Fal991l
2 years ago
Selected Answer: BC
To capture telemetry data and minimize storage costs for an ASP.NET Core application, you should enable **adaptive sampling** in the code of the application and add **Azure Application Insights telemetry**¹. Adaptive sampling ensures that only a representative sample of telemetry data is captured, reducing the overall volume of data and minimizing storage costs³. So, the two actions you should perform are **B. From the code of the application, enable adaptive sampling** and **C. From the code of the application, add Azure Application Insights telemetry**.
upvoted 2 times
Fal991l
2 years ago
You can disable adaptive sampling and use fixed-rate sampling instead to reduce the volume of telemetry sent from your ASP.NET or ASP.NET Core or Java server and from your users’ browsers. With fixed-rate sampling, you can set the rate and the client and server will synchronize their sampling so that you can navigate between related page views and requests in Search .
upvoted 1 times
Fal991l
2 years ago
The best answer to the question "You are building an ASP.NET Core application. You plan to create an application utilization baseline by capturing telemetry data. You need to add code to the application to capture the telemetry data. The solution must minimize the costs of storing the telemetry data." would be **B. From the code of the application, enable adaptive sampling**. Adaptive sampling is a feature in Application Insights that reduces telemetry traffic and storage costs while preserving a statistically correct analysis of application data. It ensures that only a representative sample of telemetry data is captured, reducing the overall volume of data and minimizing storage costs. Option E, "From the code of the application, disable adaptive sampling," would not help minimize the costs of storing telemetry data.
upvoted 2 times
...
...
...
col2511kol
2 years ago
Selected Answer: CE
If your goal is to minimize the cost of storing telemetry data, using Fixed Rate Sampling is a more appropriate approach. In this case, the correct answers would be: C. From the code of the application, add Azure Application Insights telemetry. E. From the code of the application, disable adaptive sampling. By disabling adaptive sampling (E) and using Fixed Rate Sampling, you can control the volume of telemetry data sent from your application, reducing the storage cost. Adding Azure Application Insights telemetry (C) will enable you to collect and analyze the telemetry data from your ASP.NET Core application.
upvoted 4 times
...
jimmyyml
2 years, 2 months ago
Selected Answer: BC
B. From the code of the application, enable adaptive sampling. C. From the code of the application, add Azure Application Insights telemetry. Explanation: To capture telemetry data and minimize storage costs, you should enable adaptive sampling in the code of the application and add Azure Application Insights telemetry. Adaptive sampling ensures that only a representative sample of telemetry data is captured, reducing the overall volume of data and minimizing storage costs. Adding Azure Application Insights telemetry to the code allows the application to send telemetry data to the Application Insights service. The other options listed are not relevant to capturing telemetry data and minimizing storage costs.
upvoted 2 times
...
budha
2 years, 4 months ago
It was on my exam on December 7, 2022.
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