Azure Logic App Workflow Runtime - azure

Having difficulty getting diagnostic details out of my logic app. I have enabled the diagnostics, bit the event hub and log analytics for work flow runtime. But at this time I'm not seeing anything coming out. I have also checked the diagnostic logs table and nothing. this is a very basic POC logic app.
Do I need to do anything else.

You can set up the log analytics(OMS) workspace in azure and link it with the logic app. For the existing logic apps, we can add this via diagnostics settings under monitoring.

Related

Azure App Service File And Configuration Change Monitoring

As part of our production environment we have several App Services running inside of Azure. I would like to implement notifications to be sent to a specific email address upon file or configuration changes within those App Services. I have tried enabling Application Changes for the service but it does not appear to provide the capability to set up alerts on the changes,
I have also tried enabling App Service alerts but it does not appear that any of the test configuration changes that I have made were captured by the signal "Apply Web App Configuration".
The last thing that I tried was to enable Diagnostic Settings to capture AppServicePlatformLogs and AppServiceFileAuditLogs and stream them to an Event Hub, however, I cannot determine how to set up the email notification from the hub for the events.
I am hoping that there may be an easier way to set this up and was hoping that someone may have some pointers or resources that I can follow.
I was able to accomplish this under "Monitoring" -> "Alerts". A more detailed walkthrough can be found here https://perituza.com/blog/azure-app-service-monitoring-and-alerts/. The key was selecting "Activity Log - Administrative" as the Monitor Service in the Condition.

Azure diagnotics settings (preview)

Im new to Azure. I have an App service that has Application Insight enabled. Im trying now to understand what Diagnotics Settings is and what it can be used for.
It seems like most of what Diagnotics Settings does can be done through Application Insights.
Is this correct or am I misunderstanding the purpose behind Diagnotics Settings?
There are some (major) differences. From the docs:
Platform logs in Azure, including the Azure Activity log and resource logs, provide detailed diagnostic and auditing information for Azure resources and the Azure platform they depend on. Platform metrics are collected by default and typically stored in the Azure Monitor metrics database.
Now, when we are talking about auditing information and activity logs, that is something that Application Insights (AI) cannot do. Also, AI is geared towards applications whereas Diagnostics Settings is used to emit information about azure platform resources. AI allows you to send custom telemetry and also can track a lot more detailed information.
I assume you ask this question in the context of an Azure Web App or Azure Function. I'd recommend to enable both. AI has a lot more to offer than Diagnostics Settings when it comes to detailed information about how your application is behaving.

Error setting up Azure Function within Azure Resource under Log Analytics Workspace

I have error setting up Azure Function within Azure Resource under Log Analytics Workspace.
When only AllMetrics is checked, it works. But whenever FunctionExecutionLogs is checked, error occurs like below:
1.Nav to your log analytics workspace in azure portal.
2.in the left blade, select Workspace Data Sources -> Azure Resources, then click your azure function there.
Check FunctionExecutionLogs and error occurs.
Any idea?
Setup data used by Azure Log Analytics with Azure Fucntions
Update
We would like to understand more on Application InSights and Log Analytics, and use the best tool for us.
'FunctionExecutionLogs' for azure function/web app in azure log analytics will not be supported any more.
So application insights is a better choice for monitoring azure function.
The following is the feedback from MS log analytics team:
Several months ago, App Service/Functions team on-boarded to Azure Monitor diagnostic logs but they don't actually emit log data.
Basically there are thousands of diagnostic setting registrations which are no-ops and don't actually do anything.
Recently in the past few weeks, we've been in discussion with App Service to release this feature in the next few weeks as a private preview feature.
This unfortunately is a breaking change as only private preview customers can turn on diagnostic logs for App Service.
Please note -- There is no actual customer impact as whatever customers turned on previously never worked to begin with.
To fix the deployment script, we should ask customers to update their template to only turn on metric export and not logs --- this won't have any actual customer impact.
So, from our Log Analytics side, this is a scenario we are not support from our Log Analytics team which has declared by our Production Group any more.
I would recommend using Application insight with Azure Functions. Application insights has deeper integration with Azure Functions and is the recommended way of setting up Analytics for your app. Is there a specific reason you want to setup through Log Analytics instead of Application Insights?
Now, almost 2 years later, Classic Application Insights is deprecated (apparently it will be retired around Feb '24). The recommended way to set this up is to
Create a log analytics workspace
Create an application insights resource that has it's workspace id set to the LA workspace created in the previous step
Your functions will still be configured to log to app insights but that has its datastorage now backed by the LA workspace instead of bringing its own.
You can migrate existing app insights to link to a LA workspace - apparently this migration is not reversible but it should be transparent from your function point of view (i.e. the app insights connection doesn't change). Details can be found here: https://learn.microsoft.com/en-nz/azure/azure-monitor/app/convert-classic-resource

Logging from an azure console app as a web job

I am in search for a good way to log various messages while being able to use functions, logic, monitoring, etc to get notified or run a certain task to fix a problem and notify someone.
What I have in mind is something like "If a specific error happens send me a notification or restart a service"
What I currently already have is an app service that holds 10 web jobs(continuous, triggered). Two of them use the Azure Web job SDK and the rest of them are plain .net core console apps. All of them generate structured logs using serilog and are saved to blob storage.
Is there something I am missing? I don't want to reinvent the wheel here.
You can use application insights with webjobs, more details are here.
You can also set an alert in application insights if error occurs, refer to this doc.
Any more questions please let me know.

AzureWebApp: Monitor Application Logs

I'm building an Azure web-app and if there are certain unexpected errors, I want to be able to bubble it up in the Azure Dashboard / add alerts.
Any System.Diagnostics.Trace.TraceError() messages are logged to the ApplicationLog. Is there a way to add alert/monitoring-graphs for these in Azure Portal?
I think and most flexible option for configuring alerts on Web Apps is enabling the Application insights have the App Insight be one of your event sources:
https://azure.microsoft.com/en-us/documentation/articles/app-insights-search-diagnostic-logs/
Once you have the Application Insight setup then you can easily set any kind of alerts based on the diagnostics that are collected:
https://azure.microsoft.com/en-gb/documentation/articles/app-insights-alerts/
Aram's links below really helps. Please read them.
To Get this working:
Add the ApplicationInsights to your project.
(Optional) If you want log traces (System.Diagnostics.Trace) to be searchable on insights, add Microsoft.ApplicationInsights.TraceListener nuget to your project.
Use telemetryClient.TrackException() to place a server exception
when you hit a critical error.
Add an alert on Azure portal to check for ServerExceptions within the given time window.

Resources