Skip to content

feat: add durable-functions integration#7535

Merged
ojproductions merged 44 commits intomasterfrom
onzia/azure-durable-functions
Mar 13, 2026
Merged

feat: add durable-functions integration#7535
ojproductions merged 44 commits intomasterfrom
onzia/azure-durable-functions

Conversation

@ojproductions
Copy link
Contributor

@ojproductions ojproductions commented Feb 13, 2026

What does this PR do?

Adds auto instrumentation for azure durable-functions package

  • Instruments Activity and Entity operations
  • Purposely does not instrument orchestrator functions
    • It was found orchestrators dont play well with instrumentation due to non-deterministic functionality
  • Tests

Motivation

APMSVLS-332
SVLS-7644

Additional Notes

@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2026

Overall package size

Self size: 4.97 MB
Deduped: 5.81 MB
No deduping: 5.81 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.0 | 81.15 kB | 815.98 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

❌ Patch coverage is 17.77778% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.33%. Comparing base (c9ba145) to head (de96275).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...og-instrumentations/src/azure-durable-functions.js 20.00% 20 Missing ⚠️
...atadog-plugin-azure-durable-functions/src/index.js 18.75% 13 Missing ⚠️
...ages/datadog-instrumentations/src/helpers/hooks.js 0.00% 1 Missing ⚠️
packages/dd-trace/src/plugins/index.js 0.00% 1 Missing ⚠️
...-trace/src/service-naming/schemas/v0/serverless.js 0.00% 1 Missing ⚠️
...-trace/src/service-naming/schemas/v1/serverless.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7535      +/-   ##
==========================================
- Coverage   80.42%   80.33%   -0.10%     
==========================================
  Files         741      743       +2     
  Lines       32182    32227      +45     
==========================================
+ Hits        25883    25890       +7     
- Misses       6299     6337      +38     
Flag Coverage Δ
aiguard-macos 39.08% <0.00%> (-0.11%) ⬇️
aiguard-ubuntu 39.20% <0.00%> (-0.11%) ⬇️
aiguard-windows 38.93% <0.00%> (-0.11%) ⬇️
apm-capabilities-tracing-macos 48.87% <15.78%> (-0.03%) ⬇️
apm-capabilities-tracing-ubuntu 48.91% <15.78%> (-0.03%) ⬇️
apm-capabilities-tracing-windows 48.64% <15.78%> (-0.03%) ⬇️
apm-integrations-child-process 38.38% <0.00%> (-0.11%) ⬇️
apm-integrations-couchbase-18 37.30% <0.00%> (-0.11%) ⬇️
apm-integrations-couchbase-eol 37.76% <0.00%> (-0.12%) ⬇️
apm-integrations-oracledb 37.60% <0.00%> (-0.11%) ⬇️
appsec-express 55.18% <0.00%> (-0.09%) ⬇️
appsec-fastify 51.53% <0.00%> (-0.08%) ⬇️
appsec-graphql 51.72% <0.00%> (-0.09%) ⬇️
appsec-kafka 44.26% <0.00%> (-0.09%) ⬇️
appsec-ldapjs 43.92% <0.00%> (-0.09%) ⬇️
appsec-lodash 43.58% <0.00%> (-0.09%) ⬇️
appsec-macos 58.20% <0.00%> (-0.08%) ⬇️
appsec-mongodb-core 48.70% <0.00%> (-0.08%) ⬇️
appsec-mongoose 49.35% <0.00%> (-0.10%) ⬇️
appsec-mysql 50.79% <0.00%> (-0.08%) ⬇️
appsec-node-serialize 43.10% <0.00%> (-0.09%) ⬇️
appsec-passport 47.54% <0.00%> (-0.10%) ⬇️
appsec-postgres 50.51% <0.00%> (-0.08%) ⬇️
appsec-sourcing 42.50% <0.00%> (-0.09%) ⬇️
appsec-template 43.26% <0.00%> (-0.09%) ⬇️
appsec-ubuntu 58.28% <0.00%> (-0.08%) ⬇️
appsec-windows 58.06% <0.00%> (-0.08%) ⬇️
instrumentations-instrumentation-bluebird 32.25% <0.00%> (-0.11%) ⬇️
instrumentations-instrumentation-body-parser 40.40% <0.00%> (-0.11%) ⬇️
instrumentations-instrumentation-child_process 37.70% <0.00%> (-0.11%) ⬇️
instrumentations-instrumentation-cookie-parser 34.23% <0.00%> (-0.10%) ⬇️
instrumentations-instrumentation-express 34.55% <0.00%> (-0.10%) ⬇️
instrumentations-instrumentation-express-mongo-sanitize 34.36% <0.00%> (-0.10%) ⬇️
instrumentations-instrumentation-express-session 40.04% <0.00%> (-0.11%) ⬇️
instrumentations-instrumentation-fs 31.87% <0.00%> (-0.11%) ⬇️
instrumentations-instrumentation-generic-pool 29.68% <0.00%> (-0.02%) ⬇️
instrumentations-instrumentation-http 39.67% <0.00%> (-0.11%) ⬇️
instrumentations-instrumentation-knex 32.26% <0.00%> (-0.11%) ⬇️
instrumentations-instrumentation-mongoose 33.39% <0.00%> (-0.10%) ⬇️
instrumentations-instrumentation-multer 40.15% <0.00%> (-0.11%) ⬇️
instrumentations-instrumentation-mysql2 38.16% <0.00%> (-0.11%) ⬇️
instrumentations-instrumentation-passport 43.96% <0.00%> (-0.10%) ⬇️
instrumentations-instrumentation-passport-http 43.63% <0.00%> (-0.10%) ⬇️
instrumentations-instrumentation-passport-local 44.16% <0.00%> (-0.10%) ⬇️
instrumentations-instrumentation-pg 37.59% <0.00%> (-0.11%) ⬇️
instrumentations-instrumentation-promise 32.18% <0.00%> (-0.11%) ⬇️
instrumentations-instrumentation-promise-js 32.19% <0.00%> (-0.11%) ⬇️
instrumentations-instrumentation-q 32.23% <0.00%> (-0.11%) ⬇️
instrumentations-instrumentation-url 32.16% <0.00%> (-0.11%) ⬇️
instrumentations-instrumentation-when 32.20% <0.00%> (-0.11%) ⬇️
llmobs-ai 42.14% <0.00%> (-0.11%) ⬇️
llmobs-anthropic 40.13% <0.00%> (-0.10%) ⬇️
llmobs-bedrock 39.12% <0.00%> (-0.09%) ⬇️
llmobs-google-genai 39.68% <0.00%> (-0.10%) ⬇️
llmobs-langchain 40.03% <0.00%> (+0.02%) ⬆️
llmobs-openai 43.86% <0.00%> (-0.10%) ⬇️
llmobs-vertex-ai 39.93% <0.00%> (-0.10%) ⬇️
platform-core 31.47% <0.00%> (-0.07%) ⬇️
platform-esbuild 34.42% <0.00%> (-0.07%) ⬇️
platform-instrumentations-misc 48.35% <0.00%> (-0.05%) ⬇️
platform-shimmer 37.56% <0.00%> (-0.07%) ⬇️
platform-unit-guardrails 32.89% <0.00%> (-0.07%) ⬇️
plugins-azure-durable-functions 25.62% <19.23%> (?)
plugins-azure-event-hubs 25.79% <0.00%> (-0.05%) ⬇️
plugins-azure-service-bus 25.15% <0.00%> (-0.04%) ⬇️
plugins-bullmq 44.06% <0.00%> (-0.11%) ⬇️
plugins-cassandra 37.64% <0.00%> (-0.11%) ⬇️
plugins-cookie 26.84% <0.00%> (-0.05%) ⬇️
plugins-cookie-parser 26.63% <0.00%> (-0.05%) ⬇️
plugins-crypto 26.73% <0.00%> (-0.06%) ⬇️
plugins-dd-trace-api 38.21% <0.00%> (-0.11%) ⬇️
plugins-express-mongo-sanitize 26.78% <0.00%> (-0.05%) ⬇️
plugins-express-session 26.59% <0.00%> (-0.05%) ⬇️
plugins-fastify 42.11% <0.00%> (-0.10%) ⬇️
plugins-fetch 38.21% <0.00%> (-0.11%) ⬇️
plugins-fs 38.48% <0.00%> (-0.11%) ⬇️
plugins-generic-pool 25.83% <0.00%> (-0.05%) ⬇️
plugins-google-cloud-pubsub 45.33% <0.00%> (-0.10%) ⬇️
plugins-grpc 40.79% <0.00%> (-0.11%) ⬇️
plugins-handlebars 26.82% <0.00%> (-0.05%) ⬇️
plugins-hapi 40.03% <0.00%> (-0.11%) ⬇️
plugins-hono 40.29% <0.00%> (-0.11%) ⬇️
plugins-ioredis 38.29% <0.00%> (-0.12%) ⬇️
plugins-knex 26.46% <0.00%> (-0.04%) ⬇️
plugins-ldapjs 24.32% <0.00%> (-0.04%) ⬇️
plugins-light-my-request 26.19% <0.00%> (-0.05%) ⬇️
plugins-limitd-client 32.53% <0.00%> (-0.11%) ⬇️
plugins-lodash 25.92% <0.00%> (-0.05%) ⬇️
plugins-mariadb 39.34% <0.00%> (-0.12%) ⬇️
plugins-memcached 38.01% <0.00%> (-0.12%) ⬇️
plugins-microgateway-core 39.10% <0.00%> (-0.11%) ⬇️
plugins-moleculer 40.39% <0.00%> (-0.11%) ⬇️
plugins-mongodb 39.03% <0.00%> (-0.11%) ⬇️
plugins-mongodb-core 38.86% <0.00%> (-0.11%) ⬇️
plugins-mongoose 38.75% <0.00%> (-0.08%) ⬇️
plugins-multer 26.59% <0.00%> (-0.05%) ⬇️
plugins-mysql 39.02% <0.00%> (-0.12%) ⬇️
plugins-mysql2 39.12% <0.00%> (-0.11%) ⬇️
plugins-node-serialize 26.89% <0.00%> (-0.05%) ⬇️
plugins-opensearch 37.47% <0.00%> (-0.11%) ⬇️
plugins-passport-http 26.64% <0.00%> (-0.05%) ⬇️
plugins-postgres 35.52% <0.00%> (-0.10%) ⬇️
plugins-process 26.73% <0.00%> (-0.06%) ⬇️
plugins-pug 26.84% <0.00%> (-0.05%) ⬇️
plugins-redis 38.75% <0.00%> (-0.12%) ⬇️
plugins-router 42.84% <0.00%> (-0.11%) ⬇️
plugins-sequelize 25.43% <0.00%> (-0.05%) ⬇️
plugins-test-and-upstream-amqp10 38.37% <0.00%> (-0.12%) ⬇️
plugins-test-and-upstream-amqplib 43.75% <0.00%> (-0.12%) ⬇️
plugins-test-and-upstream-apollo 39.00% <0.00%> (-0.10%) ⬇️
plugins-test-and-upstream-avsc 38.54% <0.00%> (-0.11%) ⬇️
plugins-test-and-upstream-bunyan 33.79% <0.00%> (-0.11%) ⬇️
plugins-test-and-upstream-connect 40.69% <0.00%> (-0.11%) ⬇️
plugins-test-and-upstream-graphql 39.98% <0.00%> (-0.11%) ⬇️
plugins-test-and-upstream-koa 40.28% <0.00%> (-0.11%) ⬇️
plugins-test-and-upstream-protobufjs 38.76% <0.00%> (-0.11%) ⬇️
plugins-test-and-upstream-rhea 43.92% <0.00%> (-0.12%) ⬇️
plugins-undici 38.98% <0.00%> (-0.11%) ⬇️
plugins-url 26.73% <0.00%> (-0.06%) ⬇️
plugins-valkey 37.96% <0.00%> (-0.12%) ⬇️
plugins-vm 26.73% <0.00%> (-0.06%) ⬇️
plugins-winston 33.98% <0.00%> (-0.11%) ⬇️
plugins-ws 41.74% <0.00%> (-0.11%) ⬇️
profiling-macos 39.79% <0.00%> (-0.11%) ⬇️
profiling-ubuntu 40.32% <0.00%> (+0.30%) ⬆️
profiling-windows 41.50% <0.00%> (-0.11%) ⬇️
serverless-azure-functions-client 25.50% <0.00%> (-0.04%) ⬇️
serverless-azure-functions-eventhubs 25.50% <0.00%> (-0.04%) ⬇️
serverless-azure-functions-servicebus 25.50% <0.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Feb 13, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: de96275 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

