Repository navigation
Closed
1 / 11 of 1 issue completedLabels
Description
Available in https://github.com/getsentry/sentry-react-native/releases/tag/6.7.0-alpha.0
Create sentry.options.json in the React Native project root and set options the same as you currently have in Sentry.init in JS.
{
"dsn": "https://key@example.io/value",
}Initialize Sentry on the native layers by newly provided native methods.
import io.sentry.react.RNSentrySDK
class MainApplication : Application(), ReactApplication {
override fun onCreate() {
super.onCreate()
RNSentrySDK.init(this)
}
}#import <RNSentry/RNSentry.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[RNSentrySDK start];
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
@endDevelopment
Tasks
- Create RNSentry.init for Android
- Create RNSentry.init for Cocoa
- Update
@sentry/wizardto optionally usesentry.options.json - Add new manual init docs
- Add JSON file schema
- Add E2E tests using manual init
- Update Sample App to use manual init by default
Native RNSentry.init tasks
- Drop JS Errors
sentry-react-native/ios/RNSentry.mm
Line 127 in 9421616
[event.exceptions.firstObject.type rangeOfString:@"Unhandled JS Exception"].location != NSNotFound) { - Add event origin and environment
sentry-react-native/ios/RNSentry.mm
Line 177 in 9421616
- (void)setEventOriginTag:(SentryEvent *)event {
Reacted by Manu, Karl Heinz Struggl, udey, fuelkoy and LucasZF
Sub-issues
Collapse Sub-issuesSub-issues
Loading 1 sub-issues
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsNo status
Activity
[-]Capture start up crashes by default[/-][+]Capture start up crashes by default (auto init native SDKs before JS)[/+]maxkosty commentedon May 16, 2024
@krystofwoldrich customer is asking:
krystofwoldrich commentedon May 17, 2024
@realkosty We don't have a timeline yet. But it's possible to capture the startup crashes when initializing the native SDKs manually. The
How to set up for start up crashes at the momentpart of the issue.[-]Capture start up crashes by default (auto init native SDKs before JS)[/-][+]Capture app start crashes by default (auto init native SDKs before JS)[/+][-]Capture app start crashes by default (auto init native SDKs before JS)[/-][+]Initialize native SDKs before JS[/+]kahest commentedon Feb 6, 2025
@krystofwoldrich we should also update at least one sample app to use this IMO :) (may be part of the e2e test task above, so I didn't add an item, please go ahead if you want to track it separately)
RNSentrySDKAPIs support to@sentry/react-native/expoplugin #4625