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

Import of ritm.js causing slow start up performance of servers that import tracer from 'dd-trace' #3834

Open
zeusdeux opened this issue Nov 30, 2023 · 0 comments
Labels
bug Something isn't working performance

Comments

@zeusdeux
Copy link

ritm.js which gets included in the tree when importing tracer as import tracer from 'dd-trace'; adds about 1s to the startup of any server that uses dd-trace on intel machines. Given that the import of ritm is coming from src/lambda it should not be getting imported when running in a container.

Expected behaviour
ritm.js should not be in the import tree in non-lambda environments

Actual behaviour
ritm.js is in the import tree in non-lambda environments

image

Steps to reproduce

  • import tracer from 'dd-trace'; in any file
  • take a performance profile in chrome
  • find the import tree as in the screenshot above

Environment
Docker container deployed via k8s to AWS

  • Operation system:
    Reproduced on macOS

  • Node.js version:
    20.9.0

  • Tracer version:
    N/A

  • Agent version:
    N/A

  • Relevant library versions:
    dd-trace v3.39.0 but given the import structure for this path is unchanged on main, this would occur in the latest release as well

@zeusdeux zeusdeux added the bug Something isn't working label Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working performance
Projects
None yet
Development

No branches or pull requests

2 participants