Repository navigation
fix: align the OpenTelemetry instrumentation scope with Durable Task SDKs - #372
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The Azure Managed provider changelog is missing migration guidance for updating tracing scope filters from durabletask to Microsoft.DurableTask.
1 open issue
What changed in this PR
Aligns Python Durable Task spans with the shared Microsoft.DurableTask OpenTelemetry instrumentation scope, addressing #369 and simplifying cross-language tracing filters.
Changes:
- Renames the instrumentation scope and documents migration for existing filters.
- Adds scope assertions for regular and deferred spans.
- Updates the Functions tracing test to distinguish host and worker spans by
service.name.
| File | Description |
|---|---|
tests/durabletask/test_tracing.py |
Verifies the scope on regular and deferred spans. |
tests/azure-functions-durable/e2e/test_distributed_tracing_e2e.py |
Uses worker resource identity to detect duplicate lifecycle spans. |
tests/azure-functions-durable/e2e/_harness.py |
Preserves resource metadata on collected spans. |
durabletask/internal/tracing.py |
Sets the scope to Microsoft.DurableTask. |
CHANGELOG.md |
Documents the scope change and filter migration. |
Review effort: Balanced
| - Python SDK spans now use the `Microsoft.DurableTask` OpenTelemetry instrumentation | ||
| scope. Update queries, dashboards, and collector filters that use the previous | ||
| `durabletask` scope. |
There was a problem hiding this comment.
JasonWinters (@richarmurray6y8-creator) agreed, if you could address this, it'd be great, non-blocking though
andystaples
left a comment
There was a problem hiding this comment.
Approving, but not merging until the large and sensitive stack #365 lands. If you could address the changelog, it'd be great, I'll re-approve. Thanks for the PR
| - Python SDK spans now use the `Microsoft.DurableTask` OpenTelemetry instrumentation | ||
| scope. Update queries, dashboards, and collector filters that use the previous | ||
| `durabletask` scope. |
There was a problem hiding this comment.
JasonWinters (@richarmurray6y8-creator) agreed, if you could address this, it'd be great, non-blocking though

Summary
Fixes #369. Python Durable Task spans now use the
Microsoft.DurableTaskinstrumentation scope documented for the portable SDKs. The changelog explains how to update queries and collector filters that match the previousdurabletaskscope.The Azure Functions tracing test distinguishes worker spans using their configured
service.name, so it can still detect duplicate Python lifecycle spans when the host and worker share a scope name.Verification
Microsoft.DurableTaskand the Python worker resource.Serialization compatibility
The change applies to OpenTelemetry scope metadata.