@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,341 @@
|
|
|
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 { PropagatorType } from '../rum/types';
|
|
8
|
+
import { DatadogProviderConfiguration } from './DatadogProviderConfiguration';
|
|
9
|
+
import { CORE_DEFAULTS } from './features/CoreConfiguration';
|
|
10
|
+
import { LogsConfiguration } from './features/LogsConfiguration';
|
|
11
|
+
import { RUM_DEFAULTS, RumConfiguration } from './features/RumConfiguration';
|
|
12
|
+
import { TraceConfiguration } from './features/TraceConfiguration';
|
|
13
|
+
import { SdkVerbosity } from './types/SdkVerbosity';
|
|
14
|
+
import { TrackingConsent } from './types/TrackingConsent';
|
|
15
|
+
import { ProxyConfiguration, BatchProcessingLevel, BatchSize, UploadFrequency, ProxyType, VitalsUpdateFrequency } from './types';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Helper function to remove undefined entries from the given Record
|
|
19
|
+
*/
|
|
20
|
+
const removeUndefinedEntries = obj => {
|
|
21
|
+
if (obj === undefined) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
return Object.fromEntries(Object.entries(obj).filter(([, value]) => value !== undefined));
|
|
25
|
+
};
|
|
26
|
+
export class FileBasedConfiguration extends DatadogProviderConfiguration {
|
|
27
|
+
constructor(params) {
|
|
28
|
+
const jsonConfiguration = getJSONConfiguration(params?.configuration);
|
|
29
|
+
const {
|
|
30
|
+
clientToken,
|
|
31
|
+
env,
|
|
32
|
+
trackingConsent,
|
|
33
|
+
...rest
|
|
34
|
+
} = jsonConfiguration;
|
|
35
|
+
if (clientToken === undefined || env === undefined || trackingConsent === undefined) {
|
|
36
|
+
console.warn('DATADOG: Warning - Malformed json configuration file - `clientToken`, `env` and `trackingConsent` are mandatory Core SDK properties.');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Configure Core SDK
|
|
40
|
+
const coreConfiguration = removeUndefinedEntries(rest);
|
|
41
|
+
super(clientToken, env, trackingConsent, coreConfiguration);
|
|
42
|
+
|
|
43
|
+
// Configure RUM
|
|
44
|
+
const rumConfig = removeUndefinedEntries(jsonConfiguration.rumConfiguration);
|
|
45
|
+
if (rumConfig) {
|
|
46
|
+
if (rumConfig.applicationId !== undefined) {
|
|
47
|
+
this.rumConfiguration = new RumConfiguration(rumConfig.applicationId, rumConfig.trackInteractions, rumConfig.trackResources, rumConfig.trackErrors, rumConfig);
|
|
48
|
+
this.rumConfiguration.errorEventMapper = params?.errorEventMapper ?? RUM_DEFAULTS.errorEventMapper;
|
|
49
|
+
this.rumConfiguration.resourceEventMapper = params?.resourceEventMapper ?? RUM_DEFAULTS.resourceEventMapper;
|
|
50
|
+
this.rumConfiguration.actionEventMapper = params?.actionEventMapper ?? RUM_DEFAULTS.actionEventMapper;
|
|
51
|
+
} else {
|
|
52
|
+
console.warn('DATADOG: Warning - Malformed RUM File Configuration - `applicationId` is undefined.');
|
|
53
|
+
this.rumConfiguration = undefined;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Configure Logs
|
|
58
|
+
const logsConfig = removeUndefinedEntries(jsonConfiguration.logsConfiguration);
|
|
59
|
+
if (logsConfig) {
|
|
60
|
+
this.logsConfiguration = new LogsConfiguration(logsConfig);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Configure Trace
|
|
64
|
+
const traceConfig = removeUndefinedEntries(jsonConfiguration.traceConfiguration);
|
|
65
|
+
if (traceConfig) {
|
|
66
|
+
this.traceConfiguration = new TraceConfiguration(traceConfig);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
const resolveJSONConfiguration = userSpecifiedConfiguration => {
|
|
71
|
+
if (typeof userSpecifiedConfiguration !== 'object') {
|
|
72
|
+
console.error(`Failed to parse the Datadog configuration file you provided.
|
|
73
|
+
Your configuration must validate the node_modules/@datadog/mobile-react-native/datadog-configuration.schema.json JSON schema.
|
|
74
|
+
You can use VSCode to check your configuration by adding the following line to your JSON file:
|
|
75
|
+
{
|
|
76
|
+
"$schema": "./node_modules/@datadog/mobile-react-native/datadog-configuration.schema.json",
|
|
77
|
+
}`);
|
|
78
|
+
return {};
|
|
79
|
+
}
|
|
80
|
+
return userSpecifiedConfiguration;
|
|
81
|
+
};
|
|
82
|
+
export const getJSONConfiguration = userSpecifiedConfiguration => {
|
|
83
|
+
const configuration = resolveJSONConfiguration(userSpecifiedConfiguration);
|
|
84
|
+
return {
|
|
85
|
+
additionalConfiguration: configuration.additionalConfiguration,
|
|
86
|
+
clientToken: configuration.clientToken,
|
|
87
|
+
env: configuration.env,
|
|
88
|
+
trackingConsent: buildTrackingConsent(configuration.trackingConsent),
|
|
89
|
+
verbosity: buildSdkVerbosity(configuration.verbosity),
|
|
90
|
+
site: configuration.site,
|
|
91
|
+
service: configuration.service,
|
|
92
|
+
version: configuration.version,
|
|
93
|
+
versionSuffix: configuration.versionSuffix,
|
|
94
|
+
batchSize: buildBatchSize(configuration.batchSize),
|
|
95
|
+
batchProcessingLevel: buildBatchProcessingLevel(configuration.batchProcessingLevel),
|
|
96
|
+
uploadFrequency: buildUploadFrequency(configuration.uploadFrequency),
|
|
97
|
+
proxyConfiguration: buildProxyConfiguration(configuration.proxyConfiguration),
|
|
98
|
+
...(configuration.rumConfiguration !== undefined && {
|
|
99
|
+
rumConfiguration: {
|
|
100
|
+
applicationId: configuration.rumConfiguration.applicationId,
|
|
101
|
+
firstPartyHosts: buildFirstPartyHosts(configuration.rumConfiguration.firstPartyHosts) || RUM_DEFAULTS.getFirstPartyHosts(),
|
|
102
|
+
useAccessibilityLabel: configuration.rumConfiguration.useAccessibilityLabel,
|
|
103
|
+
trackInteractions: configuration.rumConfiguration.trackInteractions,
|
|
104
|
+
trackResources: configuration.rumConfiguration.trackResources,
|
|
105
|
+
trackErrors: configuration.rumConfiguration.trackErrors,
|
|
106
|
+
nativeLongTaskThresholdMs: configuration.rumConfiguration.nativeLongTaskThresholdMs,
|
|
107
|
+
nativeCrashReportEnabled: configuration.rumConfiguration.nativeCrashReportEnabled,
|
|
108
|
+
longTaskThresholdMs: configuration.rumConfiguration.longTaskThresholdMs,
|
|
109
|
+
actionNameAttribute: configuration.rumConfiguration.actionNameAttribute,
|
|
110
|
+
customEndpoint: configuration.rumConfiguration.customEndpoint,
|
|
111
|
+
sessionSampleRate: configuration.rumConfiguration.sessionSampleRate,
|
|
112
|
+
resourceTraceSampleRate: configuration.rumConfiguration.resourceTraceSampleRate,
|
|
113
|
+
trackBackgroundEvents: configuration.rumConfiguration.trackBackgroundEvents,
|
|
114
|
+
trackFrustrations: configuration.rumConfiguration.trackFrustrations,
|
|
115
|
+
trackNonFatalAnrs: configuration.rumConfiguration.trackNonFatalAnrs,
|
|
116
|
+
trackWatchdogTerminations: configuration.rumConfiguration.trackWatchdogTerminations,
|
|
117
|
+
vitalsUpdateFrequency: buildVitalsUpdateFrequency(configuration.rumConfiguration.vitalsUpdateFrequency),
|
|
118
|
+
appHangThreshold: configuration.rumConfiguration.appHangThreshold,
|
|
119
|
+
initialResourceThreshold: configuration.rumConfiguration.initialResourceThreshold,
|
|
120
|
+
nativeViewTracking: configuration.rumConfiguration.nativeViewTracking,
|
|
121
|
+
trackMemoryWarnings: configuration.rumConfiguration.trackMemoryWarnings,
|
|
122
|
+
telemetrySampleRate: configuration.rumConfiguration.telemetrySampleRate,
|
|
123
|
+
nativeInteractionTracking: configuration.rumConfiguration.nativeInteractionTracking
|
|
124
|
+
}
|
|
125
|
+
}),
|
|
126
|
+
...(configuration.traceConfiguration !== undefined && {
|
|
127
|
+
traceConfiguration: {
|
|
128
|
+
customEndpoint: configuration.traceConfiguration.customEndpoint
|
|
129
|
+
}
|
|
130
|
+
}),
|
|
131
|
+
...(configuration.logsConfiguration !== undefined && {
|
|
132
|
+
logsConfiguration: {
|
|
133
|
+
bundleLogsWithRum: configuration.logsConfiguration.bundleLogsWithRum,
|
|
134
|
+
bundleLogsWithTraces: configuration.logsConfiguration.bundleLogsWithTraces,
|
|
135
|
+
customEndpoint: configuration.logsConfiguration.customEndpoint
|
|
136
|
+
}
|
|
137
|
+
})
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
const buildFirstPartyHosts = firstPartyHosts => {
|
|
141
|
+
if (!firstPartyHosts) {
|
|
142
|
+
return undefined;
|
|
143
|
+
}
|
|
144
|
+
try {
|
|
145
|
+
return firstPartyHosts.map(({
|
|
146
|
+
match,
|
|
147
|
+
propagatorTypes
|
|
148
|
+
}) => ({
|
|
149
|
+
match,
|
|
150
|
+
propagatorTypes: propagatorTypes.map(formatPropagatorType)
|
|
151
|
+
}));
|
|
152
|
+
} catch (error) {
|
|
153
|
+
console.error(`Failed to parse the first party hosts from the Datadog configuration file you provided:
|
|
154
|
+
${error.message}
|
|
155
|
+
The first party hosts will not be set for this session.
|
|
156
|
+
`);
|
|
157
|
+
return undefined;
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
export const formatPropagatorType = propagatorType => {
|
|
161
|
+
switch (propagatorType.toLowerCase()) {
|
|
162
|
+
case 'b3':
|
|
163
|
+
{
|
|
164
|
+
return PropagatorType.B3;
|
|
165
|
+
}
|
|
166
|
+
case 'b3multi':
|
|
167
|
+
{
|
|
168
|
+
return PropagatorType.B3MULTI;
|
|
169
|
+
}
|
|
170
|
+
case 'datadog':
|
|
171
|
+
{
|
|
172
|
+
return PropagatorType.DATADOG;
|
|
173
|
+
}
|
|
174
|
+
case 'tracecontext':
|
|
175
|
+
{
|
|
176
|
+
return PropagatorType.TRACECONTEXT;
|
|
177
|
+
}
|
|
178
|
+
default:
|
|
179
|
+
{
|
|
180
|
+
throw new Error(`Failed to parse propagator type ${propagatorType}.`);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
const buildTrackingConsent = trackingConsent => {
|
|
185
|
+
if (trackingConsent === undefined) {
|
|
186
|
+
return CORE_DEFAULTS.trackingConsent;
|
|
187
|
+
}
|
|
188
|
+
switch (trackingConsent.toLowerCase()) {
|
|
189
|
+
case 'granted':
|
|
190
|
+
{
|
|
191
|
+
return TrackingConsent.GRANTED;
|
|
192
|
+
}
|
|
193
|
+
case 'pending':
|
|
194
|
+
{
|
|
195
|
+
return TrackingConsent.PENDING;
|
|
196
|
+
}
|
|
197
|
+
case 'not_granted':
|
|
198
|
+
{
|
|
199
|
+
return TrackingConsent.NOT_GRANTED;
|
|
200
|
+
}
|
|
201
|
+
default:
|
|
202
|
+
{
|
|
203
|
+
return CORE_DEFAULTS.trackingConsent;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
const buildSdkVerbosity = verbosity => {
|
|
208
|
+
if (verbosity === undefined) {
|
|
209
|
+
return CORE_DEFAULTS.verbosity;
|
|
210
|
+
}
|
|
211
|
+
switch (verbosity.toLowerCase()) {
|
|
212
|
+
case 'debug':
|
|
213
|
+
{
|
|
214
|
+
return SdkVerbosity.DEBUG;
|
|
215
|
+
}
|
|
216
|
+
case 'info':
|
|
217
|
+
{
|
|
218
|
+
return SdkVerbosity.INFO;
|
|
219
|
+
}
|
|
220
|
+
case 'warn':
|
|
221
|
+
{
|
|
222
|
+
return SdkVerbosity.WARN;
|
|
223
|
+
}
|
|
224
|
+
case 'error':
|
|
225
|
+
{
|
|
226
|
+
return SdkVerbosity.ERROR;
|
|
227
|
+
}
|
|
228
|
+
default:
|
|
229
|
+
{
|
|
230
|
+
return undefined;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
const buildBatchSize = batchSize => {
|
|
235
|
+
if (batchSize === undefined) {
|
|
236
|
+
return CORE_DEFAULTS.batchSize;
|
|
237
|
+
}
|
|
238
|
+
switch (batchSize.toLowerCase()) {
|
|
239
|
+
case 'large':
|
|
240
|
+
return BatchSize.LARGE;
|
|
241
|
+
case 'medium':
|
|
242
|
+
return BatchSize.MEDIUM;
|
|
243
|
+
case 'small':
|
|
244
|
+
return BatchSize.SMALL;
|
|
245
|
+
default:
|
|
246
|
+
console.warn(`DATADOG: Warning - Malformed json configuration file - invalid batchSize: ${batchSize}. The default value will be used: ${CORE_DEFAULTS.batchSize}.`);
|
|
247
|
+
return CORE_DEFAULTS.batchSize;
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
const buildBatchProcessingLevel = batchProcessingLevel => {
|
|
251
|
+
if (batchProcessingLevel === undefined) {
|
|
252
|
+
return CORE_DEFAULTS.batchProcessingLevel;
|
|
253
|
+
}
|
|
254
|
+
switch (batchProcessingLevel.toLowerCase()) {
|
|
255
|
+
case 'high':
|
|
256
|
+
return BatchProcessingLevel.HIGH;
|
|
257
|
+
case 'medium':
|
|
258
|
+
return BatchProcessingLevel.MEDIUM;
|
|
259
|
+
case 'low':
|
|
260
|
+
return BatchProcessingLevel.LOW;
|
|
261
|
+
default:
|
|
262
|
+
console.warn(`DATADOG: Warning - Malformed json configuration file - invalid batchProcessingLevel: ${batchProcessingLevel}. The default value will be used: ${CORE_DEFAULTS.batchProcessingLevel}.`);
|
|
263
|
+
return CORE_DEFAULTS.batchProcessingLevel;
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
const buildUploadFrequency = uploadFrequency => {
|
|
267
|
+
if (uploadFrequency === undefined) {
|
|
268
|
+
return CORE_DEFAULTS.uploadFrequency;
|
|
269
|
+
}
|
|
270
|
+
switch (uploadFrequency.toLowerCase()) {
|
|
271
|
+
case 'frequent':
|
|
272
|
+
return UploadFrequency.FREQUENT;
|
|
273
|
+
case 'average':
|
|
274
|
+
return UploadFrequency.AVERAGE;
|
|
275
|
+
case 'rare':
|
|
276
|
+
return UploadFrequency.RARE;
|
|
277
|
+
default:
|
|
278
|
+
console.warn(`DATADOG: Warning - Malformed json configuration file - invalid uploadFrequency: ${uploadFrequency}. The default value will be used: ${CORE_DEFAULTS.uploadFrequency}.`);
|
|
279
|
+
return CORE_DEFAULTS.uploadFrequency;
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
const proxyConfigurationToString = proxyConfiguration => {
|
|
283
|
+
if (proxyConfiguration === undefined) {
|
|
284
|
+
return 'undefined';
|
|
285
|
+
}
|
|
286
|
+
try {
|
|
287
|
+
return JSON.stringify(proxyConfiguration, null, 2);
|
|
288
|
+
} catch (ignored) {
|
|
289
|
+
return String(proxyConfiguration);
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
const buildProxyType = proxyType => {
|
|
293
|
+
switch (proxyType.toLowerCase()) {
|
|
294
|
+
case 'http':
|
|
295
|
+
return ProxyType.HTTP;
|
|
296
|
+
case 'https':
|
|
297
|
+
return ProxyType.HTTPS;
|
|
298
|
+
case 'socks':
|
|
299
|
+
return ProxyType.SOCKS;
|
|
300
|
+
default:
|
|
301
|
+
console.warn(`DATADOG: Warning - Malformed json configuration file - invalid proxy type '${proxyType}' for proxyConfiguration.`);
|
|
302
|
+
return undefined;
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
const buildProxyConfiguration = proxyConfiguration => {
|
|
306
|
+
if (proxyConfiguration === undefined) {
|
|
307
|
+
return CORE_DEFAULTS.proxyConfiguration;
|
|
308
|
+
}
|
|
309
|
+
const {
|
|
310
|
+
rawType,
|
|
311
|
+
address,
|
|
312
|
+
port,
|
|
313
|
+
username,
|
|
314
|
+
password
|
|
315
|
+
} = proxyConfiguration;
|
|
316
|
+
const type = buildProxyType(rawType);
|
|
317
|
+
if (type === undefined || address === undefined || port === undefined) {
|
|
318
|
+
console.warn(`DATADOG: Warning - Malformed json configuration file - invalid proxyConfiguration: ${proxyConfigurationToString(proxyConfiguration)}. The default value will be used: ${CORE_DEFAULTS.proxyConfiguration}.`);
|
|
319
|
+
return CORE_DEFAULTS.proxyConfiguration;
|
|
320
|
+
}
|
|
321
|
+
return new ProxyConfiguration(type, address, port, username, password);
|
|
322
|
+
};
|
|
323
|
+
const buildVitalsUpdateFrequency = vitalsUpdateFrequency => {
|
|
324
|
+
if (vitalsUpdateFrequency === undefined) {
|
|
325
|
+
return RUM_DEFAULTS.vitalsUpdateFrequency;
|
|
326
|
+
}
|
|
327
|
+
switch (vitalsUpdateFrequency.toLowerCase()) {
|
|
328
|
+
case 'frequent':
|
|
329
|
+
return VitalsUpdateFrequency.FREQUENT;
|
|
330
|
+
case 'average':
|
|
331
|
+
return VitalsUpdateFrequency.AVERAGE;
|
|
332
|
+
case 'rare':
|
|
333
|
+
return VitalsUpdateFrequency.RARE;
|
|
334
|
+
case 'never':
|
|
335
|
+
return VitalsUpdateFrequency.NEVER;
|
|
336
|
+
default:
|
|
337
|
+
console.warn(`DATADOG: Warning - Malformed json configuration file - invalid vitalsUpdateFrequency: ${vitalsUpdateFrequency} for rumConfiguration. The default value will be used: ${RUM_DEFAULTS.vitalsUpdateFrequency}`);
|
|
338
|
+
return RUM_DEFAULTS.vitalsUpdateFrequency;
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
//# sourceMappingURL=FileBasedConfiguration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PropagatorType","DatadogProviderConfiguration","CORE_DEFAULTS","LogsConfiguration","RUM_DEFAULTS","RumConfiguration","TraceConfiguration","SdkVerbosity","TrackingConsent","ProxyConfiguration","BatchProcessingLevel","BatchSize","UploadFrequency","ProxyType","VitalsUpdateFrequency","removeUndefinedEntries","obj","undefined","Object","fromEntries","entries","filter","value","FileBasedConfiguration","constructor","params","jsonConfiguration","getJSONConfiguration","configuration","clientToken","env","trackingConsent","rest","console","warn","coreConfiguration","rumConfig","rumConfiguration","applicationId","trackInteractions","trackResources","trackErrors","errorEventMapper","resourceEventMapper","actionEventMapper","logsConfig","logsConfiguration","traceConfig","traceConfiguration","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","B3","B3MULTI","DATADOG","TRACECONTEXT","Error","GRANTED","PENDING","NOT_GRANTED","DEBUG","INFO","WARN","ERROR","LARGE","MEDIUM","SMALL","HIGH","LOW","FREQUENT","AVERAGE","RARE","proxyConfigurationToString","JSON","stringify","ignored","String","buildProxyType","proxyType","HTTP","HTTPS","SOCKS","rawType","address","port","username","password","type","NEVER"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,CAAC8H,IAAI,EAAEJ,OAAO,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,QAAQ,CAAC;AAC1E,CAAC;AAED,MAAMlD,0BAA0B,GAC5BD,qBAAyC,IACL;EACpC,IAAIA,qBAAqB,KAAKlE,SAAS,EAAE;IACrC,OAAOb,YAAY,CAAC+E,qBAAqB;EAC7C;EAEA,QAAQA,qBAAqB,CAACgB,WAAW,CAAC,CAAC;IACvC,KAAK,UAAU;MACX,OAAOrF,qBAAqB,CAACuG,QAAQ;IACzC,KAAK,SAAS;MACV,OAAOvG,qBAAqB,CAACwG,OAAO;IACxC,KAAK,MAAM;MACP,OAAOxG,qBAAqB,CAACyG,IAAI;IACrC,KAAK,OAAO;MACR,OAAOzG,qBAAqB,CAAC0H,KAAK;IACtC;MACIvG,OAAO,CAACC,IAAI,CACR,yFAAyFiD,qBAAqB,0DAA0D/E,YAAY,CAAC+E,qBAAqB,EAC9M,CAAC;MACD,OAAO/E,YAAY,CAAC+E,qBAAqB;EACjD;AACJ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["config/FileBasedConfiguration.type.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,45 @@
|
|
|
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 { LOGS_DEFAULTS } from '../features/LogsConfiguration';
|
|
8
|
+
import { RUM_DEFAULTS } from '../features/RumConfiguration';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Auto Instrumentation configuration passed to DatadogProvider.
|
|
12
|
+
* Does not include default values.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Parameters needed to start auto instrumentation. Includes default values.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* We could use `Proxy` instead of this function, but `Proxy` is not available on
|
|
21
|
+
* the older android jsc that can still be used.
|
|
22
|
+
*/
|
|
23
|
+
export const addDefaultValuesToAutoInstrumentationConfiguration = features => {
|
|
24
|
+
return {
|
|
25
|
+
rumConfiguration: {
|
|
26
|
+
useAccessibilityLabel: features.rumConfiguration.useAccessibilityLabel === undefined ? RUM_DEFAULTS.useAccessibilityLabel : features.rumConfiguration.useAccessibilityLabel,
|
|
27
|
+
trackInteractions: features.rumConfiguration.trackInteractions ?? RUM_DEFAULTS.trackInteractions,
|
|
28
|
+
trackResources: features.rumConfiguration.trackResources ?? RUM_DEFAULTS.trackResources,
|
|
29
|
+
trackErrors: features.rumConfiguration.trackErrors ?? RUM_DEFAULTS.trackErrors,
|
|
30
|
+
actionNameAttribute: features.rumConfiguration.actionNameAttribute ?? RUM_DEFAULTS.actionNameAttribute,
|
|
31
|
+
errorEventMapper: features.rumConfiguration.errorEventMapper === undefined ? RUM_DEFAULTS.errorEventMapper : features.rumConfiguration.errorEventMapper,
|
|
32
|
+
resourceEventMapper: features.rumConfiguration.resourceEventMapper === undefined ? RUM_DEFAULTS.resourceEventMapper : features.rumConfiguration.resourceEventMapper,
|
|
33
|
+
actionEventMapper: features.rumConfiguration.actionEventMapper === undefined ? RUM_DEFAULTS.actionEventMapper : features.rumConfiguration.actionEventMapper,
|
|
34
|
+
resourceTraceSampleRate: features.rumConfiguration.resourceTraceSampleRate === undefined ? RUM_DEFAULTS.resourceTraceSampleRate : features.rumConfiguration.resourceTraceSampleRate,
|
|
35
|
+
nativeCrashReportEnabled: features.rumConfiguration.nativeCrashReportEnabled ?? RUM_DEFAULTS.nativeCrashReportEnabled,
|
|
36
|
+
nativeLongTaskThresholdMs: features.rumConfiguration.nativeLongTaskThresholdMs ?? RUM_DEFAULTS.nativeLongTaskThresholdMs,
|
|
37
|
+
nativeViewTracking: features.rumConfiguration.nativeViewTracking ?? RUM_DEFAULTS.nativeViewTracking,
|
|
38
|
+
firstPartyHosts: features.rumConfiguration.firstPartyHosts || RUM_DEFAULTS.getFirstPartyHosts()
|
|
39
|
+
},
|
|
40
|
+
logsConfiguration: {
|
|
41
|
+
logEventMapper: features.logsConfiguration.logEventMapper === undefined ? LOGS_DEFAULTS.logEventMapper : features.logsConfiguration.logEventMapper
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=AutoInstrumentationConfiguration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["LOGS_DEFAULTS","RUM_DEFAULTS","addDefaultValuesToAutoInstrumentationConfiguration","features","rumConfiguration","useAccessibilityLabel","undefined","trackInteractions","trackResources","trackErrors","actionNameAttribute","errorEventMapper","resourceEventMapper","actionEventMapper","resourceTraceSampleRate","nativeCrashReportEnabled","nativeLongTaskThresholdMs","nativeViewTracking","firstPartyHosts","getFirstPartyHosts","logsConfiguration","logEventMapper"],"sourceRoot":"../../../../src","sources":["config/async/AutoInstrumentationConfiguration.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAMA,SAASA,aAAa,QAAQ,+BAA+B;AAC7D,SAASC,YAAY,QAAQ,8BAA8B;;AAG3D;AACA;AACA;AACA;;AAsBA;AACA;AACA;;AAuBA;AACA;AACA;AACA;AACA,OAAO,MAAMC,kDAAkD,GAC3DC,QAA0C,IACV;EAChC,OAAO;IACHC,gBAAgB,EAAE;MACdC,qBAAqB,EACjBF,QAAQ,CAACC,gBAAgB,CAACC,qBAAqB,KAAKC,SAAS,GACvDL,YAAY,CAACI,qBAAqB,GAClCF,QAAQ,CAACC,gBAAgB,CAACC,qBAAqB;MACzDE,iBAAiB,EACbJ,QAAQ,CAACC,gBAAgB,CAACG,iBAAiB,IAC3CN,YAAY,CAACM,iBAAiB;MAClCC,cAAc,EACVL,QAAQ,CAACC,gBAAgB,CAACI,cAAc,IACxCP,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qB,cAAc,GAC5BlB,QAAQ,CAACiB,iBAAiB,CAACC;IACzC;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["config/async/PartialInitializationConfiguration.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
import { CoreConfiguration } from '../features/CoreConfiguration';
|
|
7
|
+
import { LogsConfiguration } from '../features/LogsConfiguration';
|
|
8
|
+
import { RumConfiguration } from '../features/RumConfiguration';
|
|
9
|
+
export const buildConfigurationFromPartialConfiguration = (features, configuration) => {
|
|
10
|
+
const {
|
|
11
|
+
clientToken,
|
|
12
|
+
env
|
|
13
|
+
} = configuration;
|
|
14
|
+
const coreConfiguration = new CoreConfiguration(clientToken, env, configuration.trackingConsent, configuration);
|
|
15
|
+
|
|
16
|
+
// RUM
|
|
17
|
+
if (configuration.rumConfiguration?.applicationId !== undefined) {
|
|
18
|
+
coreConfiguration.rumConfiguration = new RumConfiguration(configuration.rumConfiguration.applicationId, features.rumConfiguration.trackInteractions, features.rumConfiguration.trackResources, features.rumConfiguration.trackErrors, {
|
|
19
|
+
...features.rumConfiguration,
|
|
20
|
+
...configuration.rumConfiguration
|
|
21
|
+
});
|
|
22
|
+
} else {
|
|
23
|
+
console.warn('DATADOG: Warning - Malformed RUM Configuration - `applicationId` is undefined');
|
|
24
|
+
coreConfiguration.rumConfiguration = undefined;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Logs
|
|
28
|
+
if (features.logsConfiguration.logEventMapper) {
|
|
29
|
+
coreConfiguration.logsConfiguration = new LogsConfiguration({
|
|
30
|
+
...configuration.logsConfiguration,
|
|
31
|
+
logEventMapper: features.logsConfiguration.logEventMapper
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
return coreConfiguration;
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=asyncInitializationHelper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CoreConfiguration","LogsConfiguration","RumConfiguration","buildConfigurationFromPartialConfiguration","features","configuration","clientToken","env","coreConfiguration","trackingConsent","rumConfiguration","applicationId","undefined","trackInteractions","trackResources","trackErrors","console","warn","logsConfiguration","logEventMapper"],"sourceRoot":"../../../../src","sources":["config/async/asyncInitializationHelper.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,SAASA,iBAAiB,QAAQ,+BAA+B;AACjE,SAASC,iBAAiB,QAAQ,+BAA+B;AACjE,SAASC,gBAAgB,QAAQ,8BAA8B;AAK/D,OAAO,MAAMC,0CAA0C,GAAGA,CACtDC,QAA0C,EAC1CC,aAAiD,KAC7B;EACpB,MAAM;IAAEC,WAAW;IAAEC;EAAI,CAAC,GAAGF,aAAa;EAE1C,MAAMG,iBAAiB,GAAG,IAAIR,iBAAiB,CAC3CM,WAAW,EACXC,GAAG,EACHF,aAAa,CAACI,eAAe,EAC7BJ,aACJ,CAAC;;EAED;EACA,IAAIA,aAAa,CAACK,gBAAgB,EAAEC,aAAa,KAAKC,SAAS,EAAE;IAC7DJ,iBAAiB,CAACE,gBAAgB,GAAG,IAAIR,gBAAgB,CACrDG,aAAa,CAACK,gBAAgB,CAACC,aAAa,EAC5CP,QAAQ,CAACM,gBAAgB,CAACG,iBAAiB,EAC3CT,QAAQ,CAACM,gBAAgB,CAACI,cAAc,EACxCV,QAAQ,CAACM,gBAAgB,CAACK,WAAW,EACrC;MAAE,GAAGX,QAAQ,CAACM,gBAAgB;MAAE,GAAGL,aAAa,CAACK;IAAiB,CACtE,CAAC;EACL,CAAC,MAAM;IACHM,OAAO,CAACC,IAAI,CACR,+EACJ,CAAC;IACDT,iBAAiB,CAACE,gBAAgB,GAAGE,SAAS;EAClD;;EAEA;EACA,IAAIR,QAAQ,CAACc,iBAAiB,CAACC,cAAc,EAAE;IAC3CX,iBAAiB,CAACU,iBAAiB,GAAG,IAAIjB,iBAAiB,CAAC;MACxD,GAAGI,aAAa,CAACa,iBAAiB;MAClCC,cAAc,EAAEf,QAAQ,CAACc,iBAAiB,CAACC;IAC/C,CAAC,CAAC;EACN;EAEA,OAAOX,iBAAiB;AAC5B,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,98 @@
|
|
|
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, BatchProcessingLevel, BatchSize, UploadFrequency } from '../types';
|
|
8
|
+
import { LogsConfiguration } from './LogsConfiguration';
|
|
9
|
+
import { RumConfiguration } from './RumConfiguration';
|
|
10
|
+
import { TraceConfiguration } from './TraceConfiguration';
|
|
11
|
+
const DEFAULTS = {
|
|
12
|
+
getAdditionalConfiguration: () => ({}),
|
|
13
|
+
attributeEncoders: [],
|
|
14
|
+
batchProcessingLevel: BatchProcessingLevel.MEDIUM,
|
|
15
|
+
batchSize: BatchSize.MEDIUM,
|
|
16
|
+
logsConfiguration: undefined,
|
|
17
|
+
proxyConfiguration: undefined,
|
|
18
|
+
rumConfiguration: undefined,
|
|
19
|
+
service: undefined,
|
|
20
|
+
site: 'US1',
|
|
21
|
+
traceConfiguration: undefined,
|
|
22
|
+
uploadFrequency: UploadFrequency.AVERAGE,
|
|
23
|
+
verbosity: undefined,
|
|
24
|
+
version: undefined,
|
|
25
|
+
versionSuffix: undefined,
|
|
26
|
+
trackingConsent: TrackingConsent.GRANTED
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The Core configuration class.
|
|
31
|
+
* Used to configure the SDK functionality at initialization.
|
|
32
|
+
*/
|
|
33
|
+
class CoreConfiguration {
|
|
34
|
+
// Additional Configuration
|
|
35
|
+
additionalConfiguration = DEFAULTS.getAdditionalConfiguration();
|
|
36
|
+
|
|
37
|
+
// Attribute Encoders
|
|
38
|
+
attributeEncoders = DEFAULTS.attributeEncoders;
|
|
39
|
+
|
|
40
|
+
// Batch Processing Level
|
|
41
|
+
batchProcessingLevel = DEFAULTS.batchProcessingLevel;
|
|
42
|
+
|
|
43
|
+
// Batch Size
|
|
44
|
+
batchSize = DEFAULTS.batchSize;
|
|
45
|
+
|
|
46
|
+
// Logs Configuration
|
|
47
|
+
logsConfiguration = DEFAULTS.logsConfiguration;
|
|
48
|
+
|
|
49
|
+
// Proxy Configuration
|
|
50
|
+
proxyConfiguration = DEFAULTS.proxyConfiguration;
|
|
51
|
+
|
|
52
|
+
// RUM Configuration
|
|
53
|
+
rumConfiguration = DEFAULTS.rumConfiguration;
|
|
54
|
+
|
|
55
|
+
// Service Name
|
|
56
|
+
service = DEFAULTS.service;
|
|
57
|
+
|
|
58
|
+
// Datadog Site
|
|
59
|
+
site = DEFAULTS.site;
|
|
60
|
+
|
|
61
|
+
// Trace Configuration
|
|
62
|
+
traceConfiguration = DEFAULTS.traceConfiguration;
|
|
63
|
+
|
|
64
|
+
// Batch Upload Frequency
|
|
65
|
+
uploadFrequency = DEFAULTS.uploadFrequency;
|
|
66
|
+
|
|
67
|
+
// SDK Logs Verbosity
|
|
68
|
+
verbosity = DEFAULTS.verbosity;
|
|
69
|
+
|
|
70
|
+
// Custom Version Name
|
|
71
|
+
version = DEFAULTS.version;
|
|
72
|
+
|
|
73
|
+
// Custom Version Suffix
|
|
74
|
+
versionSuffix = DEFAULTS.versionSuffix;
|
|
75
|
+
constructor(clientToken, env, trackingConsent = DEFAULTS.trackingConsent, options = {}) {
|
|
76
|
+
this.clientToken = clientToken;
|
|
77
|
+
this.env = env;
|
|
78
|
+
this.trackingConsent = trackingConsent;
|
|
79
|
+
const {
|
|
80
|
+
rumConfiguration,
|
|
81
|
+
logsConfiguration,
|
|
82
|
+
traceConfiguration,
|
|
83
|
+
...rest
|
|
84
|
+
} = options;
|
|
85
|
+
Object.assign(this, rest);
|
|
86
|
+
if (rumConfiguration !== undefined) {
|
|
87
|
+
this.rumConfiguration = new RumConfiguration(rumConfiguration.applicationId, rumConfiguration.trackInteractions, rumConfiguration.trackResources, rumConfiguration.trackErrors, rumConfiguration);
|
|
88
|
+
}
|
|
89
|
+
if (logsConfiguration !== undefined) {
|
|
90
|
+
this.logsConfiguration = new LogsConfiguration(logsConfiguration);
|
|
91
|
+
}
|
|
92
|
+
if (traceConfiguration !== undefined) {
|
|
93
|
+
this.traceConfiguration = new TraceConfiguration(traceConfiguration);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
export { DEFAULTS as CORE_DEFAULTS, CoreConfiguration };
|
|
98
|
+
//# sourceMappingURL=CoreConfiguration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TrackingConsent","BatchProcessingLevel","BatchSize","UploadFrequency","LogsConfiguration","RumConfiguration","TraceConfiguration","DEFAULTS","getAdditionalConfiguration","attributeEncoders","batchProcessingLevel","MEDIUM","batchSize","logsConfiguration","undefined","proxyConfiguration","rumConfiguration","service","site","traceConfiguration","uploadFrequency","AVERAGE","verbosity","version","versionSuffix","trackingConsent","GRANTED","CoreConfiguration","additionalConfiguration","constructor","clientToken","env","options","rest","Object","assign","applicationId","trackInteractions","trackResources","trackErrors","CORE_DEFAULTS"],"sourceRoot":"../../../../src","sources":["config/features/CoreConfiguration.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAGA,SACIA,eAAe,EACfC,oBAAoB,EACpBC,SAAS,EACTC,eAAe,QACZ,UAAU;AAMjB,SAASC,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,gBAAgB,QAAQ,oBAA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EpD;EACOC,OAAO,GAAYhB,QAAQ,CAACgB,OAAO;;EAE1C;EACOC,aAAa,GAAYjB,QAAQ,CAACiB,aAAa;EAEtDK,WAAWA,CACEC,WAAmB,EACnBC,GAAW,EACXN,eAAgC,GAAGlB,QAAQ,CAACkB,eAAe,EACpEO,OAAiC,GAAG,CAAC,CAAC,EACxC;IAAA,KAJWF,WAAmB,GAAnBA,WAAmB;IAAA,KACnBC,GAAW,GAAXA,GAAW;IAAA,KACXN,eAAgC,GAAhCA,eAAgC;IAGzC,MAAM;MACFT,gBAAgB;MAChBH,iBAAiB;MACjBM,kBAAkB;MAClB,GAAGc;IACP,CAAC,GAAGD,OAAO;IAEXE,MAAM,CAACC,MAAM,CAAC,IAAI,EAAEF,IAAI,CAAC;IACzB,IAAIjB,gBAAgB,KAAKF,SAAS,EAAE;MAChC,IAAI,CAACE,gBAAgB,GAAG,IAAIX,gBAAgB,CACxCW,gBAAgB,CAACoB,aAAa,EAC9BpB,gBAAgB,CAACqB,iBAAiB,EAClCrB,gBAAgB,CAACsB,cAAc,EAC/BtB,gBAAgB,CAACuB,WAAW,EAC5BvB,gBACJ,CAAC;IACL;IAEA,IAAIH,iBAAiB,KAAKC,SAAS,EAAE;MACjC,IAAI,CAACD,iBAAiB,GAAG,IAAIT,iBAAiB,CAACS,iBAAiB,CAAC;IACrE;IAEA,IAAIM,kBAAkB,KAAKL,SAAS,EAAE;MAClC,IAAI,CAACK,kBAAkB,GAAG,IAAIb,kBAAkB,CAC5Ca,kBACJ,CAAC;IACL;EACJ;AACJ;AAEA,SAASZ,QAAQ,IAAIiC,aAAa,EAAEb,iBAAiB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["config/features/CoreConfiguration.type.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
/**
|
|
8
|
+
* A configuration object to initialize Datadog's features.
|
|
9
|
+
*/
|
|
10
|
+
export class DdSdkNativeConfiguration {
|
|
11
|
+
constructor(additionalConfiguration, clientToken, env, site, service, verbosity, trackingConsent, uploadFrequency, batchSize, batchProcessingLevel, proxyConfiguration, attributeEncoders, rumConfiguration, logsConfiguration, traceConfiguration, configurationForTelemetry // eslint-disable-next-line no-empty-function
|
|
12
|
+
) {
|
|
13
|
+
this.additionalConfiguration = additionalConfiguration;
|
|
14
|
+
this.clientToken = clientToken;
|
|
15
|
+
this.env = env;
|
|
16
|
+
this.site = site;
|
|
17
|
+
this.service = service;
|
|
18
|
+
this.verbosity = verbosity;
|
|
19
|
+
this.trackingConsent = trackingConsent;
|
|
20
|
+
this.uploadFrequency = uploadFrequency;
|
|
21
|
+
this.batchSize = batchSize;
|
|
22
|
+
this.batchProcessingLevel = batchProcessingLevel;
|
|
23
|
+
this.proxyConfiguration = proxyConfiguration;
|
|
24
|
+
this.attributeEncoders = attributeEncoders;
|
|
25
|
+
this.rumConfiguration = rumConfiguration;
|
|
26
|
+
this.logsConfiguration = logsConfiguration;
|
|
27
|
+
this.traceConfiguration = traceConfiguration;
|
|
28
|
+
this.configurationForTelemetry = configurationForTelemetry;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=CoreConfigurationNative.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DdSdkNativeConfiguration","constructor","additionalConfiguration","clientToken","env","site","service","verbosity","trackingConsent","uploadFrequency","batchSize","batchProcessingLevel","proxyConfiguration","attributeEncoders","rumConfiguration","logsConfiguration","traceConfiguration","configurationForTelemetry"],"sourceRoot":"../../../../src","sources":["config/features/CoreConfigurationNative.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA,OAAO,MAAMA,wBAAwB,CAAC;EAClCC,WAAWA,CACEC,uBAA+B,EAC/BC,WAAmB,EACnBC,GAAW,EACXC,IAAY,EACZC,OAA2B,EAC3BC,SAA6B,EAC7BC,eAAuB,EACvBC,eAAuB,EACvBC,SAAiB,EACjBC,oBAA0C,EAC1CC,kBAQM,EACNC,iBAA0C,EAC1CC,gBAAoD,EACpDC,iBAAsD,EACtDC,kBAAwD,EACxDC,yBAOR,CAAC;EAAA,EACJ;IAAA,KA/BWf,uBAA+B,GAA/BA,uBAA+B;IAAA,KAC/BC,WAAmB,GAAnBA,WAAmB;IAAA,KACnBC,GAAW,GAAXA,GAAW;IAAA,KACXC,IAAY,GAAZA,IAAY;IAAA,KACZC,OAA2B,GAA3BA,OAA2B;IAAA,KAC3BC,SAA6B,GAA7BA,SAA6B;IAAA,KAC7BC,eAAuB,GAAvBA,eAAuB;IAAA,KACvBC,eAAuB,GAAvBA,eAAuB;IAAA,KACvBC,SAAiB,GAAjBA,SAAiB;IAAA,KACjBC,oBAA0C,GAA1CA,oBAA0C;IAAA,KAC1CC,kBAQM,GARNA,kBAQM;IAAA,KACNC,iBAA0C,GAA1CA,iBAA0C;IAAA,KAC1CC,gBAAoD,GAApDA,gBAAoD;IAAA,KACpDC,iBAAsD,GAAtDA,iBAAsD;IAAA,KACtDC,kBAAwD,GAAxDA,kBAAwD;IAAA,KACxDC,yBAOR,GAPQA,yBAOR;EACF;AACP","ignoreList":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
const DEFAULTS = {
|
|
8
|
+
bundleLogsWithRum: true,
|
|
9
|
+
bundleLogsWithTraces: true,
|
|
10
|
+
customEndpoint: undefined,
|
|
11
|
+
logEventMapper: null
|
|
12
|
+
};
|
|
13
|
+
export class LogsConfiguration {
|
|
14
|
+
// Bundle Logs with RUM
|
|
15
|
+
bundleLogsWithRum = DEFAULTS.bundleLogsWithRum;
|
|
16
|
+
|
|
17
|
+
// Bundle Logs with Traces
|
|
18
|
+
bundleLogsWithTraces = DEFAULTS.bundleLogsWithTraces;
|
|
19
|
+
|
|
20
|
+
// Custom Endpoint URL
|
|
21
|
+
customEndpoint = DEFAULTS.customEndpoint;
|
|
22
|
+
|
|
23
|
+
// Custom Log Event Mapper
|
|
24
|
+
logEventMapper = DEFAULTS.logEventMapper;
|
|
25
|
+
constructor(options = {}) {
|
|
26
|
+
Object.assign(this, options);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export { DEFAULTS as LOGS_DEFAULTS };
|
|
30
|
+
//# sourceMappingURL=LogsConfiguration.js.map
|