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 27, 2024
1 parent 7e16f27 commit bdf2bef
Show file tree
Hide file tree
Showing 5 changed files with 15 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
4 changes: 3 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,9 @@ 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);
breadcrumbDict.put("level", breadcrumb.getLevel() != null ? breadcrumb.getLevel() : null);

breadcrumbsArray.add(breadcrumbDict);
}
Expand Down
7 changes: 7 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,8 @@ - (void)setEventEnvironmentTag:(SentryEvent *)event
@"message": breadcrumb.message ?: [NSNull null],
@"category": breadcrumb.category ?: [NSNull null],
@"type": breadcrumb.type ?: [NSNull null],
@"data": breadcrumb.data ?: [NSNull null],
@"level": breadcrumb.level ?: [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.4",
"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 bdf2bef

Please sign in to comment.