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

rfc(feature): SDK Fail-Safe Mode #143

Merged
merged 53 commits into from
Jan 20, 2025
Merged

Conversation

philipphofmann
Copy link
Member

@philipphofmann philipphofmann commented Nov 12, 2024

This RFC aims to minimize the damage of a crashing SDK in production. It’s better to have no data than crashes and no data.

Rendered RFC

@philipphofmann philipphofmann changed the title rfc/sdk fail safe mode rfc(feature): SDK Fail-Safe Mode Nov 12, 2024
@philipphofmann philipphofmann changed the title rfc(feature): SDK Fail-Safe Mode [WIP] rfc(feature): SDK Fail-Safe Mode Nov 13, 2024
@armcknight
Copy link
Member

Exciting to see this being discussed! The scenario analysis is looking good 👍🏻 It might be worth moving options 2 and 3 to a separate RFC as "remote configuration" as that's a different can of worms (there are several docs in Notion about this as a potential feature set) and keep 1 and 4 here.

@philipphofmann
Copy link
Member Author

It might be worth moving options 2 and 3 to a separate RFC as "remote configuration" as that's a different can of worms (there are several docs in Notion about this as a potential feature set) and keep 1 and 4 here.

Thanks for the input. I still want to keep them in this RFC as it helps us understand how to tackle all different scenarios. If we decide we want to move forward with these, we need to open another RFC to clarify the implementation details because, as you said, that's a different can of worms.

@philipphofmann philipphofmann changed the title [WIP] rfc(feature): SDK Fail-Safe Mode rfc(feature): SDK Fail-Safe Mode Nov 26, 2024
@philipphofmann philipphofmann changed the title rfc(feature): SDK Fail-Safe Mode WIP: rfc(feature): SDK Fail-Safe Mode Dec 3, 2024
@cleptric
Copy link
Member

cleptric commented Jan 8, 2025

Can't this be a regular event envelope with a special context?

@philipphofmann
Copy link
Member Author

philipphofmann commented Jan 9, 2025

Can't this be a regular event envelope with a special context?

Yes, I actually like that more than an extra envelope item. A simple plain event with some context or something should be enough. Then users would see it in Sentry, and we can filter in the SDK crash detection for it and even create alerts. Thanks for the suggestion @cleptric, I added this in 7afaf13.

@romtsn
Copy link
Member

romtsn commented Jan 15, 2025

Can't this be a regular event envelope with a special context?

Yes, I actually like that more than an extra envelope item. A simple plain event with some context or something should be enough. Then users would see it in Sentry, and we can filter in the SDK crash detection for it and even create alerts. Thanks for the suggestion @cleptric, I added this in 7afaf13.

The incentive was to not go through our envelope serialization pipeline at all. IIRC that was the problem that triggered this initiative in the first place, right? If we have a bug in the envelope serilization logic this will do no good.

@cleptric
Copy link
Member

cleptric commented Jan 15, 2025

@romtsn adding a new event type to our ingestion pipeline to by-pass certain logic in an SDK feels a bit overkill, imo. You can still by-pass it in the SDK and create a normal event (error) envelope manually.

@philipphofmann
Copy link
Member Author

philipphofmann commented Jan 16, 2025

@romtsn and @cleptric I added this to the option in 0664795

The event envelope doesn't go through the scope/hub or client. Instead, the payload for the event envelope is hard-coded, and the SDK directly sends the HTTP payload to Sentry.

Is it OK now @romtsn?

@romtsn
Copy link
Member

romtsn commented Jan 16, 2025

@romtsn and @cleptric I added this to the option in 0664795

The event envelope doesn't go through the scope/hub or client. Instead, the payload for the event envelope is hard-coded, and the SDK directly sends the HTTP payload to Sentry.

Is it OK now @romtsn?

yes, thank you!

Copy link
Contributor

@philprime philprime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one comment, other than that seems fine to me

Copy link
Member

@JoshuaMoelans JoshuaMoelans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small nit on in-doc links, but LGTM content-wise!

@philipphofmann philipphofmann merged commit f149d76 into main Jan 20, 2025
5 checks passed
@philipphofmann philipphofmann deleted the rfc/sdk-fail-safe-mode branch January 20, 2025 15:47
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

Successfully merging this pull request may close these issues.