Skip to content

test(appsec): deflake api-security telemetry metrics integration tests#9303

Merged
BridgeAR merged 2 commits into
masterfrom
ccapell/fix-apisec-metrics-flaky-test
Jul 13, 2026
Merged

test(appsec): deflake api-security telemetry metrics integration tests#9303
BridgeAR merged 2 commits into
masterfrom
ccapell/fix-apisec-metrics-flaky-test

Conversation

@CarlesDD

@CarlesDD CarlesDD commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes a flaky assertion in packages/dd-trace/test/appsec/api-security-metrics.integration.spec.js ("should emit api_security.request.schema with framework tag for sampled requests" and the analogous "missing_route" test).

Motivation

This test has been flaky 3 times over the past week in CI: Flaky job

Additional Notes

Verified with 5 consecutive local runs, all green. No production code changes.

@dd-octo-sts

dd-octo-sts Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 6.71 MB
Deduped: 7.37 MB
No deduping: 7.37 MB

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

@CarlesDD
CarlesDD marked this pull request as ready for review July 13, 2026 09:46
@CarlesDD
CarlesDD requested a review from a team as a code owner July 13, 2026 09:46
@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jul 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: 96.55% (-0.00%)

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

@pr-commenter

pr-commenter Bot commented Jul 13, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-07-13 16:22:12

Comparing candidate commit a1fce63 in PR branch ccapell/fix-apisec-metrics-flaky-test with baseline commit adf5f1c in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 2311 metrics, 47 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 [-209.026ms; +211.636ms] or [-7.860%; +7.958%]

scenario:appsec-appsec-enabled-26

  • unstable execution_time [-231080.629µs; +229337.829µs] or [-9.056%; +8.988%]

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

  • unstable execution_time [-162178.217µs; +163798.050µs] or [-5.257%; +5.310%]

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

  • unstable execution_time [-191.984ms; +138.045ms] or [-6.692%; +4.812%]

scenario:appsec-control-20

  • unstable execution_time [-91.316ms; +139.747ms] or [-5.664%; +8.668%]

scenario:appsec-control-24

  • unstable execution_time [-113786.462µs; +112180.295µs] or [-9.172%; +9.042%]

scenario:appsec-control-26

  • unstable execution_time [-123295.299µs; +124734.299µs] or [-9.983%; +10.099%]

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

  • unstable execution_time [-16.674ms; +10.975ms] or [-6.431%; +4.233%]

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

  • unstable cpu_usage_percentage [-5.836%; +4.653%]
  • unstable execution_time [-32.343ms; +42.363ms] or [-5.832%; +7.639%]

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

  • unstable execution_time [-28.187ms; +35.530ms] or [-5.141%; +6.480%]

scenario:child_process-file-args-24

  • unstable execution_time [-25.564ms; +22.650ms] or [-5.368%; +4.756%]

scenario:child_process-shell-string-24

  • unstable cpu_usage_percentage [-6.468%; +3.628%]
  • unstable execution_time [-13.383ms; +26.324ms] or [-4.143%; +8.149%]
  • unstable throughput [-233948.155op/s; +136913.560op/s] or [-6.466%; +3.784%]

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

  • unstable cpu_user_time [-428.199ms; +430.445ms] or [-5.291%; +5.319%]
  • unstable execution_time [-477.811ms; +459.110ms] or [-5.434%; +5.221%]
  • unstable instructions [-3303.4M instructions; +3300.6M instructions] or [-5.005%; +5.001%]
  • unstable throughput [-194.668op/s; +202.292op/s] or [-5.324%; +5.533%]

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

  • unstable cpu_user_time [-2964.581ms; +2933.934ms] or [-29.881%; +29.573%]
  • unstable execution_time [-3005.990ms; +2930.919ms] or [-28.137%; +27.434%]
  • unstable instructions [-26095.6M instructions; +26046.7M instructions] or [-31.407%; +31.348%]
  • unstable max_rss_usage [-9274.527KB; +9513.727KB] or [-5.754%; +5.902%]
  • unstable throughput [-636.463op/s; +668.633op/s] or [-20.331%; +21.359%]

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

  • unstable cpu_user_time [-429.703ms; +427.594ms] or [-5.378%; +5.351%]
  • unstable execution_time [-502.586ms; +528.916ms] or [-5.785%; +6.088%]
  • unstable instructions [-3339.7M instructions; +3320.8M instructions] or [-5.149%; +5.120%]
  • unstable throughput [-217.391op/s; +211.814op/s] or [-5.875%; +5.724%]

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

  • unstable cpu_user_time [-1853.062ms; +595.743ms] or [-19.713%; +6.337%]
  • unstable execution_time [-1884.628ms; +611.651ms] or [-18.604%; +6.038%]
  • unstable instructions [-18.3G instructions; +6.0G instructions] or [-23.190%; +7.663%]
  • unstable throughput [-138.103op/s; +415.585op/s] or [-4.260%; +12.820%]

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

  • unstable cpu_user_time [-2112.842ms; +3318.080ms] or [-22.612%; +35.510%]
  • unstable execution_time [-2044.949ms; +3297.568ms] or [-20.271%; +32.687%]
  • unstable instructions [-18.9G instructions; +29.4G instructions] or [-24.247%; +37.737%]
  • unstable max_rss_usage [-6.293MB; +10.452MB] or [-3.960%; +6.576%]
  • unstable throughput [-719.685op/s; +444.169op/s] or [-22.125%; +13.655%]

scenario:dogstatsd-with-tags-20

  • unstable cpu_user_time [-277.339ms; +433.185ms] or [-5.700%; +8.903%]
  • unstable execution_time [-280.747ms; +433.258ms] or [-5.684%; +8.771%]
  • unstable throughput [-150391.079op/s; +96939.195op/s] or [-8.840%; +5.698%]

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

  • unstable cpu_user_time [-213.601ms; +169.710ms] or [-5.609%; +4.457%]

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

  • unstable cpu_user_time [-690495.670µs; +692049.370µs] or [-5.373%; +5.385%]
  • unstable execution_time [-698466.886µs; +697242.686µs] or [-5.313%; +5.304%]
  • unstable throughput [-3.200op/s; +3.210op/s] or [-5.228%; +5.243%]

scenario:plugin-mongodb-core-deep-aggregate-26

  • unstable execution_time [-161.630ms; +187.992ms] or [-5.921%; +6.886%]
  • unstable throughput [-22926.986op/s; +20407.092op/s] or [-5.309%; +4.726%]

scenario:test-optimization-large-suite-20

  • unstable max_rss_usage [-5.885MB; +3.143MB] or [-7.343%; +3.921%]

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.58%. Comparing base (adf5f1c) to head (a1fce63).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9303      +/-   ##
==========================================
- Coverage   96.58%   96.58%   -0.01%     
==========================================
  Files         918      918              
  Lines      121584   121584              
  Branches    21169    20802     -367     
==========================================
- Hits       117436   117435       -1     
- Misses       4148     4149       +1     
Flag Coverage Δ
aiguard 53.56% <ø> (-0.05%) ⬇️
aiguard-integration 57.01% <ø> (ø)
apm-bucket-0 53.79% <ø> (-0.05%) ⬇️
apm-bucket-1 58.08% <ø> (-0.05%) ⬇️
apm-bucket-2 56.11% <ø> (-0.05%) ⬇️
apm-capabilities-tracing 60.34% <ø> (ø)
apm-integrations-aerospike 52.94% <ø> (-0.05%) ⬇️
apm-integrations-confluentinc-kafka-javascript 57.06% <ø> (-0.05%) ⬇️
apm-integrations-couchbase 53.27% <ø> (-0.05%) ⬇️
apm-integrations-http 57.96% <ø> (-0.05%) ⬇️
apm-integrations-kafkajs 57.71% <ø> (-0.05%) ⬇️
apm-integrations-next 54.24% <ø> (-0.05%) ⬇️
apm-integrations-prisma 54.17% <ø> (-0.05%) ⬇️
apm-integrations-tedious 53.04% <ø> (-0.05%) ⬇️
appsec 69.00% <ø> (-0.04%) ⬇️
appsec-express_fastify_graphql 65.59% <ø> (-0.05%) ⬇️
appsec-integration 45.59% <ø> (ø)
appsec-kafka_ldapjs_lodash 59.09% <ø> (-0.04%) ⬇️
appsec-mongodb-core_mongoose_mysql 62.25% <ø> (-0.04%) ⬇️
appsec-next 52.85% <ø> (-0.04%) ⬇️
appsec-node-serialize_passport_postgres 61.88% <ø> (-0.04%) ⬇️
appsec-sourcing_stripe_template 60.34% <ø> (-0.04%) ⬇️
debugger 65.71% <ø> (-0.02%) ⬇️
instrumentations-bucket-0 48.75% <ø> (-0.05%) ⬇️
instrumentations-bucket-1 54.96% <ø> (-0.05%) ⬇️
instrumentations-bucket-10 56.63% <ø> (-0.05%) ⬇️
instrumentations-bucket-11 48.74% <ø> (-0.05%) ⬇️
instrumentations-bucket-12 48.84% <ø> (-0.05%) ⬇️
instrumentations-bucket-13 48.68% <ø> (-0.05%) ⬇️
instrumentations-bucket-2 49.74% <ø> (-0.05%) ⬇️
instrumentations-bucket-3 53.83% <ø> (-0.05%) ⬇️
instrumentations-bucket-4 49.16% <ø> (-0.05%) ⬇️
instrumentations-bucket-5 53.01% <ø> (-0.05%) ⬇️
instrumentations-bucket-6 55.60% <ø> (-0.05%) ⬇️
instrumentations-bucket-7 53.61% <ø> (-0.05%) ⬇️
instrumentations-bucket-8 54.64% <ø> (-0.05%) ⬇️
instrumentations-bucket-9 56.10% <ø> (-0.04%) ⬇️
instrumentations-instrumentation-couchbase 48.18% <ø> (-0.05%) ⬇️
instrumentations-integration-esbuild 33.96% <ø> (ø)
llmobs-ai_anthropic_bedrock 57.73% <ø> (-0.04%) ⬇️
llmobs-bucket-1 56.80% <ø> (-0.04%) ⬇️
llmobs-openai 57.56% <ø> (-0.04%) ⬇️
llmobs-sdk 59.95% <ø> (-0.06%) ⬇️
llmobs-vertex-ai 54.21% <ø> (-0.05%) ⬇️
master-coverage 96.58% <ø> (?)
openfeature 54.62% <ø> (ø)
openfeature-unit 49.83% <ø> (-0.05%) ⬇️
platform-core_esbuild_instrumentations-misc 38.46% <ø> (-0.03%) ⬇️
platform-integration 62.24% <ø> (ø)
platform-shimmer_unit-guardrails_webpack 37.29% <ø> (-0.03%) ⬇️
plugins-bucket-0 53.18% <ø> (-0.05%) ⬇️
plugins-bucket-1 55.09% <ø> (ø)
plugins-bucket-11 55.60% <ø> (-0.05%) ⬇️
plugins-bucket-18 57.08% <ø> (-0.05%) ⬇️
plugins-bucket-19 55.36% <ø> (-0.07%) ⬇️
plugins-bucket-20 57.44% <ø> (-0.05%) ⬇️
plugins-bucket-4 53.85% <ø> (-0.05%) ⬇️
plugins-bullmq_cassandra_cookie 57.39% <ø> (-0.05%) ⬇️
plugins-cookie-parser_crypto_dd-trace-api 52.32% <ø> (-0.05%) ⬇️
plugins-fetch_fs_generic-pool 54.46% <ø> (-0.05%) ⬇️
plugins-google-cloud-pubsub_grpc_handlebars 59.87% <ø> (-0.05%) ⬇️
plugins-hapi_hono_ioredis 55.86% <ø> (-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.21% <ø> (-0.05%) ⬇️
plugins-moleculer_mongodb_mongodb-core 57.29% <ø> (-0.05%) ⬇️
plugins-mongoose_multer_mysql 54.71% <ø> (-0.05%) ⬇️
plugins-mysql2_nats_node-serialize 56.21% <ø> (-0.05%) ⬇️
plugins-opensearch_passport-http_pino 55.05% <ø> (-0.05%) ⬇️
plugins-postgres_process_pug 54.29% <ø> (-0.05%) ⬇️
plugins-redis_router_sequelize 57.01% <ø> (-0.05%) ⬇️
plugins-test-and-upstream-rhea_undici_url 57.03% <ø> (-0.05%) ⬇️
plugins-valkey_vm_winston 53.84% <ø> (-0.13%) ⬇️
plugins-ws 54.80% <ø> (-0.05%) ⬇️
profiling 58.20% <ø> (-0.05%) ⬇️
serverless-aws-sdk-aws-sdk 50.67% <ø> (-0.04%) ⬇️
serverless-aws-sdk-bedrockruntime 50.69% <ø> (-0.05%) ⬇️
serverless-aws-sdk-client 51.97% <ø> (-0.05%) ⬇️
serverless-aws-sdk-dynamodb 51.75% <ø> (-0.05%) ⬇️
serverless-aws-sdk-eventbridge 46.25% <ø> (-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.73% <ø> (-0.05%) ⬇️
serverless-aws-sdk-sns 55.48% <ø> (-0.05%) ⬇️
serverless-aws-sdk-sqs 55.91% <ø> (-0.05%) ⬇️
serverless-aws-sdk-stepfunctions 51.25% <ø> (-0.05%) ⬇️
serverless-aws-sdk-util 48.48% <ø> (-0.05%) ⬇️
serverless-bucket-0 55.23% <ø> (-0.01%) ⬇️
serverless-bucket-1 56.01% <ø> (-0.05%) ⬇️
test-optimization-cucumber 72.95% <ø> (+0.04%) ⬆️
test-optimization-cypress 66.40% <ø> (+0.11%) ⬆️
test-optimization-jest 74.26% <ø> (-0.03%) ⬇️
test-optimization-mocha 74.71% <ø> (+0.06%) ⬆️
test-optimization-playwright-playwright-atr 61.57% <ø> (+0.02%) ⬆️
test-optimization-playwright-playwright-efd 61.76% <ø> (+0.03%) ⬆️
test-optimization-playwright-playwright-final-status 61.72% <ø> (+0.02%) ⬆️
test-optimization-playwright-playwright-impacted-tests 61.44% <ø> (+0.19%) ⬆️
test-optimization-playwright-playwright-reporting 61.34% <ø> (+0.02%) ⬆️
test-optimization-playwright-playwright-test-management 62.25% <ø> (-0.09%) ⬇️
test-optimization-playwright-playwright-test-span 61.49% <ø> (-0.03%) ⬇️
test-optimization-selenium 60.67% <ø> (-0.08%) ⬇️
test-optimization-testopt 59.15% <ø> (+0.08%) ⬆️
test-optimization-vitest 71.59% <ø> (+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.

@BridgeAR
BridgeAR merged commit c67b1f3 into master Jul 13, 2026
657 checks passed
@BridgeAR
BridgeAR deleted the ccapell/fix-apisec-metrics-flaky-test branch July 13, 2026 17:07
@dd-octo-sts dd-octo-sts Bot mentioned this pull request Jul 14, 2026
This was referenced Jul 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.

2 participants