3

I want to monitor a running instance of an Azure Durable Orchestrator Function for changes (like when it completes, fails etc)

I know that I can poll the status API for changes, but i was wondering if there were any push-based functionality. I've looked into the source code but I can't seem to find any clues to extension points, interfaces etc that enables this.

Any ideas on how to achieve this?

Thanks!

1
  • I dont think so, have not seen it documented or used anywhere. Table Storage sadly is not supported as a function trigger so don't see a way without continiously pooling the status.
    – Bjorne
    Feb 15, 2021 at 11:53

1 Answer 1

1
+50

Right now, publishing orchestration lifecycle events (such as created, completed, and failed) is limited to a custom Azure Event Grid Topic. This feature is currently in preview. Refer Durable Functions publishing to Azure Event Grid (preview).

Durable Functions 2.x

Add a notifications section to the durableTask property of the file, replacing <topic_name> with the name you chose. If the durableTask or extensions properties don't exist, create them like this example:

{
  "version": "2.0",
  "extensions": {
    "durableTask": {
      "notifications": {
        "eventGrid": {
          "topicEndpoint": "https://<topic_name>.westus2-1.eventgrid.azure.net/api/events",
          "keySettingName": "EventGridKey"
        }
      }
    }
  }
}

Event Schema

The following list explains the lifecycle events schema:

  • id: Unique identifier for the Event Grid event.
  • subject: Path to the event subject. durable/orchestrator/{orchestrationRuntimeStatus}. {orchestrationRuntimeStatus} will be Running, Completed, Failed, and Terminated.
  • data: Durable Functions Specific Parameters.
    • hubName: TaskHub name.
    • functionName: Orchestrator function name.
    • instanceId: Durable Functions instanceId.
    • reason: Additional data associated with the tracking event. For more information, see Diagnostics in Durable Functions (Azure Functions)
    • runtimeStatus: Orchestration Runtime Status. Running, Completed, Failed, Canceled.
  • eventType: "orchestratorEvent"
  • eventTime: Event time (UTC).
  • dataVersion: Version of the lifecycle event schema.
  • metadataVersion: Version of the metadata.
  • topic: Event grid topic resource.
1
  • Thank you for the link. I'm testing it out now and it looks promising. Feb 22, 2021 at 15:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.