Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content Request: Durable Functions in C# with .NET 8.0 Isolated Worker Process model #526

Open
springcomp opened this issue Dec 12, 2024 · 1 comment
Labels
content 📝 Request for additional content

Comments

@springcomp
Copy link
Contributor

springcomp commented Dec 12, 2024

📝 Lesson Description

Hello @marcduiker I have material to author a lesson around Durable Functions in C#, aligned with the new Isolated Worker Process model in .NET 8.0

This can demonstrate:

  • Triggering Azure Orchestrations (returning "management" endpoints for live debugging of asynchronous workflows)
  • Monitoring long-running operations (aka "Monitoring" pattern)
  • Calling activities
  • Logging in orchestration using replay-safe loggers.
  • Logging using W3C Trace Context (not working out of the box so need special consideration demonstrated in the lesson)

Is this interesting ?

Rough outline

Nr Exercise Description
0 Prerequisites -
1 Creating a function app Initial do-nothing HttpTrigger function
2 Durable Functions: function chaining Scheduling a basic orchestration with two function calls. For instance:
  • Function start-long-running-operation-activity starts a long running asynchronous operation and returns an Operation Identifier token.
  • Function get-long-running-operation-status-activity accepts an Operation Identifier token and returns the current state of the long running asynchronous operation.
3 Durable Functions: management endpoints It is possible to use HTTP rest management endpoints to request the status of asynchronous workflows. This is especially useful when debugging. This exercise demonstrates tracking the status of an asynchronous workflow using HTTP requests. It also includes an HttpTrigger function that returns the management endpoints on-demand at any time for long running operations.
4 Monitoring Long Running Tasks The workflow is updated to monitor the long running operation by repeatedly calling the get-long-running-operation-status-activity activity. This repeats until either the long running operation completes − with a success or a failure − or a a configurable timeout has been exceeded.
5 Monitoring Durable Functions By default, Application Insights can show the span of orchestrations and activities using open telemetry. This exercise adds very basic integration with Application Insights to show the open telemetry capabilities of the Transaction Seach page.
6 Supporting Distributed Tracing Although Application Insights takes advantage of open telemetry to show the relationship and durations of orchestrations and activities, the W3C TraceId property is not flowing correctly out-of-the-box from the function trigger to the orchestration, nor from the orchestration to each activity. This exercise adds very minimal code to workaround this limitation so that distributed logging can be done.
7 Cleaning up past-due execution history Durable Functions persist the state of the orchestrations and activities in table storage by default. To prevent that storage from growing in an unbounded manner, a good practice is to use a TimerTrigger and periodically cleanup past-due history from storage. This exercise also includes an on-demand HTTP endpoint to cleanup the execution history for debugging purposes.

✍ Authoring of the lesson - Writing

Yes I can

👩‍🏫 Authoring of the lesson - Presenting

Yes

@springcomp springcomp added the content 📝 Request for additional content label Dec 12, 2024
@springcomp
Copy link
Contributor Author

springcomp commented Dec 12, 2024

I understand there is a pending lesson around netcoreapp 3.1.
I’m not sure why this lesson was never merged.

I just want to make sure we are not duplicating efforts here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content 📝 Request for additional content
Projects
None yet
Development

No branches or pull requests

1 participant