-
Notifications
You must be signed in to change notification settings - Fork 805
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
[Plugin] - WebTracer - add "document-load" plugin #405
Comments
The plugins then would be lazy loaded so they won't be bundled together with WebTracer. The Plugin Loader would be responsible for that |
Would we then have |
As it is possible to have some of the plugins shared between node and browser, I would suggest to follow |
We will have more and more plugins in a future and it might be misleading which one is supported in browser only and which one in node only or both. Just looking at repo now we already have 3 plugins for http, are they going be all supported in browser too ? |
The 3 that exist are for the Nodejs standard library modules and afaik browser support for them is N/A |
Maybe the plugins could be folder organized based on their supported environments: |
My main suggestion here is that we don't rely on plugins as runtime objects or any kind of What if the plugin model looked something like this:
This way we are just using the normal import system and passing the plugins to the tracer as objects rather than trying to hook into the module system, which I think is good for Node, but feels hacky in the browser to me. |
I want to start adding auto instrumentation for WebTracer and as first thing would be simply the document load. But together with this I'm thinking of the architecture and how to structure things.
NodeTracer (TracerSDK) does this by creating a PluginLoader which is kind of cool and I thought that maybe thats the way to go. Then the first plugin for web tracer would be something like
document-load
. But then I was also thinking where it should be located. Probably some of the plugins can be shared between node and browser but not all of them. Now we have justopentelemetry-plugin-*
and I wonder if that will be appropriate place or we should rather have a separate namespace and then even if some plugins can be shared we can simply reference them. I think that would be a cleaner solution so it will look like:opentelemetry-plugin-web-*
?and for the first plugin it would be something like :
opentelemetry-plugin-web-document-load
Any thoughts , objections, suggestions :) ?
The text was updated successfully, but these errors were encountered: