Expand OpenTelemetry tracing test coverage for Azure Storage - #1400
Open
Varshitha Bachu (bachuv) wants to merge 1 commit into
Open
Expand OpenTelemetry tracing test coverage for Azure Storage#1400Varshitha Bachu (bachuv) wants to merge 1 commit into
Varshitha Bachu (bachuv) wants to merge 1 commit into
Conversation
Copilot started reviewing on behalf of
Varshitha Bachu (bachuv)
September 10, 2026 15:50
View session
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new restart test’s cleanup is not guaranteed if CreateAsync() throws and it doesn’t dispose IDisposable service/worker instances, which can lead to leaked resources and test flakiness over time.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds new Azure Storage integration tests to validate OpenTelemetry trace-context propagation and span parenting behavior across service restarts, activity retries, and sub-orchestrations (no production code changes).
Changes:
- Add a restart-focused test that injects a foreign W3C
traceparent/tracestateand validates it survives persistence and hub restart. - Add retry-focused test coverage to ensure each activity retry attempt produces distinct spans and error status is applied correctly.
- Add sub-orchestration span-linking assertions to validate expected parent/child span relationships and instance-id tagging.
File summaries
| File | Description |
|---|---|
| test/DurableTask.AzureStorage.Tests/AzureStorageScenarioTests.cs | Adds three OpenTelemetry-focused Azure Storage integration tests plus small helper utilities and new orchestration/activity test types. |
Review details
Suppressed comments (1)
test/DurableTask.AzureStorage.Tests/AzureStorageScenarioTests.cs:4229
AzureStorageOrchestrationServiceimplementsIDisposable, but neither the pre-restart nor post-restart service instances are disposed. Disposing both service objects in thefinallyblock reduces resource leakage (e.g., session manager resources) across the test suite.
if (serviceAfterRestart != null)
- Files reviewed: 1/1 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+4146
to
+4149
| await serviceBeforeRestart.CreateAsync(); | ||
|
|
||
| try | ||
| { |
Comment on lines
+4224
to
+4228
| if (worker != null) | ||
| { | ||
| await worker.StopAsync(); | ||
| } | ||
|
|
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.
Summary
Adds Azure Storage integration tests for OpenTelemetry context propagation across persistence, activity retries, and sub-orchestrations.
These tests protect the Durable Task tracing behavior required by language SDKs that activate the runtime-provided trace context. Production code is unchanged.
Details
tracestatesurvive storage persistence and a task-hub service restart.Validation
The following tests pass against dedicated Docker Azurite storage:
OpenTelemetry_ForeignParentSurvivesStorageRestartOpenTelemetry_ActivityRetryCreatesDistinctAttemptSpansOpenTelemetry_SubOrchestrationLinksClientAndServerSpans