Skip to content

fix(core): handle missing async trigger resources - #9813

Draft
mabdinur wants to merge 2 commits into
masterfrom
codex/test-di-otlp-debugger
Draft

fix(core): handle missing async trigger resources#9813
mabdinur wants to merge 2 commits into
masterfrom
codex/test-di-otlp-debugger

Conversation

@mabdinur

@mabdinur mabdinur commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Prevents a debugger snapshot from crashing the process when Node omits an async trigger resource while the inspector is paused. It also verifies snapshots remain correlated with request spans exported over OTLP.

Testing

  • ./node_modules/.bin/mocha packages/datadog-core/test/storage.spec.js
  • ./node_modules/.bin/mocha --timeout 120000 integration-tests/debugger/probe-file.spec.js
  • targeted ESLint and Node 20.1 regression checks
  • cherry-picked onto v5.121.0; unit and integration tests pass

@github-actions github-actions Bot added semver-patch debugger Dynamic Instrumentation & Live Debugger labels Aug 13, 2026
@dd-octo-sts

dd-octo-sts Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 8.2 MB
Deduped: 8.86 MB
No deduping: 8.86 MB

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

datadog-datadog-us1-prod Bot commented Aug 13, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 98.53% (+0.01%)

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

@pr-commenter

pr-commenter Bot commented Aug 13, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-08-14 17:08:24

Comparing candidate commit 6900b59 in PR branch codex/test-di-otlp-debugger with baseline commit aadb6cf in branch master.

📊 Benchmarking dashboard

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

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

Unstable benchmarks

These benchmarks have a confidence interval too wide to call a change; treat them as noise rather than signal.

scenario:appsec-appsec-enabled-24

  • unstable execution_time [-203.776ms; +201.468ms] or [-7.440%; +7.356%]

scenario:appsec-appsec-enabled-26

  • unstable execution_time [-230.123ms; +244.121ms] or [-8.818%; +9.354%]

scenario:appsec-appsec-enabled-with-attacks-24

  • unstable execution_time [-168073.568µs; +169250.968µs] or [-5.347%; +5.384%]

scenario:appsec-appsec-enabled-with-attacks-26

  • unstable execution_time [-195.853ms; +188.986ms] or [-6.621%; +6.389%]

scenario:appsec-control-20

  • unstable execution_time [-118.163ms; +127.665ms] or [-7.130%; +7.704%]

scenario:appsec-control-24

  • unstable execution_time [-114.875ms; +118.900ms] or [-9.069%; +9.387%]

scenario:appsec-control-26

  • unstable execution_time [-117.215ms; +139.813ms] or [-9.339%; +11.139%]

scenario:appsec-iast-no-vulnerability-iast-enabled-always-active-20

  • unstable execution_time [-15.228ms; +11.862ms] or [-5.964%; +4.646%]

scenario:appsec-iast-no-vulnerability-iast-enabled-default-config-20

  • unstable execution_time [-14.410ms; +11.344ms] or [-5.620%; +4.425%]

scenario:appsec-iast-with-vulnerability-iast-enabled-always-active-20

  • unstable execution_time [-27633.660µs; +27998.793µs] or [-5.027%; +5.094%]

scenario:debugger-line-probe-with-snapshot-default-20

  • unstable cpu_user_time [-51897.178ms; +51860.634ms] or [-149.369%; +149.264%]
  • unstable execution_time [-66053.166ms; +66087.948ms] or [-158.892%; +158.976%]
  • unstable instructions [-195630.8M instructions; +195304.8M instructions] or [-103.855%; +103.682%]
  • unstable max_rss_usage [-55447.455KB; +54073.855KB] or [-29.212%; +28.488%]
  • unstable throughput [-1017.300op/s; +1021.576op/s] or [-52.511%; +52.732%]

scenario:debugger-line-probe-with-snapshot-default-24

  • unstable cpu_user_time [-47803.571ms; +46166.706ms] or [-144.001%; +139.070%]
  • unstable execution_time [-62677.723ms; +61070.207ms] or [-155.136%; +151.157%]
  • unstable instructions [-139.8G instructions; +125.3G instructions] or [-86.974%; +77.962%]
  • unstable max_rss_usage [-117.282MB; +110.968MB] or [-49.635%; +46.963%]
  • unstable throughput [-1014.282op/s; +1194.565op/s] or [-53.170%; +62.621%]

scenario:debugger-line-probe-with-snapshot-default-26

  • unstable cpu_user_time [-31.198s; +47.591s] or [-143.273%; +218.553%]
  • unstable execution_time [-39.802s; +61.277s] or [-158.081%; +243.372%]
  • unstable instructions [-116.3G instructions; +166.9G instructions] or [-85.447%; +122.639%]
  • unstable max_rss_usage [-80.347MB; +122.148MB] or [-38.022%; +57.802%]
  • unstable throughput [-1228.319op/s; +1075.973op/s] or [-55.686%; +48.779%]

scenario:debugger-line-probe-with-snapshot-minimal-26

  • unstable cpu_user_time [-16.006s; +2.895s] or [-77.874%; +14.085%]
  • unstable execution_time [-19.874s; +3.453s] or [-86.275%; +14.991%]
  • unstable instructions [-40.5G instructions; +13.1G instructions] or [-31.044%; +10.002%]
  • unstable max_rss_usage [-87.294MB; +13.444MB] or [-41.314%; +6.363%]
  • unstable throughput [-294.382op/s; +715.492op/s] or [-15.067%; +36.621%]

scenario:debugger-line-probe-without-snapshot-24

  • unstable instructions [-22.2G instructions; +13.6G instructions] or [-12.570%; +7.706%]

scenario:debugger-line-probe-without-snapshot-26

  • unstable cpu_user_time [-2740.877ms; +1957.433ms] or [-6.443%; +4.602%]
  • unstable execution_time [-2935.918ms; +2165.949ms] or [-5.785%; +4.268%]
  • unstable instructions [-23.4G instructions; +16.1G instructions] or [-12.447%; +8.572%]
  • unstable throughput [-27.200op/s; +36.118op/s] or [-4.300%; +5.710%]

scenario:dogstatsd-with-tags-20

  • unstable cpu_user_time [-172.034ms; +385.277ms] or [-3.450%; +7.726%]
  • unstable execution_time [-172.010ms; +387.351ms] or [-3.397%; +7.651%]
  • unstable throughput [-138239.878op/s; +59922.113op/s] or [-8.348%; +3.618%]

scenario:plugin-claude-agent-sdk-compact-stream-scan-26

  • unstable cpu_usage_percentage [-5.463%; +5.919%]

scenario:plugin-mongodb-core-plain-find-26

  • unstable execution_time [-100.483ms; +119.947ms] or [-4.827%; +5.762%]

scenario:plugin-pg-service-26

  • unstable cpu_user_time [-37.032ms; +53.565ms] or [-4.197%; +6.070%]
  • unstable execution_time [-36.026ms; +53.265ms] or [-4.059%; +6.001%]

scenario:test-optimization-large-suite-20

  • unstable max_rss_usage [-4429.926KB; +6062.926KB] or [-5.572%; +7.626%]

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.16%. Comparing base (aadb6cf) to head (6900b59).
⚠️ Report is 16 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9813      +/-   ##
==========================================
- Coverage   98.52%   98.16%   -0.36%     
==========================================
  Files         975      975              
  Lines      142737   144164    +1427     
  Branches    12705    12487     -218     
