Skip to content

test(otel): Azure durable instrumentation unit coverage - #9793

Draft
chemystery09 wants to merge 3 commits into
ishara/otel-azure-orchestration-spansfrom
ishara/otel-azure-durable-trace-tests
Draft

test(otel): Azure durable instrumentation unit coverage#9793
chemystery09 wants to merge 3 commits into
ishara/otel-azure-orchestration-spansfrom
ishara/otel-azure-durable-trace-tests

Conversation

@chemystery09

@chemystery09 chemystery09 commented Aug 12, 2026

Copy link
Copy Markdown

Summary

Unit tests for the OTel Azure Functions / Durable Functions instrumentation, split out so feature PRs stay focused on implementation. Stacks on #9794.

Changes

  • azure-trace-context.spec.js, otel-orchestration-store.spec.js, otel-azure-handlers.spec.js, otel-azure.spec.js
  • otel-orchestration-export.spec.js — timing helpers (resolveOrchestrationSpanBounds, stampOrchestrationStartTime, startNew anchoring)
  • packages/dd-trace/test/plugins/agent.js — track AzureWebJobsStorage for store tests

Test plan

E2E verification status (via durable-node demo)

Storage backend Status Notes
Local Azurite (UseDevelopmentStorage=true) Verified (single worker) Parenting + orchestration timing confirmed; trace b888f303…
Azure DTS (durable-node-fx / test-scheduler) Partial Single-worker runs OK (17862494001755642471); multi-worker parenting intermittent — see #9794

@chemystery09
chemystery09 requested a review from a team as a code owner August 12, 2026 17:52
@chemystery09
chemystery09 requested review from tlhunter and removed request for a team August 12, 2026 17:52
@dd-octo-sts

dd-octo-sts Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 8.07 MB
Deduped: 8.73 MB
No deduping: 8.73 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.3.3 | 125.43 kB | 441.68 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

@datadog-official

datadog-official Bot commented Aug 12, 2026

Copy link
Copy Markdown

Pipelines  Tests

⚠️ Warnings

🚦 20 Pipeline jobs failed

All Green | all-green   View in Datadog   GitHub Actions

See error Workflow run 'AppSec' failed after retry, resulting in job failure with exit code 1.

🧪 3 Tests failed · 🎯 related to the job error above

🎯 esbuild support for IAST cjs "before all" hook in "cjs" from cjs   View in Datadog
Command failed: npm run build

    iast/index.js:16:8:
      16 │         stringCase: noop,
         ╵         ~~~~~~~~~~

  The original key "stringCase" is here:

    iast/index.js:15:8:
      15 │         stringCase: noop,
...
🎯 esbuild support for IAST esm "before all" hook in "esm" from esm   View in Datadog
Command failed: npm run build

    iast/index.mjs:15:8:
      15 │         stringCase: noop,
         ╵         ~~~~~~~~~~

  The original key "stringCase" is here:

    iast/index.mjs:14:8:
      14 │         stringCase: noop,
...
View all failed tests

AppSec | AppSec / integration (node-active)   View in Datadog   GitHub Actions

🔧 Fix in code. This looks caused by changes in this PR. Build failed: Could not resolve '../../../dd-trace/src/opentelemetry/time' in multiple instances during 'npm run build'.

AppSec | AppSec / integration (node-latest)   View in Datadog   GitHub Actions

🔧 Fix in code. This looks caused by changes in this PR. Build failed: ERROR: Could not resolve '../../../dd-trace/src/opentelemetry/time' during 'npm run build'.

View all 20 failed jobs.

📋 Copy prompt for your agent
CI on my pull request is failing. Help me find and fix the root cause of each failing job below — they were flagged as caused by changes in this PR, so focus on the diff. For each job, explain the failure and propose a fix.

Branch: ishara/otel-azure-durable-trace-tests

AppSec | AppSec / integration (node-active)
Commit: a178de9eb7bf095e439bc8e14d0a01c1f9000d32
Error (code / build):
Build failed: Could not resolve '../../../dd-trace/src/opentelemetry/time' in multiple instances during 'npm run build'.
CI job: https://github.com/DataDog/dd-trace-js/actions/runs/31634086768/job/94242652454

AppSec | AppSec / integration (node-latest)
Commit: a178de9eb7bf095e439bc8e14d0a01c1f9000d32
Error (code / build):
Build failed: ERROR: Could not resolve '../../../dd-trace/src/opentelemetry/time' during 'npm run build'.
CI job: https://github.com/DataDog/dd-trace-js/actions/runs/31634086768/job/94242652439

Plus 15 more failing jobs not shown here.

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

🔄 Datadog auto-retried 8 jobs - 3 passed on retry View in Datadog

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 98.47% (+1.96%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 88ceaab | Docs | Datadog PR Page | Give us feedback!

@chemystery09
chemystery09 force-pushed the ishara/otel-azure-durable-trace-tests branch from d42744f to 95d2dfc Compare August 12, 2026 17:55
@chemystery09
chemystery09 requested review from a team as code owners August 12, 2026 17:55
@chemystery09
chemystery09 requested review from BridgeAR and removed request for a team August 12, 2026 17:55
@chemystery09
chemystery09 changed the base branch from ishara/otel-azure-durable-trace-propagation to ishara/otel-azure-orchestration-spans August 12, 2026 17:55
@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.46%. Comparing base (9fe549d) to head (88ceaab).

Additional details and impacted files
@@                            Coverage Diff                            @@
##           ishara/otel-azure-orchestration-spans    #9793      +/-   ##
=========================================================================
+ Coverage                                  96.50%   98.46%   +1.96%     
=========================================================================
  Files                                        970      971       +1     
  Lines                                     140728   140764      +36     
  Branches                                   10051    10636     +585     
=========================================================================
+ Hits                                      135811   138606    +2795     
+ Misses                                      4917     2158    -2759     
Flag Coverage Δ
aiguard 57.56% <ø> (+0.06%) ⬆️
aiguard-integration 55.69% <ø> (ø)
apm-bucket-0 57.27% <ø> (+0.04%) ⬆️
apm-bucket-1 63.35% <ø> (ø)
apm-bucket-2 62.20% <ø> (ø)
apm-bucket-3 59.80% <ø> (ø)
apm-capabilities-tracing 62.50% <ø> (+0.04%) ⬆️
apm-integrations-aerospike 56.28% <ø> (ø)
apm-integrations-confluentinc-kafka-javascript 61.19% <ø> (+0.03%) ⬆️
apm-integrations-couchbase 56.71% <ø> (ø)
apm-integrations-http 61.89% <ø> (ø)
apm-integrations-kafkajs 61.71% <ø> (?)
apm-integrations-next 59.40% <ø> (ø)
apm-integrations-prisma 58.51% <ø> (?)
appsec 72.10% <ø> (+0.06%) ⬆️
appsec-express_fastify_graphql 69.41% <ø> (ø)
appsec-kafka_ldapjs_lodash 63.40% <ø> (ø)
appsec-mongodb-core_mongoose_mysql 66.86% <ø> (?)
appsec-mongodb-core_mongoose_node-serialize ?
appsec-next 56.66% <ø> (ø)
appsec-node-serialize_passport_postgres 66.27% <ø> (?)
appsec-passport_postgres_sourcing ?
appsec-sourcing_stripe_template 64.71% <ø> (?)
appsec-stripe_template ?
debugger 64.24% <ø> (+0.03%) ⬆️
instrumentations-bucket-0 51.68% <ø> (ø)
instrumentations-bucket-1 59.65% <ø> (ø)
instrumentations-bucket-10 60.87% <ø> (-0.02%) ⬇️
instrumentations-bucket-11 61.60% <ø> (+0.06%) ⬆️
instrumentations-bucket-12 51.68% <ø> (+0.09%) ⬆️
instrumentations-bucket-13 52.42% <ø> (-0.02%) ⬇️
instrumentations-bucket-14 51.64% <ø> (-0.07%) ⬇️
instrumentations-bucket-2 53.12% <ø> (+0.20%) ⬆️
instrumentations-bucket-3 53.47% <ø> (-0.10%) ⬇️
instrumentations-bucket-4 58.76% <ø> (+0.04%) ⬆️
instrumentations-bucket-5 50.29% <ø> (+0.88%) ⬆️
instrumentations-bucket-6 60.50% <ø> (+0.22%) ⬆️
instrumentations-bucket-7 58.11% <ø> (+6.22%) ⬆️
instrumentations-bucket-8 59.08% <ø> (+0.68%) ⬆️
instrumentations-bucket-9 57.45% <ø> (+0.19%) ⬆️
instrumentations-instrumentation-couchbase 50.94% <ø> (ø)
llmobs-ai_anthropic_bedrock 62.86% <ø> (ø)
llmobs-bucket-1 61.34% <ø> (ø)
llmobs-openai 61.74% <ø> (ø)
llmobs-openai-agents_vertex-ai 60.03% <ø> (+<0.01%) ⬆️
llmobs-sdk 66.77% <ø> (ø)
openfeature 55.68% <ø> (ø)
openfeature-unit 53.20% <ø> (ø)
platform-core_esbuild_instrumentations-misc ?
platform-core_esbuild_shimmer 39.15% <ø> (?)
platform-integration 60.42% <ø> (ø)
platform-shimmer_unit-guardrails_webpack ?
platform-unit-guardrails_webpack 38.84% <ø> (?)
plugins-bucket-0 56.93% <ø> (ø)
plugins-bucket-1 54.03% <ø> (ø)
plugins-bucket-11 61.47% <ø> (+0.13%) ⬆️
plugins-bucket-17 61.29% <ø> (-0.17%) ⬇️
plugins-bucket-18 61.92% <ø> (+2.19%) ⬆️
plugins-bucket-19 61.31% <ø> (-0.33%) ⬇️
plugins-bucket-20 63.72% <ø> (?)
plugins-bucket-4 58.31% <ø> (ø)
plugins-bullmq_cassandra_cookie 61.37% <ø> (ø)
plugins-cookie-parser_crypto_dd-trace-api 56.36% <ø> (ø)
plugins-fetch_fs_generic-pool 58.22% <ø> (ø)
plugins-google-cloud-pubsub_grpc_handlebars 64.14% <ø> (-0.01%) ⬇️
plugins-hapi_hono_ioredis 59.90% <ø> (ø)
plugins-knex_langgraph_ldapjs 55.08% <ø> (?)
plugins-langgraph_ldapjs_light-my-request ?
plugins-light-my-request_limitd-client_lodash 58.38% <ø> (?)
plugins-limitd-client_lodash_mariadb ?
plugins-mariadb_memcached_mercurius 61.29% <ø> (?)
plugins-memcached_mercurius_microgateway-core ?
plugins-mongodb_mongodb-core_mongoose 59.26% <ø> (?)
plugins-mongoose_multer_mysql ?
plugins-multer_mysql_mysql2 58.85% <ø> (?)
plugins-mysql2_nats_node-serialize ?
plugins-nats_node-serialize_opensearch 60.39% <ø> (?)
plugins-opensearch_passport-http_pino ?
plugins-passport-http_pino_postgres 58.59% <ø> (?)
plugins-postgres_process_pug ?
plugins-process_pug_redis 57.40% <ø> (?)
plugins-redis_router_sequelize ?
plugins-test-and-upstream-rhea_undici_url ?
plugins-undici_url_valkey 58.03% <ø> (?)
plugins-valkey_vm_winston ?
plugins-vm_winston_ws 59.59% <ø> (?)
plugins-ws ?
profiling 61.51% <ø> (ø)
serverless-aws-sdk-aws-sdk 55.13% <ø> (ø)
serverless-aws-sdk-base-inject-field 50.91% <ø> (ø)
serverless-aws-sdk-bedrockruntime 54.67% <ø> (ø)
serverless-aws-sdk-client 56.23% <ø> (ø)
serverless-aws-sdk-dynamodb 55.50% <ø> (ø)
serverless-aws-sdk-eventbridge 49.71% <ø> (ø)
serverless-aws-sdk-kinesis 59.08% <ø> (ø)
serverless-aws-sdk-lambda 57.24% <ø> (ø)
serverless-aws-sdk-s3 55.60% <ø> (ø)
serverless-aws-sdk-serverless-peer-service 59.34% <ø> (ø)
serverless-aws-sdk-sns 59.89% <ø> (ø)
serverless-aws-sdk-sqs 60.30% <ø> (-0.03%) ⬇️
serverless-aws-sdk-stepfunctions 55.43% <ø> (ø)
serverless-aws-sdk-util 51.44% <ø> (ø)
serverless-azure-functions-servicebus_lambda ?
serverless-bucket-0 54.10% <ø> (+<0.01%) ⬆️
serverless-bucket-1 58.87% <ø> (?)
test-optimization-cucumber 71.15% <ø> (+6.70%) ⬆️
test-optimization-cypress 65.03% <ø> (+0.35%) ⬆️
test-optimization-jest 72.53% <ø> (+1.15%) ⬆️
test-optimization-mocha 72.22% <ø> (+0.10%) ⬆️
test-optimization-playwright-playwright-atr 59.90% <ø> (ø)
test-optimization-playwright-playwright-efd 60.06% <ø> (+0.21%) ⬆️
test-optimization-playwright-playwright-final-status 60.22% <ø> (ø)
test-optimization-playwright-playwright-impacted-tests 59.77% <ø> (+0.18%) ⬆️
test-optimization-playwright-playwright-reporting 61.09% <ø> (+0.12%) ⬆️
test-optimization-playwright-playwright-test-management 60.74% <ø> (+0.29%) ⬆️
test-optimization-playwright-playwright-test-span 59.91% <ø> (ø)
test-optimization-selenium 59.21% <ø> (+0.05%) ⬆️
test-optimization-testopt 57.76% <ø> (?)
test-optimization-vitest 73.28% <ø> (+1.27%) ⬆️
test-optimization-vitest-browser 59.01% <ø> (ø)
test-optimization-webdriverio 65.41% <ø> (?)

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

☔ View full report in Codecov by Harness.
📢 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.

@chemystery09
chemystery09 marked this pull request as draft August 12, 2026 18:35
@chemystery09
chemystery09 force-pushed the ishara/otel-azure-durable-trace-tests branch from 95d2dfc to 0b1884e Compare August 12, 2026 19:40
chemystery09 and others added 3 commits August 12, 2026 15:43
Add helper, handler, and enablement specs for the OTel Azure Functions and
Durable Functions instrumentation, plus AzureWebJobsStorage tracking in the
test agent for orchestration store tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add unit tests for stampOrchestrationStartTime and
resolveOrchestrationSpanBounds used by the backfilled orchestration span
export path in #9794.

Co-authored-by: Cursor <cursoragent@cursor.com>
Cover startNew-seeded bounds, earliest-child clamping, and the updated
shared-store seed expectations after the orchestration timing fix.

Co-authored-by: Cursor <cursoragent@cursor.com>
@chemystery09
chemystery09 force-pushed the ishara/otel-azure-durable-trace-tests branch from 0b1884e to 88ceaab Compare August 12, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant