sentry-rust
sentry-rust copied to clipboard
Safe and production-ready to use in Android?
Hi thanks for the lib! I wonder whether this lib is safe and production-ready to use in Android? More specifically:
- Will it crash (segfault, etc) once in a while? Because I see backtrace says that
... can lead this library to segfault .... - Will the symbols be symbolized? Since https://github.com/rust-lang/rust/issues/17520 seems to be an open issue.
- Most importantly, are we ensured that the problems above never happen on every mobile phone (Android>=21 is acceptable)? In other words, if most of the phones work, but a small portion of phones crash or segfault, that is still terrible.
I am willing to use Sentry Rust but I have the worries above. Thanks for any suggestions!
Environment
How do you use Sentry? Sentry SaaS (sentry.io) or self-hosted/on-premise (which version?) saas
Which SDK and version? e.g: JavaScript 5.11.1, .NET 1.2.0 rust latest
Steps to Reproduce
n/a
Expected Result
n/a
Actual Result
n/a
As you linked to basically two problems in the wider Rust ecosystem (also note that backtrace-rs is part of the rust stdlib), and I can’t really speak to those.
Otherwise I would say that this is safe to use, we use it server-side (though you asked for Android specifically), though it still has frequent breaking changes in the API.
Depending on what your goals are (capturing hard crashes, interaction with java), you might as well take a look at sentry-native or sentry-java (which bundles sentry-native for the NDK).
My main goal is to capture anyhow::Result with a stack trace. My secondary goal is to see stack trace when a panic occurs. Thus, sentry-native/sentry-java has no use.
Is this Sentry-Rust used in Android and iOS environments before?
Is this Sentry-Rust used in Android and iOS environments before?
Not that I know of.
Ah......
We have an app that uses Rust and Electron (using Sentry SDKs for both), and are using the Rust component in our Capacitor-based mobile app that we're developing. We're looking at using the Sentry Rust SDK there as well. Once we work on adding Sentry to the mobile app I'm happy to leave comments here regarding any issues we run into (as well as contribute fixes if possible)
@rajivshah3 By the way, I have successfully bundled sentry into my app in production (android + ios) and it seems to work well. Not see big issues up to now
@fzyzcjy Do you have Sentry running on both sides (Kotlin & Rust)? Are spans, breadcrumbs, transactions shared between then?
@audkar I use Sentry for flutter + rust and is communicated vis https://github.com/fzyzcjy/flutter_rust_bridge. None is shared.
Sharing scope data between different language SDKs is always a challenge. So far, most of our Mobile focused SDKs that bundle sentry-native have implemented Scope-sync. Though nothing on the Rust side I know of.