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

Support for experimental workflow task events #113

Merged
merged 2 commits into from
Jul 24, 2023

Conversation

cretz
Copy link
Member

@cretz cretz commented Jul 19, 2023

What was changed

Added experimental WorkflowTaskStarting and WorkflowTaskCompleted events to TemporalWorkerOptions and WorkflowReplayerOptions. These are marked as experimental today and until temporalio/sdk-core#579 is created, this is only working on activations so is knowingly inaccurate.

This has been requested by others wanting to do metering based on task. If this use case becomes prevalent enough we will make a features repo entry for it and will build it elsewhere and remove the experimental label.

@cretz cretz requested a review from a team July 19, 2023 18:21
@@ -36,6 +36,44 @@ public TemporalWorkerOptions()
/// <param name="taskQueue">Task queue for the worker.</param>
public TemporalWorkerOptions(string taskQueue) => TaskQueue = taskQueue;

/// <summary>
/// Event for when a workflow task is starting. This should only be used for very advanced
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it's experimental and we can change it, maybe call it ActivationStarting?

Copy link
Member Author

@cretz cretz Jul 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The goal is task tracking even if the implementation isn't there yet. But I think the experimental API should reflect the goal instead of the current reality. I would have waited on this PR altogether but wanted to let users see the goal early.

@cretz cretz merged commit dee4538 into temporalio:main Jul 24, 2023
@cretz cretz deleted the workflow-task-event branch July 24, 2023 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants