Skip to content

Filter out ESM-incompatible defaultIntegrations when running in ESM #16146

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

Open
Lms24 opened this issue Apr 28, 2025 · 0 comments
Open

Filter out ESM-incompatible defaultIntegrations when running in ESM #16146

Lms24 opened this issue Apr 28, 2025 · 0 comments
Labels
Node.js OpenTelemetry Package: node Issues related to the Sentry Node SDK

Comments

@Lms24
Copy link
Member

Lms24 commented Apr 28, 2025

Problem Statement

While working on #16137 we realized that quite a lot of Otel instrumentation is currently not compatible with ESM. In some (all?) cases this goes as far as the application breaking if the instrumentation tries to patch a package but isn't compatible with the ESM exports

Solution Brainstorm

We should avoid trying to apply instrumentations known to break ESM apps. Currently I'm we're thinking of creating a denyList of defaultIntegrations to filter out. Let's only apply this to default integrations. If users specifically add an integration, this is on them.

This also involves adding more tests for our integrations in both CJS and ESM to be aware of this.

@Lms24 Lms24 added Package: node Issues related to the Sentry Node SDK Node.js OpenTelemetry labels Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Node.js OpenTelemetry Package: node Issues related to the Sentry Node SDK
Projects
None yet
Development

No branches or pull requests

1 participant