==========================================
+ Hits       140628   141524     +896     
- Misses       2109     2640     +531     
Flag Coverage Δ
aiguard 57.25% <100.00%> (-0.23%) ⬇️
aiguard-integration 55.50% <100.00%> (-0.17%) ⬇️
apm-bucket-0 57.64% <100.00%> (-0.24%) ⬇️
apm-bucket-1 62.83% <100.00%> (-0.24%) ⬇️
apm-bucket-2 61.66% <100.00%> (-0.25%) ⬇️
apm-bucket-3 59.29% <100.00%> (-0.24%) ⬇️
apm-capabilities-tracing 62.36% <100.00%> (-0.13%) ⬇️
apm-integrations-aerospike 55.53% <100.00%> (-0.28%) ⬇️
apm-integrations-confluentinc-kafka-javascript 60.65% <100.00%> (-0.25%) ⬇️
apm-integrations-couchbase 56.23% <100.00%> (-0.23%) ⬇️
apm-integrations-http 61.40% <100.00%> (-0.23%) ⬇️
apm-integrations-kafkajs 61.16% <100.00%> (-0.25%) ⬇️
apm-integrations-next 58.89% <62.50%> (-0.25%) ⬇️
apm-integrations-prisma 58.34% <100.00%> (+0.08%) ⬆️
appsec 71.53% <100.00%> (-0.26%) ⬇️
appsec-express_fastify_graphql 68.92% <100.00%> (-0.23%) ⬇️
appsec-integration 49.61% <100.00%> (-0.26%) ⬇️
appsec-kafka_ldapjs_lodash 62.90% <100.00%> (-0.23%) ⬇️
appsec-mongodb-core_mongoose_mysql 66.38% <100.00%> (-0.22%) ⬇️
appsec-next 56.26% <100.00%> (-0.19%) ⬇️
appsec-node-serialize_passport_postgres 65.79% <100.00%> (-0.22%) ⬇️
appsec-sourcing_stripe_template 64.23% <100.00%> (-0.22%) ⬇️
debugger 64.27% <100.00%> (+0.34%) ⬆️
instrumentations-bucket-0 51.26% <100.00%> (-0.20%) ⬇️
instrumentations-bucket-1 59.15% <100.00%> (-0.24%) ⬇️
instrumentations-bucket-10 60.40% <100.00%> (-0.22%) ⬇️
instrumentations-bucket-11 61.06% <100.00%> (-0.22%) ⬇️
instrumentations-bucket-12 51.17% <100.00%> (-0.20%) ⬇️
instrumentations-bucket-13 52.02% <100.00%> (-0.20%) ⬇️
instrumentations-bucket-14 51.28% <100.00%> (-0.20%) ⬇️
instrumentations-bucket-2 52.51% <100.00%> (-0.19%) ⬇️
instrumentations-bucket-3 53.15% <100.00%> (-0.20%) ⬇️
instrumentations-bucket-4 58.23% <100.00%> (-0.23%) ⬇️
instrumentations-bucket-5 48.84% <100.00%> (-0.40%) ⬇️
instrumentations-bucket-6 59.75% <100.00%> (-0.24%) ⬇️
instrumentations-bucket-7 51.46% <100.00%> (-0.20%) ⬇️
instrumentations-bucket-8 57.93% <100.00%> (-0.22%) ⬇️
instrumentations-bucket-9 56.77% <100.00%> (-0.23%) ⬇️
instrumentations-instrumentation-couchbase 50.24% <100.00%> (-0.26%) ⬇️
instrumentations-integration-esbuild 33.89% <100.00%> (+<0.01%) ⬆️
llmobs-ai_anthropic_bedrock 62.32% <100.00%> (-0.28%) ⬇️
llmobs-bucket-1 60.85% <100.00%> (-0.26%) ⬇️
llmobs-openai 61.26% <100.00%> (-0.22%) ⬇️
llmobs-openai-agents_vertex-ai 59.57% <100.00%> (-0.21%) ⬇️
llmobs-sdk 67.24% <100.00%> (+0.17%) ⬆️
master-coverage 98.16% <100.00%> (?)
openfeature 55.21% <100.00%> (-0.19%) ⬇️
openfeature-unit 52.86% <100.00%> (-0.21%) ⬇️
platform-core_esbuild_instrumentations-misc 40.86% <100.00%> (-0.18%) ⬇️
platform-integration 59.93% <100.00%> (-0.20%) ⬇️
platform-shimmer_unit-guardrails_webpack 38.51% <100.00%> (-0.14%) ⬇️
plugins-bucket-0 56.44% <100.00%> (-0.26%) ⬇️
plugins-bucket-1 53.57% <100.00%> (-0.19%) ⬇️
plugins-bucket-11 60.94% <100.00%> (-0.25%) ⬇️
plugins-bucket-17 60.77% <100.00%> (-0.24%) ⬇️
plugins-bucket-18 61.43% <100.00%> (-0.23%) ⬇️
plugins-bucket-19 60.79% <100.00%> (-0.24%) ⬇️
plugins-bucket-20 63.17% <100.00%> (-0.25%) ⬇️
plugins-bucket-4 57.83% <100.00%> (-0.23%) ⬇️
plugins-bullmq_cassandra_cookie 60.85% <100.00%> (-0.24%) ⬇️
plugins-cookie-parser_crypto_dd-trace-api 55.87% <100.00%> (-0.23%) ⬇️
plugins-fetch_fs_generic-pool 57.74% <100.00%> (-0.23%) ⬇️
plugins-google-cloud-pubsub_grpc_handlebars 63.61% <100.00%> (-0.24%) ⬇️
plugins-hapi_hono_ioredis 59.39% <100.00%> (-0.23%) ⬇️
plugins-knex_langgraph_ldapjs 54.62% <100.00%> (-0.22%) ⬇️
plugins-light-my-request_limitd-client_lodash 57.87% <100.00%> (-0.24%) ⬇️
plugins-mariadb_memcached_mercurius 61.04% <100.00%> (+0.01%) ⬆️
plugins-mongodb_mongodb-core_mongoose 58.76% <100.00%> (-0.23%) ⬇️
plugins-multer_mysql_mysql2 58.35% <100.00%> (-0.23%) ⬇️
plugins-nats_node-serialize_opensearch 59.87% <100.00%> (-0.24%) ⬇️
plugins-passport-http_pino_postgres 58.10% <100.00%> (-0.23%) ⬇️
plugins-process_pug_redis ?
plugins-undici_url_valkey 57.56% <100.00%> (-0.22%) ⬇️
plugins-vm_winston_ws ?
profiling 61.17% <100.00%> (-0.24%) ⬇️
serverless-aws-sdk-aws-sdk 54.41% <100.00%> (-0.52%) ⬇️
serverless-aws-sdk-base-inject-field 50.49% <100.00%> (-0.20%) ⬇️
serverless-aws-sdk-bedrockruntime 54.20% <100.00%> (-0.25%) ⬇️
serverless-aws-sdk-client 55.72% <100.00%> (-0.27%) ⬇️
serverless-aws-sdk-dynamodb 55.03% <100.00%> (-0.25%) ⬇️
serverless-aws-sdk-eventbridge 56.50% <100.00%> (+6.97%) ⬆️
serverless-aws-sdk-kinesis 58.56% <100.00%> (-0.28%) ⬇️
serverless-aws-sdk-lambda 56.74% <100.00%> (-0.26%) ⬇️
serverless-aws-sdk-s3 55.12% <100.00%> (-0.25%) ⬇️
serverless-aws-sdk-serverless-peer-service 59.14% <100.00%> (+0.05%) ⬆️
serverless-aws-sdk-sns 59.35% <100.00%> (-0.28%) ⬇️
serverless-aws-sdk-sqs 59.76% <100.00%> (-0.28%) ⬇️
serverless-aws-sdk-stepfunctions 54.95% <100.00%> (-0.25%) ⬇️
serverless-aws-sdk-util 51.01% <100.00%> (-0.21%) ⬇️
serverless-bucket-0 53.36% <100.00%> (-0.24%) ⬇️
serverless-bucket-1 58.37% <100.00%> (-0.23%) ⬇️
test-optimization-cucumber 70.60% <100.00%> (-0.36%) ⬇️
test-optimization-cypress 64.77% <100.00%> (-0.18%) ⬇️
test-optimization-jest 72.00% <100.00%> (-0.37%) ⬇️
test-optimization-mocha 72.06% <100.00%> (+0.21%) ⬆️
test-optimization-playwright-playwright-atr 59.54% <100.00%> (-0.12%) ⬇️
test-optimization-playwright-playwright-efd 59.68% <100.00%> (-0.13%) ⬇️
test-optimization-playwright-playwright-final-status 59.84% <100.00%> (-0.20%) ⬇️
test-optimization-playwright-playwright-impacted-tests 59.40% <100.00%> (-0.05%) ⬇️
test-optimization-playwright-playwright-reporting 60.87% <100.00%> (-0.26%) ⬇️
test-optimization-playwright-playwright-test-management 60.34% <100.00%> (-0.30%) ⬇️
test-optimization-playwright-playwright-test-span 59.58% <100.00%> (-0.25%) ⬇️
test-optimization-selenium 58.78% <100.00%> (-0.30%) ⬇️
test-optimization-testopt 57.45% <100.00%> (-0.06%) ⬇️
test-optimization-vitest 72.71% <100.00%> (-0.32%) ⬇️
test-optimization-vitest-browser 58.63% <100.00%> (-0.15%) ⬇️
test-optimization-webdriverio 64.92% <100.00%> (-0.12%) ⬇️

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.

@mabdinur mabdinur changed the title test(debugger): cover OTLP trace export fix(core): handle missing async trigger resources Aug 14, 2026
@github-actions github-actions Bot added core and removed debugger Dynamic Instrumentation & Live Debugger labels Aug 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.

1 participant