Repository navigation
Fix tracing follow-ups: entity handler provider, DTS client converter precedence, lazy ack index #204
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
andystaples
wants to merge
1
commit into
main
Choose a base branch
from
andystaples-tracing-post-merge-fixes
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
Fix tracing follow-ups: entity handler provider, DTS client converter precedence, lazy ack index #204
Changes from all commits
Commits
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
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
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 |
|---|---|---|
|
|
@@ -86,7 +86,7 @@ As a result: | |
| - A running, suspended, or never-completing orchestration has no exported | ||
| orchestration span yet. Its exported children can appear under a parent that | ||
| your backend doesn't show until the orchestration completes. If the | ||
| orchestration is purged or abandoned first, the parent never appears. | ||
| orchestration is purged before it completes, the parent never appears. | ||
| - If tracing is enabled while an orchestration is already running, its span | ||
| starts at the first traced dispatch. | ||
| - The JavaScript SDK works differently. It emits one SERVER span per dispatch. | ||
|
|
@@ -100,7 +100,7 @@ omitted when the task is unversioned. Entity names are lowercase, as in | |
| | Operation | Span name | Kind and parent | | ||
| | --- | --- | --- | | ||
| | Client schedules orchestration | `create_orchestration:<name>` | PRODUCER under caller | | ||
| | Orchestration execution | `orchestration:<name>` | SERVER under create span, or under the propagated caller context when client tracing is off; trace root without caller context | | ||
| | Orchestration execution | `orchestration:<name>` | SERVER under create span, or under the propagated caller context when client tracing is off; trace root without a propagated parent trace context | | ||
| | Activity scheduling | `activity:<name>` | CLIENT under orchestration | | ||
| | Activity execution | `activity:<name>` | SERVER under scheduling span; active in `ActivityContext.Context()` | | ||
| | Sub-orchestration scheduling | `orchestration:<child>` | CLIENT under parent orchestration | | ||
|
|
@@ -133,7 +133,9 @@ When each kind of span is exported: | |
| They use the operation result's timestamps. | ||
| `EntityContext.Context()` carries the operation's span context as a | ||
| non-recording span, so application spans that you start from it nest under | ||
| the operation span. | ||
| the operation span. That span reports the worker's tracer provider, so | ||
| instrumentation such as `otelhttp` that finds its provider from the context | ||
| also records children. | ||
|
|
||
| Replayed history emits no new spans. Orchestration spans aren't live inside the | ||
| orchestrator. An application span that you start from orchestrator code isn't | ||
|
|
@@ -155,9 +157,11 @@ names and kinds: | |
|
|
||
| Failures get an error status. Successful spans leave the status unset. | ||
|
|
||
| Without caller context, an orchestration becomes the root of a new trace. Its | ||
| trace ID is derived from the orchestration's persisted identity, not from the | ||
| base ID generator. With the default parent-based sampler, sampling follows the | ||
| Without a propagated parent trace context, an orchestration becomes the root of | ||
| a new trace. Its trace ID is derived from the orchestration's persisted | ||
| identity, not from the base ID generator. With client tracing enabled, the | ||
| `create_orchestration` span is always propagated as the parent, even when the | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we replace |
||
| caller has no active span. With the default parent-based sampler, sampling follows the | ||
| propagated trace flags and keeps tracestate, so unsampled orchestration trees | ||
| stay unsampled. Custom base samplers also control child-span decisions; use | ||
| `sdktrace.ParentBased(sdktrace.TraceIDRatioBased(ratio))` for ratio sampling that | ||
|
|
@@ -182,7 +186,7 @@ and [durabletask-js](https://github.com/microsoft/durabletask-js) | |
| | Instrumentation scope | `Microsoft.DurableTask` | `Microsoft.DurableTask` | `durabletask` | `Microsoft.DurableTask` | | ||
| | Client create orchestration and raise event | PRODUCER | PRODUCER | PRODUCER | PRODUCER | | ||
| | Orchestration span | One logical SERVER span per execution, with persisted ID and start time | One logical SERVER span per execution, with persisted ID and start time | One logical SERVER span per execution, with persisted ID and start time | One SERVER span per dispatch that starts at the dispatch, with `durabletask.task.replay_span_id` and `replay_start_time` attributes | | ||
| | Orchestration without caller context | New root trace | No orchestration span | New root trace | Uses the active context, or a new root trace if there isn't one | | ||
| | Orchestration without a propagated parent trace context | New root trace | No orchestration span | New root trace | Uses the active context, or a new root trace if there isn't one | | ||
| | Export timing | After the backend accepts the completion | Before the completion is accepted | Before the completion is accepted | Before the completion is accepted | | ||
| | Activity and sub-orchestration scheduling and execution | CLIENT and SERVER | CLIENT and SERVER | CLIENT and SERVER | CLIENT and SERVER. The CLIENT span doesn't reuse the propagated span ID, so the SERVER span's parent is never exported | | ||
| | Durable timers | `orchestration:<name>:timer` INTERNAL | `orchestration:<name>:timer` INTERNAL | `orchestration:<name>:timer` INTERNAL | `orchestration:<name>:timer` INTERNAL | | ||
|
|
||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This now stores a full record for every replayed entity signal until replay consumes its ack. Previously, signals with an ack already in the request skipped this record. In an isolated tracing benchmark with 10,000 fully acknowledged signals, replay rose from 2.6 to 4.2 ms and from 1.31 to 3.67 MB per dispatch. Can we keep the cheaper event-send path without paying for a full record per replayed entity signal, for example by tracking only the minimal replay state until an action survives into the response?