-
Notifications
You must be signed in to change notification settings - Fork 345
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
Adds workflow replay-safe logger #1434
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
…nullability errors Signed-off-by: Whit Waldo <[email protected]>
…o create the ReplaySafeLogger on the WorkflowContext Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
…ation context Signed-off-by: Whit Waldo <[email protected]>
…e in the context made visible to workflow developers Signed-off-by: Whit Waldo <[email protected]>
# Conflicts: # src/Dapr.Workflow/WorkflowServiceCollectionExtensions.cs
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
philliphoff
reviewed
Dec 19, 2024
…to create it off the TaskOrchestrationContext (innerContext) Signed-off-by: Whit Waldo <[email protected]>
philliphoff
approved these changes
Dec 19, 2024
jev-e
pushed a commit
to jev-e/jev-dotnet-sdk
that referenced
this pull request
Dec 26, 2024
* Removed obsolete type Signed-off-by: Whit Waldo <[email protected]> * Added missing using Signed-off-by: Whit Waldo <[email protected]> * Adding interface for IWorkflowContext for replayability concerns Signed-off-by: Whit Waldo <[email protected]> * Removed unused IConfiguration Signed-off-by: Whit Waldo <[email protected]> * Added ReplaySafeLogger type Signed-off-by: Whit Waldo <[email protected]> * Building out functionality to expose ReplayLogger in workflow context Signed-off-by: Whit Waldo <[email protected]> * Added license information to file Signed-off-by: Whit Waldo <[email protected]> * Removed unnecessary file Signed-off-by: Whit Waldo <[email protected]> * Updated copyright header for different project, made some tweaks for nullability errors Signed-off-by: Whit Waldo <[email protected]> * Added virtual methods that use the already-available ILoggerFactory to create the ReplaySafeLogger on the WorkflowContext Signed-off-by: Whit Waldo <[email protected]> * Removed unnecessary registration Signed-off-by: Whit Waldo <[email protected]> * Updated example to demonstrate using ReplaySafeLogger in the orchestration context Signed-off-by: Whit Waldo <[email protected]> * Tweaks on visibility and abstraction so that the methods are available in the context made visible to workflow developers Signed-off-by: Whit Waldo <[email protected]> * Removed obsolete type registrations Signed-off-by: Whit Waldo <[email protected]> * Simplified argument null check Signed-off-by: Whit Waldo <[email protected]> * Removed since-removed code leftover from merge Signed-off-by: Whit Waldo <[email protected]> * Added documentation demonstrating how to access the replay-safe logger Signed-off-by: Whit Waldo <[email protected]> * Removed unnecessary and separate ReplaySafeLogger in favor of method to create it off the TaskOrchestrationContext (innerContext) Signed-off-by: Whit Waldo <[email protected]> --------- Signed-off-by: Whit Waldo <[email protected]>
jev-e
pushed a commit
to jev-e/jev-dotnet-sdk
that referenced
this pull request
Dec 26, 2024
* Removed obsolete type Signed-off-by: Whit Waldo <[email protected]> * Added missing using Signed-off-by: Whit Waldo <[email protected]> * Adding interface for IWorkflowContext for replayability concerns Signed-off-by: Whit Waldo <[email protected]> * Removed unused IConfiguration Signed-off-by: Whit Waldo <[email protected]> * Added ReplaySafeLogger type Signed-off-by: Whit Waldo <[email protected]> * Building out functionality to expose ReplayLogger in workflow context Signed-off-by: Whit Waldo <[email protected]> * Added license information to file Signed-off-by: Whit Waldo <[email protected]> * Removed unnecessary file Signed-off-by: Whit Waldo <[email protected]> * Updated copyright header for different project, made some tweaks for nullability errors Signed-off-by: Whit Waldo <[email protected]> * Added virtual methods that use the already-available ILoggerFactory to create the ReplaySafeLogger on the WorkflowContext Signed-off-by: Whit Waldo <[email protected]> * Removed unnecessary registration Signed-off-by: Whit Waldo <[email protected]> * Updated example to demonstrate using ReplaySafeLogger in the orchestration context Signed-off-by: Whit Waldo <[email protected]> * Tweaks on visibility and abstraction so that the methods are available in the context made visible to workflow developers Signed-off-by: Whit Waldo <[email protected]> * Removed obsolete type registrations Signed-off-by: Whit Waldo <[email protected]> * Simplified argument null check Signed-off-by: Whit Waldo <[email protected]> * Removed since-removed code leftover from merge Signed-off-by: Whit Waldo <[email protected]> * Added documentation demonstrating how to access the replay-safe logger Signed-off-by: Whit Waldo <[email protected]> * Removed unnecessary and separate ReplaySafeLogger in favor of method to create it off the TaskOrchestrationContext (innerContext) Signed-off-by: Whit Waldo <[email protected]> --------- Signed-off-by: Whit Waldo <[email protected]> Signed-off-by: jev <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
By popular demand in Discord and after realizing that a lot of the plumbing was already available in the Durable Task SDK itself, I've implemented the version of the ReplaySafe logger used in that version (as opposed to the version in the Azure Functions Durable Task (https://github.com/Azure/azure-functions-durable-extension/tree/dev/src/WebJobs.Extensions.DurableTask). I made a few tweaks to the visibility on the context itself so conform to how Dapr implements the SDK, but nothing major.
As a result, there's a method available on the
WorkflowContext
forCreateReplaySafeLogger
that will provision anILogger
using the category name or the provided type of the context (provided either as an argument or a generic type) from theILoggerFactory
provisioned within the Durable Task SDK itself and its various registrations.I updated one of the Workflow examples to include the intended usage.
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: