Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 20 question 3 discussion

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

You need to resolve the log capacity issue.
What should you do?

  • A. Create an Application Insights Telemetry Filter
  • B. Change the minimum log level in the host.json file for the function
  • C. Implement Application Insights Sampling
  • D. Set a LogCategoryFilter during startup
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
MikiStieger
Highly Voted 3 years, 5 months ago
I had the exam last Friday and I notice that they change one sentence in case study from: Application Insights must always contain all log messages. to: Application Insights currently contain all log messages. So I chosen C. Implement Application Insights Sampling.
upvoted 31 times
gmishra88
2 years, 1 month ago
If that is the case then all three options are back on the table: 1. Sampling 2. Filtering 3. Adjusting the log level 4. Whatever the 4th mean It totally depend on the situation. Practically you try the option and find the best solution. But I think Microsoft wants us to say Sampling.
upvoted 2 times
coffecold
2 years, 1 month ago
I don't agree. Sampling does not meet "Application Insights must always contain ALL log messages" since it drops items. https://learn.microsoft.com/en-us/azure/azure-monitor/app/sampling#how-sampling-works I think it would be simply adjusting the log level in the app.
upvoted 3 times
...
coffecold
2 years, 1 month ago
The fourth means : filtering on log level (in webjobs SDK 2.0). https://learn.microsoft.com/en-us/azure/app-service/webjobs-sdk-how-to
upvoted 1 times
...
...
OPT_001122
2 years ago
so you mean IF Application Insights must always contain all log messages. then A. Create an Application Insights Telemetry Filter If Application Insights currently contain all log messages then C. Implement Application Insights Sampling.
upvoted 2 times
...
...
kozchris
Highly Voted 2 years, 9 months ago
The answer is "B". From the problem description: "Developers report that the number of log messages in the trace output for the processor is too high" The keywords are "too high". The answer is to change the minimum logging level.
upvoted 6 times
chingdm
2 years, 9 months ago
agreed, it also said "trace output for the processor is too high, resulting in lost log messages" so it seems that sampling is already enabled and the logs are too many so resulting in lost messages since sampling only takes only portion of all the logs, so it helps if changing the minimum log level to reduce the logs or disable sampling but this is not in the answer selection.
upvoted 2 times
chingdm
2 years, 9 months ago
also this requirement "Application Insights must always contain all log messages." will eliminate enable sampling answer because app insights will filter some logs during sampling
upvoted 2 times
...
gmishra88
2 years, 1 month ago
That's right, sherlock. But I don't think that is what Microsoft is looking for here. Those are red-herring options given to doom developers who never tried their flashy, state-of-the-art sampling feature. Yes, but these options depends on the developer and what exactly is shown in the logs and the level of logs.
upvoted 1 times
...
...
InversaRadice
9 months, 1 week ago
The purpose of Sampling is reducing the process of ingest log data...
upvoted 1 times
...
...
Jay456
Most Recent 3 days, 14 hours ago
Selected Answer: B
Application Insights must always contain all log messages. So I would vote B
upvoted 1 times
...
lednari
6 months, 2 weeks ago
Selected Answer: B
"Application Insights must always contain all log messages". Sampling will mean that not all log messages will get logged. Therefore changing log level from Trace to eg Information is the solution.
upvoted 1 times
...
dom271219
11 months, 1 week ago
Selected Answer: B
B : TraceWriter and Application are distincts
upvoted 1 times
...
kabbas
1 year, 4 months ago
Selected Answer: C
Using sampling also allows you to preserve all your logs but reduces throttling
upvoted 2 times
...
JH81
1 year, 5 months ago
Selected Answer: C
"Application Insights must always contain all log messages." is a stupid requirement. What does that even mean? It would help if it indicated to what level. If some jr programmer set the logging level to Verbose then that's the problem and the answer should be B change the minimum logging level. A and C would indicate you are not meeting the requirement to log all messages. D is not a real answer. But I guess C sampling is what MS is looking for since ""Sampling also helps you avoid Application Insights throttling your telemetry." which is the issue. https://learn.microsoft.com/en-us/azure/azure-monitor/app/sampling
upvoted 2 times
...
halfway
1 year, 7 months ago
Selected Answer: C
According to the reference below: "Sampling is a feature in Application Insights. It's the recommended way to reduce telemetry traffic, data costs, and storage costs, while preserving a statistically correct analysis of application data. Sampling also helps you avoid Application Insights throttling your telemetry. " Ref: https://learn.microsoft.com/en-us/azure/azure-monitor/app/sampling?tabs=net-core-new
upvoted 1 times
...
gmishra88
2 years, 1 month ago
Filtering or Sampling cannot be the answers considering, as far as I can guess from Microsoft documentation, that it is about NOT sending the telemetry (log entries?) to Application Insights. So, how can the argument that the requirement says "must contain all log message" (whatever that means in the real world). Sampling/Filtering and Chaning-log-levels have all the same effect. From the Microsoft documentation I could not really be clear of what exactly "sampling" is but it looks like it is not about "trace" but about metrics.
upvoted 3 times
coffecold
2 years, 1 month ago
Agree, exactly because of that: Filtering and Sampling drop messages. So if you must not drop messages between app and app Insights, the only thing that is left is to reduce logged messages (C)
upvoted 1 times
coffecold
2 years, 1 month ago
I mean option B.
upvoted 1 times
...
...
...
mandusya
2 years, 11 months ago
We had similar a few weeks ago sampling worked fine
upvoted 1 times
...
phvogel
3 years ago
From https://docs.microsoft.com/en-us/azure/azure-monitor/app/api-filtering-sampling "Sampling reduces the volume of telemetry without affecting your statistics. " "Filtering with telemetry processors lets you filter out telemetry in the SDK before it's sent to the server" (and the other options would also eliminate the log traces) So only sampling will meet the requirement of containing all log messages.
upvoted 2 times
...
ning
3 years, 3 months ago
I am thinking of A to exclude TraceWrite logging ... Since all log messages are required, so you cannot sampling or change log levels, those are leading to lose log entries ... LogCategoryFilter I cannot find anything with that from documentation ...
upvoted 3 times
...
[Removed]
3 years, 6 months ago
A. Create an Application Insights Telemetry Filter > A filter can be created by either implementing ITelemetryProcessor or by implementing ITelemetryInitializer. However MS recommends to use sampling https://docs.microsoft.com/en-us/azure/azure-monitor/app/api-filtering-sampling#filtering B. Change the minimum log level in the host.json file for the function > Can be ruled out because req. says app insights must always contain all log messages C. Implement Application Insights Sampling > Is the recommended way to reduce telemetry traffic, data costs and storage costs > https://docs.microsoft.com/en-us/azure/azure-monitor/app/sampling > https://blog.ramondeklein.nl/2017/05/05/filtering-application-insights/ D. Set a LogCategoryFilter during startup > No idea what that is, but feels like pointint in the same direction as the B does
upvoted 5 times
gmishra88
2 years, 1 month ago
Bingo. It does say "Application Insights must always contain all log messages." I did miss that sentence. This is an eyesight test than a developer exam.
upvoted 3 times
...
...
BrettusMaximus
3 years, 6 months ago
It can't be C. - AI Sampling. Rule 1: Application Insights must always contain all log messages If you read the Sampling doco carefully. It does filter logs and does not record all the transaction records (but yes it keeps a count for statistics only (See adaptive and fixed sampling)) https://docs.microsoft.com/en-us/azure/azure-monitor/app/sampling Fact 2: The processor also has TraceWriter logging enabled. TraceWriter logs are generally used for debugging and are not "Official" transactional logs. https://stackify.com/logging-azure-functions/ Options A, B or D are candidates to filter these logs. Option B and D would stop the actual logs being generated but may also remove some transactional logs. It would also not let the developers do their debugging (the purpose of TraceWriter in the first place). Thus this leaves the only option A. A. Create an Application Insights Telemetry Filter (to filter the trace writer logging)
upvoted 3 times
...
aperez1979
3 years, 8 months ago
I think it could be the b
upvoted 1 times
MrZoom
3 years, 7 months ago
The case states "The processor also has TraceWriter logging enabled. Application Insights must always contain all log messages." For this reason B isn't an option, and neither is A or D. These would all change what log messages are sent to AI, which isn't according to reqs. So this leaves C. Sampling just groups messages together with a count, causing less traffic to AI but the same results.
upvoted 9 times
clarionprogrammer
3 years, 7 months ago
B is correct. Because it says "Application Insights must always contain all log messages.", sampling is not a valid answer. In fact, sampling could be the very reason that log messages are lost. See: https://docs.microsoft.com/en-us/azure/azure-monitor/app/asp-net-trace-logs "I don't see some log entries that I expected".
upvoted 2 times
gmishra88
2 years, 1 month ago
That's an excellent point. Kudos. I will need three days to prepare a legal answer for this question. How much did you say the exam allows? 180 minutes? So, according to you the filter is also not an option? Nice, but I do not know how can I not see the vague requirement that says "must contain all log messages". Hope I do not read that line in the certification exam and so, I can say B is the right answer like a good developer's natural instinct.
upvoted 2 times
oceane0316
1 year, 11 months ago
Thank you gmishra88 for the funny comments you left along the way throughout this painful study session.
upvoted 3 times
naivecoder786
1 year, 8 months ago
Haha so true ! I think he is the same guy who was from start but is now showin as "Removed User" xD
upvoted 2 times
...
...
...
...
kwaazaar
3 years, 7 months ago
Sampling is enabled by default and can be turned off (althoiugh AI ingress may still drop entries when overloaded). For metrics sampling does exactly as MrZoom describes. As I see it, irrelevant logs must be prevented. My first step would be to adjust the minimum loglevel,if possible. A telemetry processor to filter telemetry/logs technically could work to, but is intended for filtering specific entries.
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 ...