Bridge Azure Durable Functions host OTel activities to Datadog spans - #8938
Draft
chemystery09 wants to merge 3 commits into
Draft
Bridge Azure Durable Functions host OTel activities to Datadog spans#8938chemystery09 wants to merge 3 commits into
chemystery09 wants to merge 3 commits into
Conversation
Subscribe to the WebJobs.Extensions.DurableTask ActivitySource emitted by the Functions host when Distributed Tracing V2 is enabled, and map host-side orchestration and related durable task spans into Datadog with serverless semantics. Complements worker-side trace context propagation in dd-trace-js. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
V2 durable tracing emits orchestration execution spans from the Microsoft.DurableTask source, not only WebJobs.Extensions.DurableTask. Co-authored-by: Cursor <cursoragent@cursor.com>
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
DurableTaskActivityHandlerthat subscribes to theWebJobs.Extensions.DurableTaskActivitySourceemitted by the Azure Functions host when Distributed Tracing V2 is enabled inhost.json.span.type=serverlessanddurabletask.*tags preserved.Motivation
Orchestration spans are emitted by the .NET Functions host (Durable extension), not by language workers. Application Insights already receives these spans when V2 tracing is enabled; this change bridges the same host
Activityevents into Datadog via the existing OTelActivityListenerinfrastructure (QuartzActivityHandler,AzureServiceBusActivityHandler, etc.).Related internal tracking: SVLS-7644 / APMSVLS-332.
Requirements
host.json:{ "extensions": { "durableTask": { "tracing": { "distributedTracingEnabled": true, "version": "V2" } } } }DD_TRACE_OTEL_ENABLED=trueor equivalent).traceContext.Implementation notes
ActivityHandlersRegisterbeforeDefaultActivityHandler.durabletask.task.name+durabletask.typewhen present.activityclient spans may appear alongside worker server spans for the same logical step; deduplication/filtering can be refined in a follow-up.Test plan
ActivityKind→ span kind mappinghost.json(follow-up)Made with Cursor