-
Notifications
You must be signed in to change notification settings - Fork 531
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
Introduce ESM testing strategy #1731
Comments
…ests Running scripts out-of-process for testing allows running tests with different node options and with isolation. The former is useful for ESM testing. This change includes adding an ESM test for ioredis. This depends on open-telemetry#1694 to pass. Closes: open-telemetry#1731
I've been experimenting a bit, and we may be able to re-use the existing At the moment one thing preventing us from doing so is that once I add |
This is an attempt to test ESM usage of ioredis based on Marc's comment at open-telemetry#1731 (comment) This *passes*, but the thing that scares me is enabling the ESM hook for .test.ts tests as well. The IORedisInstrumentation patch method is being called *both* for ESM and CommonJS for ioredis.test.ts -- I don't understand that. Refs: open-telemetry#1731 Refs: open-telemetry#1735
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.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
The text was updated successfully, but these errors were encountered: