Skip to content

v5.46.0 proposal#5551

Merged
wconti27 merged 42 commits intov5.xfrom
v5.46.0-proposal
Apr 9, 2025
Merged

v5.46.0 proposal#5551
wconti27 merged 42 commits intov5.xfrom
v5.46.0-proposal

Conversation

@wconti27
Copy link
Copy Markdown
Contributor

@wconti27 wconti27 commented Apr 8, 2025

  • [34787c1e22] - (SEMVER-PATCH) Remove appsec distribution metrics (Ugaitz Urien) #5534
  • [c2b55f41f3] - (SEMVER-MINOR) [DI] Support multiple probes in the same location (Thomas Watson) #5535
  • [9ec7ef9813] - (SEMVER-MINOR) Start collecting async IDs in profiles (Attila Szegedi) #5524
  • [c9c351d1ea] - (SEMVER-PATCH) fix missing dependency for release proposal job (Roch Devost) #5545
  • [78aa8e496b] - (SEMVER-PATCH) update the release proposal workflow to create the proposal (Roch Devost) #5527
  • [59a5f36e17] - (SEMVER-PATCH) fix loading of instrumentations (William Conti) #5544
  • [af40a87ba0] - (SEMVER-PATCH) [DI] Condtions: Allow using len to count keys in objects (Thomas Watson) #5542
  • [ded5a7762d] - (SEMVER-PATCH) fix(llmobs): send batches of span events (lievan) #5493
  • [af0b9536fd] - (SEMVER-PATCH) [DI] Reduce size of compiled code when comparing number literals (Thomas Watson) #5536
  • [5573c1291e] - (SEMVER-PATCH) [DI] Allow testing of primitives with instanceof (Thomas Watson) #5541
  • [76d688efb2] - (SEMVER-PATCH) [DI] Don't rely on logs track to split JSON keys on periods (Thomas Watson) #5539
  • [6590e70a60] - (SEMVER-PATCH) [DI] Change test name to better highlight what is being tested (Thomas Watson) #5540
  • [ca02e1ddff] - (SEMVER-PATCH) [DI] Sanitize instanceof class in probe conditions (Thomas Watson) #5520
  • [1db78a6c4e] - (SEMVER-PATCH) Pin composite actions SHA (TonyCTHsu) #5448
  • [e1fd042265] - (SEMVER-MINOR) add feature to disable mongo heartbeats spans (William Conti) #5526
  • [17e03a7ee1] - (SEMVER-MINOR) Supporting last mariadb version (Ugaitz Urien) #5532
  • [8df8c369ec] - (SEMVER-MINOR) Improve iast mongodb nosql detection removing some false positives (Ugaitz Urien) #5408
  • [21e0408b25] - (SEMVER-MINOR) [test-optimization] [SDTEST-1784] Co-relate Playwright tests with RUM sessions (Mario Vidal Domínguez) #5509
  • [0c9d24ac79] - (SEMVER-PATCH) Fix CI for mariadb (Ugaitz Urien) #5530
  • [55608ebca8] - (SEMVER-PATCH) Improve tagger, format, and encoding (Ruben Bridgewater) #5354
  • [ef3d607adc] - (SEMVER-PATCH) ci(langchain, llmobs): restore embeddings tests with fixtures (Sam Brenner) #5514
  • [61f8a84ca6] - (SEMVER-PATCH) [DI] Fix isDefined support in probe conditions (Thomas Watson) #5521
  • [5dc76abe15] - (SEMVER-PATCH) add missing shared config for clientIpHeader (Ida Liu) #5473
  • [3082b9848e] - (SEMVER-PATCH) Add message to the error consistent with one in proxy.js (Attila Szegedi) #5518
  • [22dfc65b27] - (SEMVER-PATCH) Update WAF rules to v1.14.2 (simon-id) #5523
  • [b94052cfac] - (SEMVER-MINOR) Update recommended.json to the version 1.14.1 (Ugaitz Urien) #5517
  • [8e21dd1a52] - (SEMVER-PATCH) Update rewriter to the new renamed wasm-js-rewriter 3.1.0 (Ugaitz Urien) #5472
  • [d8677ee1e4] - (SEMVER-MINOR) [DI] Add support for probe condition (Thomas Watson) #5488
  • [658800adec] - (SEMVER-PATCH) increase appsec next test start timeout to 5 minutes (Roch Devost) #5506
  • [b4b2969bdf] - (SEMVER-PATCH) [Debugger] improve snapshot performance (Ruben Bridgewater) #5419
  • [29485d9cb3] - (SEMVER-PATCH) Always check for the latest Node.js version being installed (Ruben Bridgewater) #5504
  • [a1827238eb] - (SEMVER-PATCH) Pin express version to make sure integration tests pass (Ruben Bridgewater) #5510
  • [1bd4073df9] - (SEMVER-PATCH) ci(openai, langchain, llmobs): fix broken tests (Sam Brenner) #5507
  • [f24d815ae2] - (SEMVER-MINOR) [test-optimization] [SDTEST-1163] Playwright active test span (Juan Antonio Fernández de Alba) #4843
  • [b984e6321b] - (SEMVER-MINOR) Fix span event serialization for array attributes (Marco Costa) #5490
  • [f62b60a23f] - (SEMVER-PATCH) [DI] Improve integration test error handling (Thomas Watson) #5500
  • [a029cac0ac] - (SEMVER-PATCH) Remove unused code in router instrumentation code (Thomas Watson) #5478
  • [5a2ad89c58] - (SEMVER-PATCH) centralize node version numbers for ci workflows (Roch Devost) #5492
  • [4d9b64fb87] - (SEMVER-PATCH) chore: add tracing macrobenchmark with runtime metrics enabled (Zach Montoya) #5485
  • [a432a17e03] - (SEMVER-PATCH) fix user tracking tests (Ilyas Shabi) #5497
  • [ecc6588f11] - (SEMVER-MINOR) Add rasp telemetry metrics (Ilyas Shabi) #5458

