Skip to content

Conversation

@ojproductions
Copy link
Contributor

@ojproductions ojproductions commented Jan 27, 2026

What does this PR do?

Reverts size optimizations while keeping latest dd-trace version.

Motivation

size optimizations may be removing necessary dependencies and functionality (namely profiling) needed in lambda layer. This is blocking release so for now the plan is to revert those optimizations, and address the dependency issues after releasing.

Testing Guidelines

Additional Notes

Types of Changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)

Copy link

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

Is there a reason why #711 is not used instead? The deletions here do not work as before anymore. Multiple of these libraries are now vendored in a minified version and the rm will not have any effect.

While I can not tell if it fixes everything, I do believe #711 is the better fix

@ojproductions
Copy link
Contributor Author

@BridgeAR this is because we believe #711 might not address other dependencies that are used in the layer. appsec is likely one but there may be others. we dont know exactly which ones though as there isn't test coverage there yet. Until we can figure that out, I think itd be best to not try to cut out dependencies. If the rms have no effect I can remove them but the main thing is removing the --ignore-optional flag

Copy link

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

If we want to land this, I think we should fix these first.

Comment on lines +40 to +42
RUN rm -rf /nodejs/node_modules/hdr-histogram-js/build
RUN rm -rf /nodejs/node_modules/protobufjs/dist
RUN rm -rf /nodejs/node_modules/protobufjs/cli

Choose a reason for hiding this comment

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

These should be changed to match our vendored path in dd-trace.

Comment on lines +35 to +36
RUN rm -rf /nodejs/node_modules/dd-trace/prebuilds
RUN rm -rf /nodejs/node_modules/dd-trace/dist

Choose a reason for hiding this comment

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

I am not sure where these come from. They do not belong to dd-trace (if they did, they do not since a very long time).

Comment on lines +51 to +56
RUN rm -rf /nodejs/node_modules/jsonpath-plus/src/jsonpath.d.ts
RUN rm -rf /nodejs/node_modules/jsonpath-plus/src/jsonpath-browser.js
RUN rm -rf /nodejs/node_modules/jsonpath-plus/src/dist/index-browser-umd.min.cjs
RUN rm -rf /nodejs/node_modules/jsonpath-plus/src/dist/index-browser-umd.cjs
RUN rm -rf /nodejs/node_modules/jsonpath-plus/src/dist/index-browser-esm.min.js
RUN rm -rf /nodejs/node_modules/jsonpath-plus/src/dist/index-browser-esm.js

Choose a reason for hiding this comment

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

This should be changed to match our vendored path in dd-trace.

Copy link
Contributor Author

@ojproductions ojproductions Jan 27, 2026

Choose a reason for hiding this comment

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

theres only an index.js file in each vendored package, so these files wouldnt exist there either. I think its okay to just remove these lines

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, vendoring should remove the need for any removal in a vendored dependency.

RUN rm -rf /nodejs/node_modules/@datadog/pprof/prebuilds/darwin-arm64
RUN rm -rf /nodejs/node_modules/@datadog/pprof/prebuilds/darwin-x64
RUN rm -rf /nodejs/node_modules/@datadog/pprof/prebuilds/win32-ia32
RUN rm -rf /nodejs/node_modules/@datadog/pprof/prebuilds/win32-x64

Choose a reason for hiding this comment

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

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.

5 participants