Exam AZ-204 All QuestionsBrowse all questions from this exam
Question 366

You need to investigate the Azure Function app error message in the development environment.

What should you do?

    Correct Answer: D

    To investigate an Azure Function app error message in the development environment, adding a new diagnostic setting to the Azure Function app to send logs to Log Analytics is the correct approach. This allows comprehensive logging and monitoring, which includes both live and historical data, and provides a robust mechanism for error diagnostics in development. Live Metrics Stream is more suited for production environments where real-time monitoring of multiple instances is needed.

Discussion
Deep007Option: A

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

satyadharma

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 "

27closeOption: A

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

[Removed]Option: D

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

Deep007

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

idrisflOption: D

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

rajwitOption: C

shouldn't be D as mentioned in Issues section it's 400 error https://docs.microsoft.com/en-us/azure/azure-functions/functions-diagnostics

JVTMOption: A

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... ?

ningOption: B

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?

DefaultName2

Current environment: “The solution uses Application Insights, Azure Monitor, and Azure Key Vault.” A is correct

ZidimiriteOption: A

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.

ning

"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

hstml

Why do they not log to AppInsights in a development environment? https://docs.microsoft.com/en-us/azure/azure-functions/functions-monitoring

gmishra88

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

gmishra88

It has to be about Metrics because that is mentioned as one of the first steps in one of the obscure microsoft pages

1CY1Option: A

Going with A as much because I suspect this is what MS would want as an answer.

surprise0011Option: D

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

OPT_001122Option: A

Connect Live Metrics Stream from Application Insights to the Azure Function app and filter the metrics.