diff --git a/.gitmodules b/.gitmodules index 7da0204e1..df341b7a1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "ios/Sentry"] path = ios/Sentry - url = https://github.com/getsentry/sentry-swift +url=https://github.com/getsentry/sentry-cocoa [submodule "ios/KSCrash"] path = ios/KSCrash url=https://github.com/kstenerud/KSCrash diff --git a/.travis.yml b/.travis.yml index fe6165d73..3844cd08c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,6 @@ +branches: + only: + - master matrix: include: - language: android diff --git a/SentryReactNative.podspec b/SentryReactNative.podspec index 4210ebe14..ef048326e 100644 --- a/SentryReactNative.podspec +++ b/SentryReactNative.podspec @@ -7,7 +7,7 @@ Pod::Spec.new do |s| s.name = 'SentryReactNative' s.version = package['version'] s.license = 'MIT' - s.summary = 'Official Sentry client for react-native' + s.summary = 'Official Sentry SDK for react-native' s.author = 'Sentry' s.homepage = "https://github.com/getsentry/react-native-sentry" s.source = { :git => 'https://github.com/getsentry/react-native-sentry.git', :tag => "#{s.version}"} @@ -18,8 +18,8 @@ Pod::Spec.new do |s| s.preserve_paths = '*.js' s.dependency 'React' - s.dependency 'Sentry', '~> 3.3.3' - s.dependency 'Sentry/KSCrash', '~> 3.3.3' + s.dependency 'Sentry', '~> 3.4.0' + s.dependency 'Sentry/KSCrash', '~> 3.4.0' s.source_files = 'ios/RNSentry*.{h,m}' s.public_header_files = 'ios/RNSentry.h' diff --git a/android/src/main/java/io/sentry/RNSentryModule.java b/android/src/main/java/io/sentry/RNSentryModule.java index c4d6000cf..38e028d70 100644 --- a/android/src/main/java/io/sentry/RNSentryModule.java +++ b/android/src/main/java/io/sentry/RNSentryModule.java @@ -22,9 +22,11 @@ import java.util.ArrayList; import java.util.Deque; import java.util.HashMap; +import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; import java.util.regex.Matcher; @@ -37,6 +39,7 @@ import io.sentry.event.BreadcrumbBuilder; import io.sentry.event.Event; import io.sentry.event.EventBuilder; +import io.sentry.event.Sdk; import io.sentry.event.User; import io.sentry.event.UserBuilder; import io.sentry.event.helper.ShouldSendEventCallback; @@ -49,6 +52,8 @@ public class RNSentryModule extends ReactContextBaseJavaModule { private static final Pattern mJsModuleIdPattern = Pattern.compile("(?:^|[/\\\\])(\\d+\\.js)$"); + private static final String versionString = "0.15.2"; + private static final String sdkName = "sentry-react-native"; private final ReactApplicationContext reactContext; private final ReactApplication reactApplication; @@ -291,8 +296,11 @@ public static Event buildEvent(EventBuilder eventBuilder) { } } - eventBuilder.withSdkIntegration("react-native"); - return eventBuilder.build(); + Event event = eventBuilder.build(); + Set sdkIntegrations = new HashSet<>(); + sdkIntegrations.add("sentry-java"); + event.setSdk(new Sdk(sdkName, versionString, sdkIntegrations)); + return event; } public static List copyIterator(Iterator iter) { diff --git a/appium/tests/test_ios.py b/appium/tests/test_ios.py index d4ff07bfb..940370e15 100644 --- a/appium/tests/test_ios.py +++ b/appium/tests/test_ios.py @@ -19,7 +19,8 @@ def test_send_message(driver): assert event['message'] == 'TEST message' assert event['extra']['react'] assert event['tags']['react'] == '1' - assert event['sdk']['integrations'][0] == 'react-native' + assert event['sdk']['integrations'][0] == 'sentry-cocoa' + assert event['sdk']['name'] == 'sentry-react-native' assert len(event['user']) > 0 diff --git a/examples b/examples index bb648b42a..6c172a70a 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit bb648b42a033fe0fb74bf211032454ae49407e1f +Subproject commit 6c172a70a439bc6066298e78ff6c249933522a6c diff --git a/ios/RNSentry.m b/ios/RNSentry.m index 6d490942e..15384b17b 100644 --- a/ios/RNSentry.m +++ b/ios/RNSentry.m @@ -9,6 +9,9 @@ #import #import +NSString *const RNSentryVersionString = @"0.15.2"; +NSString *const RNSentrySdkName = @"sentry-react-native"; + @interface RNSentry() @property (nonatomic, strong) NSDictionary *lastReceivedException; @@ -175,7 +178,9 @@ - (void)setReleaseVersionDist:(SentryEvent *)event { if (event.extra[@"__sentry_dist"]) { event.dist = [NSString stringWithFormat:@"%@", event.extra[@"__sentry_dist"]]; } - [event.extra setValue:@[@"react-native"] forKey:@"__sentry_sdk_integrations"]; + event.sdk = @{@"name": RNSentrySdkName, + @"version": RNSentryVersionString, + @"integrations": @[@"sentry-cocoa"]}; } RCT_EXPORT_MODULE() diff --git a/ios/Sentry b/ios/Sentry index 08ecf30e5..00b8a1a87 160000 --- a/ios/Sentry +++ b/ios/Sentry @@ -1 +1 @@ -Subproject commit 08ecf30e5a448f62e07480ce6faed2006bd13bfa +Subproject commit 00b8a1a87fec106b7c13d3a97c3a286894a5bf8d