diff --git a/example-new-architecture/ios/Podfile.lock b/example-new-architecture/ios/Podfile.lock index 13d5a27c9..869102950 100644 --- a/example-new-architecture/ios/Podfile.lock +++ b/example-new-architecture/ios/Podfile.lock @@ -10,7 +10,7 @@ PODS: - DatadogInternal (= 2.22.0) - DatadogRUM (2.22.0): - DatadogInternal (= 2.22.0) - - DatadogSDKReactNative (2.6.0): + - DatadogSDKReactNative (2.6.1): - DatadogCore (~> 2.22.0) - DatadogCrashReporting (~> 2.22.0) - DatadogLogs (~> 2.22.0) @@ -1403,7 +1403,7 @@ SPEC CHECKSUMS: DatadogInternal: 2c9770cd4bb66636f2c1578f4cfbc5984e032e2d DatadogLogs: 397a79884d4dff82cf3d1a35b3e61e9ab4b03cf4 DatadogRUM: 9f23460eb44e2bd2f2fe5e4db9d205dcdd0ef865 - DatadogSDKReactNative: fbe0cf141427904f49cc5c777a3edc22759d270c + DatadogSDKReactNative: 47b9854232aebe0a1481d40e0683e1d195b4b43e DatadogTrace: 637d592a8d98ece1794ee06ad27dbd43a4fe08d0 DatadogWebViewTracking: 2191682c6af12d86c093ceb3a20a886708bfeb4f DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5 diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index d3d439e20..4865b6cb6 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -10,7 +10,7 @@ PODS: - DatadogInternal (= 2.22.0) - DatadogRUM (2.22.0): - DatadogInternal (= 2.22.0) - - DatadogSDKReactNative (2.6.0): + - DatadogSDKReactNative (2.6.1): - DatadogCore (~> 2.22.0) - DatadogCrashReporting (~> 2.22.0) - DatadogLogs (~> 2.22.0) @@ -18,7 +18,7 @@ PODS: - DatadogTrace (~> 2.22.0) - DatadogWebViewTracking (~> 2.22.0) - React-Core - - DatadogSDKReactNative/Tests (2.6.0): + - DatadogSDKReactNative/Tests (2.6.1): - DatadogCore (~> 2.22.0) - DatadogCrashReporting (~> 2.22.0) - DatadogLogs (~> 2.22.0) @@ -26,21 +26,21 @@ PODS: - DatadogTrace (~> 2.22.0) - DatadogWebViewTracking (~> 2.22.0) - React-Core - - DatadogSDKReactNativeSessionReplay (2.6.0): + - DatadogSDKReactNativeSessionReplay (2.6.1): - DatadogSDKReactNative - DatadogSessionReplay (~> 2.22.0) - React-Core - - DatadogSDKReactNativeSessionReplay/Tests (2.6.0): + - DatadogSDKReactNativeSessionReplay/Tests (2.6.1): - DatadogSDKReactNative - DatadogSessionReplay (~> 2.22.0) - React-Core - React-RCTText - - DatadogSDKReactNativeWebView (2.6.0): + - DatadogSDKReactNativeWebView (2.6.1): - DatadogInternal (~> 2.22.0) - DatadogSDKReactNative - DatadogWebViewTracking (~> 2.22.0) - React-Core - - DatadogSDKReactNativeWebView/Tests (2.6.0): + - DatadogSDKReactNativeWebView/Tests (2.6.1): - DatadogInternal (~> 2.22.0) - DatadogSDKReactNative - DatadogWebViewTracking (~> 2.22.0) @@ -1516,9 +1516,9 @@ SPEC CHECKSUMS: DatadogInternal: 2c9770cd4bb66636f2c1578f4cfbc5984e032e2d DatadogLogs: 397a79884d4dff82cf3d1a35b3e61e9ab4b03cf4 DatadogRUM: 9f23460eb44e2bd2f2fe5e4db9d205dcdd0ef865 - DatadogSDKReactNative: d9d1a32e81642c3c426baff371f6ad9cdd909dfe - DatadogSDKReactNativeSessionReplay: bc65f7bf2d4b586b0a09621bece8558b189c7bf7 - DatadogSDKReactNativeWebView: 1fb5f772c339bcb77176e8ad76abf3ad7fd3a287 + DatadogSDKReactNative: 262a791c94a78e6f97eb74cd70e65f15627ed4ed + DatadogSDKReactNativeSessionReplay: 8004fca16fb1cf50b1a0657b65d40b05c3a4ad8b + DatadogSDKReactNativeWebView: 1b177b783d922c9da33e0200dbf9870635cab2b5 DatadogSessionReplay: 837b6d028534b22b717ccc465707007be5ee8fdf DatadogTrace: 637d592a8d98ece1794ee06ad27dbd43a4fe08d0 DatadogWebViewTracking: 2191682c6af12d86c093ceb3a20a886708bfeb4f diff --git a/lerna.json b/lerna.json index 703126d25..a1a584f36 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "npmClient": "yarn", - "version": "2.6.0", + "version": "2.6.1", "packages": [ "packages/*" ], diff --git a/packages/codepush/package.json b/packages/codepush/package.json index 202ec7daa..7a447d973 100644 --- a/packages/codepush/package.json +++ b/packages/codepush/package.json @@ -1,6 +1,6 @@ { "name": "@datadog/mobile-react-native-code-push", - "version": "2.6.0", + "version": "2.6.1", "description": "A client-side React Native module to interact with Appcenter Codepush and Datadog", "keywords": [ "datadog", @@ -38,7 +38,7 @@ "prepare": "rm -rf lib && yarn bob build" }, "devDependencies": { - "@datadog/mobile-react-native": "^2.6.0", + "@datadog/mobile-react-native": "^2.6.1", "@testing-library/react-native": "7.0.2", "react-native-builder-bob": "0.26.0", "react-native-code-push": "7.1.0" diff --git a/packages/core/android/src/main/kotlin/com/datadog/reactnative/SdkVersion.kt b/packages/core/android/src/main/kotlin/com/datadog/reactnative/SdkVersion.kt index a2ca7484e..f86893809 100644 --- a/packages/core/android/src/main/kotlin/com/datadog/reactnative/SdkVersion.kt +++ b/packages/core/android/src/main/kotlin/com/datadog/reactnative/SdkVersion.kt @@ -7,4 +7,4 @@ package com.datadog.reactnative // This is automatically updated by the update-version.sh script -internal const val SDK_VERSION = "2.6.0" +internal const val SDK_VERSION = "2.6.1" diff --git a/packages/core/ios/Sources/SdkVersion.swift b/packages/core/ios/Sources/SdkVersion.swift index 641a67a8f..7aa9936bc 100644 --- a/packages/core/ios/Sources/SdkVersion.swift +++ b/packages/core/ios/Sources/SdkVersion.swift @@ -7,4 +7,4 @@ import Foundation // This is automatically updated by the update-version.sh script -let SdkVersion = "2.6.0" +let SdkVersion = "2.6.1" diff --git a/packages/core/package.json b/packages/core/package.json index 57833c3e2..dc3629755 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@datadog/mobile-react-native", - "version": "2.6.0", + "version": "2.6.1", "description": "A client-side React Native module to interact with Datadog", "keywords": [ "datadog", diff --git a/packages/core/release-content.txt b/packages/core/release-content.txt index 3e607aa22..1be12eaf1 100644 --- a/packages/core/release-content.txt +++ b/packages/core/release-content.txt @@ -112,8 +112,6 @@ package/lib/commonjs/logs/types.js package/lib/commonjs/logs/types.js.map package/lib/commonjs/nativeModulesTypes.js package/lib/commonjs/nativeModulesTypes.js.map -package/lib/commonjs/polyfills.js -package/lib/commonjs/polyfills.js.map package/lib/commonjs/rum/DdAttributes.js package/lib/commonjs/rum/DdAttributes.js.map package/lib/commonjs/rum/DdRum.js @@ -248,8 +246,6 @@ package/lib/module/logs/types.js package/lib/module/logs/types.js.map package/lib/module/nativeModulesTypes.js package/lib/module/nativeModulesTypes.js.map -package/lib/module/polyfills.js -package/lib/module/polyfills.js.map package/lib/module/rum/DdAttributes.js package/lib/module/rum/DdAttributes.js.map package/lib/module/rum/DdRum.js @@ -520,7 +516,6 @@ package/src/logs/__tests__/eventMapper.test.ts package/src/logs/eventMapper.ts package/src/logs/types.ts package/src/nativeModulesTypes.ts -package/src/polyfills.js package/src/rum/DdAttributes.ts package/src/rum/DdRum.ts package/src/rum/__mocks__/MockTimeProvider.ts diff --git a/packages/core/src/version.ts b/packages/core/src/version.ts index fe0e74819..a11f179fe 100644 --- a/packages/core/src/version.ts +++ b/packages/core/src/version.ts @@ -1,2 +1,2 @@ // generated by genversion -export const version = '2.6.0'; +export const version = '2.6.1'; diff --git a/packages/internal-testing-tools/package.json b/packages/internal-testing-tools/package.json index b4a908947..e463ff6e3 100644 --- a/packages/internal-testing-tools/package.json +++ b/packages/internal-testing-tools/package.json @@ -1,6 +1,6 @@ { "name": "@datadog/react-native-internal-testing-tools", - "version": "2.6.0", + "version": "2.6.1", "description": "Internal tools for testing the Datadog React Native SDK.", "keywords": [ "datadog", diff --git a/packages/react-native-apollo-client/package.json b/packages/react-native-apollo-client/package.json index 2d2195e2d..6c49c6933 100644 --- a/packages/react-native-apollo-client/package.json +++ b/packages/react-native-apollo-client/package.json @@ -1,6 +1,6 @@ { "name": "@datadog/mobile-react-native-apollo-client", - "version": "2.6.0", + "version": "2.6.1", "description": "A client-side React Native module to interact with Apollo Client and Datadog", "keywords": [ "datadog", diff --git a/packages/react-native-navigation/package.json b/packages/react-native-navigation/package.json index 3870b753b..39670fe38 100644 --- a/packages/react-native-navigation/package.json +++ b/packages/react-native-navigation/package.json @@ -1,6 +1,6 @@ { "name": "@datadog/mobile-react-native-navigation", - "version": "2.6.0", + "version": "2.6.1", "description": "A client-side React Native module to interact with Datadog", "keywords": [ "datadog", @@ -36,7 +36,7 @@ "prepare": "rm -rf lib && yarn bob build" }, "devDependencies": { - "@datadog/mobile-react-native": "^2.6.0", + "@datadog/mobile-react-native": "^2.6.1", "@testing-library/react-native": "7.0.2", "react-native-builder-bob": "0.26.0", "react-native-gesture-handler": "1.10.3", diff --git a/packages/react-native-session-replay/README.md b/packages/react-native-session-replay/README.md index 12c771d63..2cef76ac9 100644 --- a/packages/react-native-session-replay/README.md +++ b/packages/react-native-session-replay/README.md @@ -1,3 +1,54 @@ # Session Replay for React Native -Session Replay for React Native is not available yet. +Mobile Session Replay expands visibility into your mobile applications by visually replaying each user interaction, such as taps, swipes, and scrolls. Visually replaying user interactions on your applications makes it easier to reproduce crashes and errors, as well as understand the user journey for making UI improvements. + +## Setup + +**Note:** Make sure you’ve setup and initialized the [Datadog React Native SDK][1] with views instrumentation enabled. + +To install with NPM, run: + +```sh +npm install @datadog/mobile-react-native-session-replay +``` + +To install with Yarn, run: + +```sh +yarn add @datadog/mobile-react-native-session-replay +``` + +## Enable Session Replay + +To enable Session Replay, import and call the `enable` method with your configuration. Below is an example setup: + +```js +import { SessionReplay } from "@datadog/mobile-react-native-session-replay"; + +SessionReplay.enable({ + replaySampleRate: sampleRate // The percentage of sampled replays, in the range 0.0 - 100.0 (Default: 100.0). + textAndInputPrivacyLevel: TextAndInputPrivacyLevel.MASK_ALL, // Defines the way text and input (e.g text fields, checkboxes) should be masked (Default: `MASK_ALL`). + imagePrivacyLevel: ImagePrivacyLevel.MASK_ALL, // Defines the way images should be masked (Default: `MASK_ALL`). + touchPrivacyLevel: TouchPrivacyLevel.HIDE // Defines the way user touches (e.g tap) should be masked (Default: `HIDE`). +}); +``` + +**Note:**: All configuration properties are optional and should be adjusted based on your application's needs. + +## Start or stop the recording manually + +By default, Session Replay starts recording automatically. However, if you prefer to manually start recording at a specific point in your application, you can use the optional `startRecordingImmediately` parameter as shown below, and later call `SessionReplay.startRecording()`. You can also use `SessionReplay.stopRecording()` to stop the recording anytime. + +```js +import { SessionReplay } from "@datadog/mobile-react-native-session-replay"; + +SessionReplay.enable({ + replaySampleRate: sampleRate, + startRecordingImmediately: false +}); +// Do something +SessionReplay.startRecording(); +SessionReplay.stopRecording(); +``` + +[1]: https://www.npmjs.com/package/@datadog/mobile-react-native \ No newline at end of file diff --git a/packages/react-native-session-replay/package.json b/packages/react-native-session-replay/package.json index eb7052faf..496f15b10 100644 --- a/packages/react-native-session-replay/package.json +++ b/packages/react-native-session-replay/package.json @@ -1,6 +1,6 @@ { "name": "@datadog/mobile-react-native-session-replay", - "version": "2.6.0", + "version": "2.6.1", "description": "A client-side React Native module to enable session replay with Datadog", "keywords": [ "datadog", @@ -35,7 +35,7 @@ "source": "src", "module": "lib/module/index", "publishConfig": { - "access": "restricted" + "access": "public" }, "scripts": { "test": "jest", diff --git a/packages/react-native-webview/package.json b/packages/react-native-webview/package.json index eec56157d..56d35170d 100644 --- a/packages/react-native-webview/package.json +++ b/packages/react-native-webview/package.json @@ -1,6 +1,6 @@ { "name": "@datadog/mobile-react-native-webview", - "version": "2.6.0", + "version": "2.6.1", "description": "A client-side React Native module to interact with react-native-webview and Datadog", "keywords": [ "datadog", diff --git a/packages/react-navigation/package.json b/packages/react-navigation/package.json index 26556da28..1882d30db 100644 --- a/packages/react-navigation/package.json +++ b/packages/react-navigation/package.json @@ -1,6 +1,6 @@ { "name": "@datadog/mobile-react-navigation", - "version": "2.6.0", + "version": "2.6.1", "description": "A client-side React Native module to interact with Datadog", "keywords": [ "datadog", @@ -36,7 +36,7 @@ "prepare": "rm -rf lib && yarn bob build" }, "devDependencies": { - "@datadog/mobile-react-native": "^2.6.0", + "@datadog/mobile-react-native": "^2.6.1", "@react-navigation/native-v5": "npm:@react-navigation/native@5.9.8", "@react-navigation/native-v6": "npm:@react-navigation/native@6.1.2", "@react-navigation/stack-v5": "npm:@react-navigation/stack@5.14.2", diff --git a/yarn.lock b/yarn.lock index 3ae0ba7d5..f4ab38b02 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2591,7 +2591,7 @@ __metadata: version: 0.0.0-use.local resolution: "@datadog/mobile-react-native-code-push@workspace:packages/codepush" dependencies: - "@datadog/mobile-react-native": ^2.6.0 + "@datadog/mobile-react-native": ^2.6.1 "@testing-library/react-native": 7.0.2 react-native-builder-bob: 0.26.0 react-native-code-push: 7.1.0 @@ -2607,7 +2607,7 @@ __metadata: version: 0.0.0-use.local resolution: "@datadog/mobile-react-native-navigation@workspace:packages/react-native-navigation" dependencies: - "@datadog/mobile-react-native": ^2.6.0 + "@datadog/mobile-react-native": ^2.6.1 "@testing-library/react-native": 7.0.2 react-native-builder-bob: 0.26.0 react-native-gesture-handler: 1.10.3 @@ -2648,7 +2648,7 @@ __metadata: languageName: unknown linkType: soft -"@datadog/mobile-react-native@^2.6.0, @datadog/mobile-react-native@workspace:packages/core": +"@datadog/mobile-react-native@^2.6.1, @datadog/mobile-react-native@workspace:packages/core": version: 0.0.0-use.local resolution: "@datadog/mobile-react-native@workspace:packages/core" dependencies: @@ -2665,7 +2665,7 @@ __metadata: version: 0.0.0-use.local resolution: "@datadog/mobile-react-navigation@workspace:packages/react-navigation" dependencies: - "@datadog/mobile-react-native": ^2.6.0 + "@datadog/mobile-react-native": ^2.6.1 "@react-navigation/native-v5": "npm:@react-navigation/native@5.9.8" "@react-navigation/native-v6": "npm:@react-navigation/native@6.1.2" "@react-navigation/stack-v5": "npm:@react-navigation/stack@5.14.2"