Skip to content

Safe and production-ready to use in Android? #367

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

Closed
fzyzcjy opened this issue Oct 13, 2021 · 11 comments
Closed

Safe and production-ready to use in Android? #367

fzyzcjy opened this issue Oct 13, 2021 · 11 comments

Comments

@fzyzcjy
Copy link
Contributor

fzyzcjy commented Oct 13, 2021

Hi thanks for the lib! I wonder whether this lib is safe and production-ready to use in Android? More specifically:

  1. Will it crash (segfault, etc) once in a while? Because I see backtrace says that ... can lead this library to segfault ....
  2. Will the symbols be symbolized? Since backtraces broken on the Android bot rust-lang/rust#17520 seems to be an open issue.
  3. 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

@Swatinem
Copy link
Member

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).

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented Oct 13, 2021

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?

@Swatinem
Copy link
Member

Is this Sentry-Rust used in Android and iOS environments before?

Not that I know of.

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented Oct 13, 2021

Ah......

@rajivshah3
Copy link
Contributor

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)

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented Mar 28, 2022

@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

@audkar
Copy link

audkar commented Mar 29, 2022

@fzyzcjy Do you have Sentry running on both sides (Kotlin & Rust)? Are spans, breadcrumbs, transactions shared between then?

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented Mar 29, 2022

@audkar I use Sentry for flutter + rust and is communicated vis https://github.com/fzyzcjy/flutter_rust_bridge. None is shared.

@Swatinem
Copy link
Member

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.

@smeubank
Copy link
Member

there is no known reason why this lib is not safe and prod ready for Android use. If a reason is found. Let's create a specific issue. Closing, feel free to reopen if my understanding is wrong!

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented Dec 12, 2024

Sure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants