-
Notifications
You must be signed in to change notification settings - Fork 765
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
Add tracer implementation for the browser #276
Comments
FYI @obecny is working on this, can't seem to add him as an assignee quite yet |
My understanding is that the basic tracer should have the small-scale platform specific code like calculating timestamps, etc. To the extent that it's currently Node-specific we should fix that and write Karma tests for it Would you see |
Ok I have added platform specific for Span for performance.now(). The |
I actually think the code for That gets swapped in when using webpack by this line:
The reason I think it's important to have that lightweight platform specific functionality in the Core and BasicTracer packages, is that then users can use those packages directly in the browser if they want to - they don't need to use the In other words, if we just need to make small changes to a package for utility functions, we just do that in the package using that. See also https://github.com/defunctzombie/package-browser-field-spec for details on the WDYT? |
I think the way we would get an early win with this approach is to make a browser-specific example of using the Then as a future action, we can make an |
Yes this is exactly where I'm adding this as you said (Span is part of BasicTracer and it was using |
Woohoo! Awesome work @obecny!!! |
The goal here is to create an initial pass at a package that contains a tracer implementation that works in the browser. This means creating a new package called opentelemetry-tracer-web which pulls in the basic tracer along with any platform specific code, scripts to compile and minify the package, and any appropriate initial testing. We use CircleCI for automated testing, which I believe allows for headless chrome testing.
cc @draffensperger is there anything else you'd add to this for an initial go at the web implementation?
The text was updated successfully, but these errors were encountered: