-
Notifications
You must be signed in to change notification settings - Fork 620
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe
In the @opentelemetry/instrumentation package, we added experimental ESM support a while ago (open-telemetry/opentelemetry-js#3698). As more and more users started using this, the lack of ESM-releated testing became apparent. A high-priority bug that's present in a large number of instrumentations causes applications to crash as wrapping ES modules fails.
- pg: cannot instrument an ESM-imported pg #1693
- pg instrumentation crashes when using ES module. #1588
- Pino instrumentation fails when using ES modules #1587
- instrumentation-fastify fails to initialise if "type" is set to "module" in package.json #1519
- ioredis: cannot instrument an ESM-imported ioredis #1692
There have been PRs opened to address this; however, as we don't test for ESM, it is hard to verify fixes and catch regressions.
Describe the solution you'd like to see
We should start testing if instrumentations also work with ESM. This issue tracks
- documenting an ESM testing strategy for existing packages
- implementing the suggested tests in at least two instrumentation packages
- adding a step in the unit tests workflow to run the ESM tests
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request