getsentry / sentry-kotlin-multiplatform

Sentry SDK for Kotlin Multiplatform
MIT License
135 stars 19 forks source link

feat: add JS Browser support #27

Open buenaflor opened 2 years ago

buenaflor commented 2 years ago

It's possible to install NPM packages via implementation(npm(...)) and create bindings through @JsModule(...) annotation

Ideally we install @sentry/browser and wrap our KMP sdk around it.

I have played around with it and was able to do basic things like init and captureMessage

rocketraman commented 1 year ago

Can you post your prototype declarations here @buenaflor ?

buenaflor commented 1 year ago

@rocketraman maybe you can find relevant things here: https://github.com/getsentry/sentry-kotlin-multiplatform/tree/feat/add-js-support/sentry-kotlin-multiplatform/src/jsMain/kotlin/io/sentry/kotlin/multiplatform

Not sure if it works currently but it's something I played around with a couple months ago

MinmoTech commented 1 year ago

Hey!

Is there any chance this would get implemented at some point? :)

I would love to be able to integrate it into common code!

romtsn commented 1 year ago

@MinmoTech definitely, if there's a demand from the community!

alexwhb commented 1 year ago

I would love to see this get implemented as well. I have iOS, Android, and WatchOS targets with an app I'm building and I'm working on a JS target, but this is currently the only dependency in my stack that doesn't have JS browser support.

ar-g commented 8 months ago

Need chrome web-extension support

buenaflor commented 1 month ago

See https://github.com/getsentry/sentry-kotlin-multiplatform/issues/227#issuecomment-2310840303 for a quick implementation that you can do yourself

sgammon commented 2 weeks ago

@romtsn Seems like there's demand!