Skip to content

Commit

Permalink
Adding 'data' field when grabbing breadcrumbs, filtering out automati…
Browse files Browse the repository at this point in the history
…c breadcrumbs, updating sentry-cocoa branch to custom fork.
  • Loading branch information
sleeper-luke committed Feb 26, 2024
1 parent 7e16f27 commit ed05cce
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions RNSentry.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Pod::Spec.new do |s|
s.license = 'MIT'
s.summary = 'Official Sentry SDK for react-native'
s.author = 'Sentry'
s.homepage = "https://github.com/getsentry/sentry-react-native"
s.source = { :git => 'https://github.com/getsentry/sentry-react-native.git', :tag => "#{s.version}"}
s.homepage = "https://github.com/blitzstudios/sentry-react-native"
s.source = { :git => 'https://github.com/blitzstudios/sentry-react-native.git', :branch => 'release/1.5'}

s.ios.deployment_target = "8.0"
s.osx.deployment_target = "10.10"
Expand Down
3 changes: 2 additions & 1 deletion android/src/main/java/io/sentry/react/RNSentryModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,8 @@ public void getBreadcrumbs(Promise promise) {
Map<String, Object> breadcrumbDict = new HashMap<>();
breadcrumbDict.put("message", breadcrumb.getMessage() != null ? breadcrumb.getMessage() : null);
breadcrumbDict.put("category", breadcrumb.getCategory() != null ? breadcrumb.getCategory() : null);
breadcrumbDict.put("type", breadcrumb.getType() != null ? breadcrumb.getType().name() : null);
breadcrumbDict.put("type", breadcrumb.getType() != null ? breadcrumb.getType() : null);
breadcrumbDict.put("data", breadcrumb.getData() != null ? breadcrumb.getData() : null);

breadcrumbsArray.add(breadcrumbDict);
}
Expand Down
6 changes: 6 additions & 0 deletions ios/RNSentry.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,13 @@ + (BOOL)requiresMainQueueSetup {
return event;
};

SentryBeforeBreadcrumbCallback beforeBreadcrumb = ^SentryBreadcrumb*(SentryBreadcrumb *breadcrumb) {
return nil;
};

NSMutableDictionary * mutableOptions =[options mutableCopy];
[mutableOptions setValue:beforeSend forKey:@"beforeSend"];
[mutableOptions setValue:beforeBreadcrumb forKey:@"beforeBreadcrumb"];

// remove performance traces sample rate and traces sampler since we don't want to synchronize these configurations
// to the Native SDKs.
Expand Down Expand Up @@ -432,6 +437,7 @@ - (void)setEventEnvironmentTag:(SentryEvent *)event
@"message": breadcrumb.message ?: [NSNull null],
@"category": breadcrumb.category ?: [NSNull null],
@"type": breadcrumb.type ?: [NSNull null],
@"data": breadcrumb.data ?: [NSNull null],
};
[breadcrumbsArray addObject:breadcrumbDict];
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@sentry/react-native",
"homepage": "https://github.com/getsentry/sentry-react-native",
"repository": "https://github.com/getsentry/sentry-react-native",
"version": "1.5.2",
"version": "1.5.3",
"description": "Official Sentry SDK for react-native",
"typings": "dist/js/index.d.ts",
"types": "dist/js/index.d.ts",
Expand Down
2 changes: 2 additions & 0 deletions sample/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ target 'sample' do
pod 'RNSentry', :path => '../../RNSentry.podspec'
end

pod 'Sentry', :git => 'https://github.com/blitzstudios/sentry-cocoa.git', :branch => 'release/1.0'

target 'sampleTests' do
inherit! :complete
# Pods for testing
Expand Down

0 comments on commit ed05cce

Please sign in to comment.