@sentry/react-native 7.0.1 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/RNSentry.podspec +1 -1
- package/android/build.gradle +2 -1
- package/android/libs/replay-stubs.jar +0 -0
- package/android/replay-stubs/README.md +17 -0
- package/android/replay-stubs/build.gradle +22 -0
- package/android/replay-stubs/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/replay-stubs/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/android/replay-stubs/gradlew +251 -0
- package/android/replay-stubs/gradlew.bat +94 -0
- package/android/replay-stubs/settings.gradle +1 -0
- package/android/replay-stubs/src/main/java/io/sentry/android/replay/DefaultReplayBreadcrumbConverter.java +13 -0
- package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +8 -1
- package/android/src/main/java/io/sentry/react/RNSentryVersion.java +1 -1
- package/dist/js/integrations/logEnricherIntegration.js +28 -9
- package/dist/js/integrations/logEnricherIntegration.js.map +1 -1
- package/dist/js/replay/mobilereplay.d.ts +1 -0
- package/dist/js/replay/mobilereplay.d.ts.map +1 -1
- package/dist/js/replay/mobilereplay.js +5 -0
- package/dist/js/replay/mobilereplay.js.map +1 -1
- package/dist/js/tools/utils.d.ts.map +1 -1
- package/dist/js/tools/utils.js +2 -8
- package/dist/js/tools/utils.js.map +1 -1
- package/dist/js/tools/vendor/metro/countLines.d.ts +3 -0
- package/dist/js/tools/vendor/metro/countLines.d.ts.map +1 -0
- package/dist/js/tools/vendor/metro/countLines.js +27 -0
- package/dist/js/tools/vendor/metro/countLines.js.map +1 -0
- package/dist/js/tools/vendor/metro/utils.d.ts.map +1 -1
- package/dist/js/tools/vendor/metro/utils.js +17 -8
- package/dist/js/tools/vendor/metro/utils.js.map +1 -1
- package/dist/js/version.d.ts +1 -1
- package/dist/js/version.js +1 -1
- package/dist/js/version.js.map +1 -1
- package/ios/RNSentry+fetchNativeStack.m +2 -6
- package/ios/RNSentry.h +1 -7
- package/ios/RNSentry.mm +50 -86
- package/ios/RNSentryExperimentalOptions.h +7 -0
- package/ios/RNSentryExperimentalOptions.m +8 -0
- package/ios/RNSentryReplayBreadcrumbConverter.m +4 -17
- package/ios/RNSentryVersion.m +1 -1
- package/ios/Replay/RNSentryReplayMask.mm +1 -2
- package/ios/Replay/RNSentryReplayUnmask.mm +1 -2
- package/package.json +11 -10
- package/plugin/build/withSentryAndroidGradlePlugin.d.ts +1 -1
- package/plugin/build/withSentryAndroidGradlePlugin.js +1 -1
- package/ts3.8/dist/js/replay/mobilereplay.d.ts +1 -0
- package/ts3.8/dist/js/version.d.ts +1 -1
package/ios/RNSentry.mm
CHANGED
|
@@ -28,16 +28,9 @@
|
|
|
28
28
|
#import <Sentry/SentryException.h>
|
|
29
29
|
#import <Sentry/SentryFormatter.h>
|
|
30
30
|
#import <Sentry/SentryOptions.h>
|
|
31
|
-
#import <Sentry/
|
|
32
|
-
|
|
33
|
-
#if __has_include(<Sentry/SentryOptions+HybridSDKs.h>)
|
|
34
|
-
# define USE_SENTRY_OPTIONS 1
|
|
35
|
-
# import <Sentry/SentryOptions+HybridSDKs.h>
|
|
36
|
-
#else
|
|
37
|
-
# define USE_SENTRY_OPTIONS 0
|
|
38
|
-
# import <Sentry/SentryOptionsInternal.h>
|
|
39
|
-
#endif
|
|
31
|
+
#import <Sentry/SentryOptionsInternal.h>
|
|
40
32
|
#import <Sentry/SentryScreenFrames.h>
|
|
33
|
+
#import <Sentry/SentryUser.h>
|
|
41
34
|
|
|
42
35
|
// This guard prevents importing Hermes in JSC apps
|
|
43
36
|
#if SENTRY_PROFILING_ENABLED
|
|
@@ -94,10 +87,8 @@ static bool hasFetchedAppStart;
|
|
|
94
87
|
}
|
|
95
88
|
|
|
96
89
|
RCT_EXPORT_MODULE()
|
|
97
|
-
RCT_EXPORT_METHOD(initNativeSdk
|
|
98
|
-
|
|
99
|
-
: (RCTPromiseResolveBlock)resolve rejecter
|
|
100
|
-
: (RCTPromiseRejectBlock)reject)
|
|
90
|
+
RCT_EXPORT_METHOD(initNativeSdk : (NSDictionary *_Nonnull)options resolve : (
|
|
91
|
+
RCTPromiseResolveBlock)resolve rejecter : (RCTPromiseRejectBlock)reject)
|
|
101
92
|
{
|
|
102
93
|
NSError *error = nil;
|
|
103
94
|
SentryOptions *sentryOptions = [self createOptionsWithDictionary:options error:&error];
|
|
@@ -207,8 +198,7 @@ RCT_EXPORT_METHOD(initNativeSdk
|
|
|
207
198
|
- (SentryOptions *_Nullable)createOptionsWithDictionary:(NSDictionary *_Nonnull)options
|
|
208
199
|
error:(NSError *_Nonnull *_Nonnull)errorPointer
|
|
209
200
|
{
|
|
210
|
-
SentryBeforeSendEventCallback beforeSend = ^SentryEvent *(SentryEvent *event)
|
|
211
|
-
{
|
|
201
|
+
SentryBeforeSendEventCallback beforeSend = ^SentryEvent *(SentryEvent *event) {
|
|
212
202
|
// We don't want to send an event after startup that came from a Unhandled JS Exception of
|
|
213
203
|
// React Native because we sent it already before the app crashed.
|
|
214
204
|
if (nil != event.exceptions.firstObject.type &&
|
|
@@ -247,13 +237,8 @@ RCT_EXPORT_METHOD(initNativeSdk
|
|
|
247
237
|
[RNSentryReplay updateOptions:mutableOptions];
|
|
248
238
|
#endif
|
|
249
239
|
|
|
250
|
-
#if USE_SENTRY_OPTIONS
|
|
251
|
-
SentryOptions *sentryOptions = [[SentryOptions alloc] initWithDict:mutableOptions
|
|
252
|
-
didFailWithError:errorPointer];
|
|
253
|
-
#else
|
|
254
240
|
SentryOptions *sentryOptions = [SentryOptionsInternal initWithDict:mutableOptions
|
|
255
241
|
didFailWithError:errorPointer];
|
|
256
|
-
#endif
|
|
257
242
|
if (*errorPointer != nil) {
|
|
258
243
|
return nil;
|
|
259
244
|
}
|
|
@@ -300,6 +285,13 @@ RCT_EXPORT_METHOD(initNativeSdk
|
|
|
300
285
|
}
|
|
301
286
|
}
|
|
302
287
|
|
|
288
|
+
if ([mutableOptions valueForKey:@"enableLogs"] != nil) {
|
|
289
|
+
id enableLogsValue = [mutableOptions valueForKey:@"enableLogs"];
|
|
290
|
+
if ([enableLogsValue isKindOfClass:[NSNumber class]]) {
|
|
291
|
+
[RNSentryExperimentalOptions setEnableLogs:[enableLogsValue boolValue]
|
|
292
|
+
sentryOptions:sentryOptions];
|
|
293
|
+
}
|
|
294
|
+
}
|
|
303
295
|
[self trySetIgnoreErrors:mutableOptions];
|
|
304
296
|
|
|
305
297
|
// Enable the App start and Frames tracking measurements
|
|
@@ -367,9 +359,8 @@ RCT_EXPORT_METHOD(initNativeSdk
|
|
|
367
359
|
event.tags = newTags;
|
|
368
360
|
}
|
|
369
361
|
|
|
370
|
-
RCT_EXPORT_METHOD(initNativeReactNavigationNewFrameTracking
|
|
371
|
-
|
|
372
|
-
: (RCTPromiseRejectBlock)reject)
|
|
362
|
+
RCT_EXPORT_METHOD(initNativeReactNavigationNewFrameTracking : (
|
|
363
|
+
RCTPromiseResolveBlock)resolve rejecter : (RCTPromiseRejectBlock)reject)
|
|
373
364
|
{
|
|
374
365
|
#if SENTRY_HAS_UIKIT
|
|
375
366
|
if ([[NSThread currentThread] isMainThread]) {
|
|
@@ -411,9 +402,8 @@ RCT_EXPORT_METHOD(initNativeReactNavigationNewFrameTracking
|
|
|
411
402
|
return @[ RNSentryNewFrameEvent ];
|
|
412
403
|
}
|
|
413
404
|
|
|
414
|
-
RCT_EXPORT_METHOD(
|
|
415
|
-
|
|
416
|
-
: (RCTPromiseRejectBlock)reject)
|
|
405
|
+
RCT_EXPORT_METHOD(
|
|
406
|
+
fetchNativeSdkInfo : (RCTPromiseResolveBlock)resolve rejecter : (RCTPromiseRejectBlock)reject)
|
|
417
407
|
{
|
|
418
408
|
resolve(@ {
|
|
419
409
|
@"name" : PrivateSentrySDKOnly.getSdkName,
|
|
@@ -421,9 +411,8 @@ RCT_EXPORT_METHOD(fetchNativeSdkInfo
|
|
|
421
411
|
});
|
|
422
412
|
}
|
|
423
413
|
|
|
424
|
-
RCT_EXPORT_METHOD(
|
|
425
|
-
|
|
426
|
-
: (RCTPromiseRejectBlock)reject)
|
|
414
|
+
RCT_EXPORT_METHOD(
|
|
415
|
+
fetchModules : (RCTPromiseResolveBlock)resolve rejecter : (RCTPromiseRejectBlock)reject)
|
|
427
416
|
{
|
|
428
417
|
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"modules" ofType:@"json"];
|
|
429
418
|
NSString *modulesString = [NSString stringWithContentsOfFile:filePath
|
|
@@ -438,15 +427,14 @@ RCT_EXPORT_SYNCHRONOUS_TYPED_METHOD(NSString *, fetchNativePackageName)
|
|
|
438
427
|
return packageName;
|
|
439
428
|
}
|
|
440
429
|
|
|
441
|
-
RCT_EXPORT_SYNCHRONOUS_TYPED_METHOD(
|
|
442
|
-
|
|
430
|
+
RCT_EXPORT_SYNCHRONOUS_TYPED_METHOD(
|
|
431
|
+
NSDictionary *, fetchNativeStackFramesBy : (NSArray *)instructionsAddr)
|
|
443
432
|
{
|
|
444
433
|
return [self fetchNativeStackFramesBy:instructionsAddr symbolicate:dladdr];
|
|
445
434
|
}
|
|
446
435
|
|
|
447
|
-
RCT_EXPORT_METHOD(fetchNativeLogAttributes
|
|
448
|
-
|
|
449
|
-
: (RCTPromiseRejectBlock)reject)
|
|
436
|
+
RCT_EXPORT_METHOD(fetchNativeLogAttributes : (RCTPromiseResolveBlock)resolve rejecter : (
|
|
437
|
+
RCTPromiseRejectBlock)reject)
|
|
450
438
|
{
|
|
451
439
|
__block NSMutableDictionary<NSString *, id> *result = [NSMutableDictionary new];
|
|
452
440
|
|
|
@@ -467,11 +455,7 @@ RCT_EXPORT_METHOD(fetchNativeLogAttributes
|
|
|
467
455
|
contexts[@"os"] = os;
|
|
468
456
|
}
|
|
469
457
|
|
|
470
|
-
#if CROSS_PLATFORM_TEST
|
|
471
458
|
NSString *releaseName = SentrySDKInternal.options.releaseName;
|
|
472
|
-
#else
|
|
473
|
-
NSString *releaseName = [SentrySDK options].releaseName;
|
|
474
|
-
#endif
|
|
475
459
|
if (releaseName) {
|
|
476
460
|
contexts[@"release"] = releaseName;
|
|
477
461
|
}
|
|
@@ -500,9 +484,8 @@ RCT_EXPORT_METHOD(fetchNativeLogAttributes
|
|
|
500
484
|
resolve(result);
|
|
501
485
|
}
|
|
502
486
|
|
|
503
|
-
RCT_EXPORT_METHOD(fetchNativeDeviceContexts
|
|
504
|
-
|
|
505
|
-
: (RCTPromiseRejectBlock)reject)
|
|
487
|
+
RCT_EXPORT_METHOD(fetchNativeDeviceContexts : (RCTPromiseResolveBlock)resolve rejecter : (
|
|
488
|
+
RCTPromiseRejectBlock)reject)
|
|
506
489
|
{
|
|
507
490
|
if (PrivateSentrySDKOnly.options.debug) {
|
|
508
491
|
NSLog(@"Bridge call to: deviceContexts");
|
|
@@ -562,9 +545,8 @@ RCT_EXPORT_METHOD(fetchNativeDeviceContexts
|
|
|
562
545
|
resolve(serializedScope);
|
|
563
546
|
}
|
|
564
547
|
|
|
565
|
-
RCT_EXPORT_METHOD(
|
|
566
|
-
|
|
567
|
-
: (RCTPromiseRejectBlock)reject)
|
|
548
|
+
RCT_EXPORT_METHOD(
|
|
549
|
+
fetchNativeAppStart : (RCTPromiseResolveBlock)resolve rejecter : (RCTPromiseRejectBlock)reject)
|
|
568
550
|
{
|
|
569
551
|
#if SENTRY_HAS_UIKIT
|
|
570
552
|
NSDictionary<NSString *, id> *measurements =
|
|
@@ -589,9 +571,8 @@ RCT_EXPORT_METHOD(fetchNativeAppStart
|
|
|
589
571
|
#endif
|
|
590
572
|
}
|
|
591
573
|
|
|
592
|
-
RCT_EXPORT_METHOD(
|
|
593
|
-
|
|
594
|
-
: (RCTPromiseRejectBlock)reject)
|
|
574
|
+
RCT_EXPORT_METHOD(
|
|
575
|
+
fetchNativeFrames : (RCTPromiseResolveBlock)resolve rejecter : (RCTPromiseRejectBlock)reject)
|
|
595
576
|
{
|
|
596
577
|
|
|
597
578
|
#if TARGET_OS_IPHONE || TARGET_OS_MACCATALYST
|
|
@@ -620,9 +601,8 @@ RCT_EXPORT_METHOD(fetchNativeFrames
|
|
|
620
601
|
#endif
|
|
621
602
|
}
|
|
622
603
|
|
|
623
|
-
RCT_EXPORT_METHOD(
|
|
624
|
-
|
|
625
|
-
: (RCTPromiseRejectBlock)reject)
|
|
604
|
+
RCT_EXPORT_METHOD(
|
|
605
|
+
fetchNativeRelease : (RCTPromiseResolveBlock)resolve rejecter : (RCTPromiseRejectBlock)reject)
|
|
626
606
|
{
|
|
627
607
|
NSDictionary *infoDict = [[NSBundle mainBundle] infoDictionary];
|
|
628
608
|
resolve(@ {
|
|
@@ -632,11 +612,8 @@ RCT_EXPORT_METHOD(fetchNativeRelease
|
|
|
632
612
|
});
|
|
633
613
|
}
|
|
634
614
|
|
|
635
|
-
RCT_EXPORT_METHOD(captureEnvelope
|
|
636
|
-
|
|
637
|
-
: (NSDictionary *_Nonnull)options resolve
|
|
638
|
-
: (RCTPromiseResolveBlock)resolve rejecter
|
|
639
|
-
: (RCTPromiseRejectBlock)reject)
|
|
615
|
+
RCT_EXPORT_METHOD(captureEnvelope : (NSString *_Nonnull)rawBytes options : (NSDictionary *_Nonnull)
|
|
616
|
+
options resolve : (RCTPromiseResolveBlock)resolve rejecter : (RCTPromiseRejectBlock)reject)
|
|
640
617
|
{
|
|
641
618
|
NSData *data = [[NSData alloc] initWithBase64EncodedString:rawBytes options:0];
|
|
642
619
|
|
|
@@ -659,9 +636,8 @@ RCT_EXPORT_METHOD(captureEnvelope
|
|
|
659
636
|
resolve(@YES);
|
|
660
637
|
}
|
|
661
638
|
|
|
662
|
-
RCT_EXPORT_METHOD(
|
|
663
|
-
|
|
664
|
-
: (RCTPromiseRejectBlock)reject)
|
|
639
|
+
RCT_EXPORT_METHOD(
|
|
640
|
+
captureScreenshot : (RCTPromiseResolveBlock)resolve rejecter : (RCTPromiseRejectBlock)reject)
|
|
665
641
|
{
|
|
666
642
|
#if TARGET_OS_IPHONE || TARGET_OS_MACCATALYST
|
|
667
643
|
NSArray<NSData *> *rawScreenshots = [PrivateSentrySDKOnly captureScreenshots];
|
|
@@ -693,9 +669,8 @@ RCT_EXPORT_METHOD(captureScreenshot
|
|
|
693
669
|
#endif
|
|
694
670
|
}
|
|
695
671
|
|
|
696
|
-
RCT_EXPORT_METHOD(
|
|
697
|
-
|
|
698
|
-
: (RCTPromiseRejectBlock)reject)
|
|
672
|
+
RCT_EXPORT_METHOD(
|
|
673
|
+
fetchViewHierarchy : (RCTPromiseResolveBlock)resolve rejecter : (RCTPromiseRejectBlock)reject)
|
|
699
674
|
{
|
|
700
675
|
#if TARGET_OS_IPHONE || TARGET_OS_MACCATALYST
|
|
701
676
|
NSData *rawViewHierarchy = [PrivateSentrySDKOnly captureViewHierarchy];
|
|
@@ -809,9 +784,8 @@ RCT_EXPORT_METHOD(setTag : (NSString *)key value : (NSString *)value)
|
|
|
809
784
|
|
|
810
785
|
RCT_EXPORT_METHOD(crash) { [SentrySDKWrapper crash]; }
|
|
811
786
|
|
|
812
|
-
RCT_EXPORT_METHOD(
|
|
813
|
-
|
|
814
|
-
: (RCTPromiseRejectBlock)reject)
|
|
787
|
+
RCT_EXPORT_METHOD(
|
|
788
|
+
closeNativeSdk : (RCTPromiseResolveBlock)resolve rejecter : (RCTPromiseRejectBlock)reject)
|
|
815
789
|
{
|
|
816
790
|
[SentrySDKWrapper close];
|
|
817
791
|
resolve(@YES);
|
|
@@ -830,10 +804,8 @@ RCT_EXPORT_METHOD(enableNativeFramesTracking)
|
|
|
830
804
|
// the 'tracesSampleRate' or 'tracesSampler' option.
|
|
831
805
|
}
|
|
832
806
|
|
|
833
|
-
RCT_EXPORT_METHOD(captureReplay
|
|
834
|
-
|
|
835
|
-
: (RCTPromiseResolveBlock)resolve rejecter
|
|
836
|
-
: (RCTPromiseRejectBlock)reject)
|
|
807
|
+
RCT_EXPORT_METHOD(captureReplay : (BOOL)isHardCrash resolver : (
|
|
808
|
+
RCTPromiseResolveBlock)resolve rejecter : (RCTPromiseRejectBlock)reject)
|
|
837
809
|
{
|
|
838
810
|
#if SENTRY_TARGET_REPLAY_SUPPORTED
|
|
839
811
|
[PrivateSentrySDKOnly captureReplay];
|
|
@@ -843,10 +815,8 @@ RCT_EXPORT_METHOD(captureReplay
|
|
|
843
815
|
#endif
|
|
844
816
|
}
|
|
845
817
|
|
|
846
|
-
RCT_EXPORT_METHOD(getDataFromUri
|
|
847
|
-
|
|
848
|
-
: (RCTPromiseResolveBlock)resolve rejecter
|
|
849
|
-
: (RCTPromiseRejectBlock)reject)
|
|
818
|
+
RCT_EXPORT_METHOD(getDataFromUri : (NSString *_Nonnull)uri resolve : (
|
|
819
|
+
RCTPromiseResolveBlock)resolve rejecter : (RCTPromiseRejectBlock)reject)
|
|
850
820
|
{
|
|
851
821
|
#if TARGET_OS_IPHONE || TARGET_OS_MACCATALYST
|
|
852
822
|
NSURL *fileURL = [NSURL URLWithString:uri];
|
|
@@ -1029,9 +999,8 @@ RCT_EXPORT_SYNCHRONOUS_TYPED_METHOD(NSDictionary *, stopProfiling)
|
|
|
1029
999
|
#endif
|
|
1030
1000
|
}
|
|
1031
1001
|
|
|
1032
|
-
RCT_EXPORT_METHOD(
|
|
1033
|
-
|
|
1034
|
-
: (RCTPromiseRejectBlock)reject)
|
|
1002
|
+
RCT_EXPORT_METHOD(
|
|
1003
|
+
crashedLastRun : (RCTPromiseResolveBlock)resolve rejecter : (RCTPromiseRejectBlock)reject)
|
|
1035
1004
|
{
|
|
1036
1005
|
resolve(@([SentrySDKWrapper crashedLastRun]));
|
|
1037
1006
|
}
|
|
@@ -1045,17 +1014,14 @@ RCT_EXPORT_METHOD(crashedLastRun
|
|
|
1045
1014
|
}
|
|
1046
1015
|
#endif
|
|
1047
1016
|
|
|
1048
|
-
RCT_EXPORT_METHOD(getNewScreenTimeToDisplay
|
|
1049
|
-
|
|
1050
|
-
: (RCTPromiseRejectBlock)reject)
|
|
1017
|
+
RCT_EXPORT_METHOD(getNewScreenTimeToDisplay : (RCTPromiseResolveBlock)resolve rejecter : (
|
|
1018
|
+
RCTPromiseRejectBlock)reject)
|
|
1051
1019
|
{
|
|
1052
1020
|
[_timeToDisplay getTimeToDisplay:resolve];
|
|
1053
1021
|
}
|
|
1054
1022
|
|
|
1055
|
-
RCT_EXPORT_METHOD(popTimeToDisplayFor
|
|
1056
|
-
|
|
1057
|
-
: (RCTPromiseResolveBlock)resolve rejecter
|
|
1058
|
-
: (RCTPromiseRejectBlock)reject)
|
|
1023
|
+
RCT_EXPORT_METHOD(popTimeToDisplayFor : (NSString *)key resolver : (
|
|
1024
|
+
RCTPromiseResolveBlock)resolve rejecter : (RCTPromiseRejectBlock)reject)
|
|
1059
1025
|
{
|
|
1060
1026
|
resolve([RNSentryTimeToDisplay popTimeToDisplayFor:key]);
|
|
1061
1027
|
}
|
|
@@ -1066,10 +1032,8 @@ RCT_EXPORT_SYNCHRONOUS_TYPED_METHOD(NSNumber *, setActiveSpanId : (NSString *)sp
|
|
|
1066
1032
|
return @YES; // The return ensures that the method is synchronous
|
|
1067
1033
|
}
|
|
1068
1034
|
|
|
1069
|
-
RCT_EXPORT_METHOD(encodeToBase64
|
|
1070
|
-
|
|
1071
|
-
: (RCTPromiseResolveBlock)resolve rejecter
|
|
1072
|
-
: (RCTPromiseRejectBlock)reject)
|
|
1035
|
+
RCT_EXPORT_METHOD(encodeToBase64 : (NSArray *)array resolver : (
|
|
1036
|
+
RCTPromiseResolveBlock)resolve rejecter : (RCTPromiseRejectBlock)reject)
|
|
1073
1037
|
{
|
|
1074
1038
|
NSUInteger count = array.count;
|
|
1075
1039
|
uint8_t *bytes = (uint8_t *)malloc(count);
|
|
@@ -21,6 +21,13 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
21
21
|
*/
|
|
22
22
|
+ (BOOL)getEnableUnhandledCPPExceptionsV2:(SentryOptions *)sentryOptions;
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Sets the enableLogs experimental option on SentryOptions
|
|
26
|
+
* @param sentryOptions The SentryOptions instance to configure
|
|
27
|
+
* @param enabled Whether logs from sentry Cocoa should be enabled
|
|
28
|
+
*/
|
|
29
|
+
+ (void)setEnableLogs:(BOOL)enabled sentryOptions:(SentryOptions *)sentryOptions;
|
|
30
|
+
|
|
24
31
|
@end
|
|
25
32
|
|
|
26
33
|
NS_ASSUME_NONNULL_END
|
|
@@ -19,4 +19,12 @@
|
|
|
19
19
|
return sentryOptions.experimental.enableUnhandledCPPExceptionsV2;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
+ (void)setEnableLogs:(BOOL)enabled sentryOptions:(SentryOptions *)sentryOptions
|
|
23
|
+
{
|
|
24
|
+
if (sentryOptions == nil) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
sentryOptions.experimental.enableLogs = enabled;
|
|
28
|
+
}
|
|
29
|
+
|
|
22
30
|
@end
|
|
@@ -50,23 +50,10 @@
|
|
|
50
50
|
SentryRRWebEvent *nativeBreadcrumb = [self->defaultConverter convertFrom:breadcrumb];
|
|
51
51
|
|
|
52
52
|
// ignore native navigation breadcrumbs
|
|
53
|
-
if (nativeBreadcrumb
|
|
54
|
-
@
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
NSDictionary *dataDict = (NSDictionary *)data;
|
|
58
|
-
id payload = dataDict[@"payload"];
|
|
59
|
-
if (payload && [payload isKindOfClass:[NSDictionary class]]) {
|
|
60
|
-
NSDictionary *payloadDict = (NSDictionary *)payload;
|
|
61
|
-
NSString *category = payloadDict[@"category"];
|
|
62
|
-
if ([category isEqualToString:@"navigation"]) {
|
|
63
|
-
return nil;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
} @catch (NSException *exception) {
|
|
68
|
-
// Just continue without ignoring native navigation breadcrumbs
|
|
69
|
-
}
|
|
53
|
+
if (nativeBreadcrumb && nativeBreadcrumb.data && nativeBreadcrumb.data[@"payload"]
|
|
54
|
+
&& nativeBreadcrumb.data[@"payload"][@"category"] &&
|
|
55
|
+
[nativeBreadcrumb.data[@"payload"][@"category"] isEqualToString:@"navigation"]) {
|
|
56
|
+
return nil;
|
|
70
57
|
}
|
|
71
58
|
|
|
72
59
|
return nativeBreadcrumb;
|
package/ios/RNSentryVersion.m
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
NSString *const NATIVE_SDK_NAME = @"sentry.cocoa.react-native";
|
|
4
4
|
NSString *const REACT_NATIVE_SDK_NAME = @"sentry.javascript.react-native";
|
|
5
5
|
NSString *const REACT_NATIVE_SDK_PACKAGE_NAME = @"npm:@sentry/react-native";
|
|
6
|
-
NSString *const REACT_NATIVE_SDK_PACKAGE_VERSION = @"7.0
|
|
6
|
+
NSString *const REACT_NATIVE_SDK_PACKAGE_VERSION = @"7.2.0";
|
|
@@ -23,8 +23,7 @@ RCT_EXPORT_MODULE(RNSentryReplayUnmask)
|
|
|
23
23
|
@end
|
|
24
24
|
|
|
25
25
|
# ifdef RCT_NEW_ARCH_ENABLED
|
|
26
|
-
@interface
|
|
27
|
-
RNSentryReplayUnmask () <RCTRNSentryReplayUnmaskViewProtocol>
|
|
26
|
+
@interface RNSentryReplayUnmask () <RCTRNSentryReplayUnmaskViewProtocol>
|
|
28
27
|
@end
|
|
29
28
|
# endif
|
|
30
29
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@sentry/react-native",
|
|
3
3
|
"homepage": "https://github.com/getsentry/sentry-react-native",
|
|
4
4
|
"repository": "https://github.com/getsentry/sentry-react-native",
|
|
5
|
-
"version": "7.0
|
|
5
|
+
"version": "7.2.0",
|
|
6
6
|
"description": "Official Sentry SDK for react-native",
|
|
7
7
|
"typings": "dist/js/index.d.ts",
|
|
8
8
|
"types": "dist/js/index.d.ts",
|
|
@@ -18,12 +18,13 @@
|
|
|
18
18
|
},
|
|
19
19
|
"main": "dist/js/index.js",
|
|
20
20
|
"scripts": {
|
|
21
|
-
"build": "npx run-s build:sdk downlevel build:tools build:plugin",
|
|
21
|
+
"build": "npx run-s build:sdk downlevel build:tools build:plugin build:replay-stubs",
|
|
22
22
|
"build:sdk": "tsc -p tsconfig.build.json",
|
|
23
23
|
"build:sdk:watch": "tsc -p tsconfig.build.json -w --preserveWatchOutput",
|
|
24
24
|
"build:tools": "tsc -p tsconfig.build.tools.json",
|
|
25
25
|
"build:tools:watch": "tsc -p tsconfig.build.tools.json -w --preserveWatchOutput",
|
|
26
26
|
"build:plugin": "EXPO_NONINTERACTIVE=true expo-module build plugin",
|
|
27
|
+
"build:replay-stubs": "cd android/replay-stubs && ./gradlew jar",
|
|
27
28
|
"build:tarball": "bash scripts/build-tarball.sh",
|
|
28
29
|
"downlevel": "downlevel-dts dist ts3.8/dist --to=3.8",
|
|
29
30
|
"clean": "rimraf dist coverage && yarn clean:plugin",
|
|
@@ -68,20 +69,20 @@
|
|
|
68
69
|
},
|
|
69
70
|
"dependencies": {
|
|
70
71
|
"@sentry/babel-plugin-component-annotate": "4.3.0",
|
|
71
|
-
"@sentry/browser": "10.
|
|
72
|
-
"@sentry/cli": "2.
|
|
73
|
-
"@sentry/core": "10.
|
|
74
|
-
"@sentry/react": "10.
|
|
75
|
-
"@sentry/types": "10.
|
|
72
|
+
"@sentry/browser": "10.12.0",
|
|
73
|
+
"@sentry/cli": "2.55.0",
|
|
74
|
+
"@sentry/core": "10.12.0",
|
|
75
|
+
"@sentry/react": "10.12.0",
|
|
76
|
+
"@sentry/types": "10.12.0"
|
|
76
77
|
},
|
|
77
78
|
"devDependencies": {
|
|
78
79
|
"@babel/core": "^7.25.2",
|
|
79
80
|
"@expo/metro-config": "~0.20.0",
|
|
80
81
|
"@mswjs/interceptors": "^0.25.15",
|
|
81
82
|
"@react-native/babel-preset": "0.77.1",
|
|
82
|
-
"@sentry-internal/eslint-config-sdk": "10.
|
|
83
|
-
"@sentry-internal/eslint-plugin-sdk": "10.
|
|
84
|
-
"@sentry-internal/typescript": "10.
|
|
83
|
+
"@sentry-internal/eslint-config-sdk": "10.12.0",
|
|
84
|
+
"@sentry-internal/eslint-plugin-sdk": "10.12.0",
|
|
85
|
+
"@sentry-internal/typescript": "10.12.0",
|
|
85
86
|
"@sentry/wizard": "6.4.0",
|
|
86
87
|
"@testing-library/react-native": "^12.7.2",
|
|
87
88
|
"@types/jest": "^29.5.13",
|
|
@@ -9,7 +9,7 @@ export interface SentryAndroidGradlePluginOptions {
|
|
|
9
9
|
includeNativeSources?: boolean;
|
|
10
10
|
includeSourceContext?: boolean;
|
|
11
11
|
}
|
|
12
|
-
export declare const sentryAndroidGradlePluginVersion = "5.
|
|
12
|
+
export declare const sentryAndroidGradlePluginVersion = "5.11.0";
|
|
13
13
|
/**
|
|
14
14
|
* Adds the Sentry Android Gradle Plugin to the project.
|
|
15
15
|
* https://docs.sentry.io/platforms/react-native/manual-setup/manual-setup/#enable-sentry-agp
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.withSentryAndroidGradlePlugin = exports.sentryAndroidGradlePluginVersion = void 0;
|
|
4
4
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
5
5
|
const utils_1 = require("./utils");
|
|
6
|
-
exports.sentryAndroidGradlePluginVersion = '5.
|
|
6
|
+
exports.sentryAndroidGradlePluginVersion = '5.11.0';
|
|
7
7
|
/**
|
|
8
8
|
* Adds the Sentry Android Gradle Plugin to the project.
|
|
9
9
|
* https://docs.sentry.io/platforms/react-native/manual-setup/manual-setup/#enable-sentry-agp
|
|
@@ -59,6 +59,7 @@ export interface MobileReplayOptions {
|
|
|
59
59
|
}
|
|
60
60
|
type MobileReplayIntegration = Integration & {
|
|
61
61
|
options: Required<MobileReplayOptions>;
|
|
62
|
+
getReplayId: () => string | null;
|
|
62
63
|
};
|
|
63
64
|
/**
|
|
64
65
|
* The Mobile Replay Integration, let's you adjust the default mobile replay options.
|