Error handling is extremely important, we can define functions to be triggered when an execution error happens in one of your triggered functions:
//Fires when 10 errors occur in the last 30 minutes (sliding)
public static void ErrorMonitor([ErrorTrigger("0:30:00", 10)] TraceFilter filter)
{
// get the last 5 errors
filter.GetDetailedMessage(10);
}
It's specially useful for centralizing error handling.
ErrorTrigger requires an additional setting on the JobHostConfiguration:
config.UseCore();
You also must install the NuGet package Microsoft.Azure.WebJobs.Extensions.