Skip to content

test(dns): remove live resolver dependency - #9950

Merged
BridgeAR merged 6 commits into
masterfrom
BridgeAR/2026-08-24-dns-trace-timeout
Aug 31, 2026
Merged

BridgeAR merged 6 commits into
masterfrom
BridgeAR/2026-08-24-dns-trace-timeout

Conversation

@BridgeAR

@BridgeAR BridgeAR commented Aug 24, 2026 •

Copy link
Copy Markdown
Member

DNS plugin tests queried lvh.me, so resolver latency could exhaust the mock-agent timeout and leave c-ares work active during teardown.

Forward-lookup tests now use parser-rejected hostnames. Reverse tests use a closed loopback endpoint and await both the rejection and trace. Setup configures the default resolver before instrumentation because dns.setServers() replaces the top-level resolver functions.

Refs: https://github.com/DataDog/dd-trace-js/actions/runs/32678296794/job/97290335175?pr=9933

@dd-octo-sts

dd-octo-sts Bot commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 8.63 MB
Deduped: 9.3 MB
No deduping: 9.3 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.4.0 | 127.33 kB | 447.04 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-prod-us1-5

datadog-prod-us1-5 Bot commented Aug 24, 2026 •

Copy link
Copy Markdown

Tests

⚠️ Warnings

⚠️ Your PR has warnings. Tests failed — unable to determine if these are from required jobs.

🧪 1 Test failed in 1 job

All Green | all-green — ❌ 1 test failed

View more details · View in GitHub Actions

❌ esm with oracledb >=5 (6.10.0) is instrumented default-from-namespace from with oracledb >=5 (6.10.0)   View in Datadog
Timeout of 20000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/runner/work/dd-trace-js/dd-trace-js/packages/datadog-plugin-oracledb/test/integration-test/client.spec.js)

Error: Timeout of 20000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/runner/work/dd-trace-js/dd-trace-js/packages/datadog-plugin-oracledb/test/integration-test/client.spec.js)
    at listOnTimeout (node:internal/timers:559:17)
    at processTimers (node:internal/timers:502:7)

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

🔄 Datadog retried 1 test - 1 passed on retry View in Datadog

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 98.63% (-0.00%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 6e849c2 | Docs | View more details | Give us feedback!

@codecov

codecov Bot commented Aug 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.62%. Comparing base (040d17b) to head (6e849c2).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9950      +/-   ##
==========================================
- Coverage   98.62%   98.62%   -0.01%     
==========================================
  Files         996      996              
  Lines      152006   152006              
  Branches    13112    13265     +153     
==========================================
- Hits       149920   149919       -1     
- Misses       2086     2087       +1     
Flag Coverage Δ
aiguard 63.13% <ø> (-0.03%) ⬇️
aiguard-integration 58.99% <ø> (ø)
apm-bucket-0 62.49% <ø> (-0.03%) ⬇️
apm-bucket-1 67.93% <ø> (-0.03%) ⬇️
apm-bucket-2 67.48% <ø> (-0.03%) ⬇️
apm-bucket-3 64.34% <ø> (-0.03%) ⬇️
apm-capabilities-tracing 62.56% <ø> (ø)
apm-integrations-aerospike 60.50% <ø> (-0.03%) ⬇️
apm-integrations-confluentinc-kafka-javascript 66.62% <ø> (-0.03%) ⬇️
apm-integrations-couchbase 61.01% <ø> (-0.03%) ⬇️
apm-integrations-http 66.21% <ø> (-0.03%) ⬇️
apm-integrations-kafkajs 67.20% <ø> (-0.03%) ⬇️
apm-integrations-next 63.83% <ø> (-0.03%) ⬇️
apm-integrations-prisma 61.88% <ø> (-0.03%) ⬇️
appsec 76.73% <ø> (-0.02%) ⬇️
appsec-express_fastify_graphql 72.68% <ø> (-0.02%) ⬇️
appsec-integration 49.51% <ø> (ø)
appsec-kafka_ldapjs_lodash 67.43% <ø> (-0.03%) ⬇️
appsec-mongodb-core_mongoose_mysql 70.63% <ø> (-0.02%) ⬇️
appsec-next 57.11% <ø> (-0.02%) ⬇️
appsec-node-serialize_passport_postgres 70.09% <ø> (-0.02%) ⬇️
appsec-sourcing_stripe_template 68.52% <ø> (-0.02%) ⬇️
debugger 69.06% <ø> (-0.03%) ⬇️
instrumentations-bucket-0 56.06% <ø> (-0.03%) ⬇️
instrumentations-bucket-1 64.16% <ø> (-0.03%) ⬇️
instrumentations-bucket-10 53.28% <ø> (-0.03%) ⬇️
instrumentations-bucket-11 65.61% <ø> (-0.03%) ⬇️
instrumentations-bucket-12 61.38% <ø> (-0.03%) ⬇️
instrumentations-bucket-13 56.26% <ø> (-0.03%) ⬇️
instrumentations-bucket-14 55.71% <ø> (-0.03%) ⬇️
instrumentations-bucket-2 56.91% <ø> (-0.03%) ⬇️
instrumentations-bucket-3 57.12% <ø> (-0.03%) ⬇️
instrumentations-bucket-4 63.77% <ø> (-0.03%) ⬇️
instrumentations-bucket-5 56.51% <ø> (-0.03%) ⬇️
instrumentations-bucket-6 58.11% <ø> (-0.02%) ⬇️
instrumentations-bucket-7 65.64% <ø> (-0.03%) ⬇️
instrumentations-bucket-8 62.91% <ø> (-0.03%) ⬇️
instrumentations-bucket-9 64.50% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-couchbase 54.68% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-zlib 55.75% <ø> (-0.03%) ⬇️
instrumentations-integration-esbuild 34.48% <ø> (ø)
llmobs-ai_anthropic_bedrock 66.67% <ø> (-0.02%) ⬇️
llmobs-bucket-1 64.81% <ø> (-0.03%) ⬇️
llmobs-openai 66.69% <ø> (-0.03%) ⬇️
llmobs-openai-agents_vertex-ai 63.92% <ø> (-0.03%) ⬇️
llmobs-sdk 75.90% <ø> (-0.03%) ⬇️
master-coverage 98.62% <ø> (?)
openfeature 59.58% <ø> (ø)
openfeature-unit 58.26% <ø> (-0.03%) ⬇️
platform-core_esbuild_instrumentations-misc 41.06% <ø> (-0.02%) ⬇️
platform-integration 64.79% <ø> (ø)
platform-shimmer_unit-guardrails_webpack 38.89% <ø> (-0.02%) ⬇️
plugins-browser-bunyan_bullmq_cassandra 66.22% <ø> (-0.03%) ⬇️
plugins-bucket-0 60.91% <ø> (-0.03%) ⬇️
plugins-bucket-1 58.13% <ø> (ø)
plugins-bucket-11 67.67% <ø> (-0.03%) ⬇️
plugins-bucket-18 65.43% <ø> (-0.03%) ⬇️
plugins-bucket-19 64.91% <ø> (-0.03%) ⬇️
plugins-bucket-20 68.63% <ø> (-0.03%) ⬇️
plugins-bucket-4 61.07% <ø> (-0.03%) ⬇️
plugins-cookie_cookie-parser_crypto 55.65% <ø> (-0.03%) ⬇️
plugins-fastify_fetch_fs 65.32% <ø> (-0.03%) ⬇️
plugins-generic-pool_google-cloud-pubsub_grpc 68.92% <ø> (-0.03%) ⬇️
plugins-handlebars_hapi_hono 63.58% <ø> (-0.03%) ⬇️
plugins-ioredis_knex_langgraph 61.59% <ø> (-0.03%) ⬇️
plugins-ldapjs_light-my-request_limitd-client 63.29% <ø> (-0.04%) ⬇️
plugins-lodash_mariadb_memcached 63.78% <ø> (-0.03%) ⬇️
plugins-moleculer_mongodb_mongodb-core 66.03% <ø> (-0.03%) ⬇️
plugins-mongoose_multer_mysql 63.88% <ø> (-0.03%) ⬇️
plugins-mysql2_nats_node-serialize 66.10% <ø> (-0.03%) ⬇️
plugins-opensearch_passport-http_pino 63.99% <ø> (-0.03%) ⬇️
plugins-postgres_process_pug 63.03% <ø> (-0.03%) ⬇️
plugins-redis_router_sequelize 66.60% <ø> (-0.03%) ⬇️
plugins-test-and-upstream-rhea_undici_url 65.95% <ø> (-0.03%) ⬇️
plugins-valkey_vm_winston 62.35% <ø> (-0.03%) ⬇️
plugins-ws 64.42% <ø> (-0.03%) ⬇️
profiling 66.18% <ø> (-0.03%) ⬇️
serverless-aws-sdk-aws-sdk 55.41% <ø> (-0.02%) ⬇️
serverless-aws-sdk-base-inject-field 55.23% <ø> (-0.03%) ⬇️
serverless-aws-sdk-bedrockruntime 58.25% <ø> (-0.03%) ⬇️
serverless-aws-sdk-client 60.03% <ø> (-0.03%) ⬇️
serverless-aws-sdk-dynamodb 59.11% <ø> (-0.04%) ⬇️
serverless-aws-sdk-eventbridge 57.61% <ø> (-0.02%) ⬇️
serverless-aws-sdk-kinesis 63.08% <ø> (-0.03%) ⬇️
serverless-aws-sdk-lambda 61.05% <ø> (-0.03%) ⬇️
serverless-aws-sdk-s3 59.16% <ø> (-0.03%) ⬇️
serverless-aws-sdk-serverless-peer-service 63.65% <ø> (-0.03%) ⬇️
serverless-aws-sdk-sns 63.97% <ø> (-0.03%) ⬇️
serverless-aws-sdk-sqs 64.43% <ø> (-0.03%) ⬇️
serverless-aws-sdk-stepfunctions 59.02% <ø> (-0.03%) ⬇️
serverless-aws-sdk-util 55.85% <ø> (-0.03%) ⬇️
serverless-bucket-0 57.76% <ø> (ø)
serverless-bucket-1 63.66% <ø> (-0.03%) ⬇️
test-optimization-cucumber 70.50% <ø> (-0.02%) ⬇️
test-optimization-cypress 64.73% <ø> (+0.05%) ⬆️
test-optimization-jest 72.06% <ø> (+<0.01%) ⬆️
test-optimization-mocha 71.95% <ø> (+0.04%) ⬆️
test-optimization-playwright-playwright-atr 59.79% <ø> (-0.06%) ⬇️
test-optimization-playwright-playwright-efd 60.41% <ø> (-0.06%) ⬇️
test-optimization-playwright-playwright-final-status 60.03% <ø> (-0.11%) ⬇️
test-optimization-playwright-playwright-impacted-tests 60.14% <ø> (+0.08%) ⬆️
test-optimization-playwright-playwright-reporting 61.11% <ø> (-0.06%) ⬇️
test-optimization-playwright-playwright-test-management 61.33% <ø> (+0.07%) ⬆️
test-optimization-playwright-playwright-test-span 59.82% <ø> (-0.01%) ⬇️
test-optimization-selenium 58.85% <ø> (-0.10%) ⬇️
test-optimization-testopt 61.79% <ø> (+0.05%) ⬆️
test-optimization-vitest 72.67% <ø> (+0.06%) ⬆️
test-optimization-vitest-browser 58.69% <ø> (-0.06%) ⬇️
test-optimization-webdriverio 65.48% <ø> (+0.04%) ⬆️

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.

@pr-commenter

pr-commenter Bot commented Aug 24, 2026 •

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-08-31 17:50:40

Comparing candidate commit 6e849c2 in PR branch BridgeAR/2026-08-24-dns-trace-timeout with baseline commit 040d17b in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 2299 metrics, 11 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-20

  • unstable max_rss_usage [-17.077MB; +5.951MB] or [-9.661%; +3.367%]

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

  • unstable max_rss_usage [-20.237MB; +23.349MB] or [-5.422%; +6.255%]

scenario:dogstatsd-with-tags-20

  • unstable cpu_user_time [-351.828ms; +354.224ms] or [-7.110%; +7.158%]
  • unstable execution_time [-354.446ms; +356.981ms] or [-7.054%; +7.104%]
  • unstable throughput [-117196.667op/s; +119726.972op/s] or [-7.018%; +7.170%]

scenario:iast-sink-check-26

  • unstable execution_time [-152.260ms; +236.144ms] or [-4.069%; +6.310%]

scenario:plugin-aws-sdk-lambda-inject-with-context-24

  • unstable cpu_user_time [-195177.119µs; +193272.619µs] or [-5.075%; +5.026%]
  • unstable execution_time [-196.266ms; +192.922ms] or [-5.072%; +4.985%]

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

  • unstable cpu_usage_percentage [-6.118%; +4.536%]

scenario:plugin-graphql-long-with-depth-on-max-20

  • unstable max_rss_usage [-7812.907KB; +8500.907KB] or [-5.554%; +6.043%]

scenario:test-optimization-large-suite-20

  • unstable max_rss_usage [-4909.778KB; +3525.445KB] or [-6.135%; +4.405%]

@BridgeAR
BridgeAR force-pushed the BridgeAR/2026-08-24-dns-trace-timeout branch from 4117ee3 to e8c2668 Compare August 24, 2026 22:52
@BridgeAR
BridgeAR marked this pull request as ready for review August 24, 2026 22:53
@BridgeAR
BridgeAR requested review from a team as code owners August 24, 2026 22:53
@BridgeAR
BridgeAR requested a review from crysmags August 24, 2026 22:53
Comment thread packages/datadog-plugin-dns/test/dns-server.js Outdated

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

Copy link
Copy Markdown

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: 07a8e0af62

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/datadog-plugin-dns/test/index.spec.js Outdated
Comment thread packages/datadog-plugin-dns/test/index.spec.js Outdated
@BridgeAR
BridgeAR marked this pull request as draft August 31, 2026 14:00
DNS plugin tests queried public DNS while the mock-agent timeout measured both lookup and trace delivery, so a slow resolver reported a missing trace and left the request running into teardown. The trace-delivery window now starts after the owned DNS operation settles.
Reverse lookups require a valid IP, so test-local resolvers cancel requests against a loopback endpoint without waiting for external DNS.
@BridgeAR
BridgeAR force-pushed the BridgeAR/2026-08-24-dns-trace-timeout branch from 5917a05 to 6f5433d Compare August 31, 2026 14:29
@BridgeAR
BridgeAR marked this pull request as ready for review August 31, 2026 14:49

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

Copy link
Copy Markdown

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: 6f5433d689

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/datadog-plugin-dns/test/index.spec.js Outdated
Comment thread packages/datadog-plugin-dns/test/index.spec.js Outdated
Calling dns.setServers() replaces the top-level resolver functions, so setup must run before instrumentation wraps them.

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

Copy link
Copy Markdown

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: 890d8fd936

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/datadog-plugin-dns/test/index.spec.js Outdated
dns.setServers() replaces the module top-level functions, so repeated setup can discard instrumentation before later tests run.
@BridgeAR
BridgeAR enabled auto-merge (squash) August 31, 2026 17:51
@BridgeAR
BridgeAR merged commit 3d8be3f into master Aug 31, 2026
932 of 934 checks passed
@BridgeAR
BridgeAR deleted the BridgeAR/2026-08-24-dns-trace-timeout branch August 31, 2026 18:00
dd-octo-sts Bot pushed a commit that referenced this pull request Sep 1, 2026
DNS plugin tests queried lvh.me, so resolver latency could exhaust the mock-agent timeout and leave c-ares work active during teardown.

Forward-lookup tests now use parser-rejected hostnames. Reverse tests use a closed loopback endpoint and await both the rejection and trace. Setup configures the default resolver before instrumentation because dns.setServers() replaces the top-level resolver functions.

Refs: DataDog/dd-trace-js/actions/runs/32678296794/job/97290335175?pr=9933
@dd-octo-sts dd-octo-sts Bot mentioned this pull request Sep 1, 2026
dd-octo-sts Bot pushed a commit that referenced this pull request Sep 1, 2026
DNS plugin tests queried lvh.me, so resolver latency could exhaust the mock-agent timeout and leave c-ares work active during teardown.

Forward-lookup tests now use parser-rejected hostnames. Reverse tests use a closed loopback endpoint and await both the rejection and trace. Setup configures the default resolver before instrumentation because dns.setServers() replaces the top-level resolver functions.

Refs: DataDog/dd-trace-js/actions/runs/32678296794/job/97290335175?pr=9933
@dd-octo-sts dd-octo-sts Bot mentioned this pull request Sep 1, 2026
BridgeAR added a commit that referenced this pull request Sep 4, 2026
DNS plugin tests queried lvh.me, so resolver latency could exhaust the mock-agent timeout and leave c-ares work active during teardown.

Forward-lookup tests now use parser-rejected hostnames. Reverse tests use a closed loopback endpoint and await both the rejection and trace. Setup configures the default resolver before instrumentation because dns.setServers() replaces the top-level resolver functions.

Refs: DataDog/dd-trace-js/actions/runs/32678296794/job/97290335175?pr=9933
BridgeAR added a commit that referenced this pull request Sep 4, 2026
DNS plugin tests queried lvh.me, so resolver latency could exhaust the mock-agent timeout and leave c-ares work active during teardown.

Forward-lookup tests now use parser-rejected hostnames. Reverse tests use a closed loopback endpoint and await both the rejection and trace. Setup configures the default resolver before instrumentation because dns.setServers() replaces the top-level resolver functions.

Refs: DataDog/dd-trace-js/actions/runs/32678296794/job/97290335175?pr=9933
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.

2 participants