Home > Blockchain >  Application Insights Alerts for multiple functions in a Azure Functions application
Application Insights Alerts for multiple functions in a Azure Functions application

Time:07-22

I have an Azure Function (C#) application that has three functions. Each function is subscribed to a different topic in the Azure Service Bus.

I need to set up an alert if any one of the functions is not receiving any messages for 15 minutes, I should receive an email.

Application Insights is only letting me set up the alert for the entire application (functions collectively) and not individually for each function. This won't work because if one function is receiving messages, and the other is not, the alert won't trigger.

In Application Insights, I tried setting the scope of the alert to the individual function but then I don't get the 'Custom log search' and 'Function Execution Count' signal options.

Another option I can think of is to use the TelemetryClient and add separate contexts for each function, and then use 'Custom log search' signal.

If anyone has an idea how to set this up, it would be very help!

CodePudding user response:

The Azure Service Bus topic has Incoming messages metrics and you can create an alert with this metrics.

So you have 3 topics, and you will have 3 alerts, but if you send the logs/metrics to the Azure Log Analytics Workspace service, you can also do it with one alert

  • Related