-
-
Notifications
You must be signed in to change notification settings - Fork 172
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
Backend selection for static lib #908
Comments
You are right. We don't have a document to help users decide on a specific backend. After 1.5 years of being exposed to questions surrounding the backend, I can short-cut it to always using Crashpad, except when you shouldn't. The reasons for "shouldn't" by order of occurrence are:
If you touch one of those, you should always default to You'll need to use
Case in point: the Unity and Unreal SDKs nowadays use practically all Native backends because the decision space is ample and not only related to platform support (which is rarely a reason to choose one over the other). The choice most often boils down to particular differences in the deployment or distribution scenario, which are more related to the environment in which it is used rather than the backend itself. What kinds of information would you base your choice on? |
OK, but what exactly does that mean? I'm really curious because if the others are more complicated to integrate for me, why should I use them instead of
Hmm, a few things come to mind:
Basically, it's all about weight pros and cons. As is, i.e. with the information that is available, I don't see why I would ever choose anything by |
because you can offer your users more useful data when crashes happen:
The list could be longer, but there is also way more nuance than what this short list hints at, because some higher level platforms use standard paths (for crashing, exiting applications, etc.) that wouldn't even be exercised in other environments. Case in point:
i covered these above
yes, all backends provide a
whether you build a static library or not is independent of the
only
we only build a single shared library that contains the Native SDK and the backend (without exposing the backend in the library symbols)
the only 3rd party dependencies are
I do understand what the basic idea is. My point is that what users actually need is extremely specific to their use-case most of the time and much broader and deeper than we are currently able to cover. I also wonder whether it would be helpful to most, because it requires a lot of detail knowledge with regard to the error handling mechanisms on each platform (from the interactions i had with users I am almost sure it would overwhelm most). So some limitation in scope is required for this to be helpful (so users don't just end up with "well, this is complicated... let's go with crashpad"). But maybe I am wrong here and open discussion. |
Thank you. This is exactly the information that I believe should be documented, be it on docs.sentry.io for sentry-native or at least here in the repository. And yes, there will always be questions about this and that, but unless those are extremely specific, they could be added to the doc. As is, it is all just guesswork for integrators. I'm not saying the doc should cover every nuance there is, we could just try to add the basic info, i.e. what has been listed in this issue so far, and start there. Also, not everyone has to read it, that's what the default settings are for, but if someone is interested, the information should be available rather than having to ask maintainers IMO. That also helps future contributors to catch up. |
I'm trying to integrate sentry-native crash handling to sentry-dotnet SDK when compiled to NativeAOT. I'm integrating as a static library to avoid having the end consumer application to need to bundle an additional library. Bundling and compilation all work fine without any backend and transport (originally, I've just used sentry-native to get the list of loaded debug images to enable server-side symbolication; that all worked fine).
However, I'm trying to figure out which backend to use for desktop platforms (Windows, Linux, macOS) in this scenario, specifically for a static library. Since crashpad is an external process (i.e. an external binary which I've tried to avoid with the static lib), I was thinking
breakpad
orinproc
. The thing is, I could not find any documentation what are the main differences, functionally, between the various backends, aside from platform support. It would be nice to have a doc that I could consult. I've already had the same issue when implementing sentry-native to the Unity and Unreal SDKs and because All these use-cases/platforms are a bit different, I'm having trouble making the decision each time, other than "pick the default" (then new questions arise, like: is the default the default because it's the best one or because it has been the default years ago and is just kept that way to not break users, etc)The text was updated successfully, but these errors were encountered: