Skip to content

chore(benchmarks): update known flaky benchmarks - #20050

Open
igoragoli wants to merge 8 commits into
mainfrom
augusto/update-known-flaky-benchmarks
Open

chore(benchmarks): update known flaky benchmarks#20050
igoragoli wants to merge 8 commits into
mainfrom
augusto/update-known-flaky-benchmarks

Conversation

@igoragoli

@igoragoli igoragoli commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Description

Updates known flaky benchmarks with httppropagationinject-ids_only, iastaspectsospath-ospathbasename_aspect, iastaspectssplit-(rsplit_aspect|rstrip_aspect), telemetryaddmetric-1-count-metric-1-times and tracer-small.

This prevents flaky benchmarks from breaching SLOs and polluting PR comments.

Testing

None.

Risks

None.

Additional Notes

I investigated 49 recent PRs that change code that shouldn't impact benchmarks: docs, release notes, tests, .riot/ lockfiles, CI config.

33 reported performance changes on scenarios outside our known flaky benchmarks. Adding the ones flagged on more than half of the 33:

  • httppropagationinject-ids_only — 33/33, median +12.7%
  • iastaspectsospath-ospathbasename_aspect — 33/33, median +31.2%
  • telemetryaddmetric-1-count-metric-1-times — 33/33, median +16.3%
  • tracer-small — 33/33, median +10.0%
  • iastaspectssplit-rsplit_aspect — 23/33, median +14.6%

Some scenarios are already in the known flaky benchmarks regex, corroborated by this data:

  • span-start -- 29/33
  • iastaspects-ljust_noaspect -- 10/33
  • iastaspects-casefold_noaspect -- 7/33
  • iastaspects-title_noaspect -- 3/33

Flagged on half of the 33 or fewer, left out as weak evidence:

  • iastaspects-add_aspect — 15/33
  • iastaspects-title_aspect — 14/33
  • iastaspects-join_aspect — 11/33
  • httppropagationextract-tracecontext_headers — 10/33
  • httppropagationextract-wsgi_valid_headers_all — 6/33
  • iastaspects-upper_aspect — 4/33
  • iastaspects-repr_aspect — 3/33
  • iastaspects-modulo_noaspect — 2/33
  • iastaspects-rstrip_aspect — 2/33
  • iastaspects-stringio_noaspect — 2/33
  • iastaspects-stringio_aspect — 2/33
  • iastaspects-lstrip_aspect — 2/33
  • iastaspects-ljust_aspect — 1/33
  • iastaspects-lower_aspect — 1/33
  • iastaspects-swapcase_aspect — 1/33
  • iastaspects-translate_noaspect — 1/33
  • samplingrules-high_match — 1/33
See investigated PRs (49) - [#19545](https://github.com//pull/19545) — ci: itr rollout configuration - [#19566](https://github.com//pull/19566) — docs: add benchmarking CI documentation - [#19786](https://github.com//pull/19786) — chore: handle potential after-import exceptions - [#19826](https://github.com//pull/19826) — chore: update django latest version to 6.1 _(no benchmark report)_ - [#19828](https://github.com//pull/19828) — chore(tests): bump gevent to 26.8.0 to stop the flaky django IAST shutdown test - [#19831](https://github.com//pull/19831) — test(profiling): try to make uwsgi less flaky _(no benchmark report)_ - [#19835](https://github.com//pull/19835) — ci(hooks): block partially staged Python files from committing unformatted (PROF-15836) - [#19836](https://github.com//pull/19836) — ci: reuse test installs and lock documentation builds - [#19838](https://github.com//pull/19838) — ci(sg): fail commits on double backticks in ddtrace comments/docstrings (PROF-15837) - [#19839](https://github.com//pull/19839) — test(ci): harden Django and pytest subprocess tests - [#19842](https://github.com//pull/19842) — ci(commenter): safely serialize message from PR commenter bot - [#19843](https://github.com//pull/19843) — chore(py-315): raise SSI exclusive max to 3.16 and pre-stage 3.15 injection (PROF-15812) - [#19846](https://github.com//pull/19846) — test(appsec): bound and raise the test server startup budget - [#19847](https://github.com//pull/19847) — test(iast): flaky test_packages_patched pyjwt _(no benchmark report)_ - [#19853](https://github.com//pull/19853) — test(appsec): enable appsec_integrations_fastapi on Python 3.15 - [#19862](https://github.com//pull/19862) — test(opentracing): remove stale Riot environments - [#19866](https://github.com//pull/19866) — ci(appsec): isolate Django server from gevent cleanup _(no benchmark report)_ - [#19871](https://github.com//pull/19871) — test(aiguard): cover multi-turn sensitive data redaction scenarios - [#19872](https://github.com//pull/19872) — chore(kafka): remove stale _dd.svc_src from service override snapshot _(no benchmark report)_ - [#19874](https://github.com//pull/19874) — test(kafka): update service source snapshots [Part 2] _(no benchmark report)_ - [#19878](https://github.com//pull/19878) — refactor(tests): standardize test runner interface _(no benchmark report)_ - [#19879](https://github.com//pull/19879) — test(dramatiq): enable tests for Python 3.14 - [#19880](https://github.com//pull/19880) — ci: withhold cp315 wheels from PyPI and the prerelease index (PROF-15857) - [#19885](https://github.com//pull/19885) — ci: automatically retry os tests - [#19897](https://github.com//pull/19897) — chore(ci): djangosimple-tracer-dont-create-db-spans slo bump - [#19904](https://github.com//pull/19904) — ci(build_base_venvs): let riot install the dev package on Python 3.15 (PROF-14439) - [#19907](https://github.com//pull/19907) — ci(testrunner): rebuild 3.15-dev and pin Cython<3.3 on the 3.15 cache (PROF-14439) - [#19914](https://github.com//pull/19914) — test(profiling): unflake `gevent_greenlet_switch_not_blocked_by_profiler` - [#19923](https://github.com//pull/19923) — chore: exclude integration manifests yaml from source distributions _(no benchmark report)_ - [#19926](https://github.com//pull/19926) — ci: auto-retry `build windows` jobs - [#19936](https://github.com//pull/19936) — ci: bump wheel-builder IMAGE_TAGs after images (PROF-15844) - [#19951](https://github.com//pull/19951) — test(profiling): unflake gc tests - [#19954](https://github.com//pull/19954) — test(llmobs): fix flaky test _(no benchmark report)_ - [#19960](https://github.com//pull/19960) — ci: install ddtest 1.7.0 and riot 0.23.0 in testrunner image - [#19961](https://github.com//pull/19961) — test(iast): fix cloned venv poisoning [APPSEC-69907] _(no benchmark report)_ - [#19962](https://github.com//pull/19962) — test(iast): give appsec test servers their own port [APPSEC-69907] _(no benchmark report)_ - [#19964](https://github.com//pull/19964) — test(iast): assert MODULES_TO_UNPATCH deltas [APPSEC-69907] _(no benchmark report)_ - [#19965](https://github.com//pull/19965) — test(iast): unwrap weak hash before each test patches it [APPSEC-69907] _(no benchmark report)_ - [#19966](https://github.com//pull/19966) — test(iast): stop the global vulnerability limit leaking between tests [APPSEC-69907] _(no benchmark report)_ - [#19967](https://github.com//pull/19967) — chore(ci): pin numeric UID for testrunner image's bits user _(no benchmark report)_ - [#19968](https://github.com//pull/19968) — test(appsec): stop waiting 0.5s per api10 test teardown [APPSEC-69907] _(no benchmark report)_ - [#19973](https://github.com//pull/19973) — chore(tests): declare tracer environments in suitespec - [#19974](https://github.com//pull/19974) — test(telemetry): support PathResolutionError in wrapt 2.4.0 - [#19977](https://github.com//pull/19977) — ci(testrunner): install pip-tools for Python 3.15 - [#19984](https://github.com//pull/19984) — ci: update testrunner image - [#19985](https://github.com//pull/19985) — test(appsec): appsec_threats 55% faster, ~12h of CI saved per pipeline [APPSEC-69907] - [#19994](https://github.com//pull/19994) — ci(benchmarks): bump codeprovenancefork-fork-10 SLO - [#19997](https://github.com//pull/19997) — chore(tests): execute tracer suites with uv - [#20025](https://github.com//pull/20025) — test(appsec): run appsec_threats suites in parallel with pytest-xdist

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@igoragoli
igoragoli requested a review from a team as a code owner September 3, 2026 12:42
@igoragoli igoragoli added the changelog/no-changelog A changelog entry is not required for this PR. label Sep 3, 2026
@igoragoli
igoragoli requested a review from a team as a code owner September 3, 2026 12:42
@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Sep 3, 2026

Copy link
Copy Markdown

Dependency direction analysis

⚠️ Existing dependency direction violations

There are 230 dependency direction violations that already exist on the base branch and have not been changed by this PR.

Show existing violations (showing 5 of 230 highest severity)
ddtrace.internal.tracemethods -×-> ddtrace.trace  (internal-core -> product:tracing, score=134)
ddtrace.internal.ci_visibility.git_client -×-> ddtrace.trace  (product:ci_visibility -> product:tracing, score=132)
ddtrace.profiling.collector.pytorch -×-> ddtrace.trace  (product:profiling -> product:tracing, score=132)
ddtrace.internal.opentelemetry.span -×-> ddtrace.trace  (product:opentelemetry -> product:tracing, score=132)
ddtrace.internal.opentelemetry.trace -×-> ddtrace.trace  (product:opentelemetry -> product:tracing, score=132)

To see all violations, download the layers-base.json and layers-pr.json artifacts from this CI job and run:

uv run --script scripts/import-analysis/layers.py compare layers-base.json layers-pr.json

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Sep 3, 2026

Copy link
Copy Markdown

Circular import analysis

⚠️ Existing circular imports

There are 3 circular imports that already exist on the base branch and have not been changed by this PR.

ddtrace.llmobs -> ddtrace.llmobs._evaluators -> ddtrace.llmobs._evaluators.format -> ddtrace.llmobs._experiment -> ddtrace.llmobs
ddtrace.errortracking._handled_exceptions.bytecode_injector -> ddtrace.errortracking._handled_exceptions.callbacks -> ddtrace.errortracking._handled_exceptions.collector -> ddtrace.errortracking._handled_exceptions.bytecode_reporting -> ddtrace.errortracking._handled_exceptions.bytecode_injector
ddtrace.appsec._asm_request_context -> ddtrace.appsec._iast._iast_request_context_base -> ddtrace.appsec._iast._iast_env -> ddtrace.appsec._iast.reporter -> ddtrace.appsec._exploit_prevention.stack_traces -> ddtrace.appsec._asm_request_context

@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Codeowners resolved as

Resolved from the full PR diff against main using the target branch CODEOWNERS file.
CODEOWNERS team requests not listed below are not required by the current file set.

.gitlab/benchmarks/microbenchmarks.yml                                  @DataDog/apm-ecosystems-performance @DataDog/apm-core-python

@igoragoli
igoragoli marked this pull request as draft September 3, 2026 12:44
@datadog-prod-us1-6

datadog-prod-us1-6 Bot commented Sep 3, 2026

Copy link
Copy Markdown

Pipelines  Tests

Unblock PR with BitsAI

⚠️ Warnings

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 3 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-py | Ubuntu_22_arm64.SID0: [test-app-python] — 🔧 Needs a code fix, caused by this PR

View more details · View in GitLab

DataDog/apm-reliability/dd-trace-py | Ubuntu_22_arm64.SIM: [test-app-python]

View more details · View in GitLab

DataDog/apm-reliability/dd-trace-py | download_dependency_wheels: [3.15.0rc1, 3.15]

View more details · View in GitLab

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🔄 Datadog retried 5 tests - 5 passed on retry View in Datadog

🚧 16 tests that failed were ignored due to quarantine View in Datadog

Useful? React with 👍 / 👎

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

@pr-commenter

pr-commenter Bot commented Sep 3, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-09-05 07:02:26

Comparing candidate commit 74034ea in PR branch augusto/update-known-flaky-benchmarks with baseline commit 6fd5a00 in branch main.

📊 Benchmarking dashboard

Found 0 performance improvements and 3 performance regressions! Performance is the same for 569 metrics, 10 unstable metrics, 7 known flaky benchmarks, 17 flaky benchmarks without significant changes.

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 ----------------------------------'

scenario:iastaspects-join_aspect

  • 🟥 execution_time [+39.846µs; +46.011µs] or [+18.071%; +20.866%]

scenario:otelspan-start

  • 🟥 execution_time [+2.295ms; +3.331ms] or [+7.391%; +10.725%]

scenario:samplingrules-high_match

  • 🟥 execution_time [+14.286µs; +17.292µs] or [+9.156%; +11.083%]

Unstable benchmarks

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

scenario:coreapiscenario-context_with_data_listeners

  • unstable execution_time [-677.821ns; +794.008ns] or [-6.126%; +7.176%]

scenario:coreapiscenario-core_dispatch_1_listener

  • unstable execution_time [-31.257ns; +34.380ns] or [-5.099%; +5.609%]

scenario:coreapiscenario-core_dispatch_50_listeners

  • unstable execution_time [-1749.952ns; +1547.586ns] or [-10.245%; +9.060%]

scenario:coreapiscenario-core_dispatch_exception_listeners

  • unstable execution_time [-1425.129ns; +1084.954ns] or [-10.770%; +8.199%]

scenario:coreapiscenario-core_dispatch_listeners

  • unstable execution_time [-326.144ns; +321.964ns] or [-8.883%; +8.769%]

scenario:coreapiscenario-core_dispatch_no_args_listeners

  • unstable execution_time [-242.919ns; +266.911ns] or [-8.359%; +9.184%]

scenario:coreapiscenario-core_dispatch_with_results_1_listener

  • unstable execution_time [-56.852ns; +89.987ns] or [-5.007%; +7.924%]

scenario:coreapiscenario-core_dispatch_with_results_50_listeners

  • unstable execution_time [-3656.644ns; +4379.960ns] or [-8.951%; +10.722%]

scenario:coreapiscenario-core_dispatch_with_results_listeners

  • unstable execution_time [-655.462ns; +888.246ns] or [-8.184%; +11.091%]

scenario:packagesupdateimporteddependencies-import_many_stdlib_cached

  • unstable execution_time [-43.457µs; +35.126µs] or [-7.437%; +6.011%]

Known flaky benchmarks

These benchmarks are marked as flaky and will not trigger a failure. Modify FLAKY_BENCHMARKS_REGEX to control which benchmarks are marked as flaky.

scenario:httppropagationinject-ids_only

  • 🟥 execution_time [+1.825µs; +2.008µs] or [+10.748%; +11.826%]

scenario:iastaspects-casefold_noaspect

  • 🟥 execution_time [+30.471µs; +35.120µs] or [+12.142%; +13.994%]

scenario:iastaspectsospath-ospathbasename_aspect

  • 🟥 execution_time [+121.560µs; +128.425µs] or [+29.465%; +31.129%]

scenario:iastaspectssplit-rsplit_aspect

  • 🟥 execution_time [+13.771µs; +17.558µs] or [+9.699%; +12.366%]

scenario:span-start

  • 🟥 execution_time [+1.909ms; +2.152ms] or [+13.831%; +15.598%]

scenario:telemetryaddmetric-1-count-metric-1-times

  • 🟥 execution_time [+360.775ns; +407.915ns] or [+12.375%; +13.992%]

scenario:tracer-small

  • 🟥 execution_time [+40.902µs; +43.411µs] or [+12.669%; +13.447%]

Known flaky benchmarks without significant changes:

  • scenario:errortrackingflasksqli-baseline
  • scenario:flasksimple-iast-get
  • scenario:iastaspects-casefold_aspect
  • scenario:iastaspects-index_aspect
  • scenario:iastaspects-ljust_noaspect
  • scenario:iastaspects-lower_aspect
  • scenario:iastaspects-replace_aspect
  • scenario:iastaspects-rstrip_aspect
  • scenario:iastaspects-swapcase_aspect
  • scenario:iastaspects-title_noaspect
  • scenario:iastaspects-translate_aspect
  • scenario:iastaspects-translate_noaspect
  • scenario:iastaspects-upper_noaspect
  • scenario:packagespackageforrootmodulemapping-cache_off
  • scenario:packagespackageforrootmodulemapping-cache_on
  • scenario:sethttpmeta-all-enabled
  • scenario:telemetryaddmetric-record-100-metrics

igoragoli and others added 2 commits September 3, 2026 16:54
A single hit across 33 control PRs is weak evidence of flakiness, and
suppressing on it costs gate sensitivity. Keep only the scenarios flagged
5 or more times.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Raise the bar for entering FLAKY_BENCHMARKS_REGEX from 2 hits to a majority
of the 33-PR control group. Keeps the five scenarios flagged on 23/33 or more
and drops the rest, which stay measured rather than trading gate sensitivity
for weak evidence.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@igoragoli
igoragoli marked this pull request as ready for review September 3, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog A changelog entry is not required for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants