-
Notifications
You must be signed in to change notification settings - Fork 821
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
Web browser span exporters should support navigator.sendBeacon #464
Comments
navigator.sendBeacon
Worth noting that |
@danwild thx for pointing this out. There is not yet dedicated exporter for a web browser - this is going to be implemented in near future. |
Yeah, I think the main challenge here is how to encode the spans in the beacon well, but I think this is a good idea! |
I believe this issue can be closed, |
done already |
When a web browser compatible span exporter package is developed, it will need a way to reliably ensure any open spans are ended and exported when user navigates away from the browser window (for context - I've just been experimenting crudely with wiring up zipkin exporter to jaeger via HTTP POST and realised this is a problem).
Historically, web developers have used work-arounds leveraging the
unload
/beforeunload
window events, however these are clearly smelly and unreliable.I would be nicer if such a package could play nicely with the navigator.sendBeacon method.
By design,
navigator.sendBeacon
must execute the async request itself, so to support this - we probably just need exporter to expose methods for:e.g.
The text was updated successfully, but these errors were encountered: