feat(azure-functions): instrument Durable Functions orchestration triggers - #9594
Conversation
…ggers Orchestrators register through app.generic rather than the durable-functions activity/entity APIs, so wrap that path and emit Orchestration spans on the existing durable-functions channel. Skip replaying invocations to avoid duplicate spans. Co-authored-by: Cursor <cursoragent@cursor.com>
Overall package sizeSelf size: 7.57 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.3.2 | 124.41 kB | 440.65 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
🎉 All green!🧪 All tests passed 🔄 Datadog retried 1 test - 1 passed on retry 🎯 Code Coverage (details) 🔗 Commit SHA: 2a0a8f3 | Docs | Datadog PR Page | Give us feedback! |
Tighten comments and add unit tests for app.generic orchestration wrapping, replay skipping, and Orchestration span naming/propagation. Co-authored-by: Cursor <cursoragent@cursor.com>
BenchmarksBenchmark execution time: 2026-07-29 22:30:40 Comparing candidate commit 2a0a8f3 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 2318 metrics, 40 unstable metrics.
|
The orchestration hook adds a fifth trace to the durable functions integration run, and the orchestrator is suspended between calls so the flush order is not stable. Look traces up by resource instead of index. Co-authored-by: Cursor <cursoragent@cursor.com>
No job set PLUGINS=azure-functions for the instrumentations suite, so the new orchestration hook spec was never exercised in CI. Co-authored-by: Cursor <cursoragent@cursor.com>
…urable-functions-orchestration-spans Pick up master fixes merged into the base branch for stacked PR CI.
Summary
app.genericon@azure/functions, publishing to the existingazure-durable-functionschannel asOrchestration <name>spans.isReplaying !== false) so replays do not duplicate spans.traceparent/tracestateinto the span context (same path as activities/entities from fix(azure-durable-functions): link activity and entity spans to the HTTP trace #9394).Stacked on #9394 (
azure-durable-functions-trace-propagation) which allows activity and entity spans to be visible, so this PR only contains the orchestration-span change.Before


Trace link
After
Trace link
Test plan
packages/datadog-plugin-azure-durable-functions/test/index.spec.js(orchestration naming case)tracing.distributedTracingEnabled+version: V2Orchestration <name>spans linked into the HTTP traceapp.genericwrap: expect activities onlyMade with Cursor