-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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(sdk-crashes): Add ReactNative options #59261
Conversation
Extract building SDK crash detection configs to a new method, so adding new SDKs doesn't pollute post_process.py with more code, and to increase testability.
Add ReactNative options as a first step to enable SDK crash detection for ReactNative. As the sample rate is 0.0 and no config for ReactNative exists, this PR doesn't change any behavior.
Codecov Report
@@ Coverage Diff @@
## master #59261 +/- ##
===========================================
+ Coverage 55.70% 80.67% +24.96%
===========================================
Files 5147 5161 +14
Lines 225050 226374 +1324
Branches 37893 38140 +247
===========================================
+ Hits 125361 182624 +57263
+ Misses 96004 38172 -57832
- Partials 3685 5578 +1893
|
options_prefix = f"issues.sdk_crash_detection.{sdk_name.value}" | ||
|
||
project_id = options.get(f"{options_prefix}.project_id") | ||
if not project_id or project_id == 0: |
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.
0
is a Falsy value, so the second check is redundant:
if not project_id or project_id == 0: | |
if not project_id: |
(same with sample_rate
below)
) | ||
|
||
return [cocoa_config] | ||
def build_config(sdk_name: SdkName) -> Optional[SDKCrashDetectionConfig]: |
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 generally find the inner functions harder to read, but no strong opinions.
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
6bfc271
to
e868538
Compare
Add ReactNative options as a first step to enable SDK crash detection for ReactNative. As the sample rate is 0.0 and no config for ReactNative exists, this PR doesn't change any behavior.
This PR is based on #59257.