Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default SR sample rate to 0 #582

Merged
merged 3 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions example-new-architecture/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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):
Expand Down Expand Up @@ -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
Expand Down
78 changes: 39 additions & 39 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -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):
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions packages/core/DatadogSDKReactNative.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 4 additions & 0 deletions packages/core/ios/Tests/MockRUMMonitor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
@testable import DatadogSDKReactNative

internal class MockRUMMonitor: RUMMonitorProtocol {
func currentSessionID(completion: @escaping (String?) -> Void) {
// not implemented
}

init () {
self.debug = false
}
Expand Down
16 changes: 12 additions & 4 deletions packages/core/ios/Tests/RUMMocks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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()),
Expand All @@ -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(),
Expand Down Expand Up @@ -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()),
Expand All @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface SessionReplayConfiguration {
}

const DEFAULTS = {
replaySampleRate: 20,
replaySampleRate: 0,
defaultPrivacyLevel: SessionReplayPrivacy.MASK
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('SessionReplay', () => {
SessionReplay.enable();

expect(NativeModules.DdSessionReplay.enable).toHaveBeenCalledWith(
20,
0,
'MASK'
);
});
Expand Down