-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat(native): add backend trade-offs to Advanced Usage #11721
feat(native): add backend trade-offs to Advanced Usage #11721
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Bundle ReportChanges will increase total bundle size by 193.14kB (1.28%) ⬆️. This is within the configured threshold ✅ Detailed changes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, IMO very helpful as an overview. left some small suggestions
docs/platforms/native/advanced-usage/backend-tradeoffs/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/native/advanced-usage/backend-tradeoffs/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/native/advanced-usage/backend-tradeoffs/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/native/advanced-usage/backend-tradeoffs/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/native/advanced-usage/backend-tradeoffs/index.mdx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, this is very helpful. Some questions/improvement ideas below:
docs/platforms/native/advanced-usage/backend-tradeoffs/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/native/advanced-usage/backend-tradeoffs/index.mdx
Outdated
Show resolved
Hide resolved
|
||
* `inproc` only provides the backtrace of the crashing thread. `breakpad` records all threads in the minidump. | ||
* similar to `crashpad`, `breakpad` uses the lowest level error handling mechanism on each platform (macOS: mach exception ports, Windows: `UnhandledExceptionFilter`, Linux: signal handlers), it does cover a smaller range of errors though as mentioned above. | ||
* `inproc`, on the other hand, uses signal handling on Linux and macOS (meaning you only get a `POSIX` compatibility layer over mach exception ports) and `UnhandledExceptionFilter` on Windows (solely errors registered by SEH) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(solely errors registered by SEH)
This could use further clarification on differences between inproc and breakpad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to say here that they use the same mechanism, and UnhandledExceptionFilter
and SEH
have equivalent meanings in this case. I can see how this easily reads as a distinction between breakpad
and inproc
. Should I remove it?
docs/platforms/native/advanced-usage/backend-tradeoffs/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/native/advanced-usage/backend-tradeoffs/index.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: Karl Heinz Struggl <[email protected]>
Co-authored-by: Karl Heinz Struggl <[email protected]>
Co-authored-by: Karl Heinz Struggl <[email protected]>
Co-authored-by: Karl Heinz Struggl <[email protected]>
Co-authored-by: Ivan Dlugos <[email protected]>
Co-authored-by: Ivan Dlugos <[email protected]>
Co-authored-by: Karl Heinz Struggl <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (+ small grammar nit)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really, really helpful stuff. Thank you.
I left some questions to help novices on the matter like me better understand things
docs/platforms/native/advanced-usage/backend-tradeoffs/index.mdx
Outdated
Show resolved
Hide resolved
|
||
* has an external `handler` process that allows for external snapshots and sending crash reports immediately (instead of on the next successful start of your application) | ||
* is the primary target for extension compared to upstream, including | ||
* client-side stack traces |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry if this is a dumb question, but what does this mean? Is that vs "server-side stack traces"?
Don't we create a minidump with crashpad and hence stack walk on the server?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not at all a dumb question. We currently have an "experimental" implementation of client-side stack traces for crashpad (which you can enable at compile time) for users who prefer to deploy to environments where they can unwind and symbolicate locally instead of managing their debug symbols at build time.
Minidumps don't preclude adding additional data; in this case, we unwind and symbolicate locally and write a separate stack trace Minidump stream known in the processing pipeline:
|
||
Sentry decided on `crashpad` as the default on all platforms because there are a lot of upsides. However, there are use cases where `crashpad` cannot be used or makes distribution or deployment much harder. We provide other backends for situations when | ||
|
||
* you cannot package or deploy an additional executable (the `crashpad_handler`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it useful to add 'or spawn'? Given environments where there's a sandbox and we can't create child processes? (Xbox and UWP I believe?)
* you cannot package or deploy an additional executable (the `crashpad_handler`) | |
* you cannot package, deploy or spawn an additional executable (the `crashpad_handler`) |
I see this might be covered in the next two lines though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to differentiate cases in which even packaging separate executables was a problem from cases in which a runtime inhibition exists.
docs/platforms/native/advanced-usage/backend-tradeoffs/index.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: Bruno Garcia <[email protected]>
This is a big step forward in documenting our native support. Thank you Mischan! |
* master: (39 commits) getsentry/relay@403f2bf feat(native): add backend trade-offs to Advanced Usage (#11721) 🔧 chore(api): add additional troubleshooting instructions to publish api docs (#11772) Bump API schema to 02adb960 (#11773) Update metric-alert-config.mdx (#11760) update w-9 tax form (#11764) chore: silence fetch cache error due to size limit (#11767) fix Ureal engine DSN placeholder (#11769) feat: Banner pathname regex (#11761) docs(nuxt): Add troubleshoot pnpm (#11720) Docker Desktop to Colima fix (#11752) Bump API schema to d51784a6 (#11759) ref(feedback): update user feedback docs to include external issue linking & auto issue creation (#11729) getsentry/relay@d23c39a Changed /store to /envelope (because /store does not exist anymore (#11755) Refactor arcade embeds (#11722) feat(js): Add `skipBrowserExtensionCheck` documentation (#11693) getsentry/relay@a7d9096 fix mermaid charts in dark mode (#11754) fix: Log4j configurations and wording (#11395) ...
* feat(native): add backend trade-offs to Advanced Usage * Add hook on macOS exception * Update docs/platforms/native/advanced-usage/backend-tradeoffs/index.mdx Co-authored-by: Karl Heinz Struggl <[email protected]> * Update docs/platforms/native/advanced-usage/backend-tradeoffs/index.mdx Co-authored-by: Karl Heinz Struggl <[email protected]> * Update docs/platforms/native/advanced-usage/backend-tradeoffs/index.mdx Co-authored-by: Karl Heinz Struggl <[email protected]> * Update docs/platforms/native/advanced-usage/backend-tradeoffs/index.mdx Co-authored-by: Karl Heinz Struggl <[email protected]> * Update docs/platforms/native/advanced-usage/backend-tradeoffs/index.mdx Co-authored-by: Ivan Dlugos <[email protected]> * Update docs/platforms/native/advanced-usage/backend-tradeoffs/index.mdx Co-authored-by: Ivan Dlugos <[email protected]> * Update docs/platforms/native/advanced-usage/backend-tradeoffs/index.mdx Co-authored-by: Karl Heinz Struggl <[email protected]> * Highlight inproc macOS breakage * grammar inproc macOS 13 breakage * Update docs/platforms/native/advanced-usage/backend-tradeoffs/index.mdx Co-authored-by: Bruno Garcia <[email protected]> * rewriting some parts for clarity --------- Co-authored-by: Karl Heinz Struggl <[email protected]> Co-authored-by: Ivan Dlugos <[email protected]> Co-authored-by: Bruno Garcia <[email protected]>
DESCRIBE YOUR PR
I try to cover some of the surface area of the tradeoffs involved when choosing a backend in the Native SDK. This was requested by downstream SDK maintainers (ref: issues below).
Fixes: getsentry/sentry-native#908
Fixes: getsentry/sentry-native#1070
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
LEGAL BOILERPLATE
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.
EXTRA RESOURCES