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

feat(esbuild-plugin): esbuild plugin to prepare bundled modules for instrumentation #2295

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

trentm
Copy link
Contributor

@trentm trentm commented Jun 21, 2024

(More details to come.)

Refs: #1856
Refs: open-telemetry/opentelemetry-js#4818

@rossipedia
Copy link

👋 As I mentioned in the other PR, here's my adapted plugin. I made a couple tweaks around caching results, in particular trying to use require.resolve() first before falling back to build.resolve(), and also grabbing a set of "interested" prefixes so we can eliminate modules we know we aren't interested in from the resolution process.

There might be more optimizations that can be done here, but this has gotten us to the "good enough" point. Hope you find it useful!

https://gist.github.com/rossipedia/341501ed93ea5b1089da143ac49e6697

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants