Repository navigation
Document and exercise enabled replay-aware tracing - #193
Draft
andystaples wants to merge 2 commits into
Draft
andystaples wants to merge 2 commits into
andystaples wants to merge 2 commits into
Conversation
andystaples
force-pushed
the
andystaples-tracing-samples-and-e2e
branch
from
November 20, 2026 20:21
e3a5f2a to
320dd7a
Compare
andystaples
marked this pull request as ready for review
November 23, 2026 17:09
andystaples
marked this pull request as draft
November 23, 2026 17:09
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The tracing README incorrectly labels Python entity-operation spans as unimplemented and needs to distinguish Python’s SERVER signal spans from Go/Core’s CONSUMER spans.
1 open issue
What changed in this PR
Completes the replay-aware tracing stack with an enabled OTLP sample, end-to-end coverage, and documentation for application-owned telemetry. Tracing remains opt-in.
Changes:
- Enables client and worker tracing in the sample, with worker shutdown before provider flushing.
- Adds enabled-mode tests for span parentage, independent entity roots, and entity failures.
- Documents span lifecycles, sampling, SDK parity, and delivery limitations.
| File | Description |
|---|---|
tracing/tracing.go |
Adds a package-doc pointer to the tracing guide. |
tracing/README.md |
Adds enablement, span semantics, parity, and limitations guidance. |
tests/tracingtree/tracingtree.go |
Clarifies the default tracing behavior in comments. |
tests/durabletaskscheduler/dts_tracing_tree_test.go |
Updates comments describing disabled-mode assertions. |
tests/durabletaskscheduler/dts_tracing_enabled_test.go |
Adds enabled-mode span-tree and entity tracing coverage. |
samples/distributedtracing/README.md |
Documents enabled tracing and provider lifecycle. |
samples/distributedtracing/distributedtracing.go |
Enables tracing and verifies durable-span collector receipt. |
README.md |
Updates tracing guidance and provider configuration examples. |
Review effort: Balanced
Comment on lines
+105
to
+113
| | Entity signal/call and operation execution | DurableTask.Core PRODUCER/CLIENT and CONSUMER/SERVER | Not implemented | Not implemented | | ||
| | Client entity signal | No span; sampled caller context propagated | None | No span; caller context propagated | | ||
| | Entity lock acquisition/release | No spans | No spans | No spans | | ||
| | Persisted span reconstruction integration | Public SDK ID-generator/sampler wrappers | Deferred spans via OTel SDK internals | `Activity` reconstruction helpers | | ||
|
|
||
| Entity tracing matches the | ||
| [DurableTask.Core reference](https://github.com/Azure/durabletask/tree/main/src/DurableTask.Core/Tracing); | ||
| it is beyond the current Python and .NET gRPC tracing surfaces, not a claim that | ||
| those SDKs emit entity spans. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Document that DTS doesn't emit durable spans, logical versus execution-turn spans, and duplicate-source guidance. Add a durabletask-js column and the enablement, scope, root, export-timing, and status rows to the parity table, and correct the Python and JavaScript entity rows. Reconcile the changelog. Extend the enabled DTS E2E test with the Microsoft.DurableTask scope, unset success status, entity operation and integer task ID attributes, an activity failure, a continue-as-new generation pair, an application span under an entity operation, and a late-duplicate guard. The sample now uses a default resource, checks span kinds on receipt, and points readers at OTLP backends. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
andystaples
force-pushed
the
andystaples-tracing-samples-and-e2e
branch
from
November 23, 2026 20:08
320dd7a to
d76c179
Compare
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
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.

Stacked on #192. Resolves #175.
Summary
Completes the opt-in, replay-aware tracing stack with documentation, an enabled-mode sample, and end-to-end coverage. Durable Task Scheduler persists and forwards trace context but doesn't emit durable orchestration, activity, timer, sub-orchestration, or entity spans, or export spans to an application's backend. SDK tracing is the supported way to get those spans into any OpenTelemetry-compatible backend, next to the application's own spans.
tracing/README.md,tracingpackage docs, root README):tracing.ErrUnsupportedTracerProvider), and shutdown order (worker, client, then provider).orchestration:<name>SERVER span per execution (per continue-as-new generation), from the first traced dispatch to completion. Dispatches and replays emit no span. A running, suspended, or never-completing orchestration has no exported orchestration span yet, so its exported children can appear under a parent that the backend doesn't show until completion.client.WithWorkerTracerProviderandclient.WithTracerProviderkeeps the SDK silent. SDK spans use theMicrosoft.DurableTaskscope and the provider's resource.samples/distributedtracing): passes one provider toclient.WithWorkerTracerProviderandclient.WithTracerProvider, builds the resource withresource.New(service name, environment, telemetry SDK), and exports over OTLP/HTTP to a collector. It verifies that the collector received the caller, create-orchestration, orchestration, activity CLIENT and SERVER, timer, and application HTTP spans with their expected kinds. The README explains how to forward the collector to Jaeger, Azure Monitor, or another OTLP backend.tests/durabletaskscheduler/dts_tracing_enabled_test.go): uses an explicit provider and an in-memory exporter, without changing the global provider, and asserts the exact exported span set, with a guard against late duplicates:create_orchestrationPRODUCER →orchestrationSERVER → sub-orchestration and activity CLIENT/SERVER; timer INTERNAL; clientRaiseEventand orchestratorSendEventPRODUCER spans. All SDK spans use theMicrosoft.DurableTaskscope.durabletask.task.status=Failedon the SERVER span, and the calling orchestration's instance ID and an integer task ID.durabletask.task.operationanddurabletask.entity.operation, and successful operations leave the status unset. An application span started fromEntityContext.Context()nests under its operation span. ClientSignalEntityemits no span.dts_tracing_tree_test.gostill assert propagation without SDK spans.Parity
ActivitySource(needs a listener)emit_trace_spans=False@opentelemetry/apiMicrosoft.DurableTaskMicrosoft.DurableTaskdurabletaskMicrosoft.DurableTaskcall_entity/signal_entity, clientsignal_entity,entity:lock_requestActivity and sub-orchestration CLIENT/SERVER spans, timer INTERNAL spans, and create-orchestration, raise-event, and send-event PRODUCER spans exist in all four SDKs. No SDK emits an event-receipt CONSUMER span.
Limitations
SignalEntityemits no span and propagates only a sampled caller context, like the .NET gRPC SDK.The DTS tests run in PR validation through
DTS_EMULATOR_ENDPOINTand skip when no DTS target is configured. Tracing stays opt-in.