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

Improve modulesIntegration for ESM #14427

Open
lforst opened this issue Nov 22, 2024 · 5 comments
Open

Improve modulesIntegration for ESM #14427

lforst opened this issue Nov 22, 2024 · 5 comments
Labels
Meta: Good First Issue Package: node Issues related to the Sentry Node SDK

Comments

@lforst
Copy link
Member

lforst commented Nov 22, 2024

Description

Currently the modulesIntegration does not work for ESM. Maybe we can use import-in-the-middle to improve that situation.

@lforst lforst added the Package: node Issues related to the Sentry Node SDK label Nov 22, 2024
@dumbbellcode
Copy link

hey @lforst, i was thinking about working on this, so i started to look into the code for modulesIntegration and realised it doesn't really capture information about most of the installed packages, the reason being sentry (for Node) is initialized at the beginning of the app (using instrument.ts), so it is only able to capture information about packages available in require.cache at that time. Let me know if it makes sense.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Nov 29, 2024
@lforst
Copy link
Member Author

lforst commented Dec 2, 2024

@dumbbellcode Yup that's totally possible. Historically we have neglected this integration a bit because it doesn't provide too much value to Sentry users directly. However, it can be immensely helpful to us when we help troubleshoot issues with the SDK.

@dumbbellcode
Copy link

which means there are 2 distinct issues to work on,

  1. Fix the current integration so that it captures information about all packges (might degrade performance slightly)
  2. Add ESM support to the integration

I am planning to work on both but I think it's important to fix the 1st issue itself as it makes the integration obsolete if not fixed, could you create an issue and assign it to me ?, i'll give it a shot. Thanks !

ping: @lforst

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Dec 2, 2024
@lforst
Copy link
Member Author

lforst commented Dec 2, 2024

@dumbbellcode feel free to just submit a PR outlining the problem and how you're solving it. Thanks!

@dumbbellcode
Copy link

sure @lforst, will create an issue and submit a PR in some time 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Meta: Good First Issue Package: node Issues related to the Sentry Node SDK
Projects
Status: No status
Development

No branches or pull requests

4 participants