IlyasShabi and others added 30 commits April 8, 2025 11:10
* add rasp telemetry missing metrics

* add tests for rasp rule match

* report rasp rule skipped metric

* report rasp rule on nextjs

* rasp metrics

* report rule match

* block

* fix windows test

* code cleaning

* add rule triggered related comment

* rule variant tests

* fix rasp duration track test
In case the integration tests times out trying to create the sandbox,
don't also fail trying to remove it (since it doesn't exist).
* fix openai tests

* skip langchain tests
* Pin express version to make sure integration tests pass

The issue itself has to be addressed and this should be reworked
after this landing.

* Fix appsec ci

* Apply suggestions from code review

---------

Co-authored-by: Ugaitz Urien <ugaitz.urien@datadoghq.com>
Co-authored-by: Thomas Watson <w@tson.dk>
Make sure all actions use the one node installer action

This aligns the behavior, allows to update the action easier and
it makes sure we always use consistent versions.

Co-authored-by: Thomas Watson <w@tson.dk>
The sync code got a tad optimized (dense instead of sparse arrays
and some other minor improvements). The async parts now also run in
parallel.
These changes do not make a big difference effectively due to the
overhead of the inspector calls themselves.

Co-authored-by: Thomas Watson <w@tson.dk>
Add support for having a condition on a probe.

A condition should return either `true` or `false`. It can however also throw
an error. The error can be thrown in two places:

1. When compiling the AST down to the JavaScript source code (an issue was
   detected at compilation-time)
2. When running the condition in the context of the breakpoint (an issue was
   detected at run-time)

Compilation-time exceptions are reported as an error event on the probe to the
DI diagnostics backend. Run-time exceptions are currently just swallowed and
the result of the condition is going to be the same as if it evaluated `false`
(i.e. it's not going to tigger the breakpoint).

To be 100% compatible with how conditions work in the other tracers, we should
technically record the run-time errors and expose those to the user (as a help
in debugging the condition). However, due to how conditions are implemented in
this PR (by using the `condition` property on the `Debugger.setBreakpoint`
Chrome DevTools Protocol API), it's not possible to know if a condition failed,
or just returned `false`.

For now, this is an ok compromise, due to the increased performance gained by
using this API.
* Update rewriter to the new renamed wasm-js-rewriter 3.0.0

* Rename requires

* Rename pending @datadog/native-iast-rewriter references

* Update to 3.1.0

* Use branch

* Set 3.0.0 version again

* 3.1.0 again
* add missing shared config for clientIpHeader
* Improve tagger and format

These are hot code paths and the otel parts should not be part of
the tagger. This removes the special handling for errors in the
tagger while also improving the performance and not adding tags
that have no purpose.

* Minor encoding perf improvement

Calling Object.entries is actually doing more work than Object.keys
while the result is the same.
* Do not instrument mariadb 3.4.1 version
* Supporting last mariadb version

* Force the execution of mariadb tests with the latest version using promise to getConnection

* Do not create asyncResource when is not needed

* Add comment
* add feature to disable mongodb heartbeat tracing
* Update dependabot to look for actions/*

* Update SHA in `actions/*`
watson and others added 11 commits April 8, 2025 11:15
The logs track will split a JSON key like `debugger.snapshot` into
`debugger: { snapshot }`. This saves a tiny amount of object creation
client side, but makes each installed tracer dependant on this custom
behavior from the logs track.

To allow us more flexibility in the future, better not rely on this
oddity.
* batch span events

* try to fix test

---------

Co-authored-by: lievan <evan.li@datadoqhq.com>
* Upgrade to profiler 5.7.0 for asyncId collection capability

* Add a config option to disable async ID collection

* Alphabetically sort some long option lists

* Add async ID assertions to the integration test

* Only enable the feature for Node.js version >=22.10.0
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 8, 2025

Codecov Report

Attention: Patch coverage is 94.92386% with 10 lines in your changes missing coverage. Please review.

Please upload report for BASE (v5.x@8471baa). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...e/src/ci-visibility/exporters/test-worker/index.js 33.33% 2 Missing ⚠️
...ages/datadog-instrumentations/src/helpers/hooks.js 0.00% 1 Missing ⚠️
...s/datadog-instrumentations/src/helpers/register.js 94.11% 1 Missing ⚠️
.../src/ci-visibility/exporters/test-worker/writer.js 66.66% 1 Missing ⚠️
packages/dd-trace/src/debugger/index.js 50.00% 1 Missing ⚠️
packages/dd-trace/src/llmobs/writers/spans/base.js 0.00% 1 Missing ⚠️
packages/dd-trace/src/profiler.js 0.00% 1 Missing ⚠️
packages/dd-trace/src/profiling/profiler.js 50.00% 1 Missing ⚠️
packages/dd-trace/src/tagger.js 95.23% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             v5.x    #5551   +/-   ##
=======================================
  Coverage        ?   78.82%           
=======================================
  Files           ?      508           
  Lines           ?    22623           
  Branches        ?        0           
=======================================
  Hits            ?    17833           
  Misses          ?     4790           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 8, 2025

Overall package size

Self size: 9.26 MB
Deduped: 101.66 MB
No deduping: 102.18 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | @datadog/libdatadog | 0.5.0 | 29.83 MB | 29.83 MB | | @datadog/native-appsec | 8.5.1 | 19.26 MB | 19.27 MB | | @datadog/native-iast-taint-tracking | 3.3.0 | 13.77 MB | 13.78 MB | | @datadog/pprof | 5.7.0 | 9.89 MB | 10.26 MB | | @opentelemetry/core | 1.30.1 | 908.66 kB | 7.16 MB | | protobufjs | 7.4.0 | 2.77 MB | 5.42 MB | | @datadog/wasm-js-rewriter | 3.1.0 | 2.37 MB | 2.52 MB | | @datadog/native-metrics | 3.1.0 | 1.06 MB | 1.46 MB | | @opentelemetry/api | 1.8.0 | 1.21 MB | 1.21 MB | | import-in-the-middle | 1.13.1 | 117.64 kB | 839.26 kB | | source-map | 0.7.4 | 226 kB | 226 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | lru-cache | 7.18.3 | 133.92 kB | 133.92 kB | | pprof-format | 2.1.0 | 111.69 kB | 111.69 kB | | @datadog/sketches-js | 2.1.1 | 109.9 kB | 109.9 kB | | lodash.sortby | 4.7.0 | 75.76 kB | 75.76 kB | | ignore | 5.3.2 | 53.63 kB | 53.63 kB | | istanbul-lib-coverage | 3.2.0 | 29.34 kB | 29.34 kB | | rfdc | 1.4.1 | 27.15 kB | 27.15 kB | | @isaacs/ttlcache | 1.4.1 | 25.2 kB | 25.2 kB | | tlhunter-sorted-set | 0.1.0 | 24.94 kB | 24.94 kB | | dc-polyfill | 0.1.6 | 24.56 kB | 24.56 kB | | shell-quote | 1.8.2 | 23.54 kB | 23.54 kB | | limiter | 1.1.5 | 23.17 kB | 23.17 kB | | retry | 0.13.1 | 18.85 kB | 18.85 kB | | semifies | 1.0.0 | 15.84 kB | 15.84 kB | | jest-docblock | 29.7.0 | 8.99 kB | 12.76 kB | | crypto-randomuuid | 1.0.0 | 11.18 kB | 11.18 kB | | ttl-set | 1.0.0 | 4.61 kB | 9.69 kB | | path-to-regexp | 0.1.12 | 6.6 kB | 6.6 kB | | koalas | 1.0.2 | 6.47 kB | 6.47 kB | | module-details-from-path | 1.0.3 | 4.47 kB | 4.47 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Apr 8, 2025

Benchmarks

Benchmark execution time: 2025-04-08 16:23:12

Comparing candidate commit 6403a44 in PR branch v5.46.0-proposal with baseline commit 8471baa in branch v5.x.

Found 8 performance improvements and 32 performance regressions! Performance is the same for 910 metrics, 13 unstable metrics.

scenario:appsec-iast-no-vulnerability-iast-enabled-always-active-18

  • 🟥 cpu_user_time [+325.142ms; +350.895ms] or [+24.622%; +26.573%]
  • 🟥 execution_time [+370.147ms; +402.438ms] or [+25.344%; +27.555%]
  • 🟥 max_rss_usage [+11.811MB; +14.626MB] or [+10.110%; +12.520%]

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

  • 🟥 cpu_user_time [+311.054ms; +336.148ms] or [+22.765%; +24.601%]
  • 🟥 execution_time [+370.247ms; +394.617ms] or [+24.610%; +26.230%]

scenario:appsec-iast-no-vulnerability-iast-enabled-always-active-22

  • 🟥 cpu_user_time [+280.505ms; +301.035ms] or [+26.740%; +28.697%]
  • 🟥 execution_time [+296.690ms; +325.523ms] or [+23.891%; +26.213%]

scenario:appsec-iast-no-vulnerability-iast-enabled-default-config-18

  • 🟥 cpu_user_time [+322.311ms; +344.391ms] or [+25.186%; +26.912%]
  • 🟥 execution_time [+380.267ms; +401.349ms] or [+26.760%; +28.244%]
  • 🟥 max_rss_usage [+9.499MB; +13.686MB] or [+8.020%; +11.554%]

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

  • 🟥 cpu_user_time [+318.976ms; +344.630ms] or [+24.079%; +26.016%]
  • 🟥 execution_time [+366.819ms; +389.444ms] or [+25.060%; +26.606%]

scenario:appsec-iast-no-vulnerability-iast-enabled-default-config-22

  • 🟥 cpu_user_time [+274.842ms; +294.943ms] or [+26.936%; +28.906%]
  • 🟥 execution_time [+298.060ms; +321.069ms] or [+24.672%; +26.577%]

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

  • 🟥 cpu_user_time [+293.354ms; +318.622ms] or [+16.743%; +18.186%]
  • 🟥 execution_time [+331.029ms; +348.705ms] or [+16.986%; +17.893%]

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

  • 🟥 cpu_user_time [+317.061ms; +344.457ms] or [+17.408%; +18.913%]
  • 🟥 execution_time [+369.380ms; +394.783ms] or [+17.888%; +19.118%]

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

  • 🟥 cpu_user_time [+241.388ms; +264.555ms] or [+17.648%; +19.342%]
  • 🟥 execution_time [+277.962ms; +297.227ms] or [+16.885%; +18.055%]

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

  • 🟥 cpu_user_time [+273.326ms; +328.132ms] or [+15.309%; +18.379%]
  • 🟥 execution_time [+298.578ms; +410.523ms] or [+11.189%; +15.384%]

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

  • 🟥 cpu_user_time [+294.532ms; +345.648ms] or [+16.600%; +19.481%]
  • 🟥 execution_time [+341.562ms; +431.958ms] or [+14.651%; +18.529%]

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

  • 🟥 cpu_user_time [+252.431ms; +294.528ms] or [+17.296%; +20.181%]
  • 🟥 execution_time [+280.729ms; +351.584ms] or [+13.689%; +17.144%]

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

  • 🟥 cpu_user_time [+279.206ms; +320.870ms] or [+16.751%; +19.250%]
  • 🟥 execution_time [+324.276ms; +400.219ms] or [+13.272%; +16.380%]

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

  • 🟥 cpu_user_time [+293.152ms; +340.860ms] or [+17.519%; +20.370%]
  • 🟥 execution_time [+353.013ms; +423.780ms] or [+16.332%; +19.606%]

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

  • 🟥 cpu_user_time [+262.937ms; +293.431ms] or [+20.078%; +22.406%]
  • 🟥 execution_time [+291.197ms; +345.427ms] or [+16.018%; +19.000%]

scenario:log-skip-log-22

  • 🟩 cpu_user_time [-21.889ms; -16.654ms] or [-7.777%; -5.917%]
  • 🟩 execution_time [-20.938ms; -17.914ms] or [-6.037%; -5.165%]

scenario:log-with-error-22

  • 🟩 cpu_user_time [-23.263ms; -17.301ms] or [-8.370%; -6.225%]
  • 🟩 execution_time [-20.215ms; -17.549ms] or [-5.924%; -5.143%]

scenario:log-without-log-22

  • 🟩 cpu_user_time [-21.989ms; -16.815ms] or [-8.555%; -6.542%]
  • 🟩 execution_time [-20.819ms; -18.885ms] or [-6.473%; -5.871%]

scenario:startup-with-tracer-22

  • 🟩 cpu_user_time [-21.967ms; -14.521ms] or [-11.699%; -7.733%]
  • 🟩 execution_time [-18.494ms; -16.818ms] or [-7.605%; -6.915%]

@datadog-datadog-prod-us1
Copy link
Copy Markdown

datadog-datadog-prod-us1 Bot commented Apr 8, 2025

Datadog Report

Branch report: v5.46.0-proposal
Commit report: 79f474e
Test service: dd-trace-js-integration-tests

✅ 0 Failed, 931 Passed, 0 Skipped, 12m 7.01s Total Time

@uurien
Copy link
Copy Markdown
Collaborator

uurien commented Apr 8, 2025

The commit message for the package change, should be "v5.46.0" and not "update package"

@wconti27
Copy link
Copy Markdown
Contributor Author

wconti27 commented Apr 8, 2025

The commit message for the package change, should be "v5.46.0" and not "update package"

@uurien This should be fixed.

@wconti27 wconti27 marked this pull request as ready for review April 8, 2025 16:27
@wconti27 wconti27 requested a review from a team as a code owner April 8, 2025 16:27
Copy link
Copy Markdown
Contributor

@szegedi szegedi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Profiling changes look okay.

Copy link
Copy Markdown
Contributor

@szegedi szegedi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Profiling changes look okay.

@wconti27 wconti27 merged commit 56652b8 into v5.x Apr 9, 2025
421 of 423 checks passed
@wconti27 wconti27 deleted the v5.46.0-proposal branch April 9, 2025 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.