@datadog/mobile-react-native 2.14.0 → 3.0.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 +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/datadog-sourcemaps.gradle +2 -1
- 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/metro/plugin/metroSerializer.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 +16 -27
- 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/metro/plugin/metroSerializer.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 +16 -26
- 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/metro/plugin/metroSerializer.ts +3 -3
- 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 +21 -35
- 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
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getJSONConfiguration = exports.formatPropagatorType = exports.FileBasedConfiguration = void 0;
|
|
7
|
+
var _types = require("../rum/types");
|
|
8
|
+
var _DatadogProviderConfiguration = require("./DatadogProviderConfiguration");
|
|
9
|
+
var _CoreConfiguration = require("./features/CoreConfiguration");
|
|
10
|
+
var _LogsConfiguration = require("./features/LogsConfiguration");
|
|
11
|
+
var _RumConfiguration = require("./features/RumConfiguration");
|
|
12
|
+
var _TraceConfiguration = require("./features/TraceConfiguration");
|
|
13
|
+
var _SdkVerbosity = require("./types/SdkVerbosity");
|
|
14
|
+
var _TrackingConsent = require("./types/TrackingConsent");
|
|
15
|
+
var _types2 = require("./types");
|
|
16
|
+
/*
|
|
17
|
+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
18
|
+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
19
|
+
* Copyright 2016-Present Datadog, Inc.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Helper function to remove undefined entries from the given Record
|
|
24
|
+
*/
|
|
25
|
+
const removeUndefinedEntries = obj => {
|
|
26
|
+
if (obj === undefined) {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
return Object.fromEntries(Object.entries(obj).filter(([, value]) => value !== undefined));
|
|
30
|
+
};
|
|
31
|
+
class FileBasedConfiguration extends _DatadogProviderConfiguration.DatadogProviderConfiguration {
|
|
32
|
+
constructor(params) {
|
|
33
|
+
const jsonConfiguration = getJSONConfiguration(params?.configuration);
|
|
34
|
+
const {
|
|
35
|
+
clientToken,
|
|
36
|
+
env,
|
|
37
|
+
trackingConsent,
|
|
38
|
+
...rest
|
|
39
|
+
} = jsonConfiguration;
|
|
40
|
+
if (clientToken === undefined || env === undefined || trackingConsent === undefined) {
|
|
41
|
+
console.warn('DATADOG: Warning - Malformed json configuration file - `clientToken`, `env` and `trackingConsent` are mandatory Core SDK properties.');
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Configure Core SDK
|
|
45
|
+
const coreConfiguration = removeUndefinedEntries(rest);
|
|
46
|
+
super(clientToken, env, trackingConsent, coreConfiguration);
|
|
47
|
+
|
|
48
|
+
// Configure RUM
|
|
49
|
+
const rumConfig = removeUndefinedEntries(jsonConfiguration.rumConfiguration);
|
|
50
|
+
if (rumConfig) {
|
|
51
|
+
if (rumConfig.applicationId !== undefined) {
|
|
52
|
+
this.rumConfiguration = new _RumConfiguration.RumConfiguration(rumConfig.applicationId, rumConfig.trackInteractions, rumConfig.trackResources, rumConfig.trackErrors, rumConfig);
|
|
53
|
+
this.rumConfiguration.errorEventMapper = params?.errorEventMapper ?? _RumConfiguration.RUM_DEFAULTS.errorEventMapper;
|
|
54
|
+
this.rumConfiguration.resourceEventMapper = params?.resourceEventMapper ?? _RumConfiguration.RUM_DEFAULTS.resourceEventMapper;
|
|
55
|
+
this.rumConfiguration.actionEventMapper = params?.actionEventMapper ?? _RumConfiguration.RUM_DEFAULTS.actionEventMapper;
|
|
56
|
+
} else {
|
|
57
|
+
console.warn('DATADOG: Warning - Malformed RUM File Configuration - `applicationId` is undefined.');
|
|
58
|
+
this.rumConfiguration = undefined;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Configure Logs
|
|
63
|
+
const logsConfig = removeUndefinedEntries(jsonConfiguration.logsConfiguration);
|
|
64
|
+
if (logsConfig) {
|
|
65
|
+
this.logsConfiguration = new _LogsConfiguration.LogsConfiguration(logsConfig);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Configure Trace
|
|
69
|
+
const traceConfig = removeUndefinedEntries(jsonConfiguration.traceConfiguration);
|
|
70
|
+
if (traceConfig) {
|
|
71
|
+
this.traceConfiguration = new _TraceConfiguration.TraceConfiguration(traceConfig);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.FileBasedConfiguration = FileBasedConfiguration;
|
|
76
|
+
const resolveJSONConfiguration = userSpecifiedConfiguration => {
|
|
77
|
+
if (typeof userSpecifiedConfiguration !== 'object') {
|
|
78
|
+
console.error(`Failed to parse the Datadog configuration file you provided.
|
|
79
|
+
Your configuration must validate the node_modules/@datadog/mobile-react-native/datadog-configuration.schema.json JSON schema.
|
|
80
|
+
You can use VSCode to check your configuration by adding the following line to your JSON file:
|
|
81
|
+
{
|
|
82
|
+
"$schema": "./node_modules/@datadog/mobile-react-native/datadog-configuration.schema.json",
|
|
83
|
+
}`);
|
|
84
|
+
return {};
|
|
85
|
+
}
|
|
86
|
+
return userSpecifiedConfiguration;
|
|
87
|
+
};
|
|
88
|
+
const getJSONConfiguration = userSpecifiedConfiguration => {
|
|
89
|
+
const configuration = resolveJSONConfiguration(userSpecifiedConfiguration);
|
|
90
|
+
return {
|
|
91
|
+
additionalConfiguration: configuration.additionalConfiguration,
|
|
92
|
+
clientToken: configuration.clientToken,
|
|
93
|
+
env: configuration.env,
|
|
94
|
+
trackingConsent: buildTrackingConsent(configuration.trackingConsent),
|
|
95
|
+
verbosity: buildSdkVerbosity(configuration.verbosity),
|
|
96
|
+
site: configuration.site,
|
|
97
|
+
service: configuration.service,
|
|
98
|
+
version: configuration.version,
|
|
99
|
+
versionSuffix: configuration.versionSuffix,
|
|
100
|
+
batchSize: buildBatchSize(configuration.batchSize),
|
|
101
|
+
batchProcessingLevel: buildBatchProcessingLevel(configuration.batchProcessingLevel),
|
|
102
|
+
uploadFrequency: buildUploadFrequency(configuration.uploadFrequency),
|
|
103
|
+
proxyConfiguration: buildProxyConfiguration(configuration.proxyConfiguration),
|
|
104
|
+
...(configuration.rumConfiguration !== undefined && {
|
|
105
|
+
rumConfiguration: {
|
|
106
|
+
applicationId: configuration.rumConfiguration.applicationId,
|
|
107
|
+
firstPartyHosts: buildFirstPartyHosts(configuration.rumConfiguration.firstPartyHosts) || _RumConfiguration.RUM_DEFAULTS.getFirstPartyHosts(),
|
|
108
|
+
useAccessibilityLabel: configuration.rumConfiguration.useAccessibilityLabel,
|
|
109
|
+
trackInteractions: configuration.rumConfiguration.trackInteractions,
|
|
110
|
+
trackResources: configuration.rumConfiguration.trackResources,
|
|
111
|
+
trackErrors: configuration.rumConfiguration.trackErrors,
|
|
112
|
+
nativeLongTaskThresholdMs: configuration.rumConfiguration.nativeLongTaskThresholdMs,
|
|
113
|
+
nativeCrashReportEnabled: configuration.rumConfiguration.nativeCrashReportEnabled,
|
|
114
|
+
longTaskThresholdMs: configuration.rumConfiguration.longTaskThresholdMs,
|
|
115
|
+
actionNameAttribute: configuration.rumConfiguration.actionNameAttribute,
|
|
116
|
+
customEndpoint: configuration.rumConfiguration.customEndpoint,
|
|
117
|
+
sessionSampleRate: configuration.rumConfiguration.sessionSampleRate,
|
|
118
|
+
resourceTraceSampleRate: configuration.rumConfiguration.resourceTraceSampleRate,
|
|
119
|
+
trackBackgroundEvents: configuration.rumConfiguration.trackBackgroundEvents,
|
|
120
|
+
trackFrustrations: configuration.rumConfiguration.trackFrustrations,
|
|
121
|
+
trackNonFatalAnrs: configuration.rumConfiguration.trackNonFatalAnrs,
|
|
122
|
+
trackWatchdogTerminations: configuration.rumConfiguration.trackWatchdogTerminations,
|
|
123
|
+
vitalsUpdateFrequency: buildVitalsUpdateFrequency(configuration.rumConfiguration.vitalsUpdateFrequency),
|
|
124
|
+
appHangThreshold: configuration.rumConfiguration.appHangThreshold,
|
|
125
|
+
initialResourceThreshold: configuration.rumConfiguration.initialResourceThreshold,
|
|
126
|
+
nativeViewTracking: configuration.rumConfiguration.nativeViewTracking,
|
|
127
|
+
trackMemoryWarnings: configuration.rumConfiguration.trackMemoryWarnings,
|
|
128
|
+
telemetrySampleRate: configuration.rumConfiguration.telemetrySampleRate,
|
|
129
|
+
nativeInteractionTracking: configuration.rumConfiguration.nativeInteractionTracking
|
|
130
|
+
}
|
|
131
|
+
}),
|
|
132
|
+
...(configuration.traceConfiguration !== undefined && {
|
|
133
|
+
traceConfiguration: {
|
|
134
|
+
customEndpoint: configuration.traceConfiguration.customEndpoint
|
|
135
|
+
}
|
|
136
|
+
}),
|
|
137
|
+
...(configuration.logsConfiguration !== undefined && {
|
|
138
|
+
logsConfiguration: {
|
|
139
|
+
bundleLogsWithRum: configuration.logsConfiguration.bundleLogsWithRum,
|
|
140
|
+
bundleLogsWithTraces: configuration.logsConfiguration.bundleLogsWithTraces,
|
|
141
|
+
customEndpoint: configuration.logsConfiguration.customEndpoint
|
|
142
|
+
}
|
|
143
|
+
})
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
exports.getJSONConfiguration = getJSONConfiguration;
|
|
147
|
+
const buildFirstPartyHosts = firstPartyHosts => {
|
|
148
|
+
if (!firstPartyHosts) {
|
|
149
|
+
return undefined;
|
|
150
|
+
}
|
|
151
|
+
try {
|
|
152
|
+
return firstPartyHosts.map(({
|
|
153
|
+
match,
|
|
154
|
+
propagatorTypes
|
|
155
|
+
}) => ({
|
|
156
|
+
match,
|
|
157
|
+
propagatorTypes: propagatorTypes.map(formatPropagatorType)
|
|
158
|
+
}));
|
|
159
|
+
} catch (error) {
|
|
160
|
+
console.error(`Failed to parse the first party hosts from the Datadog configuration file you provided:
|
|
161
|
+
${error.message}
|
|
162
|
+
The first party hosts will not be set for this session.
|
|
163
|
+
`);
|
|
164
|
+
return undefined;
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
const formatPropagatorType = propagatorType => {
|
|
168
|
+
switch (propagatorType.toLowerCase()) {
|
|
169
|
+
case 'b3':
|
|
170
|
+
{
|
|
171
|
+
return _types.PropagatorType.B3;
|
|
172
|
+
}
|
|
173
|
+
case 'b3multi':
|
|
174
|
+
{
|
|
175
|
+
return _types.PropagatorType.B3MULTI;
|
|
176
|
+
}
|
|
177
|
+
case 'datadog':
|
|
178
|
+
{
|
|
179
|
+
return _types.PropagatorType.DATADOG;
|
|
180
|
+
}
|
|
181
|
+
case 'tracecontext':
|
|
182
|
+
{
|
|
183
|
+
return _types.PropagatorType.TRACECONTEXT;
|
|
184
|
+
}
|
|
185
|
+
default:
|
|
186
|
+
{
|
|
187
|
+
throw new Error(`Failed to parse propagator type ${propagatorType}.`);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
exports.formatPropagatorType = formatPropagatorType;
|
|
192
|
+
const buildTrackingConsent = trackingConsent => {
|
|
193
|
+
if (trackingConsent === undefined) {
|
|
194
|
+
return _CoreConfiguration.CORE_DEFAULTS.trackingConsent;
|
|
195
|
+
}
|
|
196
|
+
switch (trackingConsent.toLowerCase()) {
|
|
197
|
+
case 'granted':
|
|
198
|
+
{
|
|
199
|
+
return _TrackingConsent.TrackingConsent.GRANTED;
|
|
200
|
+
}
|
|
201
|
+
case 'pending':
|
|
202
|
+
{
|
|
203
|
+
return _TrackingConsent.TrackingConsent.PENDING;
|
|
204
|
+
}
|
|
205
|
+
case 'not_granted':
|
|
206
|
+
{
|
|
207
|
+
return _TrackingConsent.TrackingConsent.NOT_GRANTED;
|
|
208
|
+
}
|
|
209
|
+
default:
|
|
210
|
+
{
|
|
211
|
+
return _CoreConfiguration.CORE_DEFAULTS.trackingConsent;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
const buildSdkVerbosity = verbosity => {
|
|
216
|
+
if (verbosity === undefined) {
|
|
217
|
+
return _CoreConfiguration.CORE_DEFAULTS.verbosity;
|
|
218
|
+
}
|
|
219
|
+
switch (verbosity.toLowerCase()) {
|
|
220
|
+
case 'debug':
|
|
221
|
+
{
|
|
222
|
+
return _SdkVerbosity.SdkVerbosity.DEBUG;
|
|
223
|
+
}
|
|
224
|
+
case 'info':
|
|
225
|
+
{
|
|
226
|
+
return _SdkVerbosity.SdkVerbosity.INFO;
|
|
227
|
+
}
|
|
228
|
+
case 'warn':
|
|
229
|
+
{
|
|
230
|
+
return _SdkVerbosity.SdkVerbosity.WARN;
|
|
231
|
+
}
|
|
232
|
+
case 'error':
|
|
233
|
+
{
|
|
234
|
+
return _SdkVerbosity.SdkVerbosity.ERROR;
|
|
235
|
+
}
|
|
236
|
+
default:
|
|
237
|
+
{
|
|
238
|
+
return undefined;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
const buildBatchSize = batchSize => {
|
|
243
|
+
if (batchSize === undefined) {
|
|
244
|
+
return _CoreConfiguration.CORE_DEFAULTS.batchSize;
|
|
245
|
+
}
|
|
246
|
+
switch (batchSize.toLowerCase()) {
|
|
247
|
+
case 'large':
|
|
248
|
+
return _types2.BatchSize.LARGE;
|
|
249
|
+
case 'medium':
|
|
250
|
+
return _types2.BatchSize.MEDIUM;
|
|
251
|
+
case 'small':
|
|
252
|
+
return _types2.BatchSize.SMALL;
|
|
253
|
+
default:
|
|
254
|
+
console.warn(`DATADOG: Warning - Malformed json configuration file - invalid batchSize: ${batchSize}. The default value will be used: ${_CoreConfiguration.CORE_DEFAULTS.batchSize}.`);
|
|
255
|
+
return _CoreConfiguration.CORE_DEFAULTS.batchSize;
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
const buildBatchProcessingLevel = batchProcessingLevel => {
|
|
259
|
+
if (batchProcessingLevel === undefined) {
|
|
260
|
+
return _CoreConfiguration.CORE_DEFAULTS.batchProcessingLevel;
|
|
261
|
+
}
|
|
262
|
+
switch (batchProcessingLevel.toLowerCase()) {
|
|
263
|
+
case 'high':
|
|
264
|
+
return _types2.BatchProcessingLevel.HIGH;
|
|
265
|
+
case 'medium':
|
|
266
|
+
return _types2.BatchProcessingLevel.MEDIUM;
|
|
267
|
+
case 'low':
|
|
268
|
+
return _types2.BatchProcessingLevel.LOW;
|
|
269
|
+
default:
|
|
270
|
+
console.warn(`DATADOG: Warning - Malformed json configuration file - invalid batchProcessingLevel: ${batchProcessingLevel}. The default value will be used: ${_CoreConfiguration.CORE_DEFAULTS.batchProcessingLevel}.`);
|
|
271
|
+
return _CoreConfiguration.CORE_DEFAULTS.batchProcessingLevel;
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
const buildUploadFrequency = uploadFrequency => {
|
|
275
|
+
if (uploadFrequency === undefined) {
|
|
276
|
+
return _CoreConfiguration.CORE_DEFAULTS.uploadFrequency;
|
|
277
|
+
}
|
|
278
|
+
switch (uploadFrequency.toLowerCase()) {
|
|
279
|
+
case 'frequent':
|
|
280
|
+
return _types2.UploadFrequency.FREQUENT;
|
|
281
|
+
case 'average':
|
|
282
|
+
return _types2.UploadFrequency.AVERAGE;
|
|
283
|
+
case 'rare':
|
|
284
|
+
return _types2.UploadFrequency.RARE;
|
|
285
|
+
default:
|
|
286
|
+
console.warn(`DATADOG: Warning - Malformed json configuration file - invalid uploadFrequency: ${uploadFrequency}. The default value will be used: ${_CoreConfiguration.CORE_DEFAULTS.uploadFrequency}.`);
|
|
287
|
+
return _CoreConfiguration.CORE_DEFAULTS.uploadFrequency;
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
const proxyConfigurationToString = proxyConfiguration => {
|
|
291
|
+
if (proxyConfiguration === undefined) {
|
|
292
|
+
return 'undefined';
|
|
293
|
+
}
|
|
294
|
+
try {
|
|
295
|
+
return JSON.stringify(proxyConfiguration, null, 2);
|
|
296
|
+
} catch (ignored) {
|
|
297
|
+
return String(proxyConfiguration);
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
const buildProxyType = proxyType => {
|
|
301
|
+
switch (proxyType.toLowerCase()) {
|
|
302
|
+
case 'http':
|
|
303
|
+
return _types2.ProxyType.HTTP;
|
|
304
|
+
case 'https':
|
|
305
|
+
return _types2.ProxyType.HTTPS;
|
|
306
|
+
case 'socks':
|
|
307
|
+
return _types2.ProxyType.SOCKS;
|
|
308
|
+
default:
|
|
309
|
+
console.warn(`DATADOG: Warning - Malformed json configuration file - invalid proxy type '${proxyType}' for proxyConfiguration.`);
|
|
310
|
+
return undefined;
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
const buildProxyConfiguration = proxyConfiguration => {
|
|
314
|
+
if (proxyConfiguration === undefined) {
|
|
315
|
+
return _CoreConfiguration.CORE_DEFAULTS.proxyConfiguration;
|
|
316
|
+
}
|
|
317
|
+
const {
|
|
318
|
+
rawType,
|
|
319
|
+
address,
|
|
320
|
+
port,
|
|
321
|
+
username,
|
|
322
|
+
password
|
|
323
|
+
} = proxyConfiguration;
|
|
324
|
+
const type = buildProxyType(rawType);
|
|
325
|
+
if (type === undefined || address === undefined || port === undefined) {
|
|
326
|
+
console.warn(`DATADOG: Warning - Malformed json configuration file - invalid proxyConfiguration: ${proxyConfigurationToString(proxyConfiguration)}. The default value will be used: ${_CoreConfiguration.CORE_DEFAULTS.proxyConfiguration}.`);
|
|
327
|
+
return _CoreConfiguration.CORE_DEFAULTS.proxyConfiguration;
|
|
328
|
+
}
|
|
329
|
+
return new _types2.ProxyConfiguration(type, address, port, username, password);
|
|
330
|
+
};
|
|
331
|
+
const buildVitalsUpdateFrequency = vitalsUpdateFrequency => {
|
|
332
|
+
if (vitalsUpdateFrequency === undefined) {
|
|
333
|
+
return _RumConfiguration.RUM_DEFAULTS.vitalsUpdateFrequency;
|
|
334
|
+
}
|
|
335
|
+
switch (vitalsUpdateFrequency.toLowerCase()) {
|
|
336
|
+
case 'frequent':
|
|
337
|
+
return _types2.VitalsUpdateFrequency.FREQUENT;
|
|
338
|
+
case 'average':
|
|
339
|
+
return _types2.VitalsUpdateFrequency.AVERAGE;
|
|
340
|
+
case 'rare':
|
|
341
|
+
return _types2.VitalsUpdateFrequency.RARE;
|
|
342
|
+
case 'never':
|
|
343
|
+
return _types2.VitalsUpdateFrequency.NEVER;
|
|
344
|
+
default:
|
|
345
|
+
console.warn(`DATADOG: Warning - Malformed json configuration file - invalid vitalsUpdateFrequency: ${vitalsUpdateFrequency} for rumConfiguration. The default value will be used: ${_RumConfiguration.RUM_DEFAULTS.vitalsUpdateFrequency}`);
|
|
346
|
+
return _RumConfiguration.RUM_DEFAULTS.vitalsUpdateFrequency;
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
//# sourceMappingURL=FileBasedConfiguration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_types","require","_DatadogProviderConfiguration","_CoreConfiguration","_LogsConfiguration","_RumConfiguration","_TraceConfiguration","_SdkVerbosity","_TrackingConsent","_types2","removeUndefinedEntries","obj","undefined","Object","fromEntries","entries","filter","value","FileBasedConfiguration","DatadogProviderConfiguration","constructor","params","jsonConfiguration","getJSONConfiguration","configuration","clientToken","env","trackingConsent","rest","console","warn","coreConfiguration","rumConfig","rumConfiguration","applicationId","RumConfiguration","trackInteractions","trackResources","trackErrors","errorEventMapper","RUM_DEFAULTS","resourceEventMapper","actionEventMapper","logsConfig","logsConfiguration","LogsConfiguration","traceConfig","traceConfiguration","TraceConfiguration","exports","resolveJSONConfiguration","userSpecifiedConfiguration","error","additionalConfiguration","buildTrackingConsent","verbosity","buildSdkVerbosity","site","service","version","versionSuffix","batchSize","buildBatchSize","batchProcessingLevel","buildBatchProcessingLevel","uploadFrequency","buildUploadFrequency","proxyConfiguration","buildProxyConfiguration","firstPartyHosts","buildFirstPartyHosts","getFirstPartyHosts","useAccessibilityLabel","nativeLongTaskThresholdMs","nativeCrashReportEnabled","longTaskThresholdMs","actionNameAttribute","customEndpoint","sessionSampleRate","resourceTraceSampleRate","trackBackgroundEvents","trackFrustrations","trackNonFatalAnrs","trackWatchdogTerminations","vitalsUpdateFrequency","buildVitalsUpdateFrequency","appHangThreshold","initialResourceThreshold","nativeViewTracking","trackMemoryWarnings","telemetrySampleRate","nativeInteractionTracking","bundleLogsWithRum","bundleLogsWithTraces","map","match","propagatorTypes","formatPropagatorType","message","propagatorType","toLowerCase","PropagatorType","B3","B3MULTI","DATADOG","TRACECONTEXT","Error","CORE_DEFAULTS","TrackingConsent","GRANTED","PENDING","NOT_GRANTED","SdkVerbosity","DEBUG","INFO","WARN","ERROR","BatchSize","LARGE","MEDIUM","SMALL","BatchProcessingLevel","HIGH","LOW","UploadFrequency","FREQUENT","AVERAGE","RARE","proxyConfigurationToString","JSON","stringify","ignored","String","buildProxyType","proxyType","ProxyType","HTTP","HTTPS","SOCKS","rawType","address","port","username","password","type","ProxyConfiguration","VitalsUpdateFrequency","NEVER"],"sourceRoot":"../../../src","sources":["config/FileBasedConfiguration.ts"],"mappings":";;;;;;AAUA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,6BAAA,GAAAD,OAAA;AAEA,IAAAE,kBAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,gBAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AApBA;AACA;AACA;AACA;AACA;;AAyBA;AACA;AACA;AACA,MAAMS,sBAAsB,GACxBC,GAAkB,IACO;EACzB,IAAIA,GA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;MACR,OAAOmB,6BAAqB,CAACC,KAAK;IACtC;MACItH,OAAO,CAACC,IAAI,CACR,yFAAyFsD,qBAAqB,0DAA0D5C,8BAAY,CAAC4C,qBAAqB,EAC9M,CAAC;MACD,OAAO5C,8BAAY,CAAC4C,qBAAqB;EACjD;AACJ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["config/FileBasedConfiguration.type.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.addDefaultValuesToAutoInstrumentationConfiguration = void 0;
|
|
7
|
+
var _LogsConfiguration = require("../features/LogsConfiguration");
|
|
8
|
+
var _RumConfiguration = require("../features/RumConfiguration");
|
|
9
|
+
/*
|
|
10
|
+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
11
|
+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
* Copyright 2016-Present Datadog, Inc.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Auto Instrumentation configuration passed to DatadogProvider.
|
|
17
|
+
* Does not include default values.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Parameters needed to start auto instrumentation. Includes default values.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* We could use `Proxy` instead of this function, but `Proxy` is not available on
|
|
26
|
+
* the older android jsc that can still be used.
|
|
27
|
+
*/
|
|
28
|
+
const addDefaultValuesToAutoInstrumentationConfiguration = features => {
|
|
29
|
+
return {
|
|
30
|
+
rumConfiguration: {
|
|
31
|
+
useAccessibilityLabel: features.rumConfiguration.useAccessibilityLabel === undefined ? _RumConfiguration.RUM_DEFAULTS.useAccessibilityLabel : features.rumConfiguration.useAccessibilityLabel,
|
|
32
|
+
trackInteractions: features.rumConfiguration.trackInteractions ?? _RumConfiguration.RUM_DEFAULTS.trackInteractions,
|
|
33
|
+
trackResources: features.rumConfiguration.trackResources ?? _RumConfiguration.RUM_DEFAULTS.trackResources,
|
|
34
|
+
trackErrors: features.rumConfiguration.trackErrors ?? _RumConfiguration.RUM_DEFAULTS.trackErrors,
|
|
35
|
+
actionNameAttribute: features.rumConfiguration.actionNameAttribute ?? _RumConfiguration.RUM_DEFAULTS.actionNameAttribute,
|
|
36
|
+
errorEventMapper: features.rumConfiguration.errorEventMapper === undefined ? _RumConfiguration.RUM_DEFAULTS.errorEventMapper : features.rumConfiguration.errorEventMapper,
|
|
37
|
+
resourceEventMapper: features.rumConfiguration.resourceEventMapper === undefined ? _RumConfiguration.RUM_DEFAULTS.resourceEventMapper : features.rumConfiguration.resourceEventMapper,
|
|
38
|
+
actionEventMapper: features.rumConfiguration.actionEventMapper === undefined ? _RumConfiguration.RUM_DEFAULTS.actionEventMapper : features.rumConfiguration.actionEventMapper,
|
|
39
|
+
resourceTraceSampleRate: features.rumConfiguration.resourceTraceSampleRate === undefined ? _RumConfiguration.RUM_DEFAULTS.resourceTraceSampleRate : features.rumConfiguration.resourceTraceSampleRate,
|
|
40
|
+
nativeCrashReportEnabled: features.rumConfiguration.nativeCrashReportEnabled ?? _RumConfiguration.RUM_DEFAULTS.nativeCrashReportEnabled,
|
|
41
|
+
nativeLongTaskThresholdMs: features.rumConfiguration.nativeLongTaskThresholdMs ?? _RumConfiguration.RUM_DEFAULTS.nativeLongTaskThresholdMs,
|
|
42
|
+
nativeViewTracking: features.rumConfiguration.nativeViewTracking ?? _RumConfiguration.RUM_DEFAULTS.nativeViewTracking,
|
|
43
|
+
firstPartyHosts: features.rumConfiguration.firstPartyHosts || _RumConfiguration.RUM_DEFAULTS.getFirstPartyHosts()
|
|
44
|
+
},
|
|
45
|
+
logsConfiguration: {
|
|
46
|
+
logEventMapper: features.logsConfiguration.logEventMapper === undefined ? _LogsConfiguration.LOGS_DEFAULTS.logEventMapper : features.logsConfiguration.logEventMapper
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
exports.addDefaultValuesToAutoInstrumentationConfiguration = addDefaultValuesToAutoInstrumentationConfiguration;
|
|
51
|
+
//# sourceMappingURL=AutoInstrumentationConfiguration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_LogsConfiguration","require","_RumConfiguration","addDefaultValuesToAutoInstrumentationConfiguration","features","rumConfiguration","useAccessibilityLabel","undefined","RUM_DEFAULTS","trackInteractions","trackResources","trackErrors","actionNameAttribute","errorEventMapper","resourceEventMapper","actionEventMapper","resourceTraceSampleRate","nativeCrashReportEnabled","nativeLongTaskThresholdMs","nativeViewTracking","firstPartyHosts","getFirstPartyHosts","logsConfiguration","logEventMapper","LOGS_DEFAULTS","exports"],"sourceRoot":"../../../../src","sources":["config/async/AutoInstrumentationConfiguration.ts"],"mappings":";;;;;;AAUA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAXA;AACA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;;AAsBA;AACA;AACA;;AAuBA;AACA;AACA;AACA;AACO,MAAME,kDAAkD,GAC3DC,QAA0C,IACV;EAChC,OAAO;IACHC,gBAAgB,EAAE;MACdC,qBAAqB,EACjBF,QAAQ,CAACC,gBAAgB,CAACC,qBAAqB,KAAKC,SAAS,GACvDC,8BAAY,CAACF,qBAAqB,GAClCF,QAAQ,CAACC,gBAAgB,CAACC,qBAAqB;MACzDG,iBAAiB,EACbL,QAAQ,CAACC,gBAAgB,CAACI,iBAAiB,IAC3CD,8BAAY,CAACC,iBAAiB;MAClCC,cAAc,EACVN,QAAQ,CAACC,gBAAgB,CAACK,cAAc,IACxCF,8BAAY,CAACE,cAAc;MAC/BC,WAAW,EACPP,QAAQ,CAACC,gBAAgB,CAACM,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C;EACJ,CAAC;AACL,CAAC;AAACE,OAAA,CAAAtB,kDAAA,GAAAA,kDAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["config/async/PartialInitializationConfiguration.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.buildConfigurationFromPartialConfiguration = void 0;
|
|
7
|
+
var _CoreConfiguration = require("../features/CoreConfiguration");
|
|
8
|
+
var _LogsConfiguration = require("../features/LogsConfiguration");
|
|
9
|
+
var _RumConfiguration = require("../features/RumConfiguration");
|
|
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
|
+
const buildConfigurationFromPartialConfiguration = (features, configuration) => {
|
|
17
|
+
const {
|
|
18
|
+
clientToken,
|
|
19
|
+
env
|
|
20
|
+
} = configuration;
|
|
21
|
+
const coreConfiguration = new _CoreConfiguration.CoreConfiguration(clientToken, env, configuration.trackingConsent, configuration);
|
|
22
|
+
|
|
23
|
+
// RUM
|
|
24
|
+
if (configuration.rumConfiguration?.applicationId !== undefined) {
|
|
25
|
+
coreConfiguration.rumConfiguration = new _RumConfiguration.RumConfiguration(configuration.rumConfiguration.applicationId, features.rumConfiguration.trackInteractions, features.rumConfiguration.trackResources, features.rumConfiguration.trackErrors, {
|
|
26
|
+
...features.rumConfiguration,
|
|
27
|
+
...configuration.rumConfiguration
|
|
28
|
+
});
|
|
29
|
+
} else {
|
|
30
|
+
console.warn('DATADOG: Warning - Malformed RUM Configuration - `applicationId` is undefined');
|
|
31
|
+
coreConfiguration.rumConfiguration = undefined;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Logs
|
|
35
|
+
if (features.logsConfiguration.logEventMapper) {
|
|
36
|
+
coreConfiguration.logsConfiguration = new _LogsConfiguration.LogsConfiguration({
|
|
37
|
+
...configuration.logsConfiguration,
|
|
38
|
+
logEventMapper: features.logsConfiguration.logEventMapper
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
return coreConfiguration;
|
|
42
|
+
};
|
|
43
|
+
exports.buildConfigurationFromPartialConfiguration = buildConfigurationFromPartialConfiguration;
|
|
44
|
+
//# sourceMappingURL=asyncInitializationHelper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_CoreConfiguration","require","_LogsConfiguration","_RumConfiguration","buildConfigurationFromPartialConfiguration","features","configuration","clientToken","env","coreConfiguration","CoreConfiguration","trackingConsent","rumConfiguration","applicationId","undefined","RumConfiguration","trackInteractions","trackResources","trackErrors","console","warn","logsConfiguration","logEventMapper","LogsConfiguration","exports"],"sourceRoot":"../../../../src","sources":["config/async/asyncInitializationHelper.tsx"],"mappings":";;;;;;AAKA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AAPA;AACA;AACA;AACA;AACA;;AAQO,MAAMG,0CAA0C,GAAGA,CACtDC,QAA0C,EAC1CC,aAAiD,KAC7B;EACpB,MAAM;IAAEC,WAAW;IAAEC;EAAI,CAAC,GAAGF,aAAa;EAE1C,MAAMG,iBAAiB,GAAG,IAAIC,oCAAiB,CAC3CH,WAAW,EACXC,GAAG,EACHF,aAAa,CAACK,eAAe,EAC7BL,aACJ,CAAC;;EAED;EACA,IAAIA,aAAa,CAACM,gBAAgB,EAAEC,aAAa,KAAKC,SAAS,EAAE;IAC7DL,iBAAiB,CAACG,gBAAgB,GAAG,IAAIG,kCAAgB,CACrDT,aAAa,CAACM,gBAAgB,CAACC,aAAa,EAC5CR,QAAQ,CAACO,gBAAgB,CAACI,iBAAiB,EAC3CX,QAAQ,CAACO,gBAAgB,CAACK,cAAc,EACxCZ,QAAQ,CAACO,gBAAgB,CAACM,WAAW,EACrC;MAAE,GAAGb,QAAQ,CAACO,gBAAgB;MAAE,GAAGN,aAAa,CAACM;IAAiB,CACtE,CAAC;EACL,CAAC,MAAM;IACHO,OAAO,CAACC,IAAI,CACR,+EACJ,CAAC;IACDX,iBAAiB,CAACG,gBAAgB,GAAGE,SAAS;EAClD;;EAEA;EACA,IAAIT,QAAQ,CAACgB,iBAAiB,CAACC,cAAc,EAAE;IAC3Cb,iBAAiB,CAACY,iBAAiB,GAAG,IAAIE,oCAAiB,CAAC;MACxD,GAAGjB,aAAa,CAACe,iBAAiB;MAClCC,cAAc,EAAEjB,QAAQ,CAACgB,iBAAiB,CAACC;IAC/C,CAAC,CAAC;EACN;EAEA,OAAOb,iBAAiB;AAC5B,CAAC;AAACe,OAAA,CAAApB,0CAAA,GAAAA,0CAAA","ignoreList":[]}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.CoreConfiguration = exports.CORE_DEFAULTS = void 0;
|
|
7
|
+
var _types = require("../types");
|
|
8
|
+
var _LogsConfiguration = require("./LogsConfiguration");
|
|
9
|
+
var _RumConfiguration = require("./RumConfiguration");
|
|
10
|
+
var _TraceConfiguration = require("./TraceConfiguration");
|
|
11
|
+
/*
|
|
12
|
+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
13
|
+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
14
|
+
* Copyright 2016-Present Datadog, Inc.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const DEFAULTS = exports.CORE_DEFAULTS = {
|
|
18
|
+
getAdditionalConfiguration: () => ({}),
|
|
19
|
+
attributeEncoders: [],
|
|
20
|
+
batchProcessingLevel: _types.BatchProcessingLevel.MEDIUM,
|
|
21
|
+
batchSize: _types.BatchSize.MEDIUM,
|
|
22
|
+
logsConfiguration: undefined,
|
|
23
|
+
proxyConfiguration: undefined,
|
|
24
|
+
rumConfiguration: undefined,
|
|
25
|
+
service: undefined,
|
|
26
|
+
site: 'US1',
|
|
27
|
+
traceConfiguration: undefined,
|
|
28
|
+
uploadFrequency: _types.UploadFrequency.AVERAGE,
|
|
29
|
+
verbosity: undefined,
|
|
30
|
+
version: undefined,
|
|
31
|
+
versionSuffix: undefined,
|
|
32
|
+
trackingConsent: _types.TrackingConsent.GRANTED
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The Core configuration class.
|
|
37
|
+
* Used to configure the SDK functionality at initialization.
|
|
38
|
+
*/
|
|
39
|
+
class CoreConfiguration {
|
|
40
|
+
// Additional Configuration
|
|
41
|
+
additionalConfiguration = DEFAULTS.getAdditionalConfiguration();
|
|
42
|
+
|
|
43
|
+
// Attribute Encoders
|
|
44
|
+
attributeEncoders = DEFAULTS.attributeEncoders;
|
|
45
|
+
|
|
46
|
+
// Batch Processing Level
|
|
47
|
+
batchProcessingLevel = DEFAULTS.batchProcessingLevel;
|
|
48
|
+
|
|
49
|
+
// Batch Size
|
|
50
|
+
batchSize = DEFAULTS.batchSize;
|
|
51
|
+
|
|
52
|
+
// Logs Configuration
|
|
53
|
+
logsConfiguration = DEFAULTS.logsConfiguration;
|
|
54
|
+
|
|
55
|
+
// Proxy Configuration
|
|
56
|
+
proxyConfiguration = DEFAULTS.proxyConfiguration;
|
|
57
|
+
|
|
58
|
+
// RUM Configuration
|
|
59
|
+
rumConfiguration = DEFAULTS.rumConfiguration;
|
|
60
|
+
|
|
61
|
+
// Service Name
|
|
62
|
+
service = DEFAULTS.service;
|
|
63
|
+
|
|
64
|
+
// Datadog Site
|
|
65
|
+
site = DEFAULTS.site;
|
|
66
|
+
|
|
67
|
+
// Trace Configuration
|
|
68
|
+
traceConfiguration = DEFAULTS.traceConfiguration;
|
|
69
|
+
|
|
70
|
+
// Batch Upload Frequency
|
|
71
|
+
uploadFrequency = DEFAULTS.uploadFrequency;
|
|
72
|
+
|
|
73
|
+
// SDK Logs Verbosity
|
|
74
|
+
verbosity = DEFAULTS.verbosity;
|
|
75
|
+
|
|
76
|
+
// Custom Version Name
|
|
77
|
+
version = DEFAULTS.version;
|
|
78
|
+
|
|
79
|
+
// Custom Version Suffix
|
|
80
|
+
versionSuffix = DEFAULTS.versionSuffix;
|
|
81
|
+
constructor(clientToken, env, trackingConsent = DEFAULTS.trackingConsent, options = {}) {
|
|
82
|
+
this.clientToken = clientToken;
|
|
83
|
+
this.env = env;
|
|
84
|
+
this.trackingConsent = trackingConsent;
|
|
85
|
+
const {
|
|
86
|
+
rumConfiguration,
|
|
87
|
+
logsConfiguration,
|
|
88
|
+
traceConfiguration,
|
|
89
|
+
...rest
|
|
90
|
+
} = options;
|
|
91
|
+
Object.assign(this, rest);
|
|
92
|
+
if (rumConfiguration !== undefined) {
|
|
93
|
+
this.rumConfiguration = new _RumConfiguration.RumConfiguration(rumConfiguration.applicationId, rumConfiguration.trackInteractions, rumConfiguration.trackResources, rumConfiguration.trackErrors, rumConfiguration);
|
|
94
|
+
}
|
|
95
|
+
if (logsConfiguration !== undefined) {
|
|
96
|
+
this.logsConfiguration = new _LogsConfiguration.LogsConfiguration(logsConfiguration);
|
|
97
|
+
}
|
|
98
|
+
if (traceConfiguration !== undefined) {
|
|
99
|
+
this.traceConfiguration = new _TraceConfiguration.TraceConfiguration(traceConfiguration);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
exports.CoreConfiguration = CoreConfiguration;
|
|
104
|
+
//# sourceMappingURL=CoreConfiguration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_types","require","_LogsConfiguration","_RumConfiguration","_TraceConfiguration","DEFAULTS","exports","CORE_DEFAULTS","getAdditionalConfiguration","attributeEncoders","batchProcessingLevel","BatchProcessingLevel","MEDIUM","batchSize","BatchSize","logsConfiguration","undefined","proxyConfiguration","rumConfiguration","service","site","traceConfiguration","uploadFrequency","UploadFrequency","AVERAGE","verbosity","version","versionSuffix","trackingConsent","TrackingConsent","GRANTED","CoreConfiguration","additionalConfiguration","constructor","clientToken","env","options","rest","Object","assign","RumConfiguration","applicationId","trackInteractions","trackResources","trackErrors","LogsConfiguration","TraceConfiguration"],"sourceRoot":"../../../../src","sources":["config/features/CoreConfiguration.ts"],"mappings":";;;;;;AAOA,IAAAA,MAAA,GAAAC,OAAA;AAWA,IAAAC,kBAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AApBA;AACA;AACA;AACA;AACA;;AAkBA,MAAMI,QAAQ,GAAAC,OAAA,CAAAC,aAAA,GAAG;EACbC,0BAA0B,EAAEA,CAAA,MAAO,CAAC,CAAC,CAAC;EACtCC,iBAAiB,EAAE,EAA6B;EAChDC,oBAAoB,EAAEC,2BAAoB,CAACC,MAAM;EACjDC,SAAS,EAAEC,gBAAS,CAACF,MAAM;EAC3BG,iBAAiB,EAAEC,SAAS;EAC5BC,kBAAkB,EAAED,SAAS;EAC7BE,gBAAgB,EAAEF,SAAS;EAC3BG,OAAO,EAAEH,SAAS;EAClBI,IAAI,EAAE,KAAK;EACXC,kBAAkB,EAAEL,SAAS;EAC7BM,eAAe,EAAEC,sBAAe,CAACC,OAAO;EACxCC,SAAS,EAAET,SAAS;EACpBU,OAAO,EAAEV,SAAS;EAClBW,aAAa,EAAEX,SAAS;EACxBY,eAAe,EAAEC,sBAAe,CAACC;AACrC,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAMC,iBAAiB,CAAkC;EACrD;EACOC,uBAAuB,GAE1B3B,QAAQ,CAACG,0BAA0B,CAAC,CAAC;;EAEzC;EACOC,iBAAiB,GACpBJ,QAAQ,C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,CAAC;IACL;IAEA,IAAIH,iBAAiB,KAAKC,SAAS,EAAE;MACjC,IAAI,CAACD,iBAAiB,GAAG,IAAI8B,oCAAiB,CAAC9B,iBAAiB,CAAC;IACrE;IAEA,IAAIM,kBAAkB,KAAKL,SAAS,EAAE;MAClC,IAAI,CAACK,kBAAkB,GAAG,IAAIyB,sCAAkB,CAC5CzB,kBACJ,CAAC;IACL;EACJ;AACJ;AAACf,OAAA,CAAAyB,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["config/features/CoreConfiguration.type.ts"],"mappings":"","ignoreList":[]}
|