Introduction
- This is a series of articles to get our hands dirty with Durable Functions and their patterns in detail.
- Please refer to my previous article to understand the basics of durable functions.
- In this article, we would cover the pattern Monitoring patterns.
It will cover the following things,
- Application Patterns
- Pre-requisites
- What is a Monitoring pattern?
- Hands-on Lab – Create durable function using Monitoring pattern in C#
- Hands-on Lab – Deploy a durable function using Monitoring pattern on Azure
Application patterns
The following application patterns can benefit from Durable Functions:
- Chaining
- Fan-out/fan-in
- Async HTTP APIs
- Monitoring(COVERED in this article)
- Human interaction
- Aggregator (stateful entities)
Pre-requisites
These are pre-requisites to start working on durable functions
- An Azure pay-as-you-go account enabled
- Install Visual Studio 2019
- Install Azure Storage Emulator
What is a Monitoring pattern?
- The monitor pattern refers to a flexible, recurring process in a workflow. An example is polling until specific conditions are met.
- You can use a regular timer trigger to address a basic scenario, such as a periodic cleanup job, but its interval is static and managing instance lifetimes becomes complex.
- You can use Durable Functions to create flexible recurrence intervals, manage task lifetimes, and create multiple monitor processes from a single orchestration.
Hands-on Lab – Create durable function using Monitoring pattern in C#
Steps to be followed,
Open VS 2019 and create a project.
Choose the Azure function template and create a directory.

Choose durable functions orchestration template.

Once the application has been created, we would see three functions,
- MonitorJobStatus – Main functionality function which internally calls GetJobStatus and SendAlert in case job Status is completed
- GetJobStatus – Intermediate function gets called from MonitorJobStatus which return the status of the job, in our case, it completed only
- SendAlert– Intermediate function gets called from MonitorJobStatus which return the alert message in case job status is completed










Join the conversation! Your thoughts help the community grow.