-
Notifications
You must be signed in to change notification settings - Fork 326
Add ContinueAsNew fresh-trace support for periodic orchestrations #1337
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
Open
chandramouleswaran
wants to merge
12
commits into
Azure:main
Choose a base branch
from
chandramouleswaran:feature/continue-as-new-fresh-trace
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
3216b55
Merge pull request #1 from Azure/main
chandramouleswaran c9c9684
Add ContinueAsNew fresh-trace support for periodic orchestrations
chandramouleswaran 718c560
Fix ContinueAsNew(object) to delegate through virtual overload
chandramouleswaran 29ddef8
Preserve backward compat for legacy CreateTraceForNewOrchestration tag
chandramouleswaran 26d5d37
Address Copilot review: signal consumption order, comment, comparer
chandramouleswaran 20cd4c9
Cache default ContinueAsNewOptions to avoid per-call allocation
chandramouleswaran 0e54bb3
Fix PR review feedback for fresh traces
chandramouleswaran 48e7117
Fix net48 build: remove StringComparison overload of string.Replace
chandramouleswaran 8b8e3c9
Merge branch 'main' into feature/continue-as-new-fresh-trace
chandramouleswaran aee4484
Merge branch 'main' into feature/continue-as-new-fresh-trace
chandramouleswaran 615bea2
Merge branch 'main' into feature/continue-as-new-fresh-trace
chandramouleswaran 9ec6389
Address fresh trace PR feedback
chandramouleswaran File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
486 changes: 486 additions & 0 deletions
486
Test/DurableTask.Core.Tests/ContinueAsNewTraceBehaviorTests.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| // ---------------------------------------------------------------------------------- | ||
| // Copyright Microsoft Corporation | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
| // ---------------------------------------------------------------------------------- | ||
| #nullable enable | ||
| namespace DurableTask.Core | ||
| { | ||
| /// <summary> | ||
| /// Configures how an orchestration continues as new. | ||
| /// </summary> | ||
| public sealed class ContinueAsNewOptions | ||
| { | ||
| /// <summary> | ||
| /// Gets or sets how distributed tracing should behave for the next generation. | ||
| /// The default is <see cref="ContinueAsNewTraceBehavior.PreserveTraceContext"/>, | ||
| /// which keeps the next generation in the same distributed trace. | ||
| /// </summary> | ||
| public ContinueAsNewTraceBehavior TraceBehavior { get; set; } = | ||
| ContinueAsNewTraceBehavior.PreserveTraceContext; | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Describes how distributed tracing should behave for the next <c>ContinueAsNew</c> generation. | ||
| /// </summary> | ||
| public enum ContinueAsNewTraceBehavior | ||
| { | ||
| /// <summary> | ||
| /// Preserve the current trace lineage across generations. This is the default. | ||
| /// </summary> | ||
| PreserveTraceContext = 0, | ||
|
|
||
| /// <summary> | ||
| /// Start the next generation in a fresh distributed trace. Useful for long-running | ||
| /// periodic orchestrations where each cycle should be independently observable. | ||
| /// </summary> | ||
| StartNewTrace = 1, | ||
| } | ||
| } |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.