Skip to content

test(playwright): stabilize request error tag reporting#9254

Merged
juan-fernandez merged 1 commit into
masterfrom
juan-fernandez/fix-playwright-request-error-tags
Jul 8, 2026
Merged

test(playwright): stabilize request error tag reporting#9254
juan-fernandez merged 1 commit into
masterfrom
juan-fernandez/fix-playwright-request-error-tags

Conversation

@juan-fernandez

@juan-fernandez juan-fernandez commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Stabilizes the Playwright request-error-tag reporting tests by running those assertions against a minimal Playwright fixture and waiting for the Playwright child process to exit before asserting on flushed CI Visibility payloads.

Motivation

The known-tests request-error-tag case was often failing at the 15s gatherPayloadsMaxTimeout deadline with missing session/module events, then passing on retry. The test did not need the full default browser-heavy fixture suite, and asserting on a fixed deadline could inspect an incomplete payload buffer. This makes the test faster and deterministic instead of raising the timeout.

@dd-octo-sts

dd-octo-sts Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 6.65 MB
Deduped: 7.31 MB
No deduping: 7.31 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.3.1 | 122.62 kB | 437.94 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

@pr-commenter

pr-commenter Bot commented Jul 8, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-07-08 09:19:47

Comparing candidate commit 3750249 in PR branch juan-fernandez/fix-playwright-request-error-tags with baseline commit a619775 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 2309 metrics, 49 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 [-212.170ms; +215.299ms] or [-8.003%; +8.121%]

scenario:appsec-appsec-enabled-26

  • unstable execution_time [-224.673ms; +230.746ms] or [-8.858%; +9.097%]

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

  • unstable execution_time [-160.769ms; +167.878ms] or [-5.201%; +5.431%]

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

  • unstable execution_time [-184.724ms; +187.187ms] or [-6.333%; +6.417%]

scenario:appsec-control-20

  • unstable execution_time [-117655.284µs; +116150.584µs] or [-7.216%; +7.123%]

scenario:appsec-control-24

  • unstable execution_time [-111236.431µs; +110274.064µs] or [-8.992%; +8.914%]

scenario:appsec-control-26

  • unstable execution_time [-126.149ms; +119.049ms] or [-10.217%; +9.642%]

scenario:appsec-iast-no-vulnerability-control-20

  • unstable execution_time [-22.666ms; +7.792ms] or [-8.588%; +2.952%]

scenario:appsec-iast-startup-time-iast-enabled-20

  • unstable execution_time [-17.750ms; +26.079ms] or [-4.430%; +6.509%]

scenario:appsec-iast-with-vulnerability-control-20

  • unstable execution_time [-27.229ms; +34.473ms] or [-5.018%; +6.353%]

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

  • unstable execution_time [-23.501ms; +34.143ms] or [-4.275%; +6.212%]

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

  • unstable execution_time [-22.645ms; +32.103ms] or [-4.150%; +5.884%]

scenario:child_process-file-args-24

  • unstable execution_time [-23.294ms; +25.887ms] or [-4.868%; +5.410%]

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

  • unstable cpu_user_time [-2432.107ms; +3941.888ms] or [-28.355%; +45.957%]
  • unstable execution_time [-2426.215ms; +4006.722ms] or [-26.102%; +43.106%]
  • unstable instructions [-20.9G instructions; +33.6G instructions] or [-29.802%; +47.955%]
  • unstable max_rss_usage [-9.146MB; +13.738MB] or [-5.818%; +8.739%]
  • unstable throughput [-969.716op/s; +579.002op/s] or [-27.081%; +16.170%]

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

  • unstable cpu_user_time [-2174.244ms; +3367.384ms] or [-23.321%; +36.119%]
  • unstable execution_time [-2313.190ms; +3519.702ms] or [-23.005%; +35.003%]
  • unstable instructions [-18.9G instructions; +29.5G instructions] or [-24.307%; +37.949%]
  • unstable max_rss_usage [-6.896MB; +11.162MB] or [-4.347%; +7.036%]
  • unstable throughput [-749.625op/s; +510.014op/s] or [-22.892%; +15.575%]

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

  • unstable cpu_user_time [-3934.690ms; +2320.511ms] or [-36.561%; +21.562%]
  • unstable execution_time [-3978.417ms; +2355.435ms] or [-34.626%; +20.500%]
  • unstable instructions [-35.3G instructions; +21.0G instructions] or [-39.068%; +23.224%]
  • unstable max_rss_usage [-12.299MB; +7.215MB] or [-7.533%; +4.419%]
  • unstable throughput [-528.920op/s; +832.922op/s] or [-17.780%; +27.999%]

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

  • unstable cpu_user_time [-1885.672ms; +2528.146ms] or [-22.790%; +30.555%]
  • unstable execution_time [-1924.771ms; +2556.351ms] or [-21.416%; +28.443%]
  • unstable instructions [-16.0G instructions; +21.6G instructions] or [-23.650%; +31.874%]
  • unstable throughput [-715.447op/s; +587.017op/s] or [-19.624%; +16.101%]

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

  • unstable cpu_user_time [-1798.406ms; +625.875ms] or [-19.261%; +6.703%]
  • unstable execution_time [-1848.214ms; +669.294ms] or [-18.384%; +6.657%]
  • unstable instructions [-16.1G instructions; +5.3G instructions] or [-20.563%; +6.767%]
  • unstable throughput [-154.853op/s; +395.792op/s] or [-4.736%; +12.106%]

scenario:dogstatsd-aggregated-20

  • unstable execution_time [-71.527ms; +87.432ms] or [-5.565%; +6.803%]

scenario:dogstatsd-with-tags-20

  • unstable cpu_user_time [-350.024ms; +347.693ms] or [-7.068%; +7.021%]
  • unstable execution_time [-347891.935µs; +345988.102µs] or [-6.915%; +6.877%]
  • unstable throughput [-118661.434op/s; +119487.829op/s] or [-7.111%; +7.161%]

scenario:fs-subscribed-24

  • unstable throughput [-150314.745op/s; +96647.571op/s] or [-6.798%; +4.371%]

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

  • unstable cpu_usage_percentage [-5.494%; +4.700%]

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

  • unstable cpu_usage_percentage [-4.677%; +6.400%]

scenario:plugin-graphql-long-with-depth-off-20

  • unstable max_rss_usage [-5.431MB; +8.365MB] or [-4.211%; +6.487%]

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

  • unstable cpu_user_time [-709.318ms; +727.461ms] or [-5.534%; +5.676%]
  • unstable execution_time [-710.106ms; +730.338ms] or [-5.421%; +5.575%]
  • unstable throughput [-3.370op/s; +3.273op/s] or [-5.484%; +5.327%]

scenario:propagation-inject-20

  • unstable execution_time [-48.169ms; +72.958ms] or [-4.216%; +6.386%]

scenario:test-optimization-large-suite-20

  • unstable max_rss_usage [-6378.849KB; +4984.516KB] or [-7.847%; +6.132%]

@juan-fernandez
juan-fernandez marked this pull request as ready for review July 8, 2026 09:20
@juan-fernandez
juan-fernandez requested a review from a team as a code owner July 8, 2026 09:20
@juan-fernandez
juan-fernandez enabled auto-merge (squash) July 8, 2026 09:22
@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented Jul 8, 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: 96.50% (-0.00%)

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

@juan-fernandez
juan-fernandez merged commit 75ad052 into master Jul 8, 2026
654 checks passed
@juan-fernandez
juan-fernandez deleted the juan-fernandez/fix-playwright-request-error-tags branch July 8, 2026 09:24
@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.54%. Comparing base (a619775) to head (3750249).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9254      +/-   ##
==========================================
- Coverage   96.54%   96.54%   -0.01%     
==========================================
  Files         915      915              
  Lines      121018   121018              
  Branches    20693    20841     +148     
==========================================
- Hits       116837   116835       -2     
- Misses       4181     4183       +2     
Flag Coverage Δ
aiguard 53.57% <ø> (-0.05%) ⬇️
aiguard-integration 57.01% <ø> (ø)
apm-bucket-0 53.80% <ø> (-0.05%) ⬇️
apm-bucket-1 58.11% <ø> (-0.05%) ⬇️
apm-bucket-2 56.12% <ø> (-0.05%) ⬇️
apm-capabilities-tracing 60.30% <ø> (ø)
apm-integrations-aerospike 52.95% <ø> (-0.05%) ⬇️
apm-integrations-confluentinc-kafka-javascript 57.08% <ø> (+0.01%) ⬆️
apm-integrations-couchbase 53.27% <ø> (-0.05%) ⬇️
apm-integrations-http 57.99% <ø> (-0.04%) ⬇️
apm-integrations-kafkajs 57.73% <ø> (-0.07%) ⬇️
apm-integrations-next 54.25% <ø> (-0.05%) ⬇️
apm-integrations-prisma 54.19% <ø> (-0.05%) ⬇️
apm-integrations-tedious 53.05% <ø> (-0.05%) ⬇️
appsec 69.08% <ø> (-0.05%) ⬇️
appsec-express_fastify_graphql 65.71% <ø> (-0.03%) ⬇️
appsec-integration 45.51% <ø> (ø)
appsec-kafka_ldapjs_lodash 59.13% <ø> (-0.04%) ⬇️
appsec-mongodb-core_mongoose_mysql 62.29% <ø> (-0.04%) ⬇️
appsec-next 52.86% <ø> (-0.04%) ⬇️
appsec-node-serialize_passport_postgres 61.93% <ø> (-0.04%) ⬇️
appsec-sourcing_stripe_template 60.27% <ø> (-0.04%) ⬇️
debugger 65.72% <ø> (ø)
instrumentations-bucket-0 48.75% <ø> (-0.05%) ⬇️
instrumentations-bucket-1 54.98% <ø> (-0.05%) ⬇️
instrumentations-bucket-10 56.65% <ø> (-0.05%) ⬇️
instrumentations-bucket-11 48.74% <ø> (-0.05%) ⬇️
instrumentations-bucket-12 48.85% <ø> (-0.05%) ⬇️
instrumentations-bucket-13 48.68% <ø> (-0.05%) ⬇️
instrumentations-bucket-2 49.74% <ø> (-0.05%) ⬇️
instrumentations-bucket-3 53.84% <ø> (-0.05%) ⬇️
instrumentations-bucket-4 49.17% <ø> (-0.05%) ⬇️
instrumentations-bucket-5 53.02% <ø> (-0.05%) ⬇️
instrumentations-bucket-6 55.63% <ø> (-0.05%) ⬇️
instrumentations-bucket-7 53.61% <ø> (-0.05%) ⬇️
instrumentations-bucket-8 54.65% <ø> (-0.05%) ⬇️
instrumentations-bucket-9 56.11% <ø> (-0.04%) ⬇️
instrumentations-instrumentation-couchbase 48.17% <ø> (-0.05%) ⬇️
instrumentations-integration-esbuild 33.91% <ø> (ø)
llmobs-ai_anthropic_bedrock 57.76% <ø> (-0.04%) ⬇️
llmobs-bucket-1 56.82% <ø> (-0.04%) ⬇️
llmobs-openai 57.59% <ø> (-0.04%) ⬇️
llmobs-sdk 59.99% <ø> (-0.05%) ⬇️
llmobs-vertex-ai 54.22% <ø> (-0.05%) ⬇️
master-coverage 96.54% <ø> (?)
openfeature 54.62% <ø> (ø)
openfeature-unit 49.82% <ø> (-0.05%) ⬇️
platform-core_esbuild_instrumentations-misc 38.38% <ø> (-0.03%) ⬇️
platform-integration 62.19% <ø> (ø)
platform-shimmer_unit-guardrails_webpack 37.19% <ø> (-0.03%) ⬇️
plugins-bucket-0 53.19% <ø> (-0.05%) ⬇️
plugins-bucket-1 55.08% <ø> (ø)
plugins-bucket-11 56.74% <ø> (-0.05%) ⬇️
plugins-bucket-17 56.76% <ø> (-0.05%) ⬇️
plugins-bucket-18 57.61% <ø> (-0.04%) ⬇️
plugins-bucket-19 57.14% <ø> (-0.05%) ⬇️
plugins-bucket-20 59.39% <ø> (-0.05%) ⬇️
plugins-bucket-4 53.86% <ø> (-0.05%) ⬇️
plugins-bullmq_cassandra_cookie 57.41% <ø> (-0.05%) ⬇️
plugins-cookie-parser_crypto_dd-trace-api 52.33% <ø> (-0.05%) ⬇️
plugins-fetch_fs_generic-pool 54.47% <ø> (-0.13%) ⬇️
plugins-google-cloud-pubsub_grpc_handlebars 59.89% <ø> (-0.05%) ⬇️
plugins-hapi_hono_ioredis 55.88% <ø> (-0.05%) ⬇️
plugins-jest_knex_langgraph 51.67% <ø> (-0.05%) ⬇️
plugins-ldapjs_light-my-request_limitd-client 53.42% <ø> (-0.05%) ⬇️
plugins-lodash_mariadb_memcached 54.22% <ø> (-0.05%) ⬇️
plugins-mongodb_mongodb-core_mongoose 55.47% <ø> (-0.05%) ⬇️
plugins-multer_mysql_mysql2 54.38% <ø> (-0.05%) ⬇️
plugins-nats_node-serialize_opensearch 56.08% <ø> (-0.05%) ⬇️
plugins-passport-http_pino_postgres 54.76% <ø> (-0.05%) ⬇️
plugins-process_pug_redis 53.88% <ø> (-0.05%) ⬇️
plugins-undici_url_valkey 54.31% <ø> (-0.13%) ⬇️
plugins-vm_winston_ws 55.28% <ø> (-0.06%) ⬇️
profiling 58.22% <ø> (-0.05%) ⬇️
serverless-aws-sdk-aws-sdk 50.67% <ø> (-0.04%) ⬇️
serverless-aws-sdk-bedrockruntime 50.68% <ø> (-0.05%) ⬇️
serverless-aws-sdk-client 51.96% <ø> (-0.05%) ⬇️
serverless-aws-sdk-dynamodb 51.75% <ø> (-0.05%) ⬇️
serverless-aws-sdk-eventbridge 46.22% <ø> (-0.05%) ⬇️
serverless-aws-sdk-kinesis 54.71% <ø> (-0.05%) ⬇️
serverless-aws-sdk-lambda 52.79% <ø> (-0.05%) ⬇️
serverless-aws-sdk-s3 51.53% <ø> (-0.05%) ⬇️
serverless-aws-sdk-serverless-peer-service 54.74% <ø> (-0.05%) ⬇️
serverless-aws-sdk-sns 55.49% <ø> (-0.05%) ⬇️
serverless-aws-sdk-sqs 55.92% <ø> (-0.05%) ⬇️
serverless-aws-sdk-stepfunctions 51.25% <ø> (-0.05%) ⬇️
serverless-aws-sdk-util 48.46% <ø> (-0.05%) ⬇️
serverless-bucket-0 55.24% <ø> (-0.01%) ⬇️
serverless-bucket-1 56.02% <ø> (-0.05%) ⬇️
test-optimization-cucumber 72.94% <ø> (-0.04%) ⬇️
test-optimization-cypress 66.41% <ø> (+0.01%) ⬆️
test-optimization-jest 73.91% <ø> (-0.05%) ⬇️
test-optimization-mocha 74.32% <ø> (+0.04%) ⬆️
test-optimization-playwright-playwright-atr 61.59% <ø> (-0.01%) ⬇️
test-optimization-playwright-playwright-efd 61.78% <ø> (ø)
test-optimization-playwright-playwright-final-status 61.73% <ø> (-0.01%) ⬇️
test-optimization-playwright-playwright-impacted-tests 61.46% <ø> (+0.16%) ⬆️
test-optimization-playwright-playwright-reporting 61.36% <ø> (-0.20%) ⬇️
test-optimization-playwright-playwright-test-management 62.27% <ø> (-0.12%) ⬇️
test-optimization-playwright-playwright-test-span 61.49% <ø> (-0.07%) ⬇️
test-optimization-selenium 60.69% <ø> (-0.17%) ⬇️
test-optimization-testopt 59.15% <ø> (+0.08%) ⬆️
test-optimization-vitest 72.76% <ø> (+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.

@datadog-prod-us1-4 datadog-prod-us1-4 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.

Datadog Autotest: PASS

More details

The refactored tests are behaviorally sound. The switch from gatherPayloadsMaxTimeout to gatherPayloadsUntilChildExit with the minimal request-error-tag-test.js fixture eliminates the 15s race-to-deadline that caused intermittent failures, and the shared assertRequestErrorTag helper improves on the old code by adding assert.ok guards before property access (the old known-tests and test-management tests accessed .content directly without existence checks, which would have produced opaque TypeErrors). The added exitCode === 0 assertion also catches a previously silent failure mode.

Was this helpful? React 👍 or 👎

📊 Validated against 17 scenarios · Open Bits AI session

🤖 Datadog Autotest · Commit 3750249 · What is Autotest? · Any feedback? Reach out in #autotest

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