exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 17 question 1 discussion

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

You need to investigate the Azure Function app error message in the development environment.
What should you do?

  • A. Connect Live Metrics Stream from Application Insights to the Azure Function app and filter the metrics.
  • B. Create a new Azure Log Analytics workspace and instrument the Azure Function app with Application Insights.
  • C. Update the Azure Function app with extension methods from Microsoft.Extensions.Logging to log events by using the log instance.
  • D. Add a new diagnostic setting to the Azure Function app to send logs to Log Analytics.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️
Azure Functions offers built-in integration with Azure Application Insights to monitor functions.
The following areas of Application Insights can be helpful when evaluating the behavior, performance, and errors in your functions:
Live Metrics: View metrics data as it's created in near real-time.

Failures -

Performance -

Metrics -
Reference:
https://docs.microsoft.com/en-us/azure/azure-functions/functions-monitoring

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
Deep007
Highly Voted 4 years, 3 months ago
Given answer is correct. Live Metrics Stream: when your function app is connected to Application Insights, you can view log data and other metrics in near real time in the Azure portal using Live Metrics Stream. Open below link for this statement. https://docs.microsoft.com/en-us/azure/azure-functions/functions-monitoring
upvoted 33 times
satyadharma
3 years, 6 months ago
not a good option :- "If you enable Applications Insights during development, you might hit this limit during testing. Azure provides portal and email notifications when you're approaching your daily limit. If you miss those alerts and hit the limit, new logs won't appear in Application Insights queries. Be aware of the limit to avoid unnecessary troubleshooting time "
upvoted 3 times
...
...
27close
Highly Voted 4 years, 5 months ago
Live Metrics Stream: when your function app is connected to Application Insights, you can view log data and other metrics in near real time in the Azure portal using Live Metrics Stream. Use this method when monitoring functions running on multiple-instances or on Linux in a Consumption plan. This method uses sampled data.. Answer is A https://docs.microsoft.com/en-us/azure/azure-functions/functions-monitoring
upvoted 14 times
...
overhill
Most Recent 5 months ago
Selected Answer: C
by using Microsoft.Extensions.Logging to log locally we: 1) Minimize Storage costs on Azure 2) prevent Application Insights to reach limits 3) We can see the logs locally, we don't need to query anything or go to azure portal
upvoted 1 times
...
overhill
5 months ago
IF you are developing locally then you will log stuff in your local machine. I would go with C) add code to log things locally
upvoted 1 times
Regex37
3 months ago
Question states that you should investigate in development environment which is in Azure. This is written in section 'Function app' of the case study.
upvoted 1 times
...
overhill
5 months ago
Also there is this: "Data storage costs must be minimized." which means that if you can not throw data to azure from logs while you are developing you minimize costs. This adding code to log locally from the Microsoft.Extensions.Logging is the way to go
upvoted 1 times
...
overhill
5 months ago
this is to prevent reaching limits in application insights
upvoted 1 times
...
...
1CY1
10 months ago
Selected Answer: A
Going with A as much because I suspect this is what MS would want as an answer.
upvoted 1 times
...
surprise0011
2 years ago
I believe D is might be an option now also https://learn.microsoft.com/en-us/azure/azure-functions/functions-monitor-log-analytics?tabs=csharp
upvoted 2 times
...
OPT_001122
2 years, 5 months ago
Selected Answer: A
Connect Live Metrics Stream from Application Insights to the Azure Function app and filter the metrics.
upvoted 1 times
...
gmishra88
2 years, 6 months ago
If it is a timeout I might not go check the metrics but of course it depends on what I expect. I might want to see the application logs. But I wonder how can one question be so confusing and totally dependent on the person checking the issue and his knowledge on the application. It totally depends, Microsoft
upvoted 2 times
gmishra88
2 years, 6 months ago
It has to be about Metrics because that is mentioned as one of the first steps in one of the obscure microsoft pages
upvoted 2 times
...
...
ning
3 years, 8 months ago
Should not B happen before A happen? I would think correct answer is B then A ... If there is no log analytics, nor application insights connected, how can live stream happens?
upvoted 4 times
DefaultName2
3 years, 5 months ago
Current environment: “The solution uses Application Insights, Azure Monitor, and Azure Key Vault.” A is correct
upvoted 1 times
...
...
Zidimirite
4 years ago
I thought: Why not B? But then realised it is in a development environment and those generally don't log to AppInsights. So A is indeed correct.
upvoted 3 times
ning
3 years, 8 months ago
"when your function app is connected to Application Insights, you can view log data and other metrics in near real time in the Azure portal using Live Metrics Stream. " If there are no application insights, there cannot be any Live Steaming for A
upvoted 1 times
...
hstml
3 years, 7 months ago
Why do they not log to AppInsights in a development environment? https://docs.microsoft.com/en-us/azure/azure-functions/functions-monitoring
upvoted 3 times
...
...
idrisfl
4 years, 1 month ago
The question specifically says "in a development environment". Live Metrics Stream is recommended for production applications. I would go for D. https://docs.microsoft.com/en-us/azure/azure-monitor/app/live-stream
upvoted 6 times
...
rajwit
4 years, 3 months ago
shouldn't be D as mentioned in Issues section it's 400 error https://docs.microsoft.com/en-us/azure/azure-functions/functions-diagnostics
upvoted 5 times
...
[Removed]
4 years, 3 months ago
I think the answer should be (D) - Add new diagnostics settings. https://docs.microsoft.com/en-us/azure/azure-functions/functions-monitor-log-analytics?tabs=csharp "From the Monitoring section of your function app in the Azure portal, select Diagnostic settings, and then select Add diagnostic setting." Live Metrics is used for monitoring a live system and should not be necessary in a development environment, because there are not that many events to use the "big canon". https://docs.microsoft.com/en-us/azure/azure-monitor/app/live-stream
upvoted 12 times
Deep007
4 years, 3 months ago
Streaming Logs While developing an application, you often want to see what's being written to the logs in near real time when running in Azure. There are two ways to view a stream of the log data being generated by your function executions. Built-in log streaming: the App Service platform lets you view a stream of your application log files. This stream is equivalent to the output seen when you debug your functions during local development and when you use the Test tab in the portal. All log-based information is displayed. For more information, see Stream logs. This streaming method supports only a single instance, and can't be used with an app running on Linux in a Consumption plan. Live Metrics Stream: when your function app is connected to Application Insights, you can view log data and other metrics in near real time in the Azure portal using Live Metrics Stream. Use this method when monitoring functions running on multiple-instances or on Linux in a Consumption plan. This method uses sampled data. https://docs.microsoft.com/en-us/azure/azure-functions/functions-monitoring
upvoted 4 times
...
...
JVTM
4 years, 5 months ago
I do not understand the explanation: CONNECT Live Metrics Stream from Application Insights TO THE AZURE FUNCTION app and filter the metrics... Functions have InSights integrated by default. I presume, I should check collected data somehow. But not connect anything... ?
upvoted 5 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