Skip to content
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

Plugins and SDKs must gracefully downgrade in the event Sentry is unavailable #3

Open
1 of 5 tasks
bruno-garcia opened this issue May 6, 2022 · 10 comments
Open
1 of 5 tasks

Comments

@bruno-garcia
Copy link
Member

bruno-garcia commented May 6, 2022

Sentry had an incident where Google's storage failures affected our ability to receive events and serve API requests such as symbol upload. These caused problems for customers trying to upload symbols or had SDKs affecting the applications performance.

This issue tracks the verifications of our plugins and SDKs to validate they can behave properly in the event of Sentry being offline. Including warning the users that uploading symbols must happen at a later time.

Example:

Symbol upload: getsentry/sentry-react-native#2243
SDK performance: https://twitter.com/JasnK/status/1522621765670871042

@marandaneto
Copy link

marandaneto commented May 13, 2022

We could offer a flag that turns off the auto-upload of the debug symbols, similar to how the SAGP does https://github.com/getsentry/sentry-android-gradle-plugin/blob/0ece4be66f4c30c739cc26a7ae0250e8a65cb518/plugin-build/src/main/kotlin/io/sentry/android/gradle/extensions/SentryPluginExtension.kt#L26-L32

The build is going to fail if this flag is enabled (which is by default), and the build is going to log the flag.
If you disable this flag, we log that you've to upload debug symbols manually later once connection is back.
We can do it thru a env. var such as SENTRY_CONTINUE_ON_ERROR=true or something similar.

@marandaneto
Copy link

marandaneto commented Jun 24, 2022

We could try to do that in sentry-cli instead so we don't need to do that everywhere.
sentry-cli reads the env. var. directly.
@kamilogorek would that be possible? what do you think?

@kamilogorek
Copy link

@kamilogorek would that be possible? what do you think?

You can already achieve that using a simple bash syntax, there's no need to add anything to cli itself.
Unless I misunderstood something because I think you basically want to not fail when upload failed?

@marandaneto
Copy link

@kamilogorek yes.
We'd need to implement the bash syntax on every plugin since it's builtin in the build solution.
It's more about DRY and doing only once rather than not being possible to do on our end.

@kamilogorek
Copy link

You'll have to update all plugins to sentry-cli@v2 and make some env/flags changes anyway :P

There is a unified way of dealing with this in the CLI - https://github.com/getsentry/sentry-cli/blob/656d234bca08f9b98a738058b50d645b62c863c3/src/commands/mod.rs#L261-L289 but I'm not sure how feasible it is to allow users to do that directly there. Some might easily shoot themselves in the foot.

@bruno-garcia
Copy link
Member Author

error: API request failed
caused by: [56] Failure when receiving data from the peer (SSLRead() return error -9820)

Seems like this is happening also on SAGP, breaks the build

@krystofwoldrich
Copy link
Member

A flag --allow-failure is now part of the CLI getsentry/sentry-cli#1343 so implementing this should be a simple upgrade of the CLI (At least RN was like that.).

@marandaneto
Copy link

@krystofwoldrich do we have docs for that somewhere already? it'd be nice to have it under https://docs.sentry.io/platforms/react-native/troubleshooting/

@krystofwoldrich
Copy link
Member

Yes, I've already prepared it. It just needs one more review and can be merged.
getsentry/sentry-docs#5652

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

5 participants