From 00ba7eec711a4ec183466a0c981c96a130ae36a7 Mon Sep 17 00:00:00 2001 From: louiszawadzki Date: Wed, 10 Jan 2024 16:25:46 +0100 Subject: [PATCH 1/3] Update iOS SDK version --- example-new-architecture/ios/Podfile.lock | 54 ++++++------- example/ios/Podfile.lock | 78 +++++++++---------- packages/core/DatadogSDKReactNative.podspec | 12 +-- ...DatadogSDKReactNativeSessionReplay.podspec | 2 +- 4 files changed, 73 insertions(+), 73 deletions(-) diff --git a/example-new-architecture/ios/Podfile.lock b/example-new-architecture/ios/Podfile.lock index 19bb79785..06d57837e 100644 --- a/example-new-architecture/ios/Podfile.lock +++ b/example-new-architecture/ios/Podfile.lock @@ -1,23 +1,23 @@ PODS: - boost (1.76.0) - CocoaAsyncSocket (7.6.5) - - DatadogCore (2.5.0): - - DatadogInternal (= 2.5.0) - - DatadogCrashReporting (2.5.0): - - DatadogInternal (= 2.5.0) + - DatadogCore (2.6.0): + - DatadogInternal (= 2.6.0) + - DatadogCrashReporting (2.6.0): + - DatadogInternal (= 2.6.0) - PLCrashReporter (~> 1.11.1) - - DatadogInternal (2.5.0) - - DatadogLogs (2.5.0): - - DatadogInternal (= 2.5.0) - - DatadogRUM (2.5.0): - - DatadogInternal (= 2.5.0) + - DatadogInternal (2.6.0) + - DatadogLogs (2.6.0): + - DatadogInternal (= 2.6.0) + - DatadogRUM (2.6.0): + - DatadogInternal (= 2.6.0) - DatadogSDKReactNative (2.0.1): - - DatadogCore (~> 2.5.0) - - DatadogCrashReporting (~> 2.5.0) - - DatadogLogs (~> 2.5.0) - - DatadogRUM (~> 2.5.0) - - DatadogTrace (~> 2.5.0) - - DatadogWebViewTracking (~> 2.5.0) + - DatadogCore (~> 2.6.0) + - DatadogCrashReporting (~> 2.6.0) + - DatadogLogs (~> 2.6.0) + - DatadogRUM (~> 2.6.0) + - DatadogTrace (~> 2.6.0) + - DatadogWebViewTracking (~> 2.6.0) - RCT-Folly (= 2021.07.22.00) - RCTRequired - RCTTypeSafety @@ -26,10 +26,10 @@ PODS: - React-RCTFabric - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - DatadogTrace (2.5.0): - - DatadogInternal (= 2.5.0) - - DatadogWebViewTracking (2.5.0): - - DatadogInternal (= 2.5.0) + - DatadogTrace (2.6.0): + - DatadogInternal (= 2.6.0) + - DatadogWebViewTracking (2.6.0): + - DatadogInternal (= 2.6.0) - DoubleConversion (1.1.6) - FBLazyVector (0.71.10) - FBReactNativeSpec (0.71.10): @@ -959,14 +959,14 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: 57d2868c099736d80fcd648bf211b4431e51a558 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 - DatadogCore: a152fbcc24ea1a6b937c9844b1c1d5b86f0a375e - DatadogCrashReporting: 53b458152130de5505901e025e0dd031ce057f31 - DatadogInternal: 96448807156495aa41a9f177b8c849a404618948 - DatadogLogs: 2e67adf2e2cccd84b880b42f52e56cd0b8c7ef82 - DatadogRUM: d807827ad24ae6c738867e853df38c6cb2bb555b - DatadogSDKReactNative: 0b659c7de3043d16465ae3fd6e2d418a5b62261c - DatadogTrace: 703d7572acc1dcda474ab33b7db3d8d67984192c - DatadogWebViewTracking: 87c0c1c9de4da7bb4f9efb87595da6c3d333aba9 + DatadogCore: 2b9cae7b3706ec29c6329f5b2e350bd70395bfb6 + DatadogCrashReporting: 0ebc16ea7f226805c19a7efa6dab47f3743c6d2c + DatadogInternal: 6febbce547fac204638f2ef5fe53cea49d05215b + DatadogLogs: 23905c3f91c8c3c9ab3bd0f00ec5c070fccafa36 + DatadogRUM: 691819a9d5fc1924f783af6ad6eb609e5ab35e72 + DatadogSDKReactNative: e4eacadf44b51c642d094ec063191f679f286215 + DatadogTrace: e099ae8cab89bd01575809a93acdc3f69b599cbe + DatadogWebViewTracking: d1c6e9b349444d8996380dd0545bdb3abd620302 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 FBLazyVector: ddb55c55295ea51ed98aa7e2e08add2f826309d5 FBReactNativeSpec: 33a87f65f1a467d5f63d11d0cc106a10d3b0639d diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 30197e7e9..043040b38 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,44 +1,44 @@ PODS: - boost (1.76.0) - - DatadogCore (2.5.0): - - DatadogInternal (= 2.5.0) - - DatadogCrashReporting (2.5.0): - - DatadogInternal (= 2.5.0) + - DatadogCore (2.6.0): + - DatadogInternal (= 2.6.0) + - DatadogCrashReporting (2.6.0): + - DatadogInternal (= 2.6.0) - PLCrashReporter (~> 1.11.1) - - DatadogInternal (2.5.0) - - DatadogLogs (2.5.0): - - DatadogInternal (= 2.5.0) - - DatadogRUM (2.5.0): - - DatadogInternal (= 2.5.0) + - DatadogInternal (2.6.0) + - DatadogLogs (2.6.0): + - DatadogInternal (= 2.6.0) + - DatadogRUM (2.6.0): + - DatadogInternal (= 2.6.0) - DatadogSDKReactNative (2.0.1): - - DatadogCore (~> 2.5.0) - - DatadogCrashReporting (~> 2.5.0) - - DatadogLogs (~> 2.5.0) - - DatadogRUM (~> 2.5.0) - - DatadogTrace (~> 2.5.0) - - DatadogWebViewTracking (~> 2.5.0) + - DatadogCore (~> 2.6.0) + - DatadogCrashReporting (~> 2.6.0) + - DatadogLogs (~> 2.6.0) + - DatadogRUM (~> 2.6.0) + - DatadogTrace (~> 2.6.0) + - DatadogWebViewTracking (~> 2.6.0) - React-Core - DatadogSDKReactNative/Tests (2.0.1): - - DatadogCore (~> 2.5.0) - - DatadogCrashReporting (~> 2.5.0) - - DatadogLogs (~> 2.5.0) - - DatadogRUM (~> 2.5.0) - - DatadogTrace (~> 2.5.0) - - DatadogWebViewTracking (~> 2.5.0) + - DatadogCore (~> 2.6.0) + - DatadogCrashReporting (~> 2.6.0) + - DatadogLogs (~> 2.6.0) + - DatadogRUM (~> 2.6.0) + - DatadogTrace (~> 2.6.0) + - DatadogWebViewTracking (~> 2.6.0) - React-Core - DatadogSDKReactNativeSessionReplay (2.0.1): - - DatadogSessionReplay (~> 2.5.0) + - DatadogSessionReplay (~> 2.6.0) - React-Core - DatadogSDKReactNativeSessionReplay/Tests (2.0.1): - - DatadogSessionReplay (~> 2.5.0) + - DatadogSessionReplay (~> 2.6.0) - React-Core - React-RCTText - - DatadogSessionReplay (2.5.0): - - DatadogInternal (= 2.5.0) - - DatadogTrace (2.5.0): - - DatadogInternal (= 2.5.0) - - DatadogWebViewTracking (2.5.0): - - DatadogInternal (= 2.5.0) + - DatadogSessionReplay (2.6.0): + - DatadogInternal (= 2.6.0) + - DatadogTrace (2.6.0): + - DatadogInternal (= 2.6.0) + - DatadogWebViewTracking (2.6.0): + - DatadogInternal (= 2.6.0) - DoubleConversion (1.1.6) - FBLazyVector (0.71.10) - FBReactNativeSpec (0.71.10): @@ -570,16 +570,16 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: 57d2868c099736d80fcd648bf211b4431e51a558 - DatadogCore: a152fbcc24ea1a6b937c9844b1c1d5b86f0a375e - DatadogCrashReporting: 53b458152130de5505901e025e0dd031ce057f31 - DatadogInternal: 96448807156495aa41a9f177b8c849a404618948 - DatadogLogs: 2e67adf2e2cccd84b880b42f52e56cd0b8c7ef82 - DatadogRUM: d807827ad24ae6c738867e853df38c6cb2bb555b - DatadogSDKReactNative: 3bdadcd1ad69e2fb9fd53b823dddaa8d503edf6f - DatadogSDKReactNativeSessionReplay: 08001fa73bc35a9acb783cd4c4428cc3d22fdeb9 - DatadogSessionReplay: e264895cd8093c22408f518e0c736f6c3ca6882c - DatadogTrace: 703d7572acc1dcda474ab33b7db3d8d67984192c - DatadogWebViewTracking: 87c0c1c9de4da7bb4f9efb87595da6c3d333aba9 + DatadogCore: 2b9cae7b3706ec29c6329f5b2e350bd70395bfb6 + DatadogCrashReporting: 0ebc16ea7f226805c19a7efa6dab47f3743c6d2c + DatadogInternal: 6febbce547fac204638f2ef5fe53cea49d05215b + DatadogLogs: 23905c3f91c8c3c9ab3bd0f00ec5c070fccafa36 + DatadogRUM: 691819a9d5fc1924f783af6ad6eb609e5ab35e72 + DatadogSDKReactNative: d28c4f7e26743b344cc820dd8da93b73ad48fbce + DatadogSDKReactNativeSessionReplay: e71e8def302514e2417e3e155d114600a4d3cf43 + DatadogSessionReplay: 0198de603c4d7d0755d61f33f13855b9743586af + DatadogTrace: e099ae8cab89bd01575809a93acdc3f69b599cbe + DatadogWebViewTracking: d1c6e9b349444d8996380dd0545bdb3abd620302 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 FBLazyVector: ddb55c55295ea51ed98aa7e2e08add2f826309d5 FBReactNativeSpec: 90fc1a90b4b7a171e0a7c20ea426c1bf6ce4399c diff --git a/packages/core/DatadogSDKReactNative.podspec b/packages/core/DatadogSDKReactNative.podspec index c71a9f671..17122464a 100644 --- a/packages/core/DatadogSDKReactNative.podspec +++ b/packages/core/DatadogSDKReactNative.podspec @@ -19,12 +19,12 @@ Pod::Spec.new do |s| s.dependency "React-Core" # /!\ Remember to keep the versions in sync with DatadogSDKReactNativeSessionReplay.podspec - s.dependency 'DatadogCore', '~> 2.5.0' - s.dependency 'DatadogLogs', '~> 2.5.0' - s.dependency 'DatadogTrace', '~> 2.5.0' - s.dependency 'DatadogRUM', '~> 2.5.0' - s.dependency 'DatadogCrashReporting', '~> 2.5.0' - s.dependency 'DatadogWebViewTracking', '~> 2.5.0' + s.dependency 'DatadogCore', '~> 2.6.0' + s.dependency 'DatadogLogs', '~> 2.6.0' + s.dependency 'DatadogTrace', '~> 2.6.0' + s.dependency 'DatadogRUM', '~> 2.6.0' + s.dependency 'DatadogCrashReporting', '~> 2.6.0' + s.dependency 'DatadogWebViewTracking', '~> 2.6.0' s.test_spec 'Tests' do |test_spec| test_spec.source_files = 'ios/Tests/*.swift' diff --git a/packages/react-native-session-replay/DatadogSDKReactNativeSessionReplay.podspec b/packages/react-native-session-replay/DatadogSDKReactNativeSessionReplay.podspec index 1d2cd1802..71639f4da 100644 --- a/packages/react-native-session-replay/DatadogSDKReactNativeSessionReplay.podspec +++ b/packages/react-native-session-replay/DatadogSDKReactNativeSessionReplay.podspec @@ -19,7 +19,7 @@ Pod::Spec.new do |s| s.dependency "React-Core" # /!\ Remember to keep the version in sync with DatadogSDKReactNative.podspec - s.dependency 'DatadogSessionReplay', '~> 2.5.0' + s.dependency 'DatadogSessionReplay', '~> 2.6.0' s.test_spec 'Tests' do |test_spec| test_spec.dependency "React-RCTText" From af66a21caa227b501957036fb2dcee036a3738d8 Mon Sep 17 00:00:00 2001 From: louiszawadzki Date: Wed, 10 Jan 2024 17:34:50 +0100 Subject: [PATCH 2/3] Fix tests after update --- packages/core/ios/Tests/MockRUMMonitor.swift | 4 ++++ packages/core/ios/Tests/RUMMocks.swift | 16 ++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/packages/core/ios/Tests/MockRUMMonitor.swift b/packages/core/ios/Tests/MockRUMMonitor.swift index df8b27ac1..c77d6c071 100644 --- a/packages/core/ios/Tests/MockRUMMonitor.swift +++ b/packages/core/ios/Tests/MockRUMMonitor.swift @@ -10,6 +10,10 @@ @testable import DatadogSDKReactNative internal class MockRUMMonitor: RUMMonitorProtocol { + func currentSessionID(completion: @escaping (String?) -> Void) { + // not implemented + } + init () { self.debug = false } diff --git a/packages/core/ios/Tests/RUMMocks.swift b/packages/core/ios/Tests/RUMMocks.swift index b43dbe3f3..3e9324f68 100644 --- a/packages/core/ios/Tests/RUMMocks.swift +++ b/packages/core/ios/Tests/RUMMocks.swift @@ -260,15 +260,17 @@ extension RUMResourceEvent: RandomMockable { configuration: nil, discarded: nil, rulePsr: nil, - session: .init(plan: .plan1), + session: .init(plan: .plan1, sessionPrecondition: nil), spanId: .mockRandom(), traceId: .mockRandom() ), action: .init(id: .mockRandom()), application: .init(id: .mockRandom()), + buildId: nil, buildVersion: nil, ciTest: nil, connectivity: .mockRandom(), + container: nil, context: .init(contextInfo: ["_dd.resource.drop_resource": true] ), date: .mockRandom(), device: .mockRandom(), @@ -319,15 +321,17 @@ extension RUMResourceEvent: RandomMockable { configuration: nil, discarded: nil, rulePsr: nil, - session: .init(plan: .plan1), + session: .init(plan: .plan1, sessionPrecondition: nil), spanId: .mockRandom(), traceId: .mockRandom() ), action: .init(id: .mockRandom()), application: .init(id: .mockRandom()), + buildId: nil, buildVersion: nil, ciTest: nil, connectivity: .mockRandom(), + container: nil, context: .mockRandom(), date: .mockRandom(), device: .mockRandom(), @@ -386,7 +390,7 @@ extension RUMActionEvent: RandomMockable { ), browserSdkVersion: nil, configuration: nil, - session: .init(plan: .plan1) + session: .init(plan: .plan1, sessionPrecondition: nil) ), action: .init( crash: .init(count: .mockRandom()), @@ -400,9 +404,11 @@ extension RUMActionEvent: RandomMockable { type: [.tap, .swipe, .scroll].randomElement()! ), application: .init(id: .mockRandom()), + buildId: nil, buildVersion: nil, ciTest: nil, connectivity: .mockRandom(), + container: nil, context: .init(contextInfo: ["_dd.resource.drop_resource": true] ), date: .mockRandom(), device: .mockRandom(), @@ -440,7 +446,7 @@ extension RUMActionEvent: RandomMockable { ), browserSdkVersion: nil, configuration: nil, - session: .init(plan: .plan1) + session: .init(plan: .plan1, sessionPrecondition: nil) ), action: .init( crash: .init(count: .mockRandom()), @@ -454,9 +460,11 @@ extension RUMActionEvent: RandomMockable { type: [.tap, .swipe, .scroll].randomElement()! ), application: .init(id: .mockRandom()), + buildId: nil, buildVersion: nil, ciTest: nil, connectivity: .mockRandom(), + container: nil, context: .mockRandom(), date: .mockRandom(), device: .mockRandom(), From 118c92ebde8b7d37889f6aef2617d640b8ff46fd Mon Sep 17 00:00:00 2001 From: louiszawadzki Date: Wed, 10 Jan 2024 15:56:25 +0100 Subject: [PATCH 3/3] Set default session replay sample rate to 0 --- packages/react-native-session-replay/src/SessionReplay.ts | 2 +- .../src/__tests__/SessionReplay.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native-session-replay/src/SessionReplay.ts b/packages/react-native-session-replay/src/SessionReplay.ts index 7eed3ea00..0c1da957d 100644 --- a/packages/react-native-session-replay/src/SessionReplay.ts +++ b/packages/react-native-session-replay/src/SessionReplay.ts @@ -33,7 +33,7 @@ export interface SessionReplayConfiguration { } const DEFAULTS = { - replaySampleRate: 20, + replaySampleRate: 0, defaultPrivacyLevel: SessionReplayPrivacy.MASK }; diff --git a/packages/react-native-session-replay/src/__tests__/SessionReplay.test.ts b/packages/react-native-session-replay/src/__tests__/SessionReplay.test.ts index ca4a32e8a..d2001c26e 100644 --- a/packages/react-native-session-replay/src/__tests__/SessionReplay.test.ts +++ b/packages/react-native-session-replay/src/__tests__/SessionReplay.test.ts @@ -18,7 +18,7 @@ describe('SessionReplay', () => { SessionReplay.enable(); expect(NativeModules.DdSessionReplay.enable).toHaveBeenCalledWith( - 20, + 0, 'MASK' ); });