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

Avoid Leaking under Jest #2496

Open
3 tasks
astorm opened this issue Dec 3, 2021 · 1 comment
Open
3 tasks

Avoid Leaking under Jest #2496

astorm opened this issue Dec 3, 2021 · 1 comment
Labels
agent-nodejs Make available for APM Agents project planning. kibana

Comments

@astorm
Copy link
Contributor

astorm commented Dec 3, 2021

We've received reports that's the agent will leak when used inside the jest testing framework. This is a known issue with jest and modules that employ some form of redefining modules/monkey-patching.

It would good to better understand what jest is doing, how that interacts poorly with other modules redefining things, and determine if there's any proactive steps we can take to detect jest and avoid the leaks.

Other Data Points

From @pgayvallet

During my testing, I observed that just importing the agent once did not seem to cause a leak. It had to be imported twice from two distinct paths of the test's dependency tree to start leaking (e.g A-B-C-agent and A-D-C-agent)

Proposed Next Steps:

  • reproduce issue in isolation
  • determine what jest is doing and why that leads to leaking
  • if possible, take proactive steps to avoid leaking
@github-actions github-actions bot added the agent-nodejs Make available for APM Agents project planning. label Dec 3, 2021
@trentm
Copy link
Member

trentm commented Dec 3, 2021

@estolfo estolfo modified the milestone: 8.1 Jan 24, 2022
@estolfo estolfo removed this from the 8.1 milestone Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-nodejs Make available for APM Agents project planning. kibana
Projects
None yet
Development

No branches or pull requests

4 participants