How to get Azure WebJob continuous call information

A look at the Kudu Azure WebJobs API https://github.com/projectkudu/kudu/wiki/WebJobs-API I see that there are several calls that I can make to control WebJobs programmatically.

There is no call to get information about one call for a continuous webjob. With a call, I mean a one-time execution of a function for a given message.

What I am trying to do is for a message falling into the poison queue to receive a parent call exception message. In a poisonous message, I get the parent call id using json prop $ AzureWebJobsParentId.

I would like to manage the poison queue using a function that sends messages about the details of the error and moves the message to the dead letter queue.

Any idea if this is possible?

+4
source share
3 answers

The Azure WebJobs SDK Core extensions contains a binding for ExecutionContext, which allows you to access specific information about your program. An example showing how to access the Invocation ID function:

public static void ProcessOrder(
    [QueueTrigger("orders")] Order order,
    TextWriter log,
    ExecutionContext context)
{
    log.WriteLine("InvocationId: {0}", context.InvocationId);
}

The call ID is used in Dashboard logs, so access to this software allows you to correlate a call with these logs.

+5
source
+1

WebJobs SDK WebJobs. WebJobs ( "LOGS" ).

, , URL- ( ):

https://<yourapp>.scm.azurewebsites.net/azurejobs/#/functions/invocations/<invocation-id>

.

0

All Articles