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.
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.
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.
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.
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.
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.
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
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.
"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.
"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
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
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.
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)
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.
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 ...
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
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.
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)
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.
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".
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.
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
...
...
...
Log in to ExamTopics
Sign in:
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.
MikiStieger
Highly Voted 3 years, 5 months agogmishra88
2 years, 1 month agocoffecold
2 years, 1 month agocoffecold
2 years, 1 month agoOPT_001122
2 years agokozchris
Highly Voted 2 years, 9 months agochingdm
2 years, 9 months agochingdm
2 years, 9 months agogmishra88
2 years, 1 month agoInversaRadice
9 months, 1 week agoJay456
Most Recent 3 days, 14 hours agolednari
6 months, 2 weeks agodom271219
11 months, 1 week agokabbas
1 year, 4 months agoJH81
1 year, 5 months agohalfway
1 year, 7 months agogmishra88
2 years, 1 month agocoffecold
2 years, 1 month agocoffecold
2 years, 1 month agomandusya
2 years, 11 months agophvogel
3 years agoning
3 years, 3 months ago[Removed]
3 years, 6 months agogmishra88
2 years, 1 month agoBrettusMaximus
3 years, 6 months agoaperez1979
3 years, 8 months agoMrZoom
3 years, 7 months agoclarionprogrammer
3 years, 7 months agogmishra88
2 years, 1 month agooceane0316
1 year, 11 months agonaivecoder786
1 year, 8 months agokwaazaar
3 years, 7 months ago