Skip to content

test(appsec): replace axios with fetch - #10076

Merged
BridgeAR merged 7 commits into
masterfrom
BridgeAR/2026-08-31-axios-appsec-tests
Sep 8, 2026
Merged

BridgeAR merged 7 commits into
masterfrom
BridgeAR/2026-08-31-axios-appsec-tests

Conversation

@BridgeAR

Copy link
Copy Markdown
Member

Fetch resolves when response headers arrive. The test helpers consume each response body before reporting completion, which preserves the existing request timing.

@dd-octo-sts

dd-octo-sts Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 8.85 MB
Deduped: 9.52 MB
No deduping: 9.52 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-datadog-prod-us1

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

Copy link
Copy Markdown

Tests

⚠️ Warnings

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

🧪 3 Tests failed in 1 job

LLMObs | claude-agent-sdk — ❌ 3 tests failed

View more details · View in GitHub Actions

❌ Plugin claude-agent-sdk with @anthropic-ai/claude-agent-sdk >=0.2.113 (0.3.259) instruments a full agentic call with subagents from with @anthropic-ai/claude-agent-sdk >=0.2.113 (0.3.259)   View in Datadog
Timeout of 15000ms 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-claude-agent-sdk/test/index.spec.js)

Error: Timeout of 15000ms 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-claude-agent-sdk/test/index.spec.js)
    at listOnTimeout (node:internal/timers:605:17)
    at process.processTimers (node:internal/timers:541:7)
❌ esm with @anthropic-ai/claude-agent-sdk >=0.2.113 (0.3.259) is instrumented named from with @anthropic-ai/claude-agent-sdk >=0.2.113 (0.3.259)   View in Datadog
Timeout of 30000ms 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-claude-agent-sdk/test/integration-test/client.spec.js)

Error: Timeout of 30000ms 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-claude-agent-sdk/test/integration-test/client.spec.js)
    at listOnTimeout (node:internal/timers:605:17)
    at process.processTimers (node:internal/timers:541:7)
❌ esm with @anthropic-ai/claude-agent-sdk >=0.2.113 (0.3.259) is instrumented named-from-namespace from with @anthropic-ai/claude-agent-sdk >=0.2.113 (0.3.259)   View in Datadog
Timeout of 30000ms 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-claude-agent-sdk/test/integration-test/client.spec.js)

Error: Timeout of 30000ms 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-claude-agent-sdk/test/integration-test/client.spec.js)
    at listOnTimeout (node:internal/timers:605:17)
    at process.processTimers (node:internal/timers:541:7)

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 98.16% (+0.00%)

Useful? React with 👍 / 👎

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

@pr-commenter

pr-commenter Bot commented Aug 31, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-09-08 16:02:17

Comparing candidate commit 43bba41 in PR branch BridgeAR/2026-08-31-axios-appsec-tests with baseline commit b5bb711 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 2304 metrics, 9 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-with-attacks-20

  • unstable max_rss_usage [-13.759MB; +4.421MB] or [-8.066%; +2.592%]

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

  • unstable max_rss_usage [-11.858MB; +18.778MB] or [-4.712%; +7.462%]

scenario:encoders-0.4-immediate-flush-20

  • unstable max_rss_usage [-10.743MB; +5.631MB] or [-14.061%; +7.369%]

scenario:llmobs-encode-unicode-mixed-20

  • unstable max_rss_usage [-12.514MB; +5.979MB] or [-16.368%; +7.820%]

scenario:plugin-aws-sdk-eventbridge-inject-detail-24

  • unstable execution_time [-188.236ms; +320.542ms] or [-3.878%; +6.604%]

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

  • unstable execution_time [-243.130ms; +486.010ms] or [-3.415%; +6.826%]

scenario:plugin-claude-agent-sdk-delayed-noisy-stream-scan-20

  • unstable execution_time [-131.338ms; +213.610ms] or [-3.875%; +6.303%]

scenario:plugin-pg-service-26

  • unstable execution_time [-82.143ms; +141.846ms] or [-5.092%; +8.793%]
  • unstable throughput [-433428.958op/s; +257208.883op/s] or [-6.284%; +3.729%]

@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.67%. Comparing base (b5bb711) to head (43bba41).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10076      +/-   ##
==========================================
- Coverage   98.68%   98.67%   -0.01%     
==========================================
  Files        1006     1006              
  Lines      158039   158039              
  Branches       74       74              
==========================================
- Hits       155957   155952       -5     
- Misses       2082     2087       +5     
Flag Coverage Δ
ai-guard 65.00% <ø> (-0.02%) ⬇️
apm-capabilities 63.75% <ø> (ø)
apm-integrations 81.47% <ø> (-0.02%) ⬇️
appsec 58.85% <ø> (+<0.01%) ⬆️
debugger 69.84% <ø> (-0.01%) ⬇️
instrumentation 53.70% <ø> (-0.02%) ⬇️
llmobs 79.01% <ø> (-0.02%) ⬇️
master-coverage 98.67% <ø> (?)
openfeature 66.39% <ø> (-0.03%) ⬇️
platform 69.31% <ø> (-0.01%) ⬇️
profiling 66.76% <ø> (-0.03%) ⬇️
serverless 65.73% <ø> (-0.02%) ⬇️
test-optimization 82.78% <ø> (-0.03%) ⬇️

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.

@BridgeAR
BridgeAR marked this pull request as ready for review September 1, 2026 09:17
@BridgeAR
BridgeAR requested review from a team as code owners September 1, 2026 09:17

@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: 97bc30d9c4

ℹ️ 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 integration-tests/appsec/inferred-proxy-spans.spec.js
@BridgeAR
BridgeAR force-pushed the BridgeAR/2026-08-31-axios-appsec-tests branch from 97bc30d to fa67ca5 Compare September 1, 2026 09:49
Fetch resolves when response headers arrive. The test helpers consume each response body before reporting completion, which preserves the existing request timing.
Fetch resolves when response headers arrive. Each helper consumes the response body before assertions run, which preserves the existing request timing.
Fetch resolves when response headers arrive. Each helper consumes the response body before the test proceeds, preserving the prior request completion timing.
Fetch resolves when response headers arrive. The helper consumes the response body before the test completes, preserving the prior request timing.
Fetch resolves when response headers arrive. The helper consumes the response body before the test completes, preserving the prior request timing.
Fetch resolves 4xx and 5xx responses, unlike the Axios calls these helpers replaced. Without an explicit success check, the tests can pass after a broken request.
@BridgeAR
BridgeAR force-pushed the BridgeAR/2026-08-31-axios-appsec-tests branch from fa67ca5 to 43bba41 Compare September 8, 2026 15:49
@BridgeAR
BridgeAR merged commit d277606 into master Sep 8, 2026
1474 of 1513 checks passed
@BridgeAR
BridgeAR deleted the BridgeAR/2026-08-31-axios-appsec-tests branch September 8, 2026 18:32
This was referenced Sep 9, 2026
BridgeAR added a commit that referenced this pull request Sep 11, 2026
Fetch resolves when response headers arrive. The test helpers consume each response body before reporting completion, which preserves the existing request timing.
BridgeAR added a commit that referenced this pull request Sep 11, 2026
Fetch resolves when response headers arrive. The test helpers consume each response body before reporting completion, which preserves the existing request timing.
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