@datadog/mobile-react-native 2.14.1 → 3.0.1
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 +6 -6
- package/README.md +23 -13
- package/android/build.gradle +10 -11
- package/android/gradle.properties +1 -1
- package/android/src/main/kotlin/com/datadog/reactnative/DatadogSDKWrapper.kt +36 -93
- package/android/src/main/kotlin/com/datadog/reactnative/DatadogWrapper.kt +46 -59
- package/android/src/main/kotlin/com/datadog/reactnative/DdLogsImplementation.kt +2 -1
- package/android/src/main/kotlin/com/datadog/reactnative/DdRumImplementation.kt +98 -0
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkConfiguration.kt +125 -75
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkConfigurationExt.kt +199 -90
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkImplementation.kt +151 -24
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkNativeInitialization.kt +57 -33
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkReactNativePackage.kt +2 -1
- package/android/src/main/kotlin/com/datadog/reactnative/DdTelemetry.kt +96 -0
- package/android/src/main/kotlin/com/datadog/reactnative/DdTraceImplementation.kt +20 -19
- package/android/src/main/kotlin/com/datadog/reactnative/SdkVersion.kt +1 -1
- package/android/src/newarch/kotlin/com/datadog/reactnative/DdRum.kt +100 -1
- package/android/src/newarch/kotlin/com/datadog/reactnative/DdSdk.kt +68 -14
- package/android/src/oldarch/kotlin/com/datadog/reactnative/DdRum.kt +94 -0
- package/android/src/oldarch/kotlin/com/datadog/reactnative/DdSdk.kt +70 -11
- package/android/src/test/kotlin/com/datadog/reactnative/DdRumTest.kt +58 -0
- package/android/src/test/kotlin/com/datadog/reactnative/DdSdkNativeInitializationTest.kt +63 -43
- package/android/src/test/kotlin/com/datadog/reactnative/DdSdkTest.kt +2024 -1199
- package/android/src/test/kotlin/com/datadog/reactnative/DdTraceTest.kt +44 -40
- package/android/src/test/kotlin/com/datadog/tools/unit/DdSdkConfigurationExt.kt +60 -91
- package/android/src/test/kotlin/com/datadog/tools/unit/MockRumMonitor.kt +34 -14
- package/android/src/test/kotlin/com/datadog/tools/unit/forge/DdSdkConfigurationForgeryFactory.kt +47 -43
- package/android/src/test/kotlin/com/datadog/tools/unit/forge/TelemetryConfigurationEventForgeryFactory.kt +0 -1
- package/android/src/test/resources/input/complete-configuration.json +32 -28
- package/android/src/test/resources/input/malformed-configuration.json +1 -1
- package/android/src/test/resources/input/minimal-configuration.json +4 -2
- package/datadog-configuration.schema.json +187 -139
- package/ios/Sources/AnyEncodable.swift +14 -7
- package/ios/Sources/Attributes.swift +0 -7
- package/ios/Sources/DatadogSDKWrapper.swift +12 -128
- package/ios/Sources/DdLogsImplementation.swift +9 -39
- package/ios/Sources/DdRum.mm +89 -1
- package/ios/Sources/DdRumImplementation.swift +79 -0
- package/ios/Sources/DdSdk.mm +76 -11
- package/ios/Sources/DdSdkConfiguration.swift +159 -117
- package/ios/Sources/DdSdkImplementation.swift +235 -82
- package/ios/Sources/DdSdkNativeInitialization.swift +116 -80
- package/ios/Sources/DdTelemetry.swift +49 -0
- package/ios/Sources/GlobalState.swift +1 -1
- package/ios/Sources/RNDdSdkConfiguration.swift +334 -172
- package/ios/Sources/SdkVersion.swift +1 -1
- package/jest/mock.js +43 -4
- package/lib/commonjs/DdAttributes.js.map +1 -0
- package/lib/commonjs/DdSdkReactNative.js +159 -56
- package/lib/commonjs/DdSdkReactNative.js.map +1 -1
- package/lib/commonjs/InternalLog.js +1 -1
- package/lib/commonjs/config/DatadogProviderConfiguration.js +25 -0
- package/lib/commonjs/config/DatadogProviderConfiguration.js.map +1 -0
- package/lib/commonjs/config/FileBasedConfiguration.js +349 -0
- package/lib/commonjs/config/FileBasedConfiguration.js.map +1 -0
- package/lib/commonjs/config/FileBasedConfiguration.type.js +6 -0
- package/lib/commonjs/config/FileBasedConfiguration.type.js.map +1 -0
- package/lib/commonjs/config/async/AutoInstrumentationConfiguration.js +51 -0
- package/lib/commonjs/config/async/AutoInstrumentationConfiguration.js.map +1 -0
- package/lib/commonjs/config/async/PartialInitializationConfiguration.js +6 -0
- package/lib/commonjs/config/async/PartialInitializationConfiguration.js.map +1 -0
- package/lib/commonjs/config/async/asyncInitializationHelper.js +44 -0
- package/lib/commonjs/config/async/asyncInitializationHelper.js.map +1 -0
- package/lib/commonjs/config/features/CoreConfiguration.js +104 -0
- package/lib/commonjs/config/features/CoreConfiguration.js.map +1 -0
- package/lib/commonjs/config/features/CoreConfiguration.type.js +6 -0
- package/lib/commonjs/config/features/CoreConfiguration.type.js.map +1 -0
- package/lib/commonjs/config/features/CoreConfigurationNative.js +38 -0
- package/lib/commonjs/config/features/CoreConfigurationNative.js.map +1 -0
- package/lib/commonjs/config/features/LogsConfiguration.js +36 -0
- package/lib/commonjs/config/features/LogsConfiguration.js.map +1 -0
- package/lib/commonjs/config/features/LogsConfiguration.type.js +6 -0
- package/lib/commonjs/config/features/LogsConfiguration.type.js.map +1 -0
- package/lib/commonjs/config/features/LogsConfigurationNative.js +2 -0
- package/lib/commonjs/config/features/LogsConfigurationNative.js.map +1 -0
- package/lib/commonjs/config/features/RumConfiguration.js +120 -0
- package/lib/commonjs/config/features/RumConfiguration.js.map +1 -0
- package/lib/commonjs/config/features/RumConfiguration.type.js +6 -0
- package/lib/commonjs/config/features/RumConfiguration.type.js.map +1 -0
- package/lib/commonjs/config/features/RumConfigurationNative.js +2 -0
- package/lib/commonjs/config/features/RumConfigurationNative.js.map +1 -0
- package/lib/commonjs/config/features/TraceConfiguration.js +24 -0
- package/lib/commonjs/config/features/TraceConfiguration.js.map +1 -0
- package/lib/commonjs/config/features/TraceConfiguration.type.js +2 -0
- package/lib/commonjs/config/features/TraceConfiguration.type.js.map +1 -0
- package/lib/commonjs/config/features/TraceConfigurationNative.js +2 -0
- package/lib/commonjs/config/features/TraceConfigurationNative.js.map +1 -0
- package/lib/commonjs/config/types/BatchProcessingLevel.js +30 -0
- package/lib/commonjs/config/types/BatchProcessingLevel.js.map +1 -0
- package/lib/commonjs/config/types/BatchSize.js +31 -0
- package/lib/commonjs/config/types/BatchSize.js.map +1 -0
- package/lib/commonjs/config/types/InitializationMode.js +17 -0
- package/lib/commonjs/config/types/InitializationMode.js.map +1 -0
- package/lib/commonjs/config/types/InitializationModeForTelemetry.js +2 -0
- package/lib/commonjs/config/types/InitializationModeForTelemetry.js.map +1 -0
- package/lib/commonjs/{ProxyConfiguration.js → config/types/ProxyConfiguration.js} +6 -0
- package/lib/commonjs/config/types/ProxyConfiguration.js.map +1 -0
- package/lib/commonjs/config/types/SdkVerbosity.js.map +1 -0
- package/lib/commonjs/config/types/TrackingConsent.js.map +1 -0
- package/lib/commonjs/config/types/UploadFrequency.js +30 -0
- package/lib/commonjs/config/types/UploadFrequency.js.map +1 -0
- package/lib/commonjs/config/types/VitalsUpdateFrequency.js +19 -0
- package/lib/commonjs/config/types/VitalsUpdateFrequency.js.map +1 -0
- package/lib/commonjs/config/types/index.js +68 -0
- package/lib/commonjs/config/types/index.js.map +1 -0
- package/lib/commonjs/index.js +51 -21
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/logs/DdLogs.js +13 -9
- package/lib/commonjs/logs/DdLogs.js.map +1 -1
- package/lib/commonjs/logs/eventMapper.js +4 -1
- package/lib/commonjs/logs/eventMapper.js.map +1 -1
- package/lib/commonjs/nativeModulesTypes.js +0 -45
- package/lib/commonjs/nativeModulesTypes.js.map +1 -1
- package/lib/commonjs/rum/DdRum.js +56 -28
- package/lib/commonjs/rum/DdRum.js.map +1 -1
- package/lib/commonjs/rum/helper.js +63 -0
- package/lib/commonjs/rum/helper.js.map +1 -0
- package/lib/commonjs/rum/instrumentation/DdRumErrorTracking.js +14 -18
- package/lib/commonjs/rum/instrumentation/DdRumErrorTracking.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js +15 -25
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdEventsInterceptor.js +1 -1
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js +15 -5
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/DdRumResourceTracking.js +34 -22
- package/lib/commonjs/rum/instrumentation/resourceTracking/DdRumResourceTracking.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.js +21 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js +16 -3
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js +10 -12
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.js +6 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.js.map +1 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js +41 -47
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.js +62 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.js.map +1 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/headers.js +36 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/headers.js.map +1 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js +19 -8
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js +90 -48
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js +1 -1
- package/lib/commonjs/rum/types.js +1 -9
- package/lib/commonjs/rum/types.js.map +1 -1
- package/lib/commonjs/sdk/AccountInfoSingleton/AccountInfoSingleton.js +46 -0
- package/lib/commonjs/sdk/AccountInfoSingleton/AccountInfoSingleton.js.map +1 -0
- package/lib/commonjs/sdk/AccountInfoSingleton/types.js +2 -0
- package/lib/commonjs/sdk/AccountInfoSingleton/types.js.map +1 -0
- package/lib/commonjs/sdk/AttributesEncoding/attributesEncoding.js +51 -0
- package/lib/commonjs/sdk/AttributesEncoding/attributesEncoding.js.map +1 -0
- package/lib/commonjs/sdk/AttributesEncoding/defaultEncoders.js +140 -0
- package/lib/commonjs/sdk/AttributesEncoding/defaultEncoders.js.map +1 -0
- package/lib/commonjs/{utils → sdk/AttributesEncoding}/errorUtils.js +39 -22
- package/lib/commonjs/sdk/AttributesEncoding/errorUtils.js.map +1 -0
- package/lib/commonjs/sdk/AttributesEncoding/helpers.js +123 -0
- package/lib/commonjs/sdk/AttributesEncoding/helpers.js.map +1 -0
- package/lib/commonjs/sdk/AttributesEncoding/types.js +2 -0
- package/lib/commonjs/sdk/AttributesEncoding/types.js.map +1 -0
- package/lib/commonjs/sdk/AttributesEncoding/utils.js +36 -0
- package/lib/commonjs/sdk/AttributesEncoding/utils.js.map +1 -0
- package/lib/commonjs/sdk/AttributesSingleton/AttributesSingleton.js +27 -1
- package/lib/commonjs/sdk/AttributesSingleton/AttributesSingleton.js.map +1 -1
- package/lib/commonjs/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.js +3 -3
- package/lib/commonjs/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.js.map +1 -1
- package/lib/commonjs/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.js +1 -1
- package/lib/commonjs/sdk/DatadogProvider/Buffer/BoundedBuffer.js +4 -4
- package/lib/commonjs/sdk/DatadogProvider/Buffer/BoundedBuffer.js.map +1 -1
- package/lib/commonjs/sdk/DatadogProvider/DatadogProvider.js +10 -9
- package/lib/commonjs/sdk/DatadogProvider/DatadogProvider.js.map +1 -1
- package/lib/commonjs/sdk/DatadogProvider/DatadogProviderState.js +28 -0
- package/lib/commonjs/sdk/DatadogProvider/DatadogProviderState.js.map +1 -0
- package/lib/commonjs/sdk/DdSdk.js +4 -2
- package/lib/commonjs/sdk/DdSdk.js.map +1 -1
- package/lib/commonjs/sdk/DdSdkInternal.js +86 -0
- package/lib/commonjs/sdk/DdSdkInternal.js.map +1 -0
- package/lib/commonjs/sdk/EventMappers/EventMapper.js +6 -3
- package/lib/commonjs/sdk/EventMappers/EventMapper.js.map +1 -1
- package/lib/commonjs/sdk/GlobalState/GlobalState.js +5 -11
- package/lib/commonjs/sdk/GlobalState/GlobalState.js.map +1 -1
- package/lib/commonjs/sdk/UserInfoSingleton/UserInfoSingleton.js +6 -1
- package/lib/commonjs/sdk/UserInfoSingleton/UserInfoSingleton.js.map +1 -1
- package/lib/commonjs/specs/NativeDdRum.js.map +1 -1
- package/lib/commonjs/specs/NativeDdSdk.js.map +1 -1
- package/lib/commonjs/trace/DdTrace.js +7 -5
- package/lib/commonjs/trace/DdTrace.js.map +1 -1
- package/lib/commonjs/types.js +19 -46
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/utils/longTasksUtils.js.map +1 -1
- package/lib/commonjs/utils/singletonUtils.js +21 -0
- package/lib/commonjs/utils/singletonUtils.js.map +1 -0
- package/lib/commonjs/version.js +1 -1
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/DdAttributes.js.map +1 -0
- package/lib/module/DdSdkReactNative.js +155 -52
- package/lib/module/DdSdkReactNative.js.map +1 -1
- package/lib/module/InternalLog.js +1 -1
- package/lib/module/InternalLog.js.map +1 -1
- package/lib/module/config/DatadogProviderConfiguration.js +18 -0
- package/lib/module/config/DatadogProviderConfiguration.js.map +1 -0
- package/lib/module/config/FileBasedConfiguration.js +341 -0
- package/lib/module/config/FileBasedConfiguration.js.map +1 -0
- package/lib/module/config/FileBasedConfiguration.type.js +2 -0
- package/lib/module/config/FileBasedConfiguration.type.js.map +1 -0
- package/lib/module/config/async/AutoInstrumentationConfiguration.js +45 -0
- package/lib/module/config/async/AutoInstrumentationConfiguration.js.map +1 -0
- package/lib/module/config/async/PartialInitializationConfiguration.js +2 -0
- package/lib/module/config/async/PartialInitializationConfiguration.js.map +1 -0
- package/lib/module/config/async/asyncInitializationHelper.js +36 -0
- package/lib/module/config/async/asyncInitializationHelper.js.map +1 -0
- package/lib/module/config/features/CoreConfiguration.js +98 -0
- package/lib/module/config/features/CoreConfiguration.js.map +1 -0
- package/lib/module/config/features/CoreConfiguration.type.js +2 -0
- package/lib/module/config/features/CoreConfiguration.type.js.map +1 -0
- package/lib/module/config/features/CoreConfigurationNative.js +31 -0
- package/lib/module/config/features/CoreConfigurationNative.js.map +1 -0
- package/lib/module/config/features/LogsConfiguration.js +30 -0
- package/lib/module/config/features/LogsConfiguration.js.map +1 -0
- package/lib/module/config/features/LogsConfiguration.type.js +2 -0
- package/lib/module/config/features/LogsConfiguration.type.js.map +1 -0
- package/lib/module/config/features/LogsConfigurationNative.js +2 -0
- package/lib/module/config/features/LogsConfigurationNative.js.map +1 -0
- package/lib/module/config/features/RumConfiguration.js +114 -0
- package/lib/module/config/features/RumConfiguration.js.map +1 -0
- package/lib/module/config/features/RumConfiguration.type.js +2 -0
- package/lib/module/config/features/RumConfiguration.type.js.map +1 -0
- package/lib/module/config/features/RumConfigurationNative.js +2 -0
- package/lib/module/config/features/RumConfigurationNative.js.map +1 -0
- package/lib/module/config/features/TraceConfiguration.js +18 -0
- package/lib/module/config/features/TraceConfiguration.js.map +1 -0
- package/lib/module/config/features/TraceConfiguration.type.js +2 -0
- package/lib/module/config/features/TraceConfiguration.type.js.map +1 -0
- package/lib/module/config/features/TraceConfigurationNative.js +2 -0
- package/lib/module/config/features/TraceConfigurationNative.js.map +1 -0
- package/lib/module/config/types/BatchProcessingLevel.js +25 -0
- package/lib/module/config/types/BatchProcessingLevel.js.map +1 -0
- package/lib/module/config/types/BatchSize.js +26 -0
- package/lib/module/config/types/BatchSize.js.map +1 -0
- package/lib/module/config/types/InitializationMode.js +11 -0
- package/lib/module/config/types/InitializationMode.js.map +1 -0
- package/lib/module/config/types/InitializationModeForTelemetry.js +2 -0
- package/lib/module/config/types/InitializationModeForTelemetry.js.map +1 -0
- package/lib/module/{ProxyConfiguration.js → config/types/ProxyConfiguration.js} +6 -0
- package/lib/module/config/types/ProxyConfiguration.js.map +1 -0
- package/lib/module/config/types/SdkVerbosity.js.map +1 -0
- package/lib/module/config/types/TrackingConsent.js.map +1 -0
- package/lib/module/config/types/UploadFrequency.js +25 -0
- package/lib/module/config/types/UploadFrequency.js.map +1 -0
- package/lib/module/config/types/VitalsUpdateFrequency.js +13 -0
- package/lib/module/config/types/VitalsUpdateFrequency.js.map +1 -0
- package/lib/module/config/types/index.js +15 -0
- package/lib/module/config/types/index.js.map +1 -0
- package/lib/module/index.js +13 -7
- package/lib/module/index.js.map +1 -1
- package/lib/module/logs/DdLogs.js +13 -9
- package/lib/module/logs/DdLogs.js.map +1 -1
- package/lib/module/logs/eventMapper.js +4 -1
- package/lib/module/logs/eventMapper.js.map +1 -1
- package/lib/module/nativeModulesTypes.js +1 -43
- package/lib/module/nativeModulesTypes.js.map +1 -1
- package/lib/module/rum/DdRum.js +54 -26
- package/lib/module/rum/DdRum.js.map +1 -1
- package/lib/module/rum/helper.js +49 -0
- package/lib/module/rum/helper.js.map +1 -0
- package/lib/module/rum/instrumentation/DdRumErrorTracking.js +14 -18
- package/lib/module/rum/instrumentation/DdRumErrorTracking.js.map +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js +15 -24
- package/lib/module/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js.map +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/DdEventsInterceptor.js +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/DdEventsInterceptor.js.map +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js +15 -5
- package/lib/module/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/DdRumResourceTracking.js +33 -21
- package/lib/module/rum/instrumentation/resourceTracking/DdRumResourceTracking.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.js +22 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js +13 -2
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js +10 -11
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.js +2 -0
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.js.map +1 -0
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js +27 -33
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.js +54 -0
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.js.map +1 -0
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/headers.js +30 -0
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/headers.js.map +1 -0
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js +14 -3
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js +90 -48
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js.map +1 -1
- package/lib/module/rum/types.js +0 -9
- package/lib/module/rum/types.js.map +1 -1
- package/lib/module/sdk/AccountInfoSingleton/AccountInfoSingleton.js +39 -0
- package/lib/module/sdk/AccountInfoSingleton/AccountInfoSingleton.js.map +1 -0
- package/lib/module/sdk/AccountInfoSingleton/types.js +2 -0
- package/lib/module/sdk/AccountInfoSingleton/types.js.map +1 -0
- package/lib/module/sdk/AttributesEncoding/attributesEncoding.js +46 -0
- package/lib/module/sdk/AttributesEncoding/attributesEncoding.js.map +1 -0
- package/lib/module/sdk/AttributesEncoding/defaultEncoders.js +134 -0
- package/lib/module/sdk/AttributesEncoding/defaultEncoders.js.map +1 -0
- package/lib/module/{utils → sdk/AttributesEncoding}/errorUtils.js +37 -20
- package/lib/module/sdk/AttributesEncoding/errorUtils.js.map +1 -0
- package/lib/module/sdk/AttributesEncoding/helpers.js +115 -0
- package/lib/module/sdk/AttributesEncoding/helpers.js.map +1 -0
- package/lib/module/sdk/AttributesEncoding/types.js +2 -0
- package/lib/module/sdk/AttributesEncoding/types.js.map +1 -0
- package/lib/module/sdk/AttributesEncoding/utils.js +28 -0
- package/lib/module/sdk/AttributesEncoding/utils.js.map +1 -0
- package/lib/module/sdk/AttributesSingleton/AttributesSingleton.js +27 -1
- package/lib/module/sdk/AttributesSingleton/AttributesSingleton.js.map +1 -1
- package/lib/module/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.js +2 -2
- package/lib/module/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.js.map +1 -1
- package/lib/module/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.js +1 -1
- package/lib/module/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.js.map +1 -1
- package/lib/module/sdk/DatadogProvider/Buffer/BoundedBuffer.js +4 -4
- package/lib/module/sdk/DatadogProvider/Buffer/BoundedBuffer.js.map +1 -1
- package/lib/module/sdk/DatadogProvider/DatadogProvider.js +9 -8
- package/lib/module/sdk/DatadogProvider/DatadogProvider.js.map +1 -1
- package/lib/module/sdk/DatadogProvider/DatadogProviderState.js +21 -0
- package/lib/module/sdk/DatadogProvider/DatadogProviderState.js.map +1 -0
- package/lib/module/sdk/DdSdk.js +4 -4
- package/lib/module/sdk/DdSdk.js.map +1 -1
- package/lib/module/sdk/DdSdkInternal.js +80 -0
- package/lib/module/sdk/DdSdkInternal.js.map +1 -0
- package/lib/module/sdk/EventMappers/EventMapper.js +6 -3
- package/lib/module/sdk/EventMappers/EventMapper.js.map +1 -1
- package/lib/module/sdk/GlobalState/GlobalState.js +5 -10
- package/lib/module/sdk/GlobalState/GlobalState.js.map +1 -1
- package/lib/module/sdk/UserInfoSingleton/UserInfoSingleton.js +6 -1
- package/lib/module/sdk/UserInfoSingleton/UserInfoSingleton.js.map +1 -1
- package/lib/module/specs/NativeDdRum.js.map +1 -1
- package/lib/module/specs/NativeDdSdk.js.map +1 -1
- package/lib/module/trace/DdTrace.js +7 -6
- package/lib/module/trace/DdTrace.js.map +1 -1
- package/lib/module/types.js +22 -42
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/longTasksUtils.js.map +1 -1
- package/lib/module/utils/singletonUtils.js +14 -0
- package/lib/module/utils/singletonUtils.js.map +1 -0
- package/lib/module/version.js +1 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/DdAttributes.d.ts.map +1 -0
- package/lib/typescript/DdSdkReactNative.d.ts +49 -12
- package/lib/typescript/DdSdkReactNative.d.ts.map +1 -1
- package/lib/typescript/InternalLog.d.ts +1 -1
- package/lib/typescript/InternalLog.d.ts.map +1 -1
- package/lib/typescript/config/DatadogProviderConfiguration.d.ts +12 -0
- package/lib/typescript/config/DatadogProviderConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/FileBasedConfiguration.d.ts +17 -0
- package/lib/typescript/config/FileBasedConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/FileBasedConfiguration.type.d.ts +52 -0
- package/lib/typescript/config/FileBasedConfiguration.type.d.ts.map +1 -0
- package/lib/typescript/config/async/AutoInstrumentationConfiguration.d.ts +60 -0
- package/lib/typescript/config/async/AutoInstrumentationConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/async/PartialInitializationConfiguration.d.ts +47 -0
- package/lib/typescript/config/async/PartialInitializationConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/async/asyncInitializationHelper.d.ts +5 -0
- package/lib/typescript/config/async/asyncInitializationHelper.d.ts.map +1 -0
- package/lib/typescript/config/features/CoreConfiguration.d.ts +52 -0
- package/lib/typescript/config/features/CoreConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/features/CoreConfiguration.type.d.ts +90 -0
- package/lib/typescript/config/features/CoreConfiguration.type.d.ts.map +1 -0
- package/lib/typescript/config/features/CoreConfigurationNative.d.ts +54 -0
- package/lib/typescript/config/features/CoreConfigurationNative.d.ts.map +1 -0
- package/lib/typescript/config/features/LogsConfiguration.d.ts +17 -0
- package/lib/typescript/config/features/LogsConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/features/LogsConfiguration.type.d.ts +24 -0
- package/lib/typescript/config/features/LogsConfiguration.type.d.ts.map +1 -0
- package/lib/typescript/config/features/LogsConfigurationNative.d.ts +6 -0
- package/lib/typescript/config/features/LogsConfigurationNative.d.ts.map +1 -0
- package/lib/typescript/config/features/RumConfiguration.d.ts +66 -0
- package/lib/typescript/config/features/RumConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/features/RumConfiguration.type.d.ts +131 -0
- package/lib/typescript/config/features/RumConfiguration.type.d.ts.map +1 -0
- package/lib/typescript/config/features/RumConfigurationNative.d.ts +25 -0
- package/lib/typescript/config/features/RumConfigurationNative.d.ts.map +1 -0
- package/lib/typescript/config/features/TraceConfiguration.d.ts +10 -0
- package/lib/typescript/config/features/TraceConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/features/TraceConfiguration.type.d.ts +11 -0
- package/lib/typescript/config/features/TraceConfiguration.type.d.ts.map +1 -0
- package/lib/typescript/config/features/TraceConfigurationNative.d.ts +4 -0
- package/lib/typescript/config/features/TraceConfigurationNative.d.ts.map +1 -0
- package/lib/typescript/config/types/BatchProcessingLevel.d.ts +18 -0
- package/lib/typescript/config/types/BatchProcessingLevel.d.ts.map +1 -0
- package/lib/typescript/config/types/BatchSize.d.ts +19 -0
- package/lib/typescript/config/types/BatchSize.d.ts.map +1 -0
- package/lib/typescript/config/types/InitializationMode.d.ts +5 -0
- package/lib/typescript/config/types/InitializationMode.d.ts.map +1 -0
- package/lib/typescript/config/types/InitializationModeForTelemetry.d.ts +2 -0
- package/lib/typescript/config/types/InitializationModeForTelemetry.d.ts.map +1 -0
- package/lib/typescript/config/types/ProxyConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/types/SdkVerbosity.d.ts.map +1 -0
- package/lib/typescript/config/types/TrackingConsent.d.ts.map +1 -0
- package/lib/typescript/config/types/UploadFrequency.d.ts +18 -0
- package/lib/typescript/config/types/UploadFrequency.d.ts.map +1 -0
- package/lib/typescript/config/types/VitalsUpdateFrequency.d.ts +7 -0
- package/lib/typescript/config/types/VitalsUpdateFrequency.d.ts.map +1 -0
- package/lib/typescript/config/types/index.d.ts +10 -0
- package/lib/typescript/config/types/index.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +20 -9
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/logs/DdLogs.d.ts +2 -1
- package/lib/typescript/logs/DdLogs.d.ts.map +1 -1
- package/lib/typescript/logs/eventMapper.d.ts +3 -2
- package/lib/typescript/logs/eventMapper.d.ts.map +1 -1
- package/lib/typescript/logs/types.d.ts +1 -16
- package/lib/typescript/logs/types.d.ts.map +1 -1
- package/lib/typescript/nativeModulesTypes.d.ts +2 -15
- package/lib/typescript/nativeModulesTypes.d.ts.map +1 -1
- package/lib/typescript/rum/DdRum.d.ts +10 -1
- package/lib/typescript/rum/DdRum.d.ts.map +1 -1
- package/lib/typescript/rum/eventMappers/errorEventMapper.d.ts +1 -1
- package/lib/typescript/rum/eventMappers/errorEventMapper.d.ts.map +1 -1
- package/lib/typescript/rum/helper.d.ts +10 -0
- package/lib/typescript/rum/helper.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/DdRumErrorTracking.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.d.ts +6 -6
- package/lib/typescript/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.d.ts +7 -0
- package/lib/typescript/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/DdRumResourceTracking.d.ts +12 -6
- package/lib/typescript/rum/instrumentation/resourceTracking/DdRumResourceTracking.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.d.ts +8 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.d.ts +5 -17
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.d.ts +20 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.d.ts +3 -24
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.d.ts +12 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/headers.d.ts +24 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/headers.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.d.ts +2 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.d.ts +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.d.ts.map +1 -1
- package/lib/typescript/rum/types.d.ts +47 -7
- package/lib/typescript/rum/types.d.ts.map +1 -1
- package/lib/typescript/sdk/AccountInfoSingleton/AccountInfoSingleton.d.ts +15 -0
- package/lib/typescript/sdk/AccountInfoSingleton/AccountInfoSingleton.d.ts.map +1 -0
- package/lib/typescript/sdk/AccountInfoSingleton/types.d.ts +6 -0
- package/lib/typescript/sdk/AccountInfoSingleton/types.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesEncoding/attributesEncoding.d.ts +13 -0
- package/lib/typescript/sdk/AttributesEncoding/attributesEncoding.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesEncoding/defaultEncoders.d.ts +33 -0
- package/lib/typescript/sdk/AttributesEncoding/defaultEncoders.d.ts.map +1 -0
- package/lib/typescript/{utils → sdk/AttributesEncoding}/errorUtils.d.ts +4 -4
- package/lib/typescript/sdk/AttributesEncoding/errorUtils.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesEncoding/helpers.d.ts +17 -0
- package/lib/typescript/sdk/AttributesEncoding/helpers.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesEncoding/types.d.ts +21 -0
- package/lib/typescript/sdk/AttributesEncoding/types.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesEncoding/utils.d.ts +7 -0
- package/lib/typescript/sdk/AttributesEncoding/utils.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesSingleton/AttributesSingleton.d.ts +5 -1
- package/lib/typescript/sdk/AttributesSingleton/AttributesSingleton.d.ts.map +1 -1
- package/lib/typescript/sdk/DatadogProvider/DatadogProvider.d.ts +4 -3
- package/lib/typescript/sdk/DatadogProvider/DatadogProvider.d.ts.map +1 -1
- package/lib/typescript/sdk/DatadogProvider/DatadogProviderState.d.ts +9 -0
- package/lib/typescript/sdk/DatadogProvider/DatadogProviderState.d.ts.map +1 -0
- package/lib/typescript/sdk/DdSdk.d.ts +2 -3
- package/lib/typescript/sdk/DdSdk.d.ts.map +1 -1
- package/lib/typescript/sdk/DdSdkInternal.d.ts +39 -0
- package/lib/typescript/sdk/DdSdkInternal.d.ts.map +1 -0
- package/lib/typescript/sdk/EventMappers/EventMapper.d.ts +3 -1
- package/lib/typescript/sdk/EventMappers/EventMapper.d.ts.map +1 -1
- package/lib/typescript/sdk/GlobalState/GlobalState.d.ts +3 -3
- package/lib/typescript/sdk/GlobalState/GlobalState.d.ts.map +1 -1
- package/lib/typescript/sdk/UserInfoSingleton/UserInfoSingleton.d.ts +2 -1
- package/lib/typescript/sdk/UserInfoSingleton/UserInfoSingleton.d.ts.map +1 -1
- package/lib/typescript/sdk/UserInfoSingleton/types.d.ts +1 -2
- package/lib/typescript/sdk/UserInfoSingleton/types.d.ts.map +1 -1
- package/lib/typescript/specs/NativeDdRum.d.ts +45 -0
- package/lib/typescript/specs/NativeDdRum.d.ts.map +1 -1
- package/lib/typescript/specs/NativeDdSdk.d.ts +34 -6
- package/lib/typescript/specs/NativeDdSdk.d.ts.map +1 -1
- package/lib/typescript/trace/DdTrace.d.ts +1 -2
- package/lib/typescript/trace/DdTrace.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +74 -92
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/utils/longTasksUtils.d.ts +1 -1
- package/lib/typescript/utils/longTasksUtils.d.ts.map +1 -1
- package/lib/typescript/utils/singletonUtils.d.ts +2 -0
- package/lib/typescript/utils/singletonUtils.d.ts.map +1 -0
- package/lib/typescript/version.d.ts +1 -1
- package/lib/typescript/version.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/DdSdkReactNative.tsx +246 -104
- package/src/InternalLog.tsx +1 -1
- package/src/__tests__/DdSdkReactNative.test.tsx +415 -207
- package/src/__tests__/DdSdkReactNativeConfiguration.test.ts +237 -153
- package/src/__tests__/InternalLog.test.tsx +1 -1
- package/src/__tests__/rum/instrumentation/DdEventsInterceptor.test.tsx +2 -2
- package/src/__tests__/rum/instrumentation/DdRumErrorTracking.test.tsx +139 -216
- package/src/__tests__/rum/instrumentation/DdRumUserInteractionTracking.test.tsx +10 -7
- package/src/config/DatadogProviderConfiguration.ts +17 -0
- package/src/config/FileBasedConfiguration.ts +464 -0
- package/src/config/FileBasedConfiguration.type.ts +66 -0
- package/src/config/__tests__/FileBasedConfiguration.test.ts +334 -0
- package/src/config/__tests__/__fixtures__/configuration-all-fields.json +57 -0
- package/src/config/__tests__/__fixtures__/malformed-configuration.json +4 -0
- package/src/config/async/AutoInstrumentationConfiguration.ts +126 -0
- package/src/config/async/PartialInitializationConfiguration.ts +58 -0
- package/src/config/async/asyncInitializationHelper.tsx +51 -0
- package/src/config/features/CoreConfiguration.ts +130 -0
- package/src/config/features/CoreConfiguration.type.ts +119 -0
- package/src/config/features/CoreConfigurationNative.ts +50 -0
- package/src/config/features/LogsConfiguration.ts +38 -0
- package/src/config/features/LogsConfiguration.type.ts +33 -0
- package/src/config/features/LogsConfigurationNative.ts +10 -0
- package/src/config/features/RumConfiguration.ts +137 -0
- package/src/config/features/RumConfiguration.type.ts +164 -0
- package/src/config/features/RumConfigurationNative.ts +26 -0
- package/src/config/features/TraceConfiguration.ts +24 -0
- package/src/config/features/TraceConfiguration.type.ts +17 -0
- package/src/config/features/TraceConfigurationNative.ts +8 -0
- package/src/config/types/BatchProcessingLevel.ts +23 -0
- package/src/config/types/BatchSize.ts +24 -0
- package/src/config/types/InitializationMode.ts +9 -0
- package/src/config/types/InitializationModeForTelemetry.ts +11 -0
- package/src/{ProxyConfiguration.tsx → config/types/ProxyConfiguration.ts} +6 -0
- package/src/config/types/UploadFrequency.tsx +23 -0
- package/src/config/types/VitalsUpdateFrequency.ts +11 -0
- package/src/config/types/index.ts +15 -0
- package/src/index.tsx +33 -16
- package/src/logs/DdLogs.ts +14 -13
- package/src/logs/__tests__/DdLogs.test.ts +60 -107
- package/src/logs/__tests__/eventMapper.test.ts +1 -1
- package/src/logs/eventMapper.ts +5 -4
- package/src/logs/types.ts +1 -20
- package/src/nativeModulesTypes.ts +2 -17
- package/src/rum/DdRum.ts +139 -42
- package/src/rum/__tests__/DdRum.test.ts +217 -47
- package/src/rum/eventMappers/errorEventMapper.ts +1 -1
- package/src/rum/helper.ts +62 -0
- package/src/rum/instrumentation/DdRumErrorTracking.tsx +20 -38
- package/src/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.ts +20 -32
- package/src/rum/instrumentation/interactionTracking/DdEventsInterceptor.tsx +1 -1
- package/src/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.tsx +18 -5
- package/src/rum/instrumentation/resourceTracking/DdRumResourceTracking.tsx +44 -23
- package/src/rum/instrumentation/resourceTracking/__tests__/DdRumResourceTracking.test.ts +2 -2
- package/src/rum/instrumentation/resourceTracking/__tests__/__utils__/XMLHttpRequestMock.ts +44 -23
- package/src/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.ts +24 -1
- package/src/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.tsx +17 -2
- package/src/rum/instrumentation/resourceTracking/distributedTracing/__tests__/distributedTracing.test.ts +327 -1
- package/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.tsx +22 -31
- package/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.ts +29 -0
- package/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.ts +54 -35
- package/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.ts +80 -0
- package/src/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.ts +1 -1
- package/src/rum/instrumentation/resourceTracking/distributedTracing/headers.ts +29 -0
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.ts +1 -1
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.ts +19 -7
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/__tests__/XHRProxy.test.ts +177 -119
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/__tests__/baggageHeaderUtils.test.ts +85 -13
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.ts +110 -52
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.ts +1 -1
- package/src/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.ts +1 -1
- package/src/rum/types.ts +68 -8
- package/src/sdk/AccountInfoSingleton/AccountInfoSingleton.ts +49 -0
- package/src/sdk/AccountInfoSingleton/__tests__/AccountInfoSingleton.test.ts +90 -0
- package/src/sdk/AccountInfoSingleton/types.ts +11 -0
- package/src/sdk/AttributesEncoding/__tests__/attributesEncoding.test.ts +518 -0
- package/src/sdk/AttributesEncoding/__tests__/defaultEncoders.test.ts +198 -0
- package/src/sdk/AttributesEncoding/attributesEncoding.ts +56 -0
- package/src/sdk/AttributesEncoding/defaultEncoders.ts +175 -0
- package/src/{utils → sdk/AttributesEncoding}/errorUtils.ts +50 -22
- package/src/sdk/AttributesEncoding/helpers.ts +176 -0
- package/src/sdk/AttributesEncoding/types.ts +33 -0
- package/src/sdk/AttributesEncoding/utils.ts +31 -0
- package/src/sdk/AttributesSingleton/AttributesSingleton.ts +25 -1
- package/src/sdk/AttributesSingleton/__tests__/AttributesSingleton.test.ts +52 -8
- package/src/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.tsx +2 -2
- package/src/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.tsx +1 -1
- package/src/sdk/DatadogInternalBridge/__tests__/DdSdkNativeBridge.test.tsx +1 -1
- package/src/sdk/DatadogProvider/Buffer/BoundedBuffer.ts +4 -4
- package/src/sdk/DatadogProvider/Buffer/__tests__/BoundedBuffer.test.ts +5 -5
- package/src/sdk/DatadogProvider/DatadogProvider.tsx +12 -16
- package/src/sdk/DatadogProvider/DatadogProviderState.ts +30 -0
- package/src/sdk/DatadogProvider/__tests__/__utils__/renderWithProvider.tsx +18 -7
- package/src/sdk/DatadogProvider/__tests__/initialization.test.tsx +59 -33
- package/src/sdk/DatadogProvider/__tests__/initializationModes.test.tsx +26 -10
- package/src/sdk/DdSdk.ts +8 -5
- package/src/sdk/DdSdkInternal.ts +121 -0
- package/src/sdk/EventMappers/EventMapper.ts +9 -4
- package/src/sdk/EventMappers/__tests__/EventMapper.test.ts +3 -3
- package/src/sdk/GlobalState/GlobalState.tsx +10 -11
- package/src/sdk/UserInfoSingleton/UserInfoSingleton.ts +9 -2
- package/src/sdk/UserInfoSingleton/__tests__/UserInfoSingleton.test.ts +46 -9
- package/src/sdk/UserInfoSingleton/types.ts +1 -4
- package/src/specs/NativeDdRum.ts +65 -0
- package/src/specs/NativeDdSdk.ts +40 -6
- package/src/trace/DdTrace.ts +11 -7
- package/src/trace/__tests__/DdTrace.test.ts +7 -8
- package/src/types.tsx +97 -76
- package/src/utils/__tests__/errorUtils.test.ts +1 -1
- package/src/utils/__tests__/singletonUtils.test.ts +75 -0
- package/src/utils/longTasksUtils.ts +1 -3
- package/src/utils/singletonUtils.ts +17 -0
- package/src/version.ts +1 -1
- package/lib/commonjs/DdSdkReactNativeConfiguration.js +0 -412
- package/lib/commonjs/DdSdkReactNativeConfiguration.js.map +0 -1
- package/lib/commonjs/ProxyConfiguration.js.map +0 -1
- package/lib/commonjs/SdkVerbosity.js.map +0 -1
- package/lib/commonjs/TrackingConsent.js.map +0 -1
- package/lib/commonjs/rum/DdAttributes.js.map +0 -1
- package/lib/commonjs/sdk/FileBasedConfiguration/FileBasedConfiguration.js +0 -185
- package/lib/commonjs/sdk/FileBasedConfiguration/FileBasedConfiguration.js.map +0 -1
- package/lib/commonjs/utils/argsUtils.js +0 -41
- package/lib/commonjs/utils/argsUtils.js.map +0 -1
- package/lib/commonjs/utils/errorUtils.js.map +0 -1
- package/lib/module/DdSdkReactNativeConfiguration.js +0 -403
- package/lib/module/DdSdkReactNativeConfiguration.js.map +0 -1
- package/lib/module/ProxyConfiguration.js.map +0 -1
- package/lib/module/SdkVerbosity.js.map +0 -1
- package/lib/module/TrackingConsent.js.map +0 -1
- package/lib/module/rum/DdAttributes.js.map +0 -1
- package/lib/module/sdk/FileBasedConfiguration/FileBasedConfiguration.js +0 -176
- package/lib/module/sdk/FileBasedConfiguration/FileBasedConfiguration.js.map +0 -1
- package/lib/module/utils/argsUtils.js +0 -35
- package/lib/module/utils/argsUtils.js.map +0 -1
- package/lib/module/utils/errorUtils.js.map +0 -1
- package/lib/typescript/DdSdkReactNativeConfiguration.d.ts +0 -376
- package/lib/typescript/DdSdkReactNativeConfiguration.d.ts.map +0 -1
- package/lib/typescript/ProxyConfiguration.d.ts.map +0 -1
- package/lib/typescript/SdkVerbosity.d.ts.map +0 -1
- package/lib/typescript/TrackingConsent.d.ts.map +0 -1
- package/lib/typescript/rum/DdAttributes.d.ts.map +0 -1
- package/lib/typescript/sdk/FileBasedConfiguration/FileBasedConfiguration.d.ts +0 -34
- package/lib/typescript/sdk/FileBasedConfiguration/FileBasedConfiguration.d.ts.map +0 -1
- package/lib/typescript/utils/argsUtils.d.ts +0 -8
- package/lib/typescript/utils/argsUtils.d.ts.map +0 -1
- package/lib/typescript/utils/errorUtils.d.ts.map +0 -1
- package/src/DdSdkReactNativeConfiguration.tsx +0 -582
- package/src/sdk/FileBasedConfiguration/FileBasedConfiguration.ts +0 -241
- package/src/sdk/FileBasedConfiguration/__tests__/FileBasedConfiguration.test.ts +0 -255
- package/src/sdk/FileBasedConfiguration/__tests__/__fixtures__/configuration-all-fields.json +0 -27
- package/src/sdk/FileBasedConfiguration/__tests__/__fixtures__/malformed-configuration.json +0 -5
- package/src/utils/__tests__/argsUtils.test.ts +0 -66
- package/src/utils/argsUtils.ts +0 -41
- /package/lib/commonjs/{rum/DdAttributes.js → DdAttributes.js} +0 -0
- /package/lib/commonjs/{SdkVerbosity.js → config/types/SdkVerbosity.js} +0 -0
- /package/lib/commonjs/{TrackingConsent.js → config/types/TrackingConsent.js} +0 -0
- /package/lib/module/{rum/DdAttributes.js → DdAttributes.js} +0 -0
- /package/lib/module/{SdkVerbosity.js → config/types/SdkVerbosity.js} +0 -0
- /package/lib/module/{TrackingConsent.js → config/types/TrackingConsent.js} +0 -0
- /package/lib/typescript/{rum/DdAttributes.d.ts → DdAttributes.d.ts} +0 -0
- /package/lib/typescript/{ProxyConfiguration.d.ts → config/types/ProxyConfiguration.d.ts} +0 -0
- /package/lib/typescript/{SdkVerbosity.d.ts → config/types/SdkVerbosity.d.ts} +0 -0
- /package/lib/typescript/{TrackingConsent.d.ts → config/types/TrackingConsent.d.ts} +0 -0
- /package/src/{rum/DdAttributes.ts → DdAttributes.ts} +0 -0
- /package/src/{SdkVerbosity.tsx → config/types/SdkVerbosity.ts} +0 -0
- /package/src/{TrackingConsent.tsx → config/types/TrackingConsent.ts} +0 -0
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.validateContext = void 0;
|
|
7
|
-
var _InternalLog = require("../InternalLog");
|
|
8
|
-
var _SdkVerbosity = require("../SdkVerbosity");
|
|
9
|
-
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
10
|
-
/*
|
|
11
|
-
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
12
|
-
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
13
|
-
* Copyright 2016-Present Datadog, Inc.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Validates the given context before passing it to the native SDKs.
|
|
18
|
-
* @param context the original context
|
|
19
|
-
* @returns the original context if it's a plain object, an object wrapping the context if it's an array,
|
|
20
|
-
* or an empty object if the context is of any other type.
|
|
21
|
-
*/
|
|
22
|
-
const validateContext = context => {
|
|
23
|
-
if (!context) {
|
|
24
|
-
return {};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// eslint-disable-next-line eqeqeq
|
|
28
|
-
if (context.constructor == Object) {
|
|
29
|
-
return context;
|
|
30
|
-
}
|
|
31
|
-
if (Array.isArray(context)) {
|
|
32
|
-
_InternalLog.InternalLog.log("The given context is an array, it will be nested in 'context' property inside a new object.", _SdkVerbosity.SdkVerbosity.WARN);
|
|
33
|
-
return {
|
|
34
|
-
context
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
_InternalLog.InternalLog.log(`The given context (${context}) is invalid - it must be an object. Context will be empty.`, _SdkVerbosity.SdkVerbosity.ERROR);
|
|
38
|
-
return {};
|
|
39
|
-
};
|
|
40
|
-
exports.validateContext = validateContext;
|
|
41
|
-
//# sourceMappingURL=argsUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_InternalLog","require","_SdkVerbosity","validateContext","context","constructor","Object","Array","isArray","InternalLog","log","SdkVerbosity","WARN","ERROR","exports"],"sourceRoot":"../../../src","sources":["utils/argsUtils.ts"],"mappings":";;;;;;AAOA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AARA;AACA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,eAAe,GAAIC,OAAY,IAAK;EAC7C,IAAI,CAACA,OAAO,EAAE;IACV,OAAO,CAAC,CAAC;EACb;;EAEA;EACA,IAAIA,OAAO,CAACC,WAAW,IAAIC,MAAM,EAAE;IAC/B,OAAOF,OAAO;EAClB;EAEA,IAAIG,KAAK,CAACC,OAAO,CAACJ,OAAO,CAAC,EAAE;IACxBK,wBAAW,CAACC,GAAG,CACX,6FAA6F,EAC7FC,0BAAY,CAACC,IACjB,CAAC;IACD,OAAO;MAAER;IAAQ,CAAC;EACtB;EAEAK,wBAAW,CAACC,GAAG,CACX,sBAAsBN,OAAO,6DAA6D,EAC1FO,0BAAY,CAACE,KACjB,CAAC;EAED,OAAO,CAAC,CAAC;AACb,CAAC;AAACC,OAAA,CAAAX,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["EMPTY_MESSAGE","exports","EMPTY_STACK_TRACE","DEFAULT_ERROR_NAME","getErrorMessage","error","message","undefined","String","getErrorStackTrace","stack","stacktrace","componentStack","sourceURL","line","column","e","getErrorName","name"],"sourceRoot":"../../../src","sources":["utils/errorUtils.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;;AAEO,MAAMA,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG,eAAe;AACrC,MAAME,iBAAiB,GAAAD,OAAA,CAAAC,iBAAA,GAAG,EAAE;AAC5B,MAAMC,kBAAkB,GAAAF,OAAA,CAAAE,kBAAA,GAAG,OAAO;AAElC,MAAMC,eAAe,GAAIC,KAAsB,IAAa;EAC/D,IAAIC,OAAO,GAAGN,aAAa;EAC3B,IAAIK,KAAK,KAAKE,SAAS,IAAIF,KAAK,KAAK,IAAI,EAAE;IACvCC,OAAO,GAAGN,aAAa;EAC3B,CAAC,MAAM,IAAI,OAAOK,KAAK,KAAK,QAAQ,IAAI,SAAS,IAAIA,KAAK,EAAE;IACxDC,OAAO,GAAGE,MAAM,CAACH,KAAK,CAACC,OAAO,CAAC;EACnC,CAAC,MAAM;IACHA,OAAO,GAAGE,MAAM,CAACH,KAAK,CAAC;EAC3B;EAEA,OAAOC,OAAO;AAClB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPAL,OAAA,CAAAG,eAAA,GAAAA,eAAA;AAQO,MAAMK,kBAAkB,GAAIJ,KAAsB,IAAa;EAClE,IAAIK,KAAK,GAAGR,iBAAiB;EAE7B,IAAI;IACA,IAAIG,KAAK,KAAKE,SAAS,IAAIF,KAAK,KAAK,IAAI,EAAE;MACvCK,KAAK,GAAGR,iBAAiB;IAC7B,CAAC,MAAM,IAAI,OAAOG,KAAK,KAAK,QAAQ,EAAE;MAClCK,KAAK,GAAGR,iBAAiB;IAC7B,CAAC,MAAM,IAAI,OAAOG,KAAK,KAAK,QAAQ,EAAE;MAClC,IAAI,YAAY,IAAIA,KAAK,EAAE;QACvBK,KAAK,GAAGF,MAAM,CAACH,KAAK,CAACM,UAAU,CAAC;MACpC,CAAC,MAAM,IAAI,OAAO,IAAIN,KAAK,EAAE;QACzBK,KAAK,GAAGF,MAAM,CAACH,KAAK,CAACK,KAAK,CAAC;MAC/B,CAAC,MAAM,IAAI,gBAAgB,IAAIL,KAAK,EAAE;QAClCK,KAAK,GAAGF,MAAM,CAACH,KAAK,CAACO,cAAc,CAAC;MACxC,CAAC,MAAM,IACH,WAAW,IAAIP,KAAK,IACpB,MAAM,IAAIA,KAAK,IACf,QAAQ,IAAIA,KAAK,EACnB;QACEK,KAAK,GAAG,MAAML,KAAK,CAACQ,SAAS,IAAIR,KAAK,CAACS,IAAI,IAAIT,KAAK,CAACU,MAAM,EAAE;MACjE;IACJ;EACJ,CAAC,CAAC,OAAOC,CAAC,EAAE;IACR;EAAA;EAEJ,OAAON,KAAK;AAChB,CAAC;AAACT,OAAA,CAAAQ,kBAAA,GAAAA,kBAAA;AAEK,MAAMQ,YAAY,GAAIZ,KAAc,IAAa;EACpD,IAAI;IACA,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,KAAK,IAAI,EAAE;MAC7C,OAAOF,kBAAkB;IAC7B;IACA,IAAI,OAAQE,KAAK,CAASa,IAAI,KAAK,QAAQ,EAAE;MACzC,OAAQb,KAAK,CAASa,IAAI;IAC9B;EACJ,CAAC,CAAC,OAAOF,CAAC,EAAE;IACR;EAAA;EAEJ,OAAOb,kBAAkB;AAC7B,CAAC;AAACF,OAAA,CAAAgB,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -1,403 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
3
|
-
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
4
|
-
* Copyright 2016-Present Datadog, Inc.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { TrackingConsent } from './TrackingConsent';
|
|
8
|
-
import { PropagatorType } from './rum/types';
|
|
9
|
-
export let VitalsUpdateFrequency = /*#__PURE__*/function (VitalsUpdateFrequency) {
|
|
10
|
-
VitalsUpdateFrequency["FREQUENT"] = "FREQUENT";
|
|
11
|
-
VitalsUpdateFrequency["AVERAGE"] = "AVERAGE";
|
|
12
|
-
VitalsUpdateFrequency["RARE"] = "RARE";
|
|
13
|
-
VitalsUpdateFrequency["NEVER"] = "NEVER";
|
|
14
|
-
return VitalsUpdateFrequency;
|
|
15
|
-
}({});
|
|
16
|
-
export let UploadFrequency = /*#__PURE__*/function (UploadFrequency) {
|
|
17
|
-
/**
|
|
18
|
-
* Upload data every 1000ms.
|
|
19
|
-
*/
|
|
20
|
-
UploadFrequency["FREQUENT"] = "FREQUENT";
|
|
21
|
-
/**
|
|
22
|
-
* Upload data every 5000ms.
|
|
23
|
-
*/
|
|
24
|
-
UploadFrequency["AVERAGE"] = "AVERAGE";
|
|
25
|
-
/**
|
|
26
|
-
* Upload data every 10000ms.
|
|
27
|
-
*/
|
|
28
|
-
UploadFrequency["RARE"] = "RARE";
|
|
29
|
-
return UploadFrequency;
|
|
30
|
-
}({});
|
|
31
|
-
export let BatchSize = /*#__PURE__*/function (BatchSize) {
|
|
32
|
-
/**
|
|
33
|
-
* Upload less frequent, larger batches of data
|
|
34
|
-
*/
|
|
35
|
-
BatchSize["LARGE"] = "LARGE";
|
|
36
|
-
/**
|
|
37
|
-
* Use default size for batches of data
|
|
38
|
-
*/
|
|
39
|
-
BatchSize["MEDIUM"] = "MEDIUM";
|
|
40
|
-
/**
|
|
41
|
-
* Upload more frequent, smaller batches of data
|
|
42
|
-
*/
|
|
43
|
-
BatchSize["SMALL"] = "SMALL";
|
|
44
|
-
return BatchSize;
|
|
45
|
-
}({});
|
|
46
|
-
export let BatchProcessingLevel = /*#__PURE__*/function (BatchProcessingLevel) {
|
|
47
|
-
/**
|
|
48
|
-
* Only 1 batch will be sent in a single upload cycle.
|
|
49
|
-
*/
|
|
50
|
-
BatchProcessingLevel["LOW"] = "LOW";
|
|
51
|
-
/**
|
|
52
|
-
* 10 batches will be sent in a single upload cycle
|
|
53
|
-
*/
|
|
54
|
-
BatchProcessingLevel["MEDIUM"] = "MEDIUM";
|
|
55
|
-
/**
|
|
56
|
-
* 100 batches will be sent in a single upload cycle.
|
|
57
|
-
*/
|
|
58
|
-
BatchProcessingLevel["HIGH"] = "HIGH";
|
|
59
|
-
return BatchProcessingLevel;
|
|
60
|
-
}({});
|
|
61
|
-
const isLegacyFirstPartyHost = firstPartyHost => {
|
|
62
|
-
return typeof firstPartyHost === 'string';
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* Defaults legacy first party hosts format to Datadog first party hosts to keep
|
|
66
|
-
* retro-compatibility before OTel support was introduced.
|
|
67
|
-
*/
|
|
68
|
-
export const formatFirstPartyHosts = firstPartyHosts => {
|
|
69
|
-
return firstPartyHosts.map(host => {
|
|
70
|
-
if (isLegacyFirstPartyHost(host)) {
|
|
71
|
-
return {
|
|
72
|
-
match: host,
|
|
73
|
-
propagatorTypes: [PropagatorType.DATADOG, PropagatorType.TRACECONTEXT]
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
return host;
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
export const DEFAULTS = {
|
|
80
|
-
nativeCrashReportEnabled: false,
|
|
81
|
-
sessionSamplingRate: 100.0,
|
|
82
|
-
resourceTracingSamplingRate: 20.0,
|
|
83
|
-
site: 'US1',
|
|
84
|
-
longTaskThresholdMs: 0,
|
|
85
|
-
nativeLongTaskThresholdMs: 200,
|
|
86
|
-
nativeViewTracking: false,
|
|
87
|
-
nativeInteractionTracking: false,
|
|
88
|
-
getFirstPartyHosts: () => [],
|
|
89
|
-
getAdditionalConfiguration: () => ({}),
|
|
90
|
-
trackingConsent: TrackingConsent.GRANTED,
|
|
91
|
-
telemetrySampleRate: 20.0,
|
|
92
|
-
vitalsUpdateFrequency: VitalsUpdateFrequency.AVERAGE,
|
|
93
|
-
logEventMapper: null,
|
|
94
|
-
errorEventMapper: null,
|
|
95
|
-
resourceEventMapper: null,
|
|
96
|
-
actionEventMapper: null,
|
|
97
|
-
trackFrustrations: true,
|
|
98
|
-
uploadFrequency: UploadFrequency.AVERAGE,
|
|
99
|
-
batchSize: BatchSize.MEDIUM,
|
|
100
|
-
trackBackgroundEvents: false,
|
|
101
|
-
getCustomEndpoints: () => ({}),
|
|
102
|
-
bundleLogsWithRum: true,
|
|
103
|
-
bundleLogsWithTraces: true,
|
|
104
|
-
useAccessibilityLabel: true,
|
|
105
|
-
trackWatchdogTerminations: false,
|
|
106
|
-
batchProcessingLevel: BatchProcessingLevel.MEDIUM
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* The SDK configuration class.
|
|
111
|
-
* It will be used to configure the SDK functionality at initialization.
|
|
112
|
-
*/
|
|
113
|
-
export class DdSdkReactNativeConfiguration {
|
|
114
|
-
/**
|
|
115
|
-
* Enables crash reporting for native platforms (iOS, Android). Default `false`.
|
|
116
|
-
*/
|
|
117
|
-
nativeCrashReportEnabled = DEFAULTS.nativeCrashReportEnabled;
|
|
118
|
-
/**
|
|
119
|
-
* @deprecated `sampleRate` has been replaced by `sessionSamplingRate` to avoid confusion with `resourceTracingSamplingRate` and will be removed in a future release.
|
|
120
|
-
*/
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Percentage of sampled RUM sessions. Range `0`-`100`.
|
|
124
|
-
*/
|
|
125
|
-
sessionSamplingRate = DEFAULTS.sessionSamplingRate;
|
|
126
|
-
/**
|
|
127
|
-
* Percentage of tracing integrations for network calls between your app and your backend. Range `0`-`100`.
|
|
128
|
-
*/
|
|
129
|
-
resourceTracingSamplingRate = DEFAULTS.resourceTracingSamplingRate;
|
|
130
|
-
site = DEFAULTS.site;
|
|
131
|
-
/**
|
|
132
|
-
* Verbosity for internal SDK logging.
|
|
133
|
-
* Set to `SdkVerbosity.DEBUG` to debug your SDK implementation.
|
|
134
|
-
*/
|
|
135
|
-
verbosity = undefined;
|
|
136
|
-
/**
|
|
137
|
-
* Enables native views tracking.
|
|
138
|
-
* Set to `true` if you use a custom navigation system relying on native views.
|
|
139
|
-
*/
|
|
140
|
-
nativeViewTracking = DEFAULTS.nativeViewTracking;
|
|
141
|
-
/**
|
|
142
|
-
* Enables native interaction tracking.
|
|
143
|
-
* Set to `true` if you want to track interactions on native screens.
|
|
144
|
-
*/
|
|
145
|
-
nativeInteractionTracking = DEFAULTS.nativeInteractionTracking;
|
|
146
|
-
proxyConfig = undefined;
|
|
147
|
-
serviceName = undefined;
|
|
148
|
-
/**
|
|
149
|
-
* List of your backends hosts to enable tracing with.
|
|
150
|
-
* Regular expressions are NOT supported.
|
|
151
|
-
*
|
|
152
|
-
* Matches domains and subdomains, e.g. `['example.com']` matches `example.com` and `api.example.com`.
|
|
153
|
-
*/
|
|
154
|
-
firstPartyHosts = DEFAULTS.getFirstPartyHosts();
|
|
155
|
-
/**
|
|
156
|
-
* Overrides the reported version of the app.
|
|
157
|
-
* Accepted characters are alphanumerics and `_`, `-`, `:`, `.`, `/`.
|
|
158
|
-
* Other special characters are converted to underscores.
|
|
159
|
-
*
|
|
160
|
-
* See https://docs.datadoghq.com/getting_started/tagging/#define-tags for more information on the format.
|
|
161
|
-
*
|
|
162
|
-
* Make sure you set it correctly, as it will have to match the one specified during the upload of your source maps and other mapping files.
|
|
163
|
-
*/
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Add a suffix to the reported version of the app.
|
|
167
|
-
* Accepted characters are alphanumerics and `_`, `-`, `:`, `.`, `/`.
|
|
168
|
-
* Other special characters are converted to underscores.
|
|
169
|
-
*
|
|
170
|
-
* See https://docs.datadoghq.com/getting_started/tagging/#define-tags for more information on the format.
|
|
171
|
-
*
|
|
172
|
-
* A dash (`-`) will be automatically added between the version and the suffix
|
|
173
|
-
*/
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* The sampling rate for Internal Telemetry (info related to the work of the
|
|
177
|
-
* SDK internals).
|
|
178
|
-
*
|
|
179
|
-
* The sampling rate must be a value between 0 and 100. A value of 0 means no
|
|
180
|
-
* telemetry will be sent, 100 means all telemetry will be sent. When
|
|
181
|
-
* `telemetrySampleRate` is not set, the default value from the iOS and
|
|
182
|
-
* Android SDK is used, which is 20.
|
|
183
|
-
*/
|
|
184
|
-
telemetrySampleRate = DEFAULTS.telemetrySampleRate;
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* The threshold for native long tasks reporting in milliseconds.
|
|
188
|
-
*
|
|
189
|
-
* - Setting it to `0` or `false` disables native long task reporting.
|
|
190
|
-
* - Values below `100` will be raised to `100`.
|
|
191
|
-
* - Values above `5000` will be lowered to `5000`.
|
|
192
|
-
*
|
|
193
|
-
* Default value is `200`.
|
|
194
|
-
*/
|
|
195
|
-
nativeLongTaskThresholdMs = DEFAULTS.nativeLongTaskThresholdMs;
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* The threshold for javascript long tasks reporting in milliseconds.
|
|
199
|
-
*
|
|
200
|
-
* - Setting it to `0` or `false` disables javascript long task reporting.
|
|
201
|
-
* - Values below `100` will be raised to `100`.
|
|
202
|
-
* - Values above `5000` will be lowered to `5000`.
|
|
203
|
-
*
|
|
204
|
-
* Default value is `0`
|
|
205
|
-
*/
|
|
206
|
-
longTaskThresholdMs = DEFAULTS.longTaskThresholdMs;
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Sets the preferred frequency for collecting mobile vitals.
|
|
210
|
-
*/
|
|
211
|
-
vitalsUpdateFrequency = DEFAULTS.vitalsUpdateFrequency;
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Enables tracking of frustration signals (error taps). Defaults to `true`.
|
|
215
|
-
*/
|
|
216
|
-
trackFrustrations = DEFAULTS.trackFrustrations;
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* Sets the preferred frequency for uploading batches of data.
|
|
220
|
-
*/
|
|
221
|
-
uploadFrequency = DEFAULTS.uploadFrequency;
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* Defines the Datadog SDK policy when batching data together before uploading it to Datadog servers.
|
|
225
|
-
* Smaller batches mean smaller but more network requests, whereas larger batches mean fewer but larger network requests.
|
|
226
|
-
*/
|
|
227
|
-
batchSize = DEFAULTS.batchSize;
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* Enables tracking of RUM event when no RUM View is active.
|
|
231
|
-
*
|
|
232
|
-
* By default, background events are not tracked. Enabling this feature might increase the
|
|
233
|
-
* number of sessions tracked and impact your billing.
|
|
234
|
-
*/
|
|
235
|
-
trackBackgroundEvents = DEFAULTS.trackBackgroundEvents;
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* Enables RUM correlation with logs.
|
|
239
|
-
*
|
|
240
|
-
* By default, RUM is enabled for logs.
|
|
241
|
-
*/
|
|
242
|
-
bundleLogsWithRum = DEFAULTS.bundleLogsWithRum;
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* Enables Traces correlation with logs.
|
|
246
|
-
*
|
|
247
|
-
* By default, Traces is enabled for logs.
|
|
248
|
-
*/
|
|
249
|
-
bundleLogsWithTraces = DEFAULTS.bundleLogsWithTraces;
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
* Sets the preferred level for processing batches of data.
|
|
253
|
-
*/
|
|
254
|
-
batchProcessingLevel = DEFAULTS.batchProcessingLevel;
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Enables tracking of non-fatal ANRs on Android.
|
|
258
|
-
* By default, the reporting of non-fatal ANRs on Android 30+ is disabled because it would
|
|
259
|
-
* create too much noise over fatal ANRs. On Android 29 and below, however,
|
|
260
|
-
* the reporting of non-fatal ANRs is enabled by default,
|
|
261
|
-
* as fatal ANRs cannot be reported on those versions.
|
|
262
|
-
*/
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* The app hang threshold in seconds for non-fatal app hangs on iOS.
|
|
266
|
-
*
|
|
267
|
-
* App hangs are an iOS-specific type of error that happens when the application is unresponsive for too long.
|
|
268
|
-
* By default, app hangs reporting is disabled, but you can enable it and set your
|
|
269
|
-
* own threshold to monitor app hangs that last more than a specified
|
|
270
|
-
* duration by using the this parameter.
|
|
271
|
-
*
|
|
272
|
-
* Set the `appHangThreshold` parameter to the minimal duration you want
|
|
273
|
-
* app hangs to be reported. For example, enter 0.25 to report hangs lasting at least 250 ms.
|
|
274
|
-
* See [Configure the app hang threshold](https://docs.datadoghq.com/real_user_monitoring/error_tracking/mobile/ios/?tab=cocoapods#configure-the-app-hang-threshold)
|
|
275
|
-
* for more guidance on what to set this value to.
|
|
276
|
-
*/
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* The amount of time after a view starts where a Resource should be
|
|
280
|
-
* considered when calculating Time to Network-Settled (TNS). TNS will be
|
|
281
|
-
* calculated using all resources that start withing the specified threshold, in seconds.
|
|
282
|
-
* Defaults to 0.1 seconds.
|
|
283
|
-
*/
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* Determines whether the SDK should track application termination by the watchdog on iOS. Default: `false`.
|
|
287
|
-
*/
|
|
288
|
-
trackWatchdogTerminations = DEFAULTS.trackWatchdogTerminations;
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* Specifies a custom prop to name RUM actions on elements having an `onPress` prop.
|
|
292
|
-
*
|
|
293
|
-
* For example if you set it to `testID`, the value of the `testID` prop is used as a custom action name:
|
|
294
|
-
*
|
|
295
|
-
* ```js
|
|
296
|
-
* <TouchableOpacity testID="Dismiss notification" onPress={() => dismiss()}>
|
|
297
|
-
* ```
|
|
298
|
-
*
|
|
299
|
-
* `dd-action-name` is favored when both attributes are present on an element.
|
|
300
|
-
*/
|
|
301
|
-
|
|
302
|
-
logEventMapper = DEFAULTS.logEventMapper;
|
|
303
|
-
errorEventMapper = DEFAULTS.errorEventMapper;
|
|
304
|
-
resourceEventMapper = DEFAULTS.resourceEventMapper;
|
|
305
|
-
actionEventMapper = DEFAULTS.actionEventMapper;
|
|
306
|
-
additionalConfiguration = DEFAULTS.getAdditionalConfiguration();
|
|
307
|
-
customEndpoints = DEFAULTS.getCustomEndpoints();
|
|
308
|
-
constructor(clientToken, env, applicationId, trackInteractions = false, trackResources = false, trackErrors = false, trackingConsent = DEFAULTS.trackingConsent, useAccessibilityLabel = DEFAULTS.useAccessibilityLabel // eslint-disable-next-line no-empty-function
|
|
309
|
-
) {
|
|
310
|
-
this.clientToken = clientToken;
|
|
311
|
-
this.env = env;
|
|
312
|
-
this.applicationId = applicationId;
|
|
313
|
-
this.trackInteractions = trackInteractions;
|
|
314
|
-
this.trackResources = trackResources;
|
|
315
|
-
this.trackErrors = trackErrors;
|
|
316
|
-
this.trackingConsent = trackingConsent;
|
|
317
|
-
this.useAccessibilityLabel = useAccessibilityLabel;
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
* Auto Instrumentation configuration passed to DatadogProvider.
|
|
323
|
-
* Does not include default values.
|
|
324
|
-
*/
|
|
325
|
-
|
|
326
|
-
/**
|
|
327
|
-
* Parameters needed to start auto instrumentation. Includes default values.
|
|
328
|
-
*/
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* We could use `Proxy` instead of this function, but `Proxy` is not available on
|
|
332
|
-
* the older android jsc that can still be used.
|
|
333
|
-
*/
|
|
334
|
-
export const addDefaultValuesToAutoInstrumentationConfiguration = features => {
|
|
335
|
-
return {
|
|
336
|
-
...features,
|
|
337
|
-
firstPartyHosts: features.firstPartyHosts || DEFAULTS.getFirstPartyHosts(),
|
|
338
|
-
resourceTracingSamplingRate: features.resourceTracingSamplingRate === undefined ? DEFAULTS.resourceTracingSamplingRate : features.resourceTracingSamplingRate,
|
|
339
|
-
logEventMapper: features.logEventMapper === undefined ? DEFAULTS.logEventMapper : features.logEventMapper,
|
|
340
|
-
errorEventMapper: features.errorEventMapper === undefined ? DEFAULTS.errorEventMapper : features.errorEventMapper,
|
|
341
|
-
resourceEventMapper: features.resourceEventMapper === undefined ? DEFAULTS.resourceEventMapper : features.resourceEventMapper,
|
|
342
|
-
actionEventMapper: features.actionEventMapper === undefined ? DEFAULTS.actionEventMapper : features.actionEventMapper,
|
|
343
|
-
useAccessibilityLabel: DEFAULTS.useAccessibilityLabel
|
|
344
|
-
};
|
|
345
|
-
};
|
|
346
|
-
const setConfigurationAttribute = (attribute, configuration) => {
|
|
347
|
-
if (attribute.value !== undefined) {
|
|
348
|
-
configuration[attribute.name] = attribute.value;
|
|
349
|
-
}
|
|
350
|
-
};
|
|
351
|
-
export const buildConfigurationFromPartialConfiguration = (features, configuration) => {
|
|
352
|
-
const {
|
|
353
|
-
clientToken,
|
|
354
|
-
env,
|
|
355
|
-
applicationId,
|
|
356
|
-
...remainingConfiguration
|
|
357
|
-
} = configuration;
|
|
358
|
-
const SdkConfiguration = new DdSdkReactNativeConfiguration(clientToken, env, applicationId, features.trackInteractions, features.trackResources, features.trackErrors, configuration.trackingConsent, features.useAccessibilityLabel);
|
|
359
|
-
Object.keys(remainingConfiguration).forEach(name => {
|
|
360
|
-
setConfigurationAttribute({
|
|
361
|
-
value: remainingConfiguration[name],
|
|
362
|
-
name
|
|
363
|
-
}, SdkConfiguration);
|
|
364
|
-
});
|
|
365
|
-
setConfigurationAttribute({
|
|
366
|
-
name: 'resourceTracingSamplingRate',
|
|
367
|
-
value: features.resourceTracingSamplingRate
|
|
368
|
-
}, SdkConfiguration);
|
|
369
|
-
setConfigurationAttribute({
|
|
370
|
-
name: 'firstPartyHosts',
|
|
371
|
-
value: features.firstPartyHosts
|
|
372
|
-
}, SdkConfiguration);
|
|
373
|
-
setConfigurationAttribute({
|
|
374
|
-
name: 'logEventMapper',
|
|
375
|
-
value: features.logEventMapper
|
|
376
|
-
}, SdkConfiguration);
|
|
377
|
-
setConfigurationAttribute({
|
|
378
|
-
name: 'errorEventMapper',
|
|
379
|
-
value: features.errorEventMapper
|
|
380
|
-
}, SdkConfiguration);
|
|
381
|
-
setConfigurationAttribute({
|
|
382
|
-
name: 'resourceEventMapper',
|
|
383
|
-
value: features.resourceEventMapper
|
|
384
|
-
}, SdkConfiguration);
|
|
385
|
-
setConfigurationAttribute({
|
|
386
|
-
name: 'actionEventMapper',
|
|
387
|
-
value: features.actionEventMapper
|
|
388
|
-
}, SdkConfiguration);
|
|
389
|
-
setConfigurationAttribute({
|
|
390
|
-
name: 'actionNameAttribute',
|
|
391
|
-
value: features.actionNameAttribute
|
|
392
|
-
}, SdkConfiguration);
|
|
393
|
-
return SdkConfiguration;
|
|
394
|
-
};
|
|
395
|
-
export class DatadogProviderConfiguration extends DdSdkReactNativeConfiguration {
|
|
396
|
-
initializationMode = InitializationMode.SYNC;
|
|
397
|
-
}
|
|
398
|
-
export let InitializationMode = /*#__PURE__*/function (InitializationMode) {
|
|
399
|
-
InitializationMode["SYNC"] = "SYNC";
|
|
400
|
-
InitializationMode["ASYNC"] = "ASYNC";
|
|
401
|
-
return InitializationMode;
|
|
402
|
-
}({});
|
|
403
|
-
//# sourceMappingURL=DdSdkReactNativeConfiguration.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["TrackingConsent","PropagatorType","VitalsUpdateFrequency","UploadFrequency","BatchSize","BatchProcessingLevel","isLegacyFirstPartyHost","firstPartyHost","formatFirstPartyHosts","firstPartyHosts","map","host","match","propagatorTypes","DATADOG","TRACECONTEXT","DEFAULTS","nativeCrashReportEnabled","sessionSamplingRate","resourceTracingSamplingRate","site","longTaskThresholdMs","nativeLongTaskThresholdMs","nativeViewTracking","nativeInteractionTracking","getFirstPartyHosts","getAdditionalConfiguration","trackingConsent","GRANTED","telemetrySampleRate","vitalsUpdateFrequency","AVERAGE","logEventMapper","errorEventMapper","resourceEventMapper","actionEventMapper","trackFrustrations","uploadFrequency","batchSize","MEDIUM","trackBackgroundEvents","getCustomEndpoints","bundleLogsWithRum","bundleLogsWithTraces","useAccessibilityLabel","trackWatchdogTerminations","batchProcessingLevel","DdSdkReactNativeConfiguration","verbosity","undefined","proxyConfig","serviceName","additionalConfiguration","customEndpoints","constructor","clientToken","env","applicationId","trackInteractions","trackResources","trackErrors","addDefaultValuesToAutoInstrumentationConfiguration","features","setConfigurationAttribute","attribute","configuration","value","name","buildConfigurationFromPartialConfiguration","remainingConfiguration","SdkConfiguration","Object","keys","forEach","actionNameAttribute","DatadogProviderConfiguration","initializationMode","InitializationMode","SYNC"],"sourceRoot":"../../src","sources":["DdSdkReactNativeConfiguration.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAIA,SAASA,eAAe,QAAQ,mBAAmB;AAMnD,SAASC,cAAc,QAAQ,aAAa;AAE5C,WAAYC,qBAAqB,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;AAOjC,WAAYC,eAAe,0BAAfA,eAAe;EACvB;AACJ;AACA;EAHYA,eAAe;EAKvB;AACJ;AACA;EAPYA,eAAe;EASvB;AACJ;AACA;EAXYA,eAAe;EAAA,OAAfA,eAAe;AAAA;AAe3B,WAAYC,SAAS,0BAATA,SAAS;EACjB;AACJ;AACA;EAHYA,SAAS;EAKjB;AACJ;AACA;EAPYA,SAAS;EASjB;AACJ;AACA;EAXYA,SAAS;EAAA,OAATA,SAAS;AAAA;AAerB,WAAYC,oBAAoB,0BAApBA,oBAAoB;EAC5B;AACJ;AACA;EAHYA,oBAAoB;EAK5B;AACJ;AACA;EAPYA,oBAAoB;EAS5B;AACJ;AACA;EAXYA,oBAAoB;EAAA,OAApBA,oBAAoB;AAAA;AAsBhC,MAAMC,sBAAsB,GACxBC,cAAqD,IACZ;EACzC,OAAO,OAAOA,cAAc,KAAK,QAAQ;AAC7C,CAAC;AAQD;AACA;AACA;AACA;AACA,OAAO,MAAMC,qBAAqB,GAC9BC,eAA6C,IAC1B;EACnB,OAAOA,eAAe,CAACC,GA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IACzBD,KAAK,EAAEJ,QAAQ,CAAC3B;EACpB,CAAC,EACDmC,gBACJ,CAAC;EACDP,yBAAyB,CACrB;IACII,IAAI,EAAE,qBAAqB;IAC3BD,KAAK,EAAEJ,QAAQ,CAACY;EACpB,CAAC,EACDJ,gBACJ,CAAC;EAED,OAAOA,gBAAgB;AAC3B,CAAC;AAED,OAAO,MAAMK,4BAA4B,SAAS5B,6BAA6B,CAAC;EACrE6B,kBAAkB,GAAuBC,kBAAkB,CAACC,IAAI;AAC3E;AAEA,WAAYD,kBAAkB,0BAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["ProxyConfiguration","constructor","type","address","port","username","password","ProxyType","SOCKS","console","warn"],"sourceRoot":"../../src","sources":["ProxyConfiguration.tsx"],"mappings":"AAAA;AACA;AACA;AACA,MAAMA,kBAAkB,CAAC;EAIrBC,WAAWA;EACP;AACR;AACA;EACiBC,IAAe;EACxB;AACR;AACA;EACiBC,OAAe;EACxB;AACR;AACA;EACiBC,IAAY;EACrB;AACR;AACA;AACA;AACA;EACQC,QAAiB;EACjB;AACR;AACA;EACQC,QAAiB,EACnB;IAAA,KAnBWJ,IAAe,GAAfA,IAAe;IAAA,KAIfC,OAAe,GAAfA,OAAe;IAAA,KAIfC,IAAY,GAAZA,IAAY;IAYrB,IAAIC,QAAQ,IAAIC,QAAQ,EAAE;MACtB,IAAIJ,IAAI,KAAKK,SAAS,CAACC,KAAK,EAAE;QAC1BC,OAAO,CAACC,IAAI,CACR,iEACJ,CAAC;MACL,CAAC,MAAM;QACH,IAAI,CAACL,QAAQ,GAAGA,QAAQ;QACxB,IAAI,CAACC,QAAQ,GAAGA,QAAQ;MAC5B;IACJ;EACJ;AACJ;AAAC,IAEIC,SAAS,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA,EAATA,SAAS;AAMd,SAASP,kBAAkB,EAAEO,SAAS","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["SdkVerbosity"],"sourceRoot":"../../src","sources":["SdkVerbosity.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAYA,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["TrackingConsent"],"sourceRoot":"../../src","sources":["TrackingConsent.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAYA,eAAe,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["DdAttributes","errorSourceType","errorFingerprint","debugId"],"sourceRoot":"../../../src","sources":["rum/DdAttributes.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMA,YAAY,GAAG;EACxB;AACJ;AACA;AACA;AACA;EACIC,eAAe,EAAE,uBAAuB;EAExC;AACJ;AACA;AACA;EACIC,gBAAgB,EAAE,uBAAuB;EAEzC;AACJ;AACA;AACA;AACA;EACIC,OAAO,EAAE;AACb,CAAC","ignoreList":[]}
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
3
|
-
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
4
|
-
* Copyright 2016-Present Datadog, Inc.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { DatadogProviderConfiguration, DEFAULTS } from '../../DdSdkReactNativeConfiguration';
|
|
8
|
-
import { SdkVerbosity } from '../../SdkVerbosity';
|
|
9
|
-
import { TrackingConsent } from '../../TrackingConsent';
|
|
10
|
-
import { PropagatorType } from '../../rum/types';
|
|
11
|
-
export class FileBasedConfiguration extends DatadogProviderConfiguration {
|
|
12
|
-
constructor(params) {
|
|
13
|
-
const configuration = getJSONConfiguration(params?.configuration);
|
|
14
|
-
super(configuration.clientToken, configuration.env, configuration.applicationId, configuration.trackInteractions, configuration.trackResources, configuration.trackErrors, configuration.trackingConsent, configuration.useAccessibilityLabel);
|
|
15
|
-
this.longTaskThresholdMs = configuration.longTaskThresholdMs || DEFAULTS.longTaskThresholdMs;
|
|
16
|
-
this.verbosity = configuration.verbosity;
|
|
17
|
-
this.actionNameAttribute = configuration.actionNameAttribute;
|
|
18
|
-
this.site = configuration.site || DEFAULTS.site;
|
|
19
|
-
this.resourceTracingSamplingRate = configuration.resourceTracingSamplingRate || DEFAULTS.resourceTracingSamplingRate;
|
|
20
|
-
this.firstPartyHosts = configuration.firstPartyHosts || DEFAULTS.getFirstPartyHosts();
|
|
21
|
-
this.errorEventMapper = params?.errorEventMapper || DEFAULTS.errorEventMapper;
|
|
22
|
-
this.resourceEventMapper = params?.resourceEventMapper || DEFAULTS.resourceEventMapper;
|
|
23
|
-
this.actionEventMapper = params?.actionEventMapper || DEFAULTS.actionEventMapper;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
const resolveJSONConfiguration = userSpecifiedConfiguration => {
|
|
27
|
-
if (userSpecifiedConfiguration === undefined || userSpecifiedConfiguration === null) {
|
|
28
|
-
try {
|
|
29
|
-
// This corresponds to a file located at the root of a RN project.
|
|
30
|
-
// /!\ We have to write the require this way as dynamic requires are not supported by Hermes.
|
|
31
|
-
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
|
32
|
-
const jsonContent = require('../../../../../../datadog-configuration.json');
|
|
33
|
-
if (typeof jsonContent !== 'object' || !jsonContent['configuration']) {
|
|
34
|
-
console.error(`Failed to parse the Datadog configuration file located at the root of the project.
|
|
35
|
-
Your configuration must validate the node_modules/@datadog/mobile-react-native/datadog-configuration.schema.json JSON schema.
|
|
36
|
-
You can use VSCode to check your configuration by adding the following line to your JSON file:
|
|
37
|
-
{
|
|
38
|
-
"$schema": "./node_modules/@datadog/mobile-react-native/datadog-configuration.schema.json",
|
|
39
|
-
}`);
|
|
40
|
-
return {};
|
|
41
|
-
}
|
|
42
|
-
return jsonContent.configuration;
|
|
43
|
-
} catch (error) {
|
|
44
|
-
console.error(`Failed to read Datadog configuration file at the root of the project.
|
|
45
|
-
If you don't have a datadog-configuration.json file at the same level as your node_modules directory,\
|
|
46
|
-
please use the following syntax:\n
|
|
47
|
-
new FileBasedConfiguration({configuration: require('./file/to/configuration-file.json')})
|
|
48
|
-
`);
|
|
49
|
-
return {};
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
if (typeof userSpecifiedConfiguration !== 'object' || !userSpecifiedConfiguration['configuration']) {
|
|
53
|
-
console.error(`Failed to parse the Datadog configuration file you provided.
|
|
54
|
-
Your configuration must validate the node_modules/@datadog/mobile-react-native/datadog-configuration.schema.json JSON schema.
|
|
55
|
-
You can use VSCode to check your configuration by adding the following line to your JSON file:
|
|
56
|
-
{
|
|
57
|
-
"$schema": "./node_modules/@datadog/mobile-react-native/datadog-configuration.schema.json",
|
|
58
|
-
}`);
|
|
59
|
-
return {};
|
|
60
|
-
}
|
|
61
|
-
return userSpecifiedConfiguration['configuration'];
|
|
62
|
-
};
|
|
63
|
-
export const getJSONConfiguration = userSpecifiedConfiguration => {
|
|
64
|
-
const configuration = resolveJSONConfiguration(userSpecifiedConfiguration);
|
|
65
|
-
return {
|
|
66
|
-
clientToken: configuration.clientToken,
|
|
67
|
-
env: configuration.env,
|
|
68
|
-
applicationId: configuration.applicationId,
|
|
69
|
-
trackInteractions: configuration.trackInteractions,
|
|
70
|
-
trackResources: configuration.trackResources,
|
|
71
|
-
trackErrors: configuration.trackErrors,
|
|
72
|
-
trackingConsent: buildTrackingConsent(configuration.trackingConsent),
|
|
73
|
-
longTaskThresholdMs: configuration.longTaskThresholdMs,
|
|
74
|
-
verbosity: buildSdkVerbosity(configuration.verbosity),
|
|
75
|
-
actionNameAttribute: configuration.actionNameAttribute,
|
|
76
|
-
resourceTracingSamplingRate: configuration.resourceTracingSamplingRate,
|
|
77
|
-
firstPartyHosts: buildFirstPartyHosts(configuration.firstPartyHosts),
|
|
78
|
-
site: configuration.site,
|
|
79
|
-
useAccessibilityLabel: configuration.useAccessibilityLabel
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
const buildFirstPartyHosts = firstPartyHosts => {
|
|
83
|
-
if (!firstPartyHosts) {
|
|
84
|
-
return undefined;
|
|
85
|
-
}
|
|
86
|
-
try {
|
|
87
|
-
return firstPartyHosts.map(({
|
|
88
|
-
match,
|
|
89
|
-
propagatorTypes
|
|
90
|
-
}) => ({
|
|
91
|
-
match,
|
|
92
|
-
propagatorTypes: propagatorTypes.map(formatPropagatorType)
|
|
93
|
-
}));
|
|
94
|
-
} catch (error) {
|
|
95
|
-
console.error(`Failed to parse the first party hosts from the Datadog configuration file you provided:
|
|
96
|
-
${error.message}
|
|
97
|
-
The first party hosts will not be set for this session.
|
|
98
|
-
`);
|
|
99
|
-
return undefined;
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
export const formatPropagatorType = propagatorType => {
|
|
103
|
-
switch (propagatorType.toLowerCase()) {
|
|
104
|
-
case 'b3':
|
|
105
|
-
{
|
|
106
|
-
return PropagatorType.B3;
|
|
107
|
-
}
|
|
108
|
-
case 'b3multi':
|
|
109
|
-
{
|
|
110
|
-
return PropagatorType.B3MULTI;
|
|
111
|
-
}
|
|
112
|
-
case 'datadog':
|
|
113
|
-
{
|
|
114
|
-
return PropagatorType.DATADOG;
|
|
115
|
-
}
|
|
116
|
-
case 'tracecontext':
|
|
117
|
-
{
|
|
118
|
-
return PropagatorType.TRACECONTEXT;
|
|
119
|
-
}
|
|
120
|
-
default:
|
|
121
|
-
{
|
|
122
|
-
throw new Error(`Failed to parse propagator type ${propagatorType}.`);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
const buildTrackingConsent = trackingConsent => {
|
|
127
|
-
if (trackingConsent === undefined) {
|
|
128
|
-
return undefined;
|
|
129
|
-
}
|
|
130
|
-
switch (trackingConsent.toLowerCase()) {
|
|
131
|
-
case 'granted':
|
|
132
|
-
{
|
|
133
|
-
return TrackingConsent.GRANTED;
|
|
134
|
-
}
|
|
135
|
-
case 'pending':
|
|
136
|
-
{
|
|
137
|
-
return TrackingConsent.PENDING;
|
|
138
|
-
}
|
|
139
|
-
case 'not_granted':
|
|
140
|
-
{
|
|
141
|
-
return TrackingConsent.NOT_GRANTED;
|
|
142
|
-
}
|
|
143
|
-
default:
|
|
144
|
-
{
|
|
145
|
-
return DEFAULTS.trackingConsent;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
const buildSdkVerbosity = verbosity => {
|
|
150
|
-
if (verbosity === undefined) {
|
|
151
|
-
return undefined;
|
|
152
|
-
}
|
|
153
|
-
switch (verbosity.toLowerCase()) {
|
|
154
|
-
case 'debug':
|
|
155
|
-
{
|
|
156
|
-
return SdkVerbosity.DEBUG;
|
|
157
|
-
}
|
|
158
|
-
case 'info':
|
|
159
|
-
{
|
|
160
|
-
return SdkVerbosity.INFO;
|
|
161
|
-
}
|
|
162
|
-
case 'warn':
|
|
163
|
-
{
|
|
164
|
-
return SdkVerbosity.WARN;
|
|
165
|
-
}
|
|
166
|
-
case 'error':
|
|
167
|
-
{
|
|
168
|
-
return SdkVerbosity.ERROR;
|
|
169
|
-
}
|
|
170
|
-
default:
|
|
171
|
-
{
|
|
172
|
-
return undefined;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
//# sourceMappingURL=FileBasedConfiguration.js.map
|