2
votes

I have a function app in Azure that is currently setup with two seperate functions. I have one function that is doing well, doing exactly what I need it to do but the other function is giving me some trouble. There are some issues I need to be notified of when an exception occurs on that function only.

My current approach was to setup Application Insights for that function app which we did and has been great, I've got a lot more visibility on some of the issues I am experiencing but ideally I would like to get some sort of email notification when an exception occurs on that function. I figured I would need to create some sort of alert rule from the function app but this is the kind of form I'm at,

enter image description here

The problem I'm running into is that I want to have an alert EVERY time an exception occurs on that function and that function alone. But I'm not sure that is possible since there is another function contained within that function app that I don't necessarily want to get alerts about.

Am I approaching this wrong or is this even possible?

1
Do these functions need to be in the same resource group? If not, perhaps the easiest way to do this would be have a resource group and function application with just that function, and set the rule on that resource group?Connor McMahon

1 Answers

2
votes

When looking at the dropdown list for Metric when your function app is selected as the Resource, there should be a metric to monitor with the name {function-name} Failures. This metric should match your needs.

You should find this metric along with {function-name} Count, {function-name} Successes, {function-name} MaxDurationMs, {function-name} MinDurationMs, {function-name} AverageDurationMs, and {function-name} SuccessRate.