Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v5.37.0 proposal #5281

Merged
merged 29 commits into from
Feb 17, 2025
Merged

v5.37.0 proposal #5281

merged 29 commits into from
Feb 17, 2025

Conversation

watson
Copy link
Collaborator

@watson watson commented Feb 17, 2025

  • [1ae023d3b4] - (SEMVER-PATCH) [DI] Use column number from source maps (Thomas Watson) #5279
  • [366368a38c] - (SEMVER-MINOR) [test optimization] [SDTEST-1529] Add quarantined tests logic (Juan Antonio Fernández de Alba) #5236
  • [b599fab632] - (SEMVER-PATCH) [test optimization] Fix session fingerprint in playwright (Juan Antonio Fernández de Alba) #5273
  • [efb8e44d5d] - (SEMVER-MINOR) [DI] Add source map support (Thomas Watson) #5205
  • [2fea9b5c58] - (SEMVER-PATCH) fix(openai): apply span char limit truncation to chat completion input tags (Sam Brenner) #5276
  • [5a08ad941e] - (SEMVER-PATCH) Delete unused packages/memwatch/* directory (Thomas Watson) #5275
  • [560236e353] - (SEMVER-MINOR) Inject trace info as comment to MongoDB operation when dbm propagation is enabled. (Zhengda Lu) #5230
  • [ff09f50cb0] - (SEMVER-MINOR) remove span kind from inferred proxy spans (William Conti) #5265
  • [6b971861fb] - (SEMVER-PATCH) fix(openai): update openai instrumentation for newest release (Sam Brenner) #5271
  • [ee6423febd] - (SEMVER-PATCH) change telemetry name for dd-trace-api (Bryan English) #5264
  • [80800d630f] - (SEMVER-PATCH) ESLint: Disallow warnings in CI (Thomas Watson) #5261
  • [8e8898d2ce] - (SEMVER-PATCH) dd-trace-api: remove runtime tests that should be test time (Bryan English) #5246
  • [872bac80cc] - (SEMVER-MINOR) [MLOB-2096] feat(llmobs): metadata and metrics annotations update instead of override (Sam Brenner) #5243
  • [b8130f2229] - (SEMVER-PATCH) prevent usage of semver in code (Roch Devost) #5252
  • [d7a574bd2c] - (SEMVER-PATCH) fix(config): keep the lookup value as passed (Thomas Hunter II) #5244
  • [fd1dd7e150] - (SEMVER-MINOR) [asm] IAST security controls (Igor Unanua) #5117
  • [784b6f39d2] - (SEMVER-PATCH) remove semver and replace with simpler semifies (Roch Devost) #5251
  • [48f6904f1c] - Revert "Temporarily limit koa upstream tests to test against 2.15.3" (Thomas Watson)
  • [95462ecee8] - Temporarily limit koa upstream tests to test against 2.15.3 (Thomas Watson)
  • [b8c03bdd48] - (SEMVER-PATCH) change RASP addresses from persistent to ephemeral (simon-id) #5235
  • [dc57b5a7af] - (SEMVER-PATCH) Upgrade ESLint from v8 to v9 (Thomas Watson) #5215
  • [f8cc54a971] - (SEMVER-PATCH) Add troubleshooting link to profiler start error message (Attila Szegedi) #5242
  • [e0ac79507d] - (SEMVER-MINOR) Extended iast location fields (Ilyas Shabi) #5171
  • [c64020ae12] - (SEMVER-PATCH) datadog-plugin-mongoose test remove forgotten skip condition for versions >= 8.10.0 (Igor Unanua) #5238
  • [788cb6fcba] - (SEMVER-PATCH) dd-trace-api: don't proxy objects returned from callbacks (Bryan English) #5240
  • [d19540d525] - (SEMVER-PATCH) [DSM] Add a wait for active stream to the putTestRecords function which was flaking when the stream was inactive (Eric Firth) #5202
  • [d3ef34e185] - (SEMVER-PATCH) chore(graphql): only stringify graphql error extension attributes in span event if not a native type (William Conti) #5212
  • [ca855f89c6] - (SEMVER-PATCH) Fix mongoose plugin tests (Igor Unanua) #5217

iunanua and others added 29 commits February 17, 2025 11:53
* move withPeerService out of before

* use mongo 4.0

* do not call done()

* provide dbName

* service name delegate

* await

* try without bufferCommands

* restore original version
…span event if not a native type (#5212)

* only stringify graphql error extension value if the value is not a number or bool

* fix reviewer comments
Some APIs (pretty much just trace) return whatever value is returned
from a callback passed in. Without providing for this, this would trip
up the check that returned objects are proxied. We don't want to proxy
these objects since they come directly from the caller.
…ions >= 8.10.0 (#5238)

* remove skip condition :S

* await disconnect
* Extend iast location fields

* improve iast test to check if frame have location

* check that location do not have column

* Exlude test without location

* use official msgpack

* Fix linter

* send class and function from original location

* fix test
* Security controls parser and secure marks for vulnerabilities

* Use new NOSQL_MONGODB_INJECTION_MARK in nosql-injection-mongodb-analyzer

* Config

* first hooks

* wrap object properties and more tests

* Use dd-trace:moduleLoad(Start|End) channels

* iterate object strings and more tests

* fix parameter index, include createNewTainted flag and do not use PluginManager in the tests

* Fix parameter index and include a test with incorrect index

* Avoid to hook multiple times the same module and config tests

* sql_injection_mark test

* vulnerable ranges tests

* fix windows paths

* Upgrade taint-tracking to 3.3.0

* Fix * secure mark

* add createNewTainted flag to addSecureMark

* Use existing _isRangeSecure

* supressed vulnerabilities metric

* increment supressed vulnerability metric

* typo

* handle esm default export and filenames starting with file://

* esm integration tests

* clean up

* secure-marks tests

* fix secure-marks generator test

* fix config test

* empty

* check for repeated marks

* Update packages/dd-trace/src/appsec/iast/analyzers/injection-analyzer.js

Co-authored-by: Ugaitz Urien <[email protected]>

* Update packages/dd-trace/src/appsec/iast/security-controls/index.js

Co-authored-by: Ugaitz Urien <[email protected]>

* Update packages/dd-trace/src/appsec/iast/taint-tracking/secure-marks.js

Co-authored-by: Ugaitz Urien <[email protected]>

* some suggestions

* move _isRangeSecure to InjectionAnalyzer

* Add programatically config option

* index.d.ts

* StoredInjectionAnalyzer

* Update packages/dd-trace/test/appsec/iast/analyzers/command-injection-analyzer.spec.js

Co-authored-by: ishabi <[email protected]>

* store control keys to avoid recreating the array

* check visited before iterating

* test suggestions

* Update packages/dd-trace/src/appsec/iast/security-controls/parser.js

Co-authored-by: Ilyas Shabi <[email protected]>

* lint

* ritm test

* clean up

* Reject security control with non numeric parameters

* fix parameter 0

* Update integration-tests/appsec/iast.esm-security-controls.spec.js

Co-authored-by: Ugaitz Urien <[email protected]>

* suggestions

* use legacy store

* fix test

* fix test

* fix test

---------

Co-authored-by: Ugaitz Urien <[email protected]>
Co-authored-by: ishabi <[email protected]>
The previous version was transforming the lookup parameter to a string.

Closes #4894

Co-authored-by: Benoit Lemoine <[email protected]>
…tead of override (#5243)

* update don't override

* remove unecessary changes
This was previously checking that objects returned by APIs are wrapped.
This shouldn't be checked at run time, but at test time in
dd-trace-api.
This is as per the landed change in dd-go.
remove some unnecessary span information

---------

Co-authored-by: Zarir Hamza <[email protected]>
…n is enabled. (#5230)

* inject dbm trace comment

* add service mode test

* add unit test to verify both full and service mode

* update test

* fix lint

* use find query

* fix timeout

* remove done

* add tests to mongodb-core

* fix service mode full

* remove custom timeout

* Update packages/dd-trace/src/plugins/database.js

Co-authored-by: Bryan English <[email protected]>

* merge duplicate code

* add tests

* add tests to verify command with comments

* fix lint

* Update index.js

Co-authored-by: Thomas Hunter II <[email protected]>

---------

Co-authored-by: Bryan English <[email protected]>
Co-authored-by: Thomas Hunter II <[email protected]>
Copy link

Overall package size

Self size: 8.75 MB
Deduped: 94.95 MB
No deduping: 95.46 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | @datadog/libdatadog | 0.4.0 | 29.44 MB | 29.44 MB | | @datadog/native-appsec | 8.4.0 | 19.25 MB | 19.26 MB | | @datadog/native-iast-taint-tracking | 3.3.0 | 13.77 MB | 13.78 MB | | @datadog/pprof | 5.5.1 | 9.79 MB | 10.17 MB | | protobufjs | 7.2.5 | 2.77 MB | 5.16 MB | | @datadog/native-iast-rewriter | 2.8.0 | 2.6 MB | 2.74 MB | | @opentelemetry/core | 1.14.0 | 872.87 kB | 1.47 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.11.2 | 112.74 kB | 835.4 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.0 | 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 | | shell-quote | 1.8.1 | 44.96 kB | 44.96 kB | | istanbul-lib-coverage | 3.2.0 | 29.34 kB | 29.34 kB | | rfdc | 1.3.1 | 25.21 kB | 25.21 kB | | @isaacs/ttlcache | 1.4.1 | 25.2 kB | 25.2 kB | | tlhunter-sorted-set | 0.1.0 | 24.94 kB | 24.94 kB | | limiter | 1.1.5 | 23.17 kB | 23.17 kB | | dc-polyfill | 0.1.4 | 23.1 kB | 23.1 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

Copy link

codecov bot commented Feb 17, 2025

Codecov Report

Attention: Patch coverage is 68.34734% with 113 lines in your changes missing coverage. Please review.

Please upload report for BASE (v5.x@31501ea). Learn more about missing BASE report.

Files with missing lines Patch % Lines
packages/datadog-instrumentations/src/cucumber.js 0.00% 24 Missing ⚠️
...ackages/datadog-instrumentations/src/mocha/main.js 0.00% 24 Missing ⚠️
...ibility/quarantined-tests/get-quarantined-tests.js 14.28% 18 Missing ⚠️
...ckages/datadog-instrumentations/src/mocha/utils.js 0.00% 12 Missing ⚠️
packages/datadog-plugin-cucumber/src/index.js 0.00% 7 Missing ⚠️
packages/datadog-plugin-mocha/src/index.js 0.00% 7 Missing ⚠️
...d-trace/src/appsec/iast/security-controls/index.js 92.13% 7 Missing ⚠️
packages/datadog-plugin-graphql/src/utils.js 0.00% 4 Missing ⚠️
.../ci-visibility/exporters/ci-visibility-exporter.js 20.00% 4 Missing ⚠️
...-trace/src/appsec/iast/security-controls/parser.js 93.33% 3 Missing ⚠️
... and 2 more
Additional details and impacted files
@@           Coverage Diff           @@
##             v5.x    #5281   +/-   ##
=======================================
  Coverage        ?   80.77%           
=======================================
  Files           ?      484           
  Lines           ?    21681           
  Branches        ?        0           
=======================================
  Hits            ?    17512           
  Misses          ?     4169           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@datadog-datadog-prod-us1
Copy link

Datadog Report

Branch report: v5.37.0-proposal
Commit report: 5365313
Test service: dd-trace-js-integration-tests

✅ 0 Failed, 674 Passed, 0 Skipped, 16m 39.73s Total Time

@pr-commenter
Copy link

pr-commenter bot commented Feb 17, 2025

Benchmarks

Benchmark execution time: 2025-02-17 11:34:12

Comparing candidate commit e3f43a4 in PR branch v5.37.0-proposal with baseline commit 31501ea in branch v5.x.

Found 77 performance improvements and 1 performance regressions! Performance is the same for 833 metrics, 22 unstable metrics.

scenario:appsec-control-18

  • 🟩 cpu_user_time [-29.519ms; -25.209ms] or [-7.671%; -6.551%]
  • 🟩 execution_time [-36.770ms; -30.660ms] or [-8.012%; -6.681%]

scenario:appsec-control-20

  • 🟩 instructions [-45.5M instructions; -43.2M instructions] or [-5.304%; -5.042%]

scenario:appsec-control-with-attacks-18

  • 🟩 cpu_user_time [-31.712ms; -27.420ms] or [-8.207%; -7.096%]
  • 🟩 execution_time [-37.137ms; -30.581ms] or [-8.087%; -6.660%]

scenario:debugger-enabled-but-breakpoint-not-hit-18

  • 🟩 cpu_usage_percentage [-29.542%; -28.004%]
  • 🟩 cpu_user_time [-425.622ms; -415.073ms] or [-60.463%; -58.965%]
  • 🟩 execution_time [-395.515ms; -376.923ms] or [-36.877%; -35.144%]
  • 🟩 instructions [-713.1M instructions; -709.6M instructions] or [-55.125%; -54.858%]
  • 🟩 max_rss_usage [-11.455MB; -11.160MB] or [-14.098%; -13.734%]

scenario:debugger-enabled-but-breakpoint-not-hit-20

  • 🟩 cpu_usage_percentage [-22.370%; -21.523%]
  • 🟩 cpu_user_time [-319.901ms; -310.954ms] or [-58.806%; -57.162%]
  • 🟩 execution_time [-366.071ms; -351.256ms] or [-35.578%; -34.138%]
  • 🟩 instructions [-714.4M instructions; -709.7M instructions] or [-48.860%; -48.535%]
  • 🟩 max_rss_usage [-9.077MB; -8.511MB] or [-12.358%; -11.588%]

scenario:debugger-enabled-but-breakpoint-not-hit-22

  • 🟩 cpu_usage_percentage [-22.364%; -21.605%]
  • 🟩 cpu_user_time [-307.348ms; -298.383ms] or [-60.783%; -59.010%]
  • 🟩 execution_time [-367.952ms; -354.214ms] or [-36.695%; -35.325%]
  • 🟩 instructions [-707.0M instructions; -703.8M instructions] or [-49.844%; -49.621%]
  • 🟩 max_rss_usage [-10.024MB; -9.487MB] or [-11.788%; -11.157%]

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

  • 🟩 cpu_usage_percentage [-53.009%; -52.040%]
  • 🟩 cpu_user_time [-18.714s; -18.342s] or [-99.492%; -97.511%]
  • 🟩 execution_time [-20.472s; -19.466s] or [-99.128%; -94.256%]
  • 🟩 instructions [-79.6G instructions; -77.9G instructions] or [-100.342%; -98.190%]
  • 🟩 max_rss_usage [-68.412MB; -63.877MB] or [-50.273%; -46.941%]

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

  • 🟩 cpu_usage_percentage [-58.784%; -58.194%]
  • 🟩 cpu_user_time [-17.277s; -17.023s] or [-99.417%; -97.953%]
  • 🟩 execution_time [-18.623s; -18.326s] or [-97.301%; -95.748%]
  • 🟩 instructions [-76.3G instructions; -75.2G instructions] or [-99.772%; -98.261%]
  • 🟩 max_rss_usage [-56.511MB; -55.682MB] or [-46.761%; -46.075%]

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

  • 🟩 cpu_usage_percentage [-61.667%; -61.097%]
  • 🟩 cpu_user_time [-16.428s; -16.140s] or [-99.625%; -97.882%]
  • 🟩 execution_time [-17.919s; -17.595s] or [-97.368%; -95.608%]
  • 🟩 instructions [-73.3G instructions; -73.2G instructions] or [-99.074%; -98.998%]
  • 🟩 max_rss_usage [-63.541MB; -61.873MB] or [-46.010%; -44.803%]

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

  • 🟩 cpu_usage_percentage [-12.291%; -11.146%]
  • 🟩 cpu_user_time [-176.118ms; -158.188ms] or [-39.023%; -35.050%]
  • 🟩 execution_time [-183.390ms; -163.788ms] or [-21.365%; -19.082%]
  • 🟩 instructions [-372.7M instructions; -369.4M instructions] or [-39.062%; -38.712%]

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

  • 🟩 cpu_usage_percentage [-12.551%; -11.898%]
  • 🟩 cpu_user_time [-157.371ms; -147.168ms] or [-41.487%; -38.798%]
  • 🟩 execution_time [-173.906ms; -161.524ms] or [-20.858%; -19.373%]
  • 🟩 instructions [-369.2M instructions; -364.6M instructions] or [-32.983%; -32.564%]

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

  • 🟩 cpu_usage_percentage [-12.417%; -11.684%]
  • 🟩 cpu_user_time [-145.529ms; -134.747ms] or [-41.921%; -38.815%]
  • 🟩 execution_time [-164.300ms; -154.748ms] or [-20.487%; -19.296%]
  • 🟩 instructions [-370.6M instructions; -367.3M instructions] or [-34.257%; -33.947%]

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

  • 🟩 cpu_usage_percentage [-27.784%; -26.720%]
  • 🟩 cpu_user_time [-384.633ms; -371.190ms] or [-58.092%; -56.062%]
  • 🟩 execution_time [-350.949ms; -336.417ms] or [-33.956%; -32.549%]
  • 🟩 instructions [-639.0M instructions; -635.9M instructions] or [-52.382%; -52.133%]
  • 🟩 max_rss_usage [-10.007MB; -9.556MB] or [-12.544%; -11.979%]

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

  • 🟩 cpu_usage_percentage [-20.811%; -19.894%]
  • 🟩 cpu_user_time [-295.204ms; -288.769ms] or [-56.656%; -55.421%]
  • 🟩 execution_time [-342.927ms; -324.696ms] or [-34.393%; -32.565%]
  • 🟩 instructions [-629.3M instructions; -623.1M instructions] or [-45.655%; -45.207%]
  • 🟩 max_rss_usage [-9.072MB; -8.075MB] or [-12.418%; -11.053%]

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

  • 🟩 cpu_usage_percentage [-21.409%; -20.782%]
  • 🟩 cpu_user_time [-290.417ms; -277.685ms] or [-59.579%; -56.967%]
  • 🟩 execution_time [-331.206ms; -318.240ms] or [-34.169%; -32.831%]
  • 🟩 instructions [-633.6M instructions; -631.0M instructions] or [-47.089%; -46.891%]
  • 🟩 max_rss_usage [-9.963MB; -9.600MB] or [-11.713%; -11.286%]

scenario:log-without-log-22

  • 🟩 execution_time [-19.754ms; -17.501ms] or [-5.745%; -5.090%]

scenario:plugin-bluebird-with-tracer-18

  • 🟩 cpu_user_time [-26.996ms; -22.893ms] or [-7.638%; -6.478%]
  • 🟩 execution_time [-31.051ms; -27.878ms] or [-7.664%; -6.881%]

scenario:plugin-graphql-with-async-hooks-18

  • 🟥 max_rss_usage [+90.436MB; +93.808MB] or [+17.105%; +17.743%]

scenario:plugin-graphql-with-depth-and-collapse-on-18

  • 🟩 max_rss_usage [-126.514MB; -67.614MB] or [-13.194%; -7.051%]

scenario:plugin-graphql-with-depth-off-18

  • 🟩 max_rss_usage [-128.408MB; -65.920MB] or [-13.451%; -6.905%]

scenario:plugin-graphql-with-depth-on-max-18

  • 🟩 max_rss_usage [-108.965MB; -103.863MB] or [-11.203%; -10.679%]

scenario:startup-with-tracer-18

  • 🟩 cpu_user_time [-22.529ms; -15.745ms] or [-8.672%; -6.061%]
  • 🟩 execution_time [-24.277ms; -22.678ms] or [-8.021%; -7.493%]
  • 🟩 instructions [-49.9M instructions; -43.7M instructions] or [-7.182%; -6.295%]

scenario:startup-with-tracer-20

  • 🟩 cpu_user_time [-40.103ms; -34.296ms] or [-15.545%; -13.294%]
  • 🟩 execution_time [-39.619ms; -37.288ms] or [-13.148%; -12.374%]
  • 🟩 instructions [-56.7M instructions; -53.1M instructions] or [-8.995%; -8.436%]

scenario:startup-with-tracer-22

  • 🟩 cpu_user_time [-18.258ms; -11.994ms] or [-8.985%; -5.903%]
  • 🟩 execution_time [-17.785ms; -16.401ms] or [-7.147%; -6.591%]
  • 🟩 instructions [-44.8M instructions; -43.4M instructions] or [-6.791%; -6.584%]

@watson watson marked this pull request as ready for review February 17, 2025 12:10
@watson watson requested a review from a team as a code owner February 17, 2025 12:10
Copy link
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.

🚀

@watson watson merged commit 63d878e into v5.x Feb 17, 2025
356 checks passed
@watson watson deleted the v5.37.0-proposal branch February 17, 2025 13:02
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.