TrackJs / trackjs-package

JavaScript Browser Error Monitoring Agent from TrackJS
https://trackjs.com
Other
128 stars 18 forks source link

[FEATURE REQUEST] rust-wasm client #36

Open nullrocket opened 5 years ago

nullrocket commented 5 years ago

My company is migrating our browser client to rust-wasm, and I'm wondering if there are any thoughts towards TrackJs supporting that environment?

Currently we are planning on just wrapping the TrackJs client to expose the API in rust, but a deeper integration would be nice.

Looks like sentry is doing it for native rust at least https://blog.sentry.io/2018/10/22/getting-started-with-rust-error-tracking

toddhgardner commented 5 years ago

Hi @nullrocket. Thanks for the suggestion! Wrapping the client is a good first step, as it should give you visitor, network, and console telemetry, as well as exposing global errors.

What sort of things would you want from a native implementation?

nullrocket commented 5 years ago

@toddhgardner wrapping the client gets quite a way there, and after looking at https://github.com/rustwasm/console_error_panic_hook and how it dumps to the console on panic, I realized stacktraces will get sent to trackjs via the javascript client when they occur.

It looks like we don't really need an official TrackJs rust-wasm client, but having it available would still be useful, as in we don't have to keep it up to date ourselves :)

toddhgardner commented 5 years ago

@nullrocket absolutely, I understand. Can you share the wrapper you built with us, maybe we can use it as a starting point?

nullrocket commented 5 years ago

Sure can, it will take us a bit to extract it, if you don't mind leaving this issue open for a while as a placeholder, I'll circle back when we have something ready.