File tree Expand file tree Collapse file tree 5 files changed +11
-1
lines changed
RNSentryCocoaTester/RNSentryCocoaTesterTests Expand file tree Collapse file tree 5 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 88
99## Unreleased
1010
11+ ### Features
12+
13+ - Send Sentry react-native SDK version in the session replay event (#4450 )
14+
1115### Fixes
1216
1317- Add mechanism field to unhandled rejection errors ([ #4457 ] ( https://github.com/getsentry/sentry-react-native/pull/4457 ) )
Original file line number Diff line number Diff line change @@ -48,12 +48,13 @@ final class RNSentryReplayOptions: XCTestCase {
4848 }
4949
5050 func assertAllDefaultReplayOptionsAreNotNil( replayOptions: [ String : Any ] ) {
51- XCTAssertEqual ( replayOptions. count, 5 )
51+ XCTAssertEqual ( replayOptions. count, 6 )
5252 XCTAssertNotNil ( replayOptions [ " sessionSampleRate " ] )
5353 XCTAssertNotNil ( replayOptions [ " errorSampleRate " ] )
5454 XCTAssertNotNil ( replayOptions [ " maskAllImages " ] )
5555 XCTAssertNotNil ( replayOptions [ " maskAllText " ] )
5656 XCTAssertNotNil ( replayOptions [ " maskedViewClasses " ] )
57+ XCTAssertNotNil ( replayOptions [ " sdkInfo " ] )
5758 }
5859
5960 func testSessionSampleRate( ) {
Original file line number Diff line number Diff line change 11#import " RNSentryReplay.h"
22#import " RNSentryReplayBreadcrumbConverterHelper.h"
3+ #import " RNSentryVersion.h"
34#import " React/RCTTextView.h"
45#import " Replay/RNSentryReplayMask.h"
56#import " Replay/RNSentryReplayUnmask.h"
@@ -27,6 +28,8 @@ + (void)updateOptions:(NSMutableDictionary *)options
2728 @" maskAllImages" : replayOptions[@" maskAllImages" ] ?: [NSNull null ],
2829 @" maskAllText" : replayOptions[@" maskAllText" ] ?: [NSNull null ],
2930 @" maskedViewClasses" : [RNSentryReplay getReplayRNRedactClasses: replayOptions],
31+ @" sdkInfo" :
32+ @ { @" name" : REACT_NATIVE_SDK_NAME, @" version" : REACT_NATIVE_SDK_PACKAGE_VERSION }
3033 }
3134 forKey: @" sessionReplay" ];
3235}
Original file line number Diff line number Diff line change 11#import < Foundation/Foundation.h>
22
33extern NSString *const NATIVE_SDK_NAME;
4+ extern NSString *const REACT_NATIVE_SDK_NAME;
45extern NSString *const REACT_NATIVE_SDK_PACKAGE_NAME;
56extern NSString *const REACT_NATIVE_SDK_PACKAGE_VERSION;
Original file line number Diff line number Diff line change 11#import " RNSentryVersion.h"
22
33NSString *const NATIVE_SDK_NAME = @" sentry.cocoa.react-native" ;
4+ NSString *const REACT_NATIVE_SDK_NAME = @" sentry.javascript.react-native" ;
45NSString *const REACT_NATIVE_SDK_PACKAGE_NAME = @" npm:@sentry/react-native" ;
56NSString *const REACT_NATIVE_SDK_PACKAGE_VERSION = @" 6.5.0" ;
You can’t perform that action at this time.
0 commit comments