Triggers by errors



  • 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);
}
click below button to copy the code. By azure tutorial team
  • It's specially useful for centralizing error handling.
  • ErrorTrigger requires an additional setting on the JobHostConfiguration:
config.UseCore();
click below button to copy the code. By azure tutorial team
  • You also must install the NuGet package Microsoft.Azure.WebJobs.Extensions.

Related Searches to Triggers by errors