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

refactor(pluginloader): move internalFilesList #401

Conversation

markwolff
Copy link
Member

@markwolff markwolff commented Oct 3, 2019

Which problem is this PR solving?

Short description of the changes

Draft PR for initial attempt at moving internalFilesList stuff to PluginLoader. Tests currently won't pass unless you provide absolute path to the grpc plugin in grpc.tests.ts due to #368.

@@ -79,10 +110,27 @@ export class PluginLoader {
}

// Enable the require hook.
hook(modulesToHook, (exports, name, baseDir) => {
hook(modulesToHook, { internals: true }, (exports, name, baseDir) => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the new entry point into the internal stuff. It causes this to function to trigger for every internal file loaded in the module. This is probably not good for perf even though the module is immediately returned as is when there is no patching to be done.

@markwolff
Copy link
Member Author

Closing this since it seems to be due to an issue with internalFilesLoader

@markwolff markwolff closed this Oct 9, 2019
@draffensperger
Copy link
Contributor

Does this suggest that we should move the Node-specific plugin config to a new package?

I wonder if that would be useful given that the browser environment plugins will look a bit different per #405

lukaswelinder pushed a commit to agile-pm/opentelemetry-js that referenced this pull request Jul 24, 2020
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