@jcstorms1
Copy link
Contributor

@codex review

@chatgpt-codex-connector
Copy link

To use Codex here, create a Codex account and connect to github.

@ojproductions
Copy link
Contributor Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 38dad4ce27

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

return function (activityName, activityOptions) {
shimmer.wrap(activityOptions, 'handler', handler => {
const isAsync =
handler && handler.constructor && handler.constructor.name === 'AsyncFunction'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Handle promise-returning activity handlers as async

The activity wrapper chooses traceSync unless handler.constructor.name === 'AsyncFunction', which misses valid handlers that return a Promise but are not declared with async (for example transpiled async functions or plain functions returning Promise). In that case the span is finished on end before the Promise settles, so latency and rejection errors are not captured for the activity execution.

Useful? React with 👍 / 👎.

@pr-commenter
Copy link

pr-commenter bot commented Feb 15, 2026

Benchmarks

Benchmark execution time: 2026-03-13 17:55:41

Comparing candidate commit de96275 in PR branch onzia/azure-durable-functions with baseline commit c9ba145 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 233 metrics, 27 unstable metrics.

@jcstorms1 jcstorms1 requested review from jcstorms1 and removed request for jcstorms1 and pabloerhard February 25, 2026 00:06
@ojproductions ojproductions requested a review from a team as a code owner March 9, 2026 14:14
jcstorms1
jcstorms1 previously approved these changes Mar 10, 2026
@gh-worker-ownership-write-b05516 gh-worker-ownership-write-b05516 bot removed the request for review from a team March 10, 2026 17:56
@ojproductions ojproductions requested a review from tlhunter March 13, 2026 17:44
@ojproductions ojproductions merged commit 1198526 into master Mar 13, 2026
877 of 889 checks passed
@ojproductions ojproductions deleted the onzia/azure-durable-functions branch March 13, 2026 20:29
dd-octo-sts bot pushed a commit that referenced this pull request Mar 14, 2026
* azure durable functions

* debug logs

* debug logs

* debug logs

* debug logs

* add durable-functions hook

* add consistent plugin naming

* update supported configs

* add spans

* add entity instrumentation

* remove debug logs

* tests

* tests pt2

* add df plugin interface and fix esm issues

* add azure-durable-function to api.md

* add ci

* remove azurite proc

* add envs to ci

* remove azurite dep and run yarn

* add asserts on span meta data

* remove alreadyPatched flag

* lint

* use asyncStart

* update supported conviguration version

* use same span name as azure-functions

* rename tracing channel

* add hasSubscribers guard

* typo

* move hasSubscribers guard

---------

Co-authored-by: Thomas Hunter II <tlhunter@datadog.com>
@dd-octo-sts dd-octo-sts bot mentioned this pull request Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants