@datadog/mobile-react-native 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DatadogSDKReactNative.podspec +2 -2
- package/android/build.gradle +5 -5
- package/android/src/main/kotlin/com/datadog/reactnative/DatadogSDKWrapper.kt +4 -0
- package/android/src/main/kotlin/com/datadog/reactnative/DatadogWrapper.kt +6 -0
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdk.kt +124 -95
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkConfiguration.kt +2 -0
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkConfigurationExt.kt +2 -0
- package/android/src/test/kotlin/com/datadog/reactnative/DdSdkTest.kt +148 -25
- package/android/src/test/kotlin/com/datadog/tools/unit/DdSdkConfigurationExt.kt +5 -0
- package/android/src/test/kotlin/com/datadog/tools/unit/forge/DdSdkConfigurationForgeryFactory.kt +2 -1
- package/android/src/test/kotlin/com/datadog/tools/unit/forge/TelemetryConfigurationEventForgeryFactory.kt +10 -0
- package/datadog-sourcemaps.gradle +55 -7
- package/ios/Sources/DdSdk.m +4 -0
- package/ios/Sources/DdSdk.swift +17 -0
- package/ios/Sources/DdSdkConfiguration.swift +6 -0
- package/ios/Sources/RNDdSdkConfiguration.swift +2 -0
- package/jest/mock.js +1 -1
- package/lib/commonjs/DdSdkReactNative.js +1 -1
- package/lib/commonjs/DdSdkReactNative.js.map +1 -1
- package/lib/commonjs/DdSdkReactNativeConfiguration.js +8 -1
- package/lib/commonjs/DdSdkReactNativeConfiguration.js.map +1 -1
- package/lib/commonjs/nativeModulesTypes.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/DdRumResourceTracking.js +4 -4
- package/lib/commonjs/rum/instrumentation/resourceTracking/DdRumResourceTracking.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js.map +1 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js.map +1 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/DatadogRumResource/ResourceReporter.js +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/ResourceReporter.js.map +1 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/internalDevResourceBlocklist.js.map +1 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/URLHostParser.js +2 -2
- package/lib/commonjs/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/URLHostParser.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/XHRProxy.js +4 -4
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js.map +1 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/responseSize.js +2 -2
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js.map +1 -0
- package/lib/commonjs/types.js +2 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/DdSdkReactNative.js +1 -1
- package/lib/module/DdSdkReactNative.js.map +1 -1
- package/lib/module/DdSdkReactNativeConfiguration.js +8 -1
- package/lib/module/DdSdkReactNativeConfiguration.js.map +1 -1
- package/lib/module/nativeModulesTypes.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/DdRumResourceTracking.js +5 -5
- package/lib/module/rum/instrumentation/resourceTracking/DdRumResourceTracking.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js.map +1 -0
- package/lib/module/rum/instrumentation/resourceTracking/{domain → distributedTracing}/firstPartyHosts.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/DatadogRumResource/ResourceReporter.js +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/ResourceReporter.js.map +1 -0
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/internalDevResourceBlocklist.js.map +1 -0
- package/lib/module/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/URLHostParser.js +2 -2
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js.map +1 -0
- package/lib/module/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/XHRProxy.js +4 -4
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js.map +1 -0
- package/lib/module/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/responseSize.js +2 -2
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js.map +1 -0
- package/lib/module/types.js +2 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/DdSdkReactNativeConfiguration.d.ts +5 -0
- package/lib/typescript/nativeModulesTypes.d.ts +5 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/{domain → distributedTracing}/distributedTracing.d.ts +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/{domain → distributedTracing}/firstPartyHosts.d.ts +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/DatadogRumResource/ResourceReporter.d.ts +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/DatadogRumResource/internalDevResourceBlocklist.d.ts +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/URLHostParser.d.ts +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/XHRProxy.d.ts +2 -2
- package/lib/typescript/rum/instrumentation/resourceTracking/{domain → requestProxy}/interfaces/RumResource.d.ts +1 -1
- package/lib/typescript/types.d.ts +2 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +76 -76
- package/src/DdSdkReactNative.tsx +1 -0
- package/src/DdSdkReactNativeConfiguration.tsx +8 -1
- package/src/__tests__/DdSdkReactNativeConfiguration.test.ts +7 -2
- package/src/nativeModulesTypes.ts +6 -0
- package/src/rum/instrumentation/resourceTracking/DdRumResourceTracking.tsx +5 -5
- package/src/rum/instrumentation/resourceTracking/{domain → distributedTracing}/distributedTracing.tsx +1 -1
- package/src/rum/instrumentation/resourceTracking/{domain → distributedTracing}/firstPartyHosts.ts +1 -2
- package/src/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/DatadogRumResource/ResourceReporter.ts +2 -2
- package/src/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/DatadogRumResource/__tests__/ResourceReporter.test.ts +2 -2
- package/src/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/DatadogRumResource/__tests__/__utils__/ResourceMockFactory.ts +1 -1
- package/src/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/DatadogRumResource/internalDevResourceBlocklist.ts +1 -1
- package/src/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/URLHostParser.ts +3 -3
- package/src/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/XHRProxy.ts +6 -6
- package/src/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/__tests__/XHRProxy.test.ts +9 -9
- package/src/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/responseSize.ts +2 -2
- package/src/rum/instrumentation/resourceTracking/{domain → requestProxy}/interfaces/RumResource.ts +1 -1
- package/src/sdk/DatadogProvider/__tests__/initialization.test.tsx +1 -0
- package/src/types.tsx +1 -0
- package/src/version.ts +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/domain/distributedTracing.js.map +0 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/domain/firstPartyHosts.js.map +0 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/implementation/DatadogRumResource/ResourceReporter.js.map +0 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/implementation/DatadogRumResource/internalDevResourceBlocklist.js.map +0 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/implementation/XHRProxy.js.map +0 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/implementation/responseSize.js.map +0 -1
- package/lib/module/rum/instrumentation/resourceTracking/domain/distributedTracing.js.map +0 -1
- package/lib/module/rum/instrumentation/resourceTracking/implementation/DatadogRumResource/ResourceReporter.js.map +0 -1
- package/lib/module/rum/instrumentation/resourceTracking/implementation/DatadogRumResource/internalDevResourceBlocklist.js.map +0 -1
- package/lib/module/rum/instrumentation/resourceTracking/implementation/URLHostParser.js.map +0 -1
- package/lib/module/rum/instrumentation/resourceTracking/implementation/XHRProxy.js.map +0 -1
- package/lib/module/rum/instrumentation/resourceTracking/implementation/responseSize.js.map +0 -1
- /package/lib/commonjs/rum/instrumentation/resourceTracking/{domain → distributedTracing}/distributedTracing.js +0 -0
- /package/lib/commonjs/rum/instrumentation/resourceTracking/{domain → distributedTracing}/distributedTracingHeaders.js +0 -0
- /package/lib/commonjs/rum/instrumentation/resourceTracking/{domain → distributedTracing}/distributedTracingHeaders.js.map +0 -0
- /package/lib/commonjs/rum/instrumentation/resourceTracking/{domain → distributedTracing}/firstPartyHosts.js +0 -0
- /package/lib/commonjs/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/DatadogRumResource/internalDevResourceBlocklist.js +0 -0
- /package/lib/commonjs/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/DatadogRumResource/resourceTiming.js +0 -0
- /package/lib/commonjs/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/DatadogRumResource/resourceTiming.js.map +0 -0
- /package/lib/commonjs/rum/instrumentation/resourceTracking/{domain → requestProxy}/interfaces/RequestProxy.js +0 -0
- /package/lib/commonjs/rum/instrumentation/resourceTracking/{domain → requestProxy}/interfaces/RequestProxy.js.map +0 -0
- /package/lib/commonjs/rum/instrumentation/resourceTracking/{domain → requestProxy}/interfaces/RumResource.js +0 -0
- /package/lib/commonjs/rum/instrumentation/resourceTracking/{domain → requestProxy}/interfaces/RumResource.js.map +0 -0
- /package/lib/module/rum/instrumentation/resourceTracking/{domain → distributedTracing}/distributedTracing.js +0 -0
- /package/lib/module/rum/instrumentation/resourceTracking/{domain → distributedTracing}/distributedTracingHeaders.js +0 -0
- /package/lib/module/rum/instrumentation/resourceTracking/{domain → distributedTracing}/distributedTracingHeaders.js.map +0 -0
- /package/lib/module/rum/instrumentation/resourceTracking/{domain → distributedTracing}/firstPartyHosts.js +0 -0
- /package/lib/module/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/DatadogRumResource/internalDevResourceBlocklist.js +0 -0
- /package/lib/module/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/DatadogRumResource/resourceTiming.js +0 -0
- /package/lib/module/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/DatadogRumResource/resourceTiming.js.map +0 -0
- /package/lib/module/rum/instrumentation/resourceTracking/{domain → requestProxy}/interfaces/RequestProxy.js +0 -0
- /package/lib/module/rum/instrumentation/resourceTracking/{domain → requestProxy}/interfaces/RequestProxy.js.map +0 -0
- /package/lib/module/rum/instrumentation/resourceTracking/{domain → requestProxy}/interfaces/RumResource.js +0 -0
- /package/lib/module/rum/instrumentation/resourceTracking/{domain → requestProxy}/interfaces/RumResource.js.map +0 -0
- /package/lib/typescript/rum/instrumentation/resourceTracking/{domain → distributedTracing}/distributedTracingHeaders.d.ts +0 -0
- /package/lib/typescript/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/DatadogRumResource/resourceTiming.d.ts +0 -0
- /package/lib/typescript/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/responseSize.d.ts +0 -0
- /package/lib/typescript/rum/instrumentation/resourceTracking/{domain → requestProxy}/interfaces/RequestProxy.d.ts +0 -0
- /package/src/rum/instrumentation/resourceTracking/{domain → distributedTracing}/__tests__/distributedTracing.test.ts +0 -0
- /package/src/rum/instrumentation/resourceTracking/{domain → distributedTracing}/__tests__/firstPartyHosts.test.ts +0 -0
- /package/src/rum/instrumentation/resourceTracking/{domain → distributedTracing}/distributedTracingHeaders.ts +0 -0
- /package/src/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/DatadogRumResource/__tests__/internalDevResourceBlocklist.test.ts +0 -0
- /package/src/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/DatadogRumResource/resourceTiming.ts +0 -0
- /package/src/rum/instrumentation/resourceTracking/{implementation → requestProxy/XHRProxy}/__tests__/URLHostParser.test.ts +0 -0
- /package/src/rum/instrumentation/resourceTracking/{domain → requestProxy}/interfaces/RequestProxy.ts +0 -0
|
@@ -9,7 +9,7 @@ package com.datadog.reactnative
|
|
|
9
9
|
import android.content.pm.PackageInfo
|
|
10
10
|
import android.util.Log
|
|
11
11
|
import android.view.Choreographer
|
|
12
|
-
import com.datadog.android.
|
|
12
|
+
import com.datadog.android.DatadogSite
|
|
13
13
|
import com.datadog.android.core.configuration.BatchSize
|
|
14
14
|
import com.datadog.android.core.configuration.Configuration
|
|
15
15
|
import com.datadog.android.core.configuration.Credentials
|
|
@@ -536,19 +536,19 @@ internal class DdSdkTest {
|
|
|
536
536
|
it.hasFieldEqualTo("uploadFrequency", UploadFrequency.AVERAGE)
|
|
537
537
|
}
|
|
538
538
|
.hasField("logsConfig") {
|
|
539
|
-
it.hasFieldEqualTo("endpointUrl",
|
|
539
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.US1.intakeEndpoint)
|
|
540
540
|
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
541
541
|
}
|
|
542
542
|
.hasField("tracesConfig") {
|
|
543
|
-
it.hasFieldEqualTo("endpointUrl",
|
|
543
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.US1.intakeEndpoint)
|
|
544
544
|
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
545
545
|
}
|
|
546
546
|
.hasField("rumConfig") {
|
|
547
|
-
it.hasFieldEqualTo("endpointUrl",
|
|
547
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.US1.intakeEndpoint)
|
|
548
548
|
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
549
549
|
}
|
|
550
550
|
.hasField("crashReportConfig") {
|
|
551
|
-
it.hasFieldEqualTo("endpointUrl",
|
|
551
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.US1.intakeEndpoint)
|
|
552
552
|
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
553
553
|
}
|
|
554
554
|
.hasFieldEqualTo(
|
|
@@ -593,19 +593,19 @@ internal class DdSdkTest {
|
|
|
593
593
|
it.hasFieldEqualTo("uploadFrequency", UploadFrequency.AVERAGE)
|
|
594
594
|
}
|
|
595
595
|
.hasField("logsConfig") {
|
|
596
|
-
it.hasFieldEqualTo("endpointUrl",
|
|
596
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.US1.intakeEndpoint)
|
|
597
597
|
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
598
598
|
}
|
|
599
599
|
.hasField("tracesConfig") {
|
|
600
|
-
it.hasFieldEqualTo("endpointUrl",
|
|
600
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.US1.intakeEndpoint)
|
|
601
601
|
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
602
602
|
}
|
|
603
603
|
.hasField("rumConfig") {
|
|
604
|
-
it.hasFieldEqualTo("endpointUrl",
|
|
604
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.US1.intakeEndpoint)
|
|
605
605
|
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
606
606
|
}
|
|
607
607
|
.hasField("crashReportConfig") {
|
|
608
|
-
it.hasFieldEqualTo("endpointUrl",
|
|
608
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.US1.intakeEndpoint)
|
|
609
609
|
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
610
610
|
}
|
|
611
611
|
.hasFieldEqualTo(
|
|
@@ -650,19 +650,19 @@ internal class DdSdkTest {
|
|
|
650
650
|
it.hasFieldEqualTo("uploadFrequency", UploadFrequency.AVERAGE)
|
|
651
651
|
}
|
|
652
652
|
.hasField("logsConfig") {
|
|
653
|
-
it.hasFieldEqualTo("endpointUrl",
|
|
653
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.US3.intakeEndpoint)
|
|
654
654
|
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
655
655
|
}
|
|
656
656
|
.hasField("tracesConfig") {
|
|
657
|
-
it.hasFieldEqualTo("endpointUrl",
|
|
657
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.US3.intakeEndpoint)
|
|
658
658
|
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
659
659
|
}
|
|
660
660
|
.hasField("rumConfig") {
|
|
661
|
-
it.hasFieldEqualTo("endpointUrl",
|
|
661
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.US3.intakeEndpoint)
|
|
662
662
|
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
663
663
|
}
|
|
664
664
|
.hasField("crashReportConfig") {
|
|
665
|
-
it.hasFieldEqualTo("endpointUrl",
|
|
665
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.US3.intakeEndpoint)
|
|
666
666
|
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
667
667
|
}
|
|
668
668
|
.hasFieldEqualTo(
|
|
@@ -707,19 +707,19 @@ internal class DdSdkTest {
|
|
|
707
707
|
it.hasFieldEqualTo("uploadFrequency", UploadFrequency.AVERAGE)
|
|
708
708
|
}
|
|
709
709
|
.hasField("logsConfig") {
|
|
710
|
-
it.hasFieldEqualTo("endpointUrl",
|
|
710
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.US5.intakeEndpoint)
|
|
711
711
|
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
712
712
|
}
|
|
713
713
|
.hasField("tracesConfig") {
|
|
714
|
-
it.hasFieldEqualTo("endpointUrl",
|
|
714
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.US5.intakeEndpoint)
|
|
715
715
|
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
716
716
|
}
|
|
717
717
|
.hasField("rumConfig") {
|
|
718
|
-
it.hasFieldEqualTo("endpointUrl",
|
|
718
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.US5.intakeEndpoint)
|
|
719
719
|
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
720
720
|
}
|
|
721
721
|
.hasField("crashReportConfig") {
|
|
722
|
-
it.hasFieldEqualTo("endpointUrl",
|
|
722
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.US5.intakeEndpoint)
|
|
723
723
|
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
724
724
|
}
|
|
725
725
|
.hasFieldEqualTo(
|
|
@@ -764,19 +764,19 @@ internal class DdSdkTest {
|
|
|
764
764
|
it.hasFieldEqualTo("uploadFrequency", UploadFrequency.AVERAGE)
|
|
765
765
|
}
|
|
766
766
|
.hasField("logsConfig") {
|
|
767
|
-
it.hasFieldEqualTo("endpointUrl",
|
|
767
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.US1_FED.intakeEndpoint)
|
|
768
768
|
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
769
769
|
}
|
|
770
770
|
.hasField("tracesConfig") {
|
|
771
|
-
it.hasFieldEqualTo("endpointUrl",
|
|
771
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.US1_FED.intakeEndpoint)
|
|
772
772
|
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
773
773
|
}
|
|
774
774
|
.hasField("rumConfig") {
|
|
775
|
-
it.hasFieldEqualTo("endpointUrl",
|
|
775
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.US1_FED.intakeEndpoint)
|
|
776
776
|
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
777
777
|
}
|
|
778
778
|
.hasField("crashReportConfig") {
|
|
779
|
-
it.hasFieldEqualTo("endpointUrl",
|
|
779
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.US1_FED.intakeEndpoint)
|
|
780
780
|
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
781
781
|
}
|
|
782
782
|
.hasFieldEqualTo(
|
|
@@ -821,19 +821,76 @@ internal class DdSdkTest {
|
|
|
821
821
|
it.hasFieldEqualTo("uploadFrequency", UploadFrequency.AVERAGE)
|
|
822
822
|
}
|
|
823
823
|
.hasField("logsConfig") {
|
|
824
|
-
it.hasFieldEqualTo("endpointUrl",
|
|
824
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.EU1.intakeEndpoint)
|
|
825
825
|
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
826
826
|
}
|
|
827
827
|
.hasField("tracesConfig") {
|
|
828
|
-
it.hasFieldEqualTo("endpointUrl",
|
|
828
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.EU1.intakeEndpoint)
|
|
829
829
|
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
830
830
|
}
|
|
831
831
|
.hasField("rumConfig") {
|
|
832
|
-
it.hasFieldEqualTo("endpointUrl",
|
|
832
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.EU1.intakeEndpoint)
|
|
833
833
|
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
834
834
|
}
|
|
835
835
|
.hasField("crashReportConfig") {
|
|
836
|
-
it.hasFieldEqualTo("endpointUrl",
|
|
836
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.EU1.intakeEndpoint)
|
|
837
|
+
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
838
|
+
}
|
|
839
|
+
.hasFieldEqualTo(
|
|
840
|
+
"additionalConfig",
|
|
841
|
+
fakeConfiguration.additionalConfig?.filterValues { it != null }.orEmpty()
|
|
842
|
+
)
|
|
843
|
+
val credentials = credentialCaptor.firstValue
|
|
844
|
+
assertThat(credentials.clientToken).isEqualTo(fakeConfiguration.clientToken)
|
|
845
|
+
assertThat(credentials.envName).isEqualTo(fakeConfiguration.env)
|
|
846
|
+
assertThat(credentials.rumApplicationId).isEqualTo(fakeConfiguration.applicationId)
|
|
847
|
+
assertThat(credentials.variant).isEqualTo("")
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
@Test
|
|
851
|
+
fun `𝕄 initialize native SDK 𝕎 initialize() {site=ap1}`(
|
|
852
|
+
forge: Forge
|
|
853
|
+
) {
|
|
854
|
+
// Given
|
|
855
|
+
val site = forge.randomizeCase("ap1")
|
|
856
|
+
fakeConfiguration = fakeConfiguration.copy(site = site, nativeCrashReportEnabled = true)
|
|
857
|
+
val credentialCaptor = argumentCaptor<Credentials>()
|
|
858
|
+
val configCaptor = argumentCaptor<Configuration>()
|
|
859
|
+
|
|
860
|
+
// When
|
|
861
|
+
testedBridgeSdk.initialize(fakeConfiguration.toReadableJavaOnlyMap(), mockPromise)
|
|
862
|
+
|
|
863
|
+
// Then
|
|
864
|
+
inOrder(mockDatadog) {
|
|
865
|
+
verify(mockDatadog).initialize(
|
|
866
|
+
same(mockContext),
|
|
867
|
+
credentialCaptor.capture(),
|
|
868
|
+
configCaptor.capture(),
|
|
869
|
+
any()
|
|
870
|
+
)
|
|
871
|
+
verify(mockDatadog).registerRumMonitor(any())
|
|
872
|
+
}
|
|
873
|
+
assertThat(configCaptor.firstValue)
|
|
874
|
+
.hasField("coreConfig") {
|
|
875
|
+
it.hasFieldEqualTo("needsClearTextHttp", false)
|
|
876
|
+
it.hasFieldEqualTo("firstPartyHostsWithHeaderTypes", emptyMap<String, String>())
|
|
877
|
+
it.hasFieldEqualTo("batchSize", BatchSize.MEDIUM)
|
|
878
|
+
it.hasFieldEqualTo("uploadFrequency", UploadFrequency.AVERAGE)
|
|
879
|
+
}
|
|
880
|
+
.hasField("logsConfig") {
|
|
881
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.AP1.intakeEndpoint)
|
|
882
|
+
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
883
|
+
}
|
|
884
|
+
.hasField("tracesConfig") {
|
|
885
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.AP1.intakeEndpoint)
|
|
886
|
+
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
887
|
+
}
|
|
888
|
+
.hasField("rumConfig") {
|
|
889
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.AP1.intakeEndpoint)
|
|
890
|
+
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
891
|
+
}
|
|
892
|
+
.hasField("crashReportConfig") {
|
|
893
|
+
it.hasFieldEqualTo("endpointUrl", DatadogSite.AP1.intakeEndpoint)
|
|
837
894
|
it.hasFieldEqualTo("plugins", emptyList<DatadogPlugin>())
|
|
838
895
|
}
|
|
839
896
|
.hasFieldEqualTo(
|
|
@@ -1077,6 +1134,72 @@ internal class DdSdkTest {
|
|
|
1077
1134
|
}
|
|
1078
1135
|
}
|
|
1079
1136
|
|
|
1137
|
+
@Test
|
|
1138
|
+
fun `𝕄 initialize native SDK 𝕎 initialize() {frustration tracking enabled}`(
|
|
1139
|
+
@Forgery configuration: DdSdkConfiguration
|
|
1140
|
+
) {
|
|
1141
|
+
// Given
|
|
1142
|
+
val bridgeConfiguration = configuration.copy(
|
|
1143
|
+
trackFrustrations = true
|
|
1144
|
+
)
|
|
1145
|
+
val credentialCaptor = argumentCaptor<Credentials>()
|
|
1146
|
+
val configCaptor = argumentCaptor<Configuration>()
|
|
1147
|
+
|
|
1148
|
+
// When
|
|
1149
|
+
testedBridgeSdk.initialize(bridgeConfiguration.toReadableJavaOnlyMap(), mockPromise)
|
|
1150
|
+
|
|
1151
|
+
// Then
|
|
1152
|
+
inOrder(mockDatadog) {
|
|
1153
|
+
verify(mockDatadog).initialize(
|
|
1154
|
+
same(mockContext),
|
|
1155
|
+
credentialCaptor.capture(),
|
|
1156
|
+
configCaptor.capture(),
|
|
1157
|
+
eq(configuration.trackingConsent.asTrackingConsent())
|
|
1158
|
+
)
|
|
1159
|
+
verify(mockDatadog).registerRumMonitor(any())
|
|
1160
|
+
}
|
|
1161
|
+
assertThat(configCaptor.firstValue)
|
|
1162
|
+
.hasField("rumConfig") {
|
|
1163
|
+
it.hasFieldEqualTo(
|
|
1164
|
+
"trackFrustrations",
|
|
1165
|
+
true
|
|
1166
|
+
)
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
@Test
|
|
1171
|
+
fun `𝕄 initialize native SDK 𝕎 initialize() {frustration tracking disabled}`(
|
|
1172
|
+
@Forgery configuration: DdSdkConfiguration
|
|
1173
|
+
) {
|
|
1174
|
+
// Given
|
|
1175
|
+
val bridgeConfiguration = configuration.copy(
|
|
1176
|
+
trackFrustrations = false
|
|
1177
|
+
)
|
|
1178
|
+
val credentialCaptor = argumentCaptor<Credentials>()
|
|
1179
|
+
val configCaptor = argumentCaptor<Configuration>()
|
|
1180
|
+
|
|
1181
|
+
// When
|
|
1182
|
+
testedBridgeSdk.initialize(bridgeConfiguration.toReadableJavaOnlyMap(), mockPromise)
|
|
1183
|
+
|
|
1184
|
+
// Then
|
|
1185
|
+
inOrder(mockDatadog) {
|
|
1186
|
+
verify(mockDatadog).initialize(
|
|
1187
|
+
same(mockContext),
|
|
1188
|
+
credentialCaptor.capture(),
|
|
1189
|
+
configCaptor.capture(),
|
|
1190
|
+
eq(configuration.trackingConsent.asTrackingConsent())
|
|
1191
|
+
)
|
|
1192
|
+
verify(mockDatadog).registerRumMonitor(any())
|
|
1193
|
+
}
|
|
1194
|
+
assertThat(configCaptor.firstValue)
|
|
1195
|
+
.hasField("rumConfig") {
|
|
1196
|
+
it.hasFieldEqualTo(
|
|
1197
|
+
"trackFrustrations",
|
|
1198
|
+
false
|
|
1199
|
+
)
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1080
1203
|
@Test
|
|
1081
1204
|
fun `𝕄 initialize native SDK 𝕎 initialize() {with user action tracking}`(
|
|
1082
1205
|
@Forgery configuration: DdSdkConfiguration
|
|
@@ -55,6 +55,11 @@ fun DdSdkConfiguration.toReadableJavaOnlyMap(): ReadableMap {
|
|
|
55
55
|
// ReadableMap#getString which doesn't allow having null value
|
|
56
56
|
map["vitalsUpdateFrequency"] = VitalsUpdateFrequency.AVERAGE.toString()
|
|
57
57
|
}
|
|
58
|
+
map["trackFrustrations"] = if (trackFrustrations == null) {
|
|
59
|
+
false
|
|
60
|
+
} else {
|
|
61
|
+
trackFrustrations
|
|
62
|
+
}
|
|
58
63
|
additionalConfig?.let { map.put("additionalConfig", it.toReadableMap()) }
|
|
59
64
|
configurationForTelemetry?.let {
|
|
60
65
|
map.put("configurationForTelemetry", it.toReadableJavaOnlyMap())
|
package/android/src/test/kotlin/com/datadog/tools/unit/forge/DdSdkConfigurationForgeryFactory.kt
CHANGED
|
@@ -47,7 +47,8 @@ class DdSdkConfigurationForgeryFactory : ForgeryFactory<DdSdkConfiguration> {
|
|
|
47
47
|
trackErrors = forge.aBool(),
|
|
48
48
|
trackInteractions = forge.aBool(),
|
|
49
49
|
trackNetworkRequests = forge.aBool()
|
|
50
|
-
)
|
|
50
|
+
),
|
|
51
|
+
trackFrustrations = forge.aNullable { aBool() },
|
|
51
52
|
)
|
|
52
53
|
}
|
|
53
54
|
}
|
|
@@ -61,11 +61,21 @@ internal class TelemetryConfigurationEventForgeryFactory :
|
|
|
61
61
|
forge.aNullable { aBool() },
|
|
62
62
|
forge.aNullable { aString() },
|
|
63
63
|
forge.aNullable { aBool() },
|
|
64
|
+
forge.aNullable { aBool() },
|
|
65
|
+
forge.aNullable {
|
|
66
|
+
aList {
|
|
67
|
+
aValueFrom(
|
|
68
|
+
TelemetryConfigurationEvent.SelectedTracingPropagator::class.java
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
},
|
|
64
72
|
forge.aNullable { aString() },
|
|
65
73
|
forge.aNullable { aBool() },
|
|
66
74
|
forge.aNullable { aBool() },
|
|
67
75
|
forge.aNullable { aBool() },
|
|
68
76
|
forge.aNullable { aBool() },
|
|
77
|
+
forge.aNullable { aBool() },
|
|
78
|
+
|
|
69
79
|
forge.aNullable { aBool() },
|
|
70
80
|
forge.aNullable { aList { aString() } },
|
|
71
81
|
forge.aNullable { aList { aString() } },
|
|
@@ -56,8 +56,8 @@ afterEvaluate {
|
|
|
56
56
|
group = "datadog"
|
|
57
57
|
description = "Uploads sourcemaps to Datadog."
|
|
58
58
|
|
|
59
|
-
def execCommand = { jsBundleFile ->
|
|
60
|
-
|
|
59
|
+
def execCommand = { jsBundleFile, shouldUploadBundleFile ->
|
|
60
|
+
def command = [
|
|
61
61
|
"yarn",
|
|
62
62
|
"datadog-ci",
|
|
63
63
|
"react-native",
|
|
@@ -66,8 +66,6 @@ afterEvaluate {
|
|
|
66
66
|
"android",
|
|
67
67
|
"--service",
|
|
68
68
|
serviceName,
|
|
69
|
-
"--bundle",
|
|
70
|
-
jsBundleFile.absolutePath,
|
|
71
69
|
"--sourcemap",
|
|
72
70
|
jsOutputSourceMapFile.absolutePath,
|
|
73
71
|
"--release-version",
|
|
@@ -75,11 +73,18 @@ afterEvaluate {
|
|
|
75
73
|
"--build-version",
|
|
76
74
|
buildVersion
|
|
77
75
|
]
|
|
76
|
+
if (shouldUploadBundleFile) {
|
|
77
|
+
command.add("--bundle")
|
|
78
|
+
command.add(jsBundleFile.absolutePath)
|
|
79
|
+
}
|
|
80
|
+
return command
|
|
78
81
|
}
|
|
79
82
|
|
|
80
83
|
doFirst {
|
|
84
|
+
def shouldUploadBundleFile = getShouldUploadBundleFile(reactRoot)
|
|
85
|
+
|
|
81
86
|
def jsBundleFile = reactConfig.bundleFileResolver()
|
|
82
|
-
if (jsBundleFile == null) {
|
|
87
|
+
if (jsBundleFile == null && shouldUploadBundleFile) {
|
|
83
88
|
throw new GradleException("JS bundle file doesn't exist, aborting upload.")
|
|
84
89
|
}
|
|
85
90
|
|
|
@@ -87,7 +92,7 @@ afterEvaluate {
|
|
|
87
92
|
throw new GradleException("JS sourcemap file doesn't exist, aborting upload.")
|
|
88
93
|
}
|
|
89
94
|
|
|
90
|
-
runShellCommand(execCommand(jsBundleFile), reactRoot)
|
|
95
|
+
runShellCommand(execCommand(jsBundleFile, shouldUploadBundleFile), reactRoot)
|
|
91
96
|
|
|
92
97
|
}
|
|
93
98
|
}
|
|
@@ -179,6 +184,7 @@ private def runShellCommand(
|
|
|
179
184
|
result.rethrowFailure()
|
|
180
185
|
} else {
|
|
181
186
|
logger.lifecycle(outputStream.toString("UTF-8"))
|
|
187
|
+
return outputStream.toString("UTF-8")
|
|
182
188
|
}
|
|
183
189
|
} catch (Exception e) {
|
|
184
190
|
def errorStreamContent = errorStream.toString("UTF-8")
|
|
@@ -189,6 +195,48 @@ private def runShellCommand(
|
|
|
189
195
|
}
|
|
190
196
|
}
|
|
191
197
|
|
|
192
|
-
private
|
|
198
|
+
private def getShouldUploadBundleFile(File reactRoot) {
|
|
199
|
+
// Provide a way to override bundle upload
|
|
200
|
+
if (project.hasProperty("datadog")) {
|
|
201
|
+
if (project.datadog.containsKey("shouldUploadBundle")) {
|
|
202
|
+
return project.datadog.shouldUploadBundle
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
def datadogCiVersionCommand = [
|
|
207
|
+
"yarn",
|
|
208
|
+
"--silent",
|
|
209
|
+
"datadog-ci",
|
|
210
|
+
"version"
|
|
211
|
+
]
|
|
212
|
+
try {
|
|
213
|
+
def versionAsString = runShellCommand(datadogCiVersionCommand, reactRoot) // outputs: v2.5.1
|
|
214
|
+
// We remove the leading "v" in the version number output
|
|
215
|
+
List version = versionAsString.replace("v", "").tokenize('.').collect { it.toInteger() }
|
|
216
|
+
|
|
217
|
+
// First datadog-ci version allowing not uploading the bundle is 2.6.0
|
|
218
|
+
return !isVersionEqualOrAbove(version, [2, 6, 0])
|
|
219
|
+
} catch (Exception e) {
|
|
220
|
+
|
|
221
|
+
return true
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
private static isVersionEqualOrAbove(List version, List targetVersion) {
|
|
226
|
+
if (version[0] != targetVersion[0]) {
|
|
227
|
+
return version[0] > targetVersion[0]
|
|
228
|
+
}
|
|
229
|
+
if (version [1] != targetVersion[1]) {
|
|
230
|
+
return version[1] > targetVersion[1]
|
|
231
|
+
}
|
|
232
|
+
return version[2] >= targetVersion[2]
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
private def getServiceName(variant) {
|
|
236
|
+
if (project.hasProperty("datadog")) {
|
|
237
|
+
if (project.datadog.serviceName) {
|
|
238
|
+
return project.datadog.serviceName
|
|
239
|
+
}
|
|
240
|
+
}
|
|
193
241
|
return variant.applicationId
|
|
194
242
|
}
|
package/ios/Sources/DdSdk.m
CHANGED
|
@@ -33,5 +33,9 @@ RCT_EXTERN_METHOD(telemetryError:(NSString)message
|
|
|
33
33
|
withKind:(NSString)kind
|
|
34
34
|
withResolver:(RCTPromiseResolveBlock)resolve
|
|
35
35
|
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
36
|
+
|
|
37
|
+
RCT_EXTERN_METHOD(consumeWebviewEvent:(NSString)message
|
|
38
|
+
withResolver:(RCTPromiseResolveBlock)resolve
|
|
39
|
+
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
36
40
|
|
|
37
41
|
@end
|
package/ios/Sources/DdSdk.swift
CHANGED
|
@@ -116,6 +116,16 @@ class RNDdSdk: NSObject {
|
|
|
116
116
|
resolve(nil)
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
@objc(consumeWebviewEvent:withResolver:withRejecter:)
|
|
120
|
+
func consumeWebviewEvent(message: NSString, resolve:RCTPromiseResolveBlock, reject:RCTPromiseRejectBlock) -> Void {
|
|
121
|
+
do{
|
|
122
|
+
try Datadog._internal.webEventBridge.send(message)
|
|
123
|
+
} catch {
|
|
124
|
+
Datadog._internal.telemetry.error(id: "datadog_react_native:\(error.localizedDescription)", message: "The message being sent was:\(message)" as String, kind: "WebViewEventBridgeError" as String, stack: String(describing: error) as String)
|
|
125
|
+
}
|
|
126
|
+
resolve(nil)
|
|
127
|
+
}
|
|
128
|
+
|
|
119
129
|
func sendConfigurationAsTelemetry(rnConfiguration: DdSdkConfiguration) -> Void {
|
|
120
130
|
Datadog._internal.telemetry.setConfigurationMapper { event in
|
|
121
131
|
var event = event
|
|
@@ -165,6 +175,8 @@ class RNDdSdk: NSObject {
|
|
|
165
175
|
_ = ddConfigBuilder.set(endpoint: .us5)
|
|
166
176
|
case "us1_fed", "gov":
|
|
167
177
|
_ = ddConfigBuilder.set(endpoint: .us1_fed)
|
|
178
|
+
case "ap1":
|
|
179
|
+
_ = ddConfigBuilder.set(endpoint: .ap1)
|
|
168
180
|
default:
|
|
169
181
|
_ = ddConfigBuilder.set(endpoint: .us1)
|
|
170
182
|
}
|
|
@@ -174,6 +186,10 @@ class RNDdSdk: NSObject {
|
|
|
174
186
|
if var telemetrySampleRate = (configuration.telemetrySampleRate as? NSNumber)?.floatValue {
|
|
175
187
|
_ = ddConfigBuilder.set(sampleTelemetry: telemetrySampleRate)
|
|
176
188
|
}
|
|
189
|
+
|
|
190
|
+
if var trackFrustrations = (configuration.trackFrustrations) {
|
|
191
|
+
_ = ddConfigBuilder.trackFrustrations(trackFrustrations)
|
|
192
|
+
}
|
|
177
193
|
|
|
178
194
|
if let threshold = configuration.nativeLongTaskThresholdMs as? TimeInterval {
|
|
179
195
|
if (threshold != 0) {
|
|
@@ -206,6 +222,7 @@ class RNDdSdk: NSObject {
|
|
|
206
222
|
}
|
|
207
223
|
|
|
208
224
|
if let firstPartyHosts = additionalConfig?[InternalConfigurationAttributes.firstPartyHosts] as? NSArray {
|
|
225
|
+
// We will always fall under this condition as firstPartyHosts is an empty array by default
|
|
209
226
|
_ = ddConfigBuilder.trackURLSession(firstPartyHostsWithHeaderTypes: firstPartyHosts.asFirstPartyHosts())
|
|
210
227
|
}
|
|
211
228
|
|
|
@@ -19,7 +19,10 @@ import Foundation
|
|
|
19
19
|
- site: The Datadog site of your organization (can be 'US1', 'US1_FED', 'US3', 'US5', or 'EU1', default is 'US1').
|
|
20
20
|
- trackingConsent: Consent, which can take one of the following values: 'pending', 'granted', 'not_granted'.
|
|
21
21
|
- telemetrySampleRate: The sample rate (between 0 and 100) of telemetry events.
|
|
22
|
+
- vitalsUpdateFrequency: The frequency at which to measure vitals performance metrics.
|
|
23
|
+
- trackFrustrations: Whether to track frustration signals or not.
|
|
22
24
|
- additionalConfig: Additional configuration parameters.
|
|
25
|
+
- configurationForTelemetry: Additional configuration paramters only used for telemetry purposes.
|
|
23
26
|
*/
|
|
24
27
|
@objc(DdSdkConfiguration)
|
|
25
28
|
public class DdSdkConfiguration: NSObject {
|
|
@@ -34,6 +37,7 @@ public class DdSdkConfiguration: NSObject {
|
|
|
34
37
|
public var trackingConsent: NSString? = nil
|
|
35
38
|
public var telemetrySampleRate: Double? = nil
|
|
36
39
|
public var vitalsUpdateFrequency: NSString? = nil
|
|
40
|
+
public var trackFrustrations: Bool? = nil
|
|
37
41
|
public var additionalConfig: NSDictionary? = nil
|
|
38
42
|
public var configurationForTelemetry: ConfigurationForTelemetry? = nil
|
|
39
43
|
|
|
@@ -49,6 +53,7 @@ public class DdSdkConfiguration: NSObject {
|
|
|
49
53
|
trackingConsent: NSString?,
|
|
50
54
|
telemetrySampleRate: Double?,
|
|
51
55
|
vitalsUpdateFrequency: NSString?,
|
|
56
|
+
trackFrustrations: Bool?,
|
|
52
57
|
additionalConfig: NSDictionary?,
|
|
53
58
|
configurationForTelemetry: ConfigurationForTelemetry?
|
|
54
59
|
) {
|
|
@@ -63,6 +68,7 @@ public class DdSdkConfiguration: NSObject {
|
|
|
63
68
|
self.trackingConsent = trackingConsent
|
|
64
69
|
self.telemetrySampleRate = telemetrySampleRate
|
|
65
70
|
self.vitalsUpdateFrequency = vitalsUpdateFrequency
|
|
71
|
+
self.trackFrustrations = trackFrustrations
|
|
66
72
|
self.additionalConfig = additionalConfig
|
|
67
73
|
self.configurationForTelemetry = configurationForTelemetry
|
|
68
74
|
}
|
|
@@ -21,6 +21,7 @@ extension NSDictionary {
|
|
|
21
21
|
let trackingConsent = object(forKey: "trackingConsent") as? NSString
|
|
22
22
|
let telemetrySampleRate = object(forKey: "telemetrySampleRate") as? Double
|
|
23
23
|
let vitalsUpdateFrequency = object(forKey: "vitalsUpdateFrequency") as? NSString
|
|
24
|
+
let trackFrustrations = object(forKey: "trackFrustrations") as? Bool
|
|
24
25
|
let additionalConfig = object(forKey: "additionalConfig") as? NSDictionary
|
|
25
26
|
let configurationForTelemetry = object(forKey: "configurationForTelemetry") as? NSDictionary
|
|
26
27
|
return DdSdkConfiguration(
|
|
@@ -35,6 +36,7 @@ extension NSDictionary {
|
|
|
35
36
|
trackingConsent: trackingConsent,
|
|
36
37
|
telemetrySampleRate: telemetrySampleRate,
|
|
37
38
|
vitalsUpdateFrequency: vitalsUpdateFrequency,
|
|
39
|
+
trackFrustrations: trackFrustrations,
|
|
38
40
|
additionalConfig: additionalConfig,
|
|
39
41
|
configurationForTelemetry: configurationForTelemetry?.asConfigurationForTelemetry()
|
|
40
42
|
)
|
package/jest/mock.js
CHANGED
|
@@ -11,7 +11,7 @@ const React = require('react');
|
|
|
11
11
|
const actualDatadog = jest.requireActual('@datadog/mobile-react-native');
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Explicitly mocking the provider prevents auto-instrumentation in tests.
|
|
15
15
|
* This prevents errors in tests to be logged in the console, as well as needing
|
|
16
16
|
* to mock XMLHttpRequest.
|
|
17
17
|
*/
|
|
@@ -232,7 +232,7 @@ _defineProperty(DdSdkReactNative, "initializeNativeSDK", async (configuration, p
|
|
|
232
232
|
|
|
233
233
|
_InternalLog.InternalLog.verbosity = configuration.verbosity;
|
|
234
234
|
DdSdkReactNative.buildConfiguration(configuration);
|
|
235
|
-
await _foundation.DdSdk.initialize(new _types.DdSdkConfiguration(configuration.clientToken, configuration.env, configuration.applicationId, configuration.nativeCrashReportEnabled, (0, _longTasksUtils.adaptLongTaskThreshold)(configuration.nativeLongTaskThresholdMs), (0, _longTasksUtils.adaptLongTaskThreshold)(configuration.longTaskThresholdMs), configuration.sampleRate === undefined ? configuration.sessionSamplingRate : configuration.sampleRate, configuration.site, configuration.trackingConsent, configuration.additionalConfig, configuration.telemetrySampleRate, configuration.vitalsUpdateFrequency, {
|
|
235
|
+
await _foundation.DdSdk.initialize(new _types.DdSdkConfiguration(configuration.clientToken, configuration.env, configuration.applicationId, configuration.nativeCrashReportEnabled, (0, _longTasksUtils.adaptLongTaskThreshold)(configuration.nativeLongTaskThresholdMs), (0, _longTasksUtils.adaptLongTaskThreshold)(configuration.longTaskThresholdMs), configuration.sampleRate === undefined ? configuration.sessionSamplingRate : configuration.sampleRate, configuration.site, configuration.trackingConsent, configuration.additionalConfig, configuration.telemetrySampleRate, configuration.vitalsUpdateFrequency, configuration.trackFrustrations, {
|
|
236
236
|
initializationType: params.initializationModeForTelemetry,
|
|
237
237
|
trackErrors: configuration.trackErrors,
|
|
238
238
|
trackInteractions: configuration.trackInteractions,
|