@datadog/mobile-react-native 2.14.1 → 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/ios/Sources/AnyEncodable.swift +14 -7
- package/ios/Sources/Attributes.swift +0 -7
- package/ios/Sources/DatadogSDKWrapper.swift +12 -128
- package/ios/Sources/DdLogsImplementation.swift +9 -39
- package/ios/Sources/DdRum.mm +89 -1
- package/ios/Sources/DdRumImplementation.swift +79 -0
- package/ios/Sources/DdSdk.mm +76 -11
- package/ios/Sources/DdSdkConfiguration.swift +159 -117
- package/ios/Sources/DdSdkImplementation.swift +235 -82
- package/ios/Sources/DdSdkNativeInitialization.swift +116 -80
- package/ios/Sources/DdTelemetry.swift +49 -0
- package/ios/Sources/GlobalState.swift +1 -1
- package/ios/Sources/RNDdSdkConfiguration.swift +334 -172
- package/ios/Sources/SdkVersion.swift +1 -1
- package/jest/mock.js +43 -4
- package/lib/commonjs/DdAttributes.js.map +1 -0
- package/lib/commonjs/DdSdkReactNative.js +159 -56
- package/lib/commonjs/DdSdkReactNative.js.map +1 -1
- package/lib/commonjs/InternalLog.js +1 -1
- package/lib/commonjs/config/DatadogProviderConfiguration.js +25 -0
- package/lib/commonjs/config/DatadogProviderConfiguration.js.map +1 -0
- package/lib/commonjs/config/FileBasedConfiguration.js +349 -0
- package/lib/commonjs/config/FileBasedConfiguration.js.map +1 -0
- package/lib/commonjs/config/FileBasedConfiguration.type.js +6 -0
- package/lib/commonjs/config/FileBasedConfiguration.type.js.map +1 -0
- package/lib/commonjs/config/async/AutoInstrumentationConfiguration.js +51 -0
- package/lib/commonjs/config/async/AutoInstrumentationConfiguration.js.map +1 -0
- package/lib/commonjs/config/async/PartialInitializationConfiguration.js +6 -0
- package/lib/commonjs/config/async/PartialInitializationConfiguration.js.map +1 -0
- package/lib/commonjs/config/async/asyncInitializationHelper.js +44 -0
- package/lib/commonjs/config/async/asyncInitializationHelper.js.map +1 -0
- package/lib/commonjs/config/features/CoreConfiguration.js +104 -0
- package/lib/commonjs/config/features/CoreConfiguration.js.map +1 -0
- package/lib/commonjs/config/features/CoreConfiguration.type.js +6 -0
- package/lib/commonjs/config/features/CoreConfiguration.type.js.map +1 -0
- package/lib/commonjs/config/features/CoreConfigurationNative.js +38 -0
- package/lib/commonjs/config/features/CoreConfigurationNative.js.map +1 -0
- package/lib/commonjs/config/features/LogsConfiguration.js +36 -0
- package/lib/commonjs/config/features/LogsConfiguration.js.map +1 -0
- package/lib/commonjs/config/features/LogsConfiguration.type.js +6 -0
- package/lib/commonjs/config/features/LogsConfiguration.type.js.map +1 -0
- package/lib/commonjs/config/features/LogsConfigurationNative.js +2 -0
- package/lib/commonjs/config/features/LogsConfigurationNative.js.map +1 -0
- package/lib/commonjs/config/features/RumConfiguration.js +120 -0
- package/lib/commonjs/config/features/RumConfiguration.js.map +1 -0
- package/lib/commonjs/config/features/RumConfiguration.type.js +6 -0
- package/lib/commonjs/config/features/RumConfiguration.type.js.map +1 -0
- package/lib/commonjs/config/features/RumConfigurationNative.js +2 -0
- package/lib/commonjs/config/features/RumConfigurationNative.js.map +1 -0
- package/lib/commonjs/config/features/TraceConfiguration.js +24 -0
- package/lib/commonjs/config/features/TraceConfiguration.js.map +1 -0
- package/lib/commonjs/config/features/TraceConfiguration.type.js +2 -0
- package/lib/commonjs/config/features/TraceConfiguration.type.js.map +1 -0
- package/lib/commonjs/config/features/TraceConfigurationNative.js +2 -0
- package/lib/commonjs/config/features/TraceConfigurationNative.js.map +1 -0
- package/lib/commonjs/config/types/BatchProcessingLevel.js +30 -0
- package/lib/commonjs/config/types/BatchProcessingLevel.js.map +1 -0
- package/lib/commonjs/config/types/BatchSize.js +31 -0
- package/lib/commonjs/config/types/BatchSize.js.map +1 -0
- package/lib/commonjs/config/types/InitializationMode.js +17 -0
- package/lib/commonjs/config/types/InitializationMode.js.map +1 -0
- package/lib/commonjs/config/types/InitializationModeForTelemetry.js +2 -0
- package/lib/commonjs/config/types/InitializationModeForTelemetry.js.map +1 -0
- package/lib/commonjs/{ProxyConfiguration.js → config/types/ProxyConfiguration.js} +6 -0
- package/lib/commonjs/config/types/ProxyConfiguration.js.map +1 -0
- package/lib/commonjs/config/types/SdkVerbosity.js.map +1 -0
- package/lib/commonjs/config/types/TrackingConsent.js.map +1 -0
- package/lib/commonjs/config/types/UploadFrequency.js +30 -0
- package/lib/commonjs/config/types/UploadFrequency.js.map +1 -0
- package/lib/commonjs/config/types/VitalsUpdateFrequency.js +19 -0
- package/lib/commonjs/config/types/VitalsUpdateFrequency.js.map +1 -0
- package/lib/commonjs/config/types/index.js +68 -0
- package/lib/commonjs/config/types/index.js.map +1 -0
- package/lib/commonjs/index.js +51 -21
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/logs/DdLogs.js +13 -9
- package/lib/commonjs/logs/DdLogs.js.map +1 -1
- package/lib/commonjs/logs/eventMapper.js +4 -1
- package/lib/commonjs/logs/eventMapper.js.map +1 -1
- package/lib/commonjs/nativeModulesTypes.js +0 -45
- package/lib/commonjs/nativeModulesTypes.js.map +1 -1
- package/lib/commonjs/rum/DdRum.js +56 -28
- package/lib/commonjs/rum/DdRum.js.map +1 -1
- package/lib/commonjs/rum/helper.js +63 -0
- package/lib/commonjs/rum/helper.js.map +1 -0
- package/lib/commonjs/rum/instrumentation/DdRumErrorTracking.js +14 -18
- package/lib/commonjs/rum/instrumentation/DdRumErrorTracking.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js +15 -25
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdEventsInterceptor.js +1 -1
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js +15 -5
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/DdRumResourceTracking.js +34 -22
- package/lib/commonjs/rum/instrumentation/resourceTracking/DdRumResourceTracking.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.js +21 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js +16 -3
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js +10 -12
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.js +6 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.js.map +1 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js +41 -47
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.js +62 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.js.map +1 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/headers.js +36 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/headers.js.map +1 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js +19 -8
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js +90 -48
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js +1 -1
- package/lib/commonjs/rum/types.js +1 -9
- package/lib/commonjs/rum/types.js.map +1 -1
- package/lib/commonjs/sdk/AccountInfoSingleton/AccountInfoSingleton.js +46 -0
- package/lib/commonjs/sdk/AccountInfoSingleton/AccountInfoSingleton.js.map +1 -0
- package/lib/commonjs/sdk/AccountInfoSingleton/types.js +2 -0
- package/lib/commonjs/sdk/AccountInfoSingleton/types.js.map +1 -0
- package/lib/commonjs/sdk/AttributesEncoding/attributesEncoding.js +51 -0
- package/lib/commonjs/sdk/AttributesEncoding/attributesEncoding.js.map +1 -0
- package/lib/commonjs/sdk/AttributesEncoding/defaultEncoders.js +140 -0
- package/lib/commonjs/sdk/AttributesEncoding/defaultEncoders.js.map +1 -0
- package/lib/commonjs/{utils → sdk/AttributesEncoding}/errorUtils.js +39 -22
- package/lib/commonjs/sdk/AttributesEncoding/errorUtils.js.map +1 -0
- package/lib/commonjs/sdk/AttributesEncoding/helpers.js +123 -0
- package/lib/commonjs/sdk/AttributesEncoding/helpers.js.map +1 -0
- package/lib/commonjs/sdk/AttributesEncoding/types.js +2 -0
- package/lib/commonjs/sdk/AttributesEncoding/types.js.map +1 -0
- package/lib/commonjs/sdk/AttributesEncoding/utils.js +36 -0
- package/lib/commonjs/sdk/AttributesEncoding/utils.js.map +1 -0
- package/lib/commonjs/sdk/AttributesSingleton/AttributesSingleton.js +27 -1
- package/lib/commonjs/sdk/AttributesSingleton/AttributesSingleton.js.map +1 -1
- package/lib/commonjs/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.js +3 -3
- package/lib/commonjs/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.js.map +1 -1
- package/lib/commonjs/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.js +1 -1
- package/lib/commonjs/sdk/DatadogProvider/Buffer/BoundedBuffer.js +4 -4
- package/lib/commonjs/sdk/DatadogProvider/Buffer/BoundedBuffer.js.map +1 -1
- package/lib/commonjs/sdk/DatadogProvider/DatadogProvider.js +10 -9
- package/lib/commonjs/sdk/DatadogProvider/DatadogProvider.js.map +1 -1
- package/lib/commonjs/sdk/DatadogProvider/DatadogProviderState.js +28 -0
- package/lib/commonjs/sdk/DatadogProvider/DatadogProviderState.js.map +1 -0
- package/lib/commonjs/sdk/DdSdk.js +4 -2
- package/lib/commonjs/sdk/DdSdk.js.map +1 -1
- package/lib/commonjs/sdk/DdSdkInternal.js +86 -0
- package/lib/commonjs/sdk/DdSdkInternal.js.map +1 -0
- package/lib/commonjs/sdk/EventMappers/EventMapper.js +6 -3
- package/lib/commonjs/sdk/EventMappers/EventMapper.js.map +1 -1
- package/lib/commonjs/sdk/GlobalState/GlobalState.js +5 -11
- package/lib/commonjs/sdk/GlobalState/GlobalState.js.map +1 -1
- package/lib/commonjs/sdk/UserInfoSingleton/UserInfoSingleton.js +6 -1
- package/lib/commonjs/sdk/UserInfoSingleton/UserInfoSingleton.js.map +1 -1
- package/lib/commonjs/specs/NativeDdRum.js.map +1 -1
- package/lib/commonjs/specs/NativeDdSdk.js.map +1 -1
- package/lib/commonjs/trace/DdTrace.js +7 -5
- package/lib/commonjs/trace/DdTrace.js.map +1 -1
- package/lib/commonjs/types.js +19 -46
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/utils/longTasksUtils.js.map +1 -1
- package/lib/commonjs/utils/singletonUtils.js +21 -0
- package/lib/commonjs/utils/singletonUtils.js.map +1 -0
- package/lib/commonjs/version.js +1 -1
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/DdAttributes.js.map +1 -0
- package/lib/module/DdSdkReactNative.js +155 -52
- package/lib/module/DdSdkReactNative.js.map +1 -1
- package/lib/module/InternalLog.js +1 -1
- package/lib/module/InternalLog.js.map +1 -1
- package/lib/module/config/DatadogProviderConfiguration.js +18 -0
- package/lib/module/config/DatadogProviderConfiguration.js.map +1 -0
- package/lib/module/config/FileBasedConfiguration.js +341 -0
- package/lib/module/config/FileBasedConfiguration.js.map +1 -0
- package/lib/module/config/FileBasedConfiguration.type.js +2 -0
- package/lib/module/config/FileBasedConfiguration.type.js.map +1 -0
- package/lib/module/config/async/AutoInstrumentationConfiguration.js +45 -0
- package/lib/module/config/async/AutoInstrumentationConfiguration.js.map +1 -0
- package/lib/module/config/async/PartialInitializationConfiguration.js +2 -0
- package/lib/module/config/async/PartialInitializationConfiguration.js.map +1 -0
- package/lib/module/config/async/asyncInitializationHelper.js +36 -0
- package/lib/module/config/async/asyncInitializationHelper.js.map +1 -0
- package/lib/module/config/features/CoreConfiguration.js +98 -0
- package/lib/module/config/features/CoreConfiguration.js.map +1 -0
- package/lib/module/config/features/CoreConfiguration.type.js +2 -0
- package/lib/module/config/features/CoreConfiguration.type.js.map +1 -0
- package/lib/module/config/features/CoreConfigurationNative.js +31 -0
- package/lib/module/config/features/CoreConfigurationNative.js.map +1 -0
- package/lib/module/config/features/LogsConfiguration.js +30 -0
- package/lib/module/config/features/LogsConfiguration.js.map +1 -0
- package/lib/module/config/features/LogsConfiguration.type.js +2 -0
- package/lib/module/config/features/LogsConfiguration.type.js.map +1 -0
- package/lib/module/config/features/LogsConfigurationNative.js +2 -0
- package/lib/module/config/features/LogsConfigurationNative.js.map +1 -0
- package/lib/module/config/features/RumConfiguration.js +114 -0
- package/lib/module/config/features/RumConfiguration.js.map +1 -0
- package/lib/module/config/features/RumConfiguration.type.js +2 -0
- package/lib/module/config/features/RumConfiguration.type.js.map +1 -0
- package/lib/module/config/features/RumConfigurationNative.js +2 -0
- package/lib/module/config/features/RumConfigurationNative.js.map +1 -0
- package/lib/module/config/features/TraceConfiguration.js +18 -0
- package/lib/module/config/features/TraceConfiguration.js.map +1 -0
- package/lib/module/config/features/TraceConfiguration.type.js +2 -0
- package/lib/module/config/features/TraceConfiguration.type.js.map +1 -0
- package/lib/module/config/features/TraceConfigurationNative.js +2 -0
- package/lib/module/config/features/TraceConfigurationNative.js.map +1 -0
- package/lib/module/config/types/BatchProcessingLevel.js +25 -0
- package/lib/module/config/types/BatchProcessingLevel.js.map +1 -0
- package/lib/module/config/types/BatchSize.js +26 -0
- package/lib/module/config/types/BatchSize.js.map +1 -0
- package/lib/module/config/types/InitializationMode.js +11 -0
- package/lib/module/config/types/InitializationMode.js.map +1 -0
- package/lib/module/config/types/InitializationModeForTelemetry.js +2 -0
- package/lib/module/config/types/InitializationModeForTelemetry.js.map +1 -0
- package/lib/module/{ProxyConfiguration.js → config/types/ProxyConfiguration.js} +6 -0
- package/lib/module/config/types/ProxyConfiguration.js.map +1 -0
- package/lib/module/config/types/SdkVerbosity.js.map +1 -0
- package/lib/module/config/types/TrackingConsent.js.map +1 -0
- package/lib/module/config/types/UploadFrequency.js +25 -0
- package/lib/module/config/types/UploadFrequency.js.map +1 -0
- package/lib/module/config/types/VitalsUpdateFrequency.js +13 -0
- package/lib/module/config/types/VitalsUpdateFrequency.js.map +1 -0
- package/lib/module/config/types/index.js +15 -0
- package/lib/module/config/types/index.js.map +1 -0
- package/lib/module/index.js +13 -7
- package/lib/module/index.js.map +1 -1
- package/lib/module/logs/DdLogs.js +13 -9
- package/lib/module/logs/DdLogs.js.map +1 -1
- package/lib/module/logs/eventMapper.js +4 -1
- package/lib/module/logs/eventMapper.js.map +1 -1
- package/lib/module/nativeModulesTypes.js +1 -43
- package/lib/module/nativeModulesTypes.js.map +1 -1
- package/lib/module/rum/DdRum.js +54 -26
- package/lib/module/rum/DdRum.js.map +1 -1
- package/lib/module/rum/helper.js +49 -0
- package/lib/module/rum/helper.js.map +1 -0
- package/lib/module/rum/instrumentation/DdRumErrorTracking.js +14 -18
- package/lib/module/rum/instrumentation/DdRumErrorTracking.js.map +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js +15 -24
- package/lib/module/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js.map +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/DdEventsInterceptor.js +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/DdEventsInterceptor.js.map +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js +15 -5
- package/lib/module/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/DdRumResourceTracking.js +33 -21
- package/lib/module/rum/instrumentation/resourceTracking/DdRumResourceTracking.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.js +22 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js +13 -2
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js +10 -11
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.js +2 -0
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.js.map +1 -0
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js +27 -33
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.js +54 -0
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.js.map +1 -0
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/headers.js +30 -0
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/headers.js.map +1 -0
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js +14 -3
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js +90 -48
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js.map +1 -1
- package/lib/module/rum/types.js +0 -9
- package/lib/module/rum/types.js.map +1 -1
- package/lib/module/sdk/AccountInfoSingleton/AccountInfoSingleton.js +39 -0
- package/lib/module/sdk/AccountInfoSingleton/AccountInfoSingleton.js.map +1 -0
- package/lib/module/sdk/AccountInfoSingleton/types.js +2 -0
- package/lib/module/sdk/AccountInfoSingleton/types.js.map +1 -0
- package/lib/module/sdk/AttributesEncoding/attributesEncoding.js +46 -0
- package/lib/module/sdk/AttributesEncoding/attributesEncoding.js.map +1 -0
- package/lib/module/sdk/AttributesEncoding/defaultEncoders.js +134 -0
- package/lib/module/sdk/AttributesEncoding/defaultEncoders.js.map +1 -0
- package/lib/module/{utils → sdk/AttributesEncoding}/errorUtils.js +37 -20
- package/lib/module/sdk/AttributesEncoding/errorUtils.js.map +1 -0
- package/lib/module/sdk/AttributesEncoding/helpers.js +115 -0
- package/lib/module/sdk/AttributesEncoding/helpers.js.map +1 -0
- package/lib/module/sdk/AttributesEncoding/types.js +2 -0
- package/lib/module/sdk/AttributesEncoding/types.js.map +1 -0
- package/lib/module/sdk/AttributesEncoding/utils.js +28 -0
- package/lib/module/sdk/AttributesEncoding/utils.js.map +1 -0
- package/lib/module/sdk/AttributesSingleton/AttributesSingleton.js +27 -1
- package/lib/module/sdk/AttributesSingleton/AttributesSingleton.js.map +1 -1
- package/lib/module/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.js +2 -2
- package/lib/module/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.js.map +1 -1
- package/lib/module/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.js +1 -1
- package/lib/module/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.js.map +1 -1
- package/lib/module/sdk/DatadogProvider/Buffer/BoundedBuffer.js +4 -4
- package/lib/module/sdk/DatadogProvider/Buffer/BoundedBuffer.js.map +1 -1
- package/lib/module/sdk/DatadogProvider/DatadogProvider.js +9 -8
- package/lib/module/sdk/DatadogProvider/DatadogProvider.js.map +1 -1
- package/lib/module/sdk/DatadogProvider/DatadogProviderState.js +21 -0
- package/lib/module/sdk/DatadogProvider/DatadogProviderState.js.map +1 -0
- package/lib/module/sdk/DdSdk.js +4 -4
- package/lib/module/sdk/DdSdk.js.map +1 -1
- package/lib/module/sdk/DdSdkInternal.js +80 -0
- package/lib/module/sdk/DdSdkInternal.js.map +1 -0
- package/lib/module/sdk/EventMappers/EventMapper.js +6 -3
- package/lib/module/sdk/EventMappers/EventMapper.js.map +1 -1
- package/lib/module/sdk/GlobalState/GlobalState.js +5 -10
- package/lib/module/sdk/GlobalState/GlobalState.js.map +1 -1
- package/lib/module/sdk/UserInfoSingleton/UserInfoSingleton.js +6 -1
- package/lib/module/sdk/UserInfoSingleton/UserInfoSingleton.js.map +1 -1
- package/lib/module/specs/NativeDdRum.js.map +1 -1
- package/lib/module/specs/NativeDdSdk.js.map +1 -1
- package/lib/module/trace/DdTrace.js +7 -6
- package/lib/module/trace/DdTrace.js.map +1 -1
- package/lib/module/types.js +22 -42
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/longTasksUtils.js.map +1 -1
- package/lib/module/utils/singletonUtils.js +14 -0
- package/lib/module/utils/singletonUtils.js.map +1 -0
- package/lib/module/version.js +1 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/DdAttributes.d.ts.map +1 -0
- package/lib/typescript/DdSdkReactNative.d.ts +49 -12
- package/lib/typescript/DdSdkReactNative.d.ts.map +1 -1
- package/lib/typescript/InternalLog.d.ts +1 -1
- package/lib/typescript/InternalLog.d.ts.map +1 -1
- package/lib/typescript/config/DatadogProviderConfiguration.d.ts +12 -0
- package/lib/typescript/config/DatadogProviderConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/FileBasedConfiguration.d.ts +17 -0
- package/lib/typescript/config/FileBasedConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/FileBasedConfiguration.type.d.ts +52 -0
- package/lib/typescript/config/FileBasedConfiguration.type.d.ts.map +1 -0
- package/lib/typescript/config/async/AutoInstrumentationConfiguration.d.ts +60 -0
- package/lib/typescript/config/async/AutoInstrumentationConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/async/PartialInitializationConfiguration.d.ts +47 -0
- package/lib/typescript/config/async/PartialInitializationConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/async/asyncInitializationHelper.d.ts +5 -0
- package/lib/typescript/config/async/asyncInitializationHelper.d.ts.map +1 -0
- package/lib/typescript/config/features/CoreConfiguration.d.ts +52 -0
- package/lib/typescript/config/features/CoreConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/features/CoreConfiguration.type.d.ts +90 -0
- package/lib/typescript/config/features/CoreConfiguration.type.d.ts.map +1 -0
- package/lib/typescript/config/features/CoreConfigurationNative.d.ts +54 -0
- package/lib/typescript/config/features/CoreConfigurationNative.d.ts.map +1 -0
- package/lib/typescript/config/features/LogsConfiguration.d.ts +17 -0
- package/lib/typescript/config/features/LogsConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/features/LogsConfiguration.type.d.ts +24 -0
- package/lib/typescript/config/features/LogsConfiguration.type.d.ts.map +1 -0
- package/lib/typescript/config/features/LogsConfigurationNative.d.ts +6 -0
- package/lib/typescript/config/features/LogsConfigurationNative.d.ts.map +1 -0
- package/lib/typescript/config/features/RumConfiguration.d.ts +66 -0
- package/lib/typescript/config/features/RumConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/features/RumConfiguration.type.d.ts +131 -0
- package/lib/typescript/config/features/RumConfiguration.type.d.ts.map +1 -0
- package/lib/typescript/config/features/RumConfigurationNative.d.ts +25 -0
- package/lib/typescript/config/features/RumConfigurationNative.d.ts.map +1 -0
- package/lib/typescript/config/features/TraceConfiguration.d.ts +10 -0
- package/lib/typescript/config/features/TraceConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/features/TraceConfiguration.type.d.ts +11 -0
- package/lib/typescript/config/features/TraceConfiguration.type.d.ts.map +1 -0
- package/lib/typescript/config/features/TraceConfigurationNative.d.ts +4 -0
- package/lib/typescript/config/features/TraceConfigurationNative.d.ts.map +1 -0
- package/lib/typescript/config/types/BatchProcessingLevel.d.ts +18 -0
- package/lib/typescript/config/types/BatchProcessingLevel.d.ts.map +1 -0
- package/lib/typescript/config/types/BatchSize.d.ts +19 -0
- package/lib/typescript/config/types/BatchSize.d.ts.map +1 -0
- package/lib/typescript/config/types/InitializationMode.d.ts +5 -0
- package/lib/typescript/config/types/InitializationMode.d.ts.map +1 -0
- package/lib/typescript/config/types/InitializationModeForTelemetry.d.ts +2 -0
- package/lib/typescript/config/types/InitializationModeForTelemetry.d.ts.map +1 -0
- package/lib/typescript/config/types/ProxyConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/types/SdkVerbosity.d.ts.map +1 -0
- package/lib/typescript/config/types/TrackingConsent.d.ts.map +1 -0
- package/lib/typescript/config/types/UploadFrequency.d.ts +18 -0
- package/lib/typescript/config/types/UploadFrequency.d.ts.map +1 -0
- package/lib/typescript/config/types/VitalsUpdateFrequency.d.ts +7 -0
- package/lib/typescript/config/types/VitalsUpdateFrequency.d.ts.map +1 -0
- package/lib/typescript/config/types/index.d.ts +10 -0
- package/lib/typescript/config/types/index.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +20 -9
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/logs/DdLogs.d.ts +2 -1
- package/lib/typescript/logs/DdLogs.d.ts.map +1 -1
- package/lib/typescript/logs/eventMapper.d.ts +3 -2
- package/lib/typescript/logs/eventMapper.d.ts.map +1 -1
- package/lib/typescript/logs/types.d.ts +1 -16
- package/lib/typescript/logs/types.d.ts.map +1 -1
- package/lib/typescript/nativeModulesTypes.d.ts +2 -15
- package/lib/typescript/nativeModulesTypes.d.ts.map +1 -1
- package/lib/typescript/rum/DdRum.d.ts +10 -1
- package/lib/typescript/rum/DdRum.d.ts.map +1 -1
- package/lib/typescript/rum/eventMappers/errorEventMapper.d.ts +1 -1
- package/lib/typescript/rum/eventMappers/errorEventMapper.d.ts.map +1 -1
- package/lib/typescript/rum/helper.d.ts +10 -0
- package/lib/typescript/rum/helper.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/DdRumErrorTracking.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.d.ts +6 -6
- package/lib/typescript/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.d.ts +7 -0
- package/lib/typescript/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/DdRumResourceTracking.d.ts +12 -6
- package/lib/typescript/rum/instrumentation/resourceTracking/DdRumResourceTracking.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.d.ts +8 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.d.ts +5 -17
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.d.ts +20 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.d.ts +3 -24
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.d.ts +12 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/headers.d.ts +24 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/headers.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.d.ts +2 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.d.ts +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.d.ts.map +1 -1
- package/lib/typescript/rum/types.d.ts +47 -7
- package/lib/typescript/rum/types.d.ts.map +1 -1
- package/lib/typescript/sdk/AccountInfoSingleton/AccountInfoSingleton.d.ts +15 -0
- package/lib/typescript/sdk/AccountInfoSingleton/AccountInfoSingleton.d.ts.map +1 -0
- package/lib/typescript/sdk/AccountInfoSingleton/types.d.ts +6 -0
- package/lib/typescript/sdk/AccountInfoSingleton/types.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesEncoding/attributesEncoding.d.ts +13 -0
- package/lib/typescript/sdk/AttributesEncoding/attributesEncoding.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesEncoding/defaultEncoders.d.ts +33 -0
- package/lib/typescript/sdk/AttributesEncoding/defaultEncoders.d.ts.map +1 -0
- package/lib/typescript/{utils → sdk/AttributesEncoding}/errorUtils.d.ts +4 -4
- package/lib/typescript/sdk/AttributesEncoding/errorUtils.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesEncoding/helpers.d.ts +17 -0
- package/lib/typescript/sdk/AttributesEncoding/helpers.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesEncoding/types.d.ts +21 -0
- package/lib/typescript/sdk/AttributesEncoding/types.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesEncoding/utils.d.ts +7 -0
- package/lib/typescript/sdk/AttributesEncoding/utils.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesSingleton/AttributesSingleton.d.ts +5 -1
- package/lib/typescript/sdk/AttributesSingleton/AttributesSingleton.d.ts.map +1 -1
- package/lib/typescript/sdk/DatadogProvider/DatadogProvider.d.ts +4 -3
- package/lib/typescript/sdk/DatadogProvider/DatadogProvider.d.ts.map +1 -1
- package/lib/typescript/sdk/DatadogProvider/DatadogProviderState.d.ts +9 -0
- package/lib/typescript/sdk/DatadogProvider/DatadogProviderState.d.ts.map +1 -0
- package/lib/typescript/sdk/DdSdk.d.ts +2 -3
- package/lib/typescript/sdk/DdSdk.d.ts.map +1 -1
- package/lib/typescript/sdk/DdSdkInternal.d.ts +39 -0
- package/lib/typescript/sdk/DdSdkInternal.d.ts.map +1 -0
- package/lib/typescript/sdk/EventMappers/EventMapper.d.ts +3 -1
- package/lib/typescript/sdk/EventMappers/EventMapper.d.ts.map +1 -1
- package/lib/typescript/sdk/GlobalState/GlobalState.d.ts +3 -3
- package/lib/typescript/sdk/GlobalState/GlobalState.d.ts.map +1 -1
- package/lib/typescript/sdk/UserInfoSingleton/UserInfoSingleton.d.ts +2 -1
- package/lib/typescript/sdk/UserInfoSingleton/UserInfoSingleton.d.ts.map +1 -1
- package/lib/typescript/sdk/UserInfoSingleton/types.d.ts +1 -2
- package/lib/typescript/sdk/UserInfoSingleton/types.d.ts.map +1 -1
- package/lib/typescript/specs/NativeDdRum.d.ts +45 -0
- package/lib/typescript/specs/NativeDdRum.d.ts.map +1 -1
- package/lib/typescript/specs/NativeDdSdk.d.ts +34 -6
- package/lib/typescript/specs/NativeDdSdk.d.ts.map +1 -1
- package/lib/typescript/trace/DdTrace.d.ts +1 -2
- package/lib/typescript/trace/DdTrace.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +74 -92
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/utils/longTasksUtils.d.ts +1 -1
- package/lib/typescript/utils/longTasksUtils.d.ts.map +1 -1
- package/lib/typescript/utils/singletonUtils.d.ts +2 -0
- package/lib/typescript/utils/singletonUtils.d.ts.map +1 -0
- package/lib/typescript/version.d.ts +1 -1
- package/lib/typescript/version.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/DdSdkReactNative.tsx +246 -104
- package/src/InternalLog.tsx +1 -1
- package/src/__tests__/DdSdkReactNative.test.tsx +415 -207
- package/src/__tests__/DdSdkReactNativeConfiguration.test.ts +237 -153
- package/src/__tests__/InternalLog.test.tsx +1 -1
- package/src/__tests__/rum/instrumentation/DdEventsInterceptor.test.tsx +2 -2
- package/src/__tests__/rum/instrumentation/DdRumErrorTracking.test.tsx +139 -216
- package/src/__tests__/rum/instrumentation/DdRumUserInteractionTracking.test.tsx +10 -7
- package/src/config/DatadogProviderConfiguration.ts +17 -0
- package/src/config/FileBasedConfiguration.ts +464 -0
- package/src/config/FileBasedConfiguration.type.ts +66 -0
- package/src/config/__tests__/FileBasedConfiguration.test.ts +334 -0
- package/src/config/__tests__/__fixtures__/configuration-all-fields.json +57 -0
- package/src/config/__tests__/__fixtures__/malformed-configuration.json +4 -0
- package/src/config/async/AutoInstrumentationConfiguration.ts +126 -0
- package/src/config/async/PartialInitializationConfiguration.ts +58 -0
- package/src/config/async/asyncInitializationHelper.tsx +51 -0
- package/src/config/features/CoreConfiguration.ts +130 -0
- package/src/config/features/CoreConfiguration.type.ts +119 -0
- package/src/config/features/CoreConfigurationNative.ts +50 -0
- package/src/config/features/LogsConfiguration.ts +38 -0
- package/src/config/features/LogsConfiguration.type.ts +33 -0
- package/src/config/features/LogsConfigurationNative.ts +10 -0
- package/src/config/features/RumConfiguration.ts +137 -0
- package/src/config/features/RumConfiguration.type.ts +164 -0
- package/src/config/features/RumConfigurationNative.ts +26 -0
- package/src/config/features/TraceConfiguration.ts +24 -0
- package/src/config/features/TraceConfiguration.type.ts +17 -0
- package/src/config/features/TraceConfigurationNative.ts +8 -0
- package/src/config/types/BatchProcessingLevel.ts +23 -0
- package/src/config/types/BatchSize.ts +24 -0
- package/src/config/types/InitializationMode.ts +9 -0
- package/src/config/types/InitializationModeForTelemetry.ts +11 -0
- package/src/{ProxyConfiguration.tsx → config/types/ProxyConfiguration.ts} +6 -0
- package/src/config/types/UploadFrequency.tsx +23 -0
- package/src/config/types/VitalsUpdateFrequency.ts +11 -0
- package/src/config/types/index.ts +15 -0
- package/src/index.tsx +33 -16
- package/src/logs/DdLogs.ts +14 -13
- package/src/logs/__tests__/DdLogs.test.ts +60 -107
- package/src/logs/__tests__/eventMapper.test.ts +1 -1
- package/src/logs/eventMapper.ts +5 -4
- package/src/logs/types.ts +1 -20
- package/src/nativeModulesTypes.ts +2 -17
- package/src/rum/DdRum.ts +139 -42
- package/src/rum/__tests__/DdRum.test.ts +217 -47
- package/src/rum/eventMappers/errorEventMapper.ts +1 -1
- package/src/rum/helper.ts +62 -0
- package/src/rum/instrumentation/DdRumErrorTracking.tsx +20 -38
- package/src/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.ts +20 -32
- package/src/rum/instrumentation/interactionTracking/DdEventsInterceptor.tsx +1 -1
- package/src/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.tsx +18 -5
- package/src/rum/instrumentation/resourceTracking/DdRumResourceTracking.tsx +44 -23
- package/src/rum/instrumentation/resourceTracking/__tests__/DdRumResourceTracking.test.ts +2 -2
- package/src/rum/instrumentation/resourceTracking/__tests__/__utils__/XMLHttpRequestMock.ts +44 -23
- package/src/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.ts +24 -1
- package/src/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.tsx +17 -2
- package/src/rum/instrumentation/resourceTracking/distributedTracing/__tests__/distributedTracing.test.ts +327 -1
- package/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.tsx +22 -31
- package/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.ts +29 -0
- package/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.ts +54 -35
- package/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.ts +80 -0
- package/src/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.ts +1 -1
- package/src/rum/instrumentation/resourceTracking/distributedTracing/headers.ts +29 -0
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.ts +1 -1
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.ts +19 -7
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/__tests__/XHRProxy.test.ts +177 -119
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/__tests__/baggageHeaderUtils.test.ts +85 -13
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.ts +110 -52
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.ts +1 -1
- package/src/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.ts +1 -1
- package/src/rum/types.ts +68 -8
- package/src/sdk/AccountInfoSingleton/AccountInfoSingleton.ts +49 -0
- package/src/sdk/AccountInfoSingleton/__tests__/AccountInfoSingleton.test.ts +90 -0
- package/src/sdk/AccountInfoSingleton/types.ts +11 -0
- package/src/sdk/AttributesEncoding/__tests__/attributesEncoding.test.ts +518 -0
- package/src/sdk/AttributesEncoding/__tests__/defaultEncoders.test.ts +198 -0
- package/src/sdk/AttributesEncoding/attributesEncoding.ts +56 -0
- package/src/sdk/AttributesEncoding/defaultEncoders.ts +175 -0
- package/src/{utils → sdk/AttributesEncoding}/errorUtils.ts +50 -22
- package/src/sdk/AttributesEncoding/helpers.ts +176 -0
- package/src/sdk/AttributesEncoding/types.ts +33 -0
- package/src/sdk/AttributesEncoding/utils.ts +31 -0
- package/src/sdk/AttributesSingleton/AttributesSingleton.ts +25 -1
- package/src/sdk/AttributesSingleton/__tests__/AttributesSingleton.test.ts +52 -8
- package/src/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.tsx +2 -2
- package/src/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.tsx +1 -1
- package/src/sdk/DatadogInternalBridge/__tests__/DdSdkNativeBridge.test.tsx +1 -1
- package/src/sdk/DatadogProvider/Buffer/BoundedBuffer.ts +4 -4
- package/src/sdk/DatadogProvider/Buffer/__tests__/BoundedBuffer.test.ts +5 -5
- package/src/sdk/DatadogProvider/DatadogProvider.tsx +12 -16
- package/src/sdk/DatadogProvider/DatadogProviderState.ts +30 -0
- package/src/sdk/DatadogProvider/__tests__/__utils__/renderWithProvider.tsx +18 -7
- package/src/sdk/DatadogProvider/__tests__/initialization.test.tsx +59 -33
- package/src/sdk/DatadogProvider/__tests__/initializationModes.test.tsx +26 -10
- package/src/sdk/DdSdk.ts +8 -5
- package/src/sdk/DdSdkInternal.ts +121 -0
- package/src/sdk/EventMappers/EventMapper.ts +9 -4
- package/src/sdk/EventMappers/__tests__/EventMapper.test.ts +3 -3
- package/src/sdk/GlobalState/GlobalState.tsx +10 -11
- package/src/sdk/UserInfoSingleton/UserInfoSingleton.ts +9 -2
- package/src/sdk/UserInfoSingleton/__tests__/UserInfoSingleton.test.ts +46 -9
- package/src/sdk/UserInfoSingleton/types.ts +1 -4
- package/src/specs/NativeDdRum.ts +65 -0
- package/src/specs/NativeDdSdk.ts +40 -6
- package/src/trace/DdTrace.ts +11 -7
- package/src/trace/__tests__/DdTrace.test.ts +7 -8
- package/src/types.tsx +97 -76
- package/src/utils/__tests__/errorUtils.test.ts +1 -1
- package/src/utils/__tests__/singletonUtils.test.ts +75 -0
- package/src/utils/longTasksUtils.ts +1 -3
- package/src/utils/singletonUtils.ts +17 -0
- package/src/version.ts +1 -1
- package/lib/commonjs/DdSdkReactNativeConfiguration.js +0 -412
- package/lib/commonjs/DdSdkReactNativeConfiguration.js.map +0 -1
- package/lib/commonjs/ProxyConfiguration.js.map +0 -1
- package/lib/commonjs/SdkVerbosity.js.map +0 -1
- package/lib/commonjs/TrackingConsent.js.map +0 -1
- package/lib/commonjs/rum/DdAttributes.js.map +0 -1
- package/lib/commonjs/sdk/FileBasedConfiguration/FileBasedConfiguration.js +0 -185
- package/lib/commonjs/sdk/FileBasedConfiguration/FileBasedConfiguration.js.map +0 -1
- package/lib/commonjs/utils/argsUtils.js +0 -41
- package/lib/commonjs/utils/argsUtils.js.map +0 -1
- package/lib/commonjs/utils/errorUtils.js.map +0 -1
- package/lib/module/DdSdkReactNativeConfiguration.js +0 -403
- package/lib/module/DdSdkReactNativeConfiguration.js.map +0 -1
- package/lib/module/ProxyConfiguration.js.map +0 -1
- package/lib/module/SdkVerbosity.js.map +0 -1
- package/lib/module/TrackingConsent.js.map +0 -1
- package/lib/module/rum/DdAttributes.js.map +0 -1
- package/lib/module/sdk/FileBasedConfiguration/FileBasedConfiguration.js +0 -176
- package/lib/module/sdk/FileBasedConfiguration/FileBasedConfiguration.js.map +0 -1
- package/lib/module/utils/argsUtils.js +0 -35
- package/lib/module/utils/argsUtils.js.map +0 -1
- package/lib/module/utils/errorUtils.js.map +0 -1
- package/lib/typescript/DdSdkReactNativeConfiguration.d.ts +0 -376
- package/lib/typescript/DdSdkReactNativeConfiguration.d.ts.map +0 -1
- package/lib/typescript/ProxyConfiguration.d.ts.map +0 -1
- package/lib/typescript/SdkVerbosity.d.ts.map +0 -1
- package/lib/typescript/TrackingConsent.d.ts.map +0 -1
- package/lib/typescript/rum/DdAttributes.d.ts.map +0 -1
- package/lib/typescript/sdk/FileBasedConfiguration/FileBasedConfiguration.d.ts +0 -34
- package/lib/typescript/sdk/FileBasedConfiguration/FileBasedConfiguration.d.ts.map +0 -1
- package/lib/typescript/utils/argsUtils.d.ts +0 -8
- package/lib/typescript/utils/argsUtils.d.ts.map +0 -1
- package/lib/typescript/utils/errorUtils.d.ts.map +0 -1
- package/src/DdSdkReactNativeConfiguration.tsx +0 -582
- package/src/sdk/FileBasedConfiguration/FileBasedConfiguration.ts +0 -241
- package/src/sdk/FileBasedConfiguration/__tests__/FileBasedConfiguration.test.ts +0 -255
- package/src/sdk/FileBasedConfiguration/__tests__/__fixtures__/configuration-all-fields.json +0 -27
- package/src/sdk/FileBasedConfiguration/__tests__/__fixtures__/malformed-configuration.json +0 -5
- package/src/utils/__tests__/argsUtils.test.ts +0 -66
- package/src/utils/argsUtils.ts +0 -41
- /package/lib/commonjs/{rum/DdAttributes.js → DdAttributes.js} +0 -0
- /package/lib/commonjs/{SdkVerbosity.js → config/types/SdkVerbosity.js} +0 -0
- /package/lib/commonjs/{TrackingConsent.js → config/types/TrackingConsent.js} +0 -0
- /package/lib/module/{rum/DdAttributes.js → DdAttributes.js} +0 -0
- /package/lib/module/{SdkVerbosity.js → config/types/SdkVerbosity.js} +0 -0
- /package/lib/module/{TrackingConsent.js → config/types/TrackingConsent.js} +0 -0
- /package/lib/typescript/{rum/DdAttributes.d.ts → DdAttributes.d.ts} +0 -0
- /package/lib/typescript/{ProxyConfiguration.d.ts → config/types/ProxyConfiguration.d.ts} +0 -0
- /package/lib/typescript/{SdkVerbosity.d.ts → config/types/SdkVerbosity.d.ts} +0 -0
- /package/lib/typescript/{TrackingConsent.d.ts → config/types/TrackingConsent.d.ts} +0 -0
- /package/src/{rum/DdAttributes.ts → DdAttributes.ts} +0 -0
- /package/src/{SdkVerbosity.tsx → config/types/SdkVerbosity.ts} +0 -0
- /package/src/{TrackingConsent.tsx → config/types/TrackingConsent.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ERROR_EMPTY_STACKTRACE","exports","ERROR_EMPTY_MESSAGE","ERROR_DEFAULT_NAME","getErrorStackTrace","error","stack","undefined","String","stacktrace","componentStack","sourceURL","line","column","e","getErrorMessage","Error","message","toString","Object","prototype","getErrorName","name"],"sourceRoot":"../../../../src","sources":["sdk/AttributesEncoding/errorUtils.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACO,MAAMA,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG,EAAE;AACjC,MAAME,mBAAmB,GAAAD,OAAA,CAAAC,mBAAA,GAAG,eAAe;AAC3C,MAAMC,kBAAkB,GAAAF,OAAA,CAAAE,kBAAA,GAAG,OAAO;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,kBAAkB,GAAIC,KAAsB,IAAa;EAClE,IAAIC,KAAK,GAAGN,sBAAsB;EAElC,IAAI;IACA,IAAIK,KAAK,KAAKE,SAAS,IAAIF,KAAK,KAAK,IAAI,EAAE;MACvCC,KAAK,GAAGN,sBAAsB;IAClC,CAAC,MAAM,IAAI,OAAOK,KAAK,KAAK,QAAQ,EAAE;MAClCC,KAAK,GAAGN,sBAAsB;IAClC,CAAC,MAAM,IAAI,OAAOK,KAAK,K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ACE,OAAOG,MAAM,CAACH,KAAK,CAAC;EACxB;;EAEA;EACA,IACI,OAAOA,KAAK,EAAEa,QAAQ,KAAK,UAAU,IACrCb,KAAK,CAACa,QAAQ,KAAKC,MAAM,CAACC,SAAS,CAACF,QAAQ,EAC9C;IACE,OAAOb,KAAK,CAACa,QAAQ,CAAC,CAAC;EAC3B;;EAEA;EACA,OAAOhB,mBAAmB;AAC9B,CAAC;AAACD,OAAA,CAAAc,eAAA,GAAAA,eAAA;AAEK,MAAMM,YAAY,GAAIhB,KAAc,IAAa;EACpD,IAAI;IACA,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,KAAK,IAAI,EAAE;MAC7C,OAAOF,kBAAkB;IAC7B;IACA,IAAI,OAAQE,KAAK,CAASiB,IAAI,KAAK,QAAQ,EAAE;MACzC,OAAQjB,KAAK,CAASiB,IAAI;IAC9B;EACJ,CAAC,CAAC,OAAOR,CAAC,EAAE;IACR;EAAA;EAEJ,OAAOX,kBAAkB;AAC7B,CAAC;AAACF,OAAA,CAAAoB,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.applyEncoders = applyEncoders;
|
|
7
|
+
exports.encodeAttributesInPlace = encodeAttributesInPlace;
|
|
8
|
+
exports.sanitizeForJson = sanitizeForJson;
|
|
9
|
+
var _utils = require("./utils");
|
|
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 MAX_ATTRIBUTES = 128;
|
|
17
|
+
/**
|
|
18
|
+
* Recursive in-place encoder: flattens values into `out` dictionary.
|
|
19
|
+
* Never applies "context", that's only for the root.
|
|
20
|
+
*/
|
|
21
|
+
function encodeAttributesInPlace(input, out, path, encoders, context = {
|
|
22
|
+
numOfAttributes: 0
|
|
23
|
+
}) {
|
|
24
|
+
const value = applyEncoders(input, encoders);
|
|
25
|
+
|
|
26
|
+
// Nullish / primitive
|
|
27
|
+
if (value === null || value === undefined || typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
|
|
28
|
+
addEncodedAttribute(out, path, value, context);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Arrays
|
|
33
|
+
if (Array.isArray(value)) {
|
|
34
|
+
const normalize = x => {
|
|
35
|
+
const v = applyEncoders(x, encoders);
|
|
36
|
+
|
|
37
|
+
// Primitive / nullish are fine
|
|
38
|
+
if (v === null || v === undefined || typeof v === 'string' || typeof v === 'number' || typeof v === 'boolean') {
|
|
39
|
+
return v;
|
|
40
|
+
}
|
|
41
|
+
if ((0, _utils.isPlainObject)(v)) {
|
|
42
|
+
const nested = {};
|
|
43
|
+
encodeAttributesInPlace(v, nested, [], encoders, context);
|
|
44
|
+
return nested;
|
|
45
|
+
}
|
|
46
|
+
if (Array.isArray(v)) {
|
|
47
|
+
return v.map(normalize);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Unsupported
|
|
51
|
+
(0, _utils.warn)(`Dropped unsupported value in array at '${(0, _utils.formatPathForLog)(path)}': ${String(v)}`);
|
|
52
|
+
return undefined;
|
|
53
|
+
};
|
|
54
|
+
addEncodedAttribute(out, path, value.map(normalize).filter(item => item !== undefined), context);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Plain object
|
|
59
|
+
if ((0, _utils.isPlainObject)(value)) {
|
|
60
|
+
for (const [k, v] of Object.entries(value)) {
|
|
61
|
+
encodeAttributesInPlace(v, out, [...path, k], encoders, context);
|
|
62
|
+
}
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Unsupported
|
|
67
|
+
(0, _utils.warn)(`Dropped unsupported value at '${(0, _utils.formatPathForLog)(path)}': ${String(value)}`);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Sanitize unknown input to be JSON-serializable using encoders.
|
|
72
|
+
* This does not flatten—it's a pure sanitization pass (used by some encoders).
|
|
73
|
+
*/
|
|
74
|
+
function sanitizeForJson(value, encoders, context = {
|
|
75
|
+
numOfAttributes: 0
|
|
76
|
+
}) {
|
|
77
|
+
const v = applyEncoders(value, encoders);
|
|
78
|
+
|
|
79
|
+
// If still a plain object, sanitize shallowly
|
|
80
|
+
if ((0, _utils.isPlainObject)(v)) {
|
|
81
|
+
const out = {};
|
|
82
|
+
for (const [k, val] of Object.entries(v)) {
|
|
83
|
+
encodeAttributesInPlace(val, out, [k], encoders, context);
|
|
84
|
+
}
|
|
85
|
+
return out;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// If array, sanitize items
|
|
89
|
+
if (Array.isArray(v)) {
|
|
90
|
+
return v.map(item => sanitizeForJson(item, encoders, context));
|
|
91
|
+
}
|
|
92
|
+
return v;
|
|
93
|
+
}
|
|
94
|
+
function applyEncoders(value, encoders) {
|
|
95
|
+
for (const enc of encoders) {
|
|
96
|
+
try {
|
|
97
|
+
if (enc.check(value)) {
|
|
98
|
+
return enc.encode(value);
|
|
99
|
+
}
|
|
100
|
+
} catch (err) {
|
|
101
|
+
(0, _utils.warn)(`Encoder error: ${String(err)}`);
|
|
102
|
+
return undefined;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
// Not matched by any encoder; leave as-is for the visitor to decide
|
|
106
|
+
return value;
|
|
107
|
+
}
|
|
108
|
+
function addEncodedAttribute(out, path, value, context) {
|
|
109
|
+
if (context.numOfAttributes >= MAX_ATTRIBUTES) {
|
|
110
|
+
// Only warn once to avoid log spam
|
|
111
|
+
if (!context.limitReachedWarned) {
|
|
112
|
+
(0, _utils.warn)(`Attribute limit of ${MAX_ATTRIBUTES} reached; further attributes will be dropped.`);
|
|
113
|
+
context.limitReachedWarned = true;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Optional: warn for specific dropped attribute (if desired)
|
|
117
|
+
(0, _utils.warn)(`Dropped attribute at '${(0, _utils.formatPathForLog)(path)}' because limit of ${MAX_ATTRIBUTES} attributes was reached. All further attributes will be dropped.`);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
out[path.join('.')] = value;
|
|
121
|
+
context.numOfAttributes++;
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_utils","require","MAX_ATTRIBUTES","encodeAttributesInPlace","input","out","path","encoders","context","numOfAttributes","value","applyEncoders","undefined","addEncodedAttribute","Array","isArray","normalize","x","v","isPlainObject","nested","map","warn","formatPathForLog","String","filter","item","k","Object","entries","sanitizeForJson","val","enc","check","encode","err","limitReachedWarned","join"],"sourceRoot":"../../../../src","sources":["sdk/AttributesEncoding/helpers.ts"],"mappings":";;;;;;;;AAOA,IAAAA,MAAA,GAAAC,OAAA;AAPA;AACA;AACA;AACA;AACA;;AAKA,MAAMC,cAAc,GAAG,GAAG;AAO1B;AACA;AACA;AACA;AACO,SAASC,uBAAuBA,CACnCC,KAAc,EACdC,GAA8B,EAC9BC,IAAc,EACdC,QAAiC,EACjCC,OAAsB,GAAG;EAAEC,eAAe,EAAE;AAAE,CAAC,EAC3C;EACJ,MAAMC,KAAK,GAAGC,aAAa,CAACP,KAAK,EAAEG,QAAQ,CAAC;;EAE5C;EACA,IACIG,KAAK,KAAK,IAAI,IACdA,KAAK,KAAKE,SAAS,IACnB,OAAOF,KAAK,KAAK,QAAQ,IACzB,OAAOA,KAAK,KAAK,QAAQ,IACzB,OAAOA,KAAK,KAAK,SAAS,EAC5B;IACEG,mBAAmB,CAACR,GAAG,EAAEC,IAAI,EAAEI,KAAK,EAAEF,OAAO,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AAC,EAAE,CAAC;MACrC,OAAOvB,SAAS;IACpB;EACJ;EACA;EACA,OAAOF,KAAK;AAChB;AAEA,SAASG,mBAAmBA,CACxBR,GAA8B,EAC9BC,IAAc,EACdI,KAAgB,EAChBF,OAAsB,EAClB;EACJ,IAAIA,OAAO,CAACC,eAAe,IAAIP,cAAc,EAAE;IAC3C;IACA,IAAI,CAACM,OAAO,CAAC4B,kBAAkB,EAAE;MAC7B,IAAAd,WAAI,EACA,sBAAsBpB,cAAc,+CACxC,CAAC;MACDM,OAAO,CAAC4B,kBAAkB,GAAG,IAAI;IACrC;;IAEA;IACA,IAAAd,WAAI,EACA,yBAAyB,IAAAC,uBAAgB,EACrCjB,IACJ,CAAC,sBAAsBJ,cAAc,kEACzC,CAAC;IAED;EACJ;EAEAG,GAAG,CAACC,IAAI,CAAC+B,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG3B,KAAK;EAC3BF,OAAO,CAACC,eAAe,EAAE;AAC7B","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["sdk/AttributesEncoding/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.formatPathForLog = formatPathForLog;
|
|
7
|
+
exports.isPlainObject = isPlainObject;
|
|
8
|
+
exports.warn = warn;
|
|
9
|
+
var _InternalLog = require("../../InternalLog");
|
|
10
|
+
var _SdkVerbosity = require("../../config/types/SdkVerbosity");
|
|
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
|
+
function warn(text) {
|
|
18
|
+
_InternalLog.InternalLog.log(`[ATTRIBUTES] ${text}`, _SdkVerbosity.SdkVerbosity.WARN);
|
|
19
|
+
}
|
|
20
|
+
function isPlainObject(v) {
|
|
21
|
+
return !!v && typeof v === 'object' && v.constructor === Object;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Utility: format a path array into dot/bracket notation (for logs).
|
|
26
|
+
*/
|
|
27
|
+
function formatPathForLog(path) {
|
|
28
|
+
return path.map((segment, index) => {
|
|
29
|
+
const s = String(segment);
|
|
30
|
+
if (/^\d/.test(s)) {
|
|
31
|
+
return `[${s}]`;
|
|
32
|
+
}
|
|
33
|
+
return index === 0 ? s : `.${s}`;
|
|
34
|
+
}).join('');
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_InternalLog","require","_SdkVerbosity","warn","text","InternalLog","log","SdkVerbosity","WARN","isPlainObject","v","constructor","Object","formatPathForLog","path","map","segment","index","s","String","test","join"],"sourceRoot":"../../../../src","sources":["sdk/AttributesEncoding/utils.ts"],"mappings":";;;;;;;;AAMA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAPA;AACA;AACA;AACA;AACA;;AAKO,SAASE,IAAIA,CAACC,IAAY,EAAE;EAC/BC,wBAAW,CAACC,GAAG,CAAC,gBAAgBF,IAAI,EAAE,EAAEG,0BAAY,CAACC,IAAI,CAAC;AAC9D;AAEO,SAASC,aAAaA,CAACC,CAAU,EAAgC;EACpE,OAAO,CAAC,CAACA,CAAC,IAAI,OAAOA,CAAC,KAAK,QAAQ,IAAKA,CAAC,CAASC,WAAW,KAAKC,MAAM;AAC5E;;AAEA;AACA;AACA;AACO,SAASC,gBAAgBA,CAACC,IAAyB,EAAU;EAChE,OAAOA,IAAI,CACNC,GAAG,CAAC,CAACC,OAAO,EAAEC,KAAK,KAAK;IACrB,MAAMC,CAAC,GAAGC,MAAM,CAACH,OAAO,CAAC;IACzB,IAAI,KAAK,CAACI,IAAI,CAACF,CAAC,CAAC,EAAE;MACf,OAAO,IAAIA,CAAC,GAAG;IACnB;IACA,OAAOD,KAAK,KAAK,CAAC,GAAGC,CAAC,GAAG,IAAIA,CAAC,EAAE;EACpC,CAAC,CAAC,CACDG,IAAI,CAAC,EAAE,CAAC;AACjB","ignoreList":[]}
|
|
@@ -12,12 +12,38 @@ exports.AttributesSingleton = void 0;
|
|
|
12
12
|
|
|
13
13
|
class AttributesProvider {
|
|
14
14
|
attributes = {};
|
|
15
|
-
|
|
15
|
+
addAttribute = (key, value) => {
|
|
16
|
+
const newAttributes = {
|
|
17
|
+
...this.attributes
|
|
18
|
+
};
|
|
19
|
+
newAttributes[key] = value;
|
|
20
|
+
this.attributes = newAttributes;
|
|
21
|
+
};
|
|
22
|
+
removeAttribute = key => {
|
|
23
|
+
const updatedAttributes = {
|
|
24
|
+
...this.attributes
|
|
25
|
+
};
|
|
26
|
+
delete updatedAttributes[key];
|
|
27
|
+
this.attributes = updatedAttributes;
|
|
28
|
+
};
|
|
29
|
+
addAttributes = attributes => {
|
|
16
30
|
this.attributes = {
|
|
17
31
|
...this.attributes,
|
|
18
32
|
...attributes
|
|
19
33
|
};
|
|
20
34
|
};
|
|
35
|
+
removeAttributes = keys => {
|
|
36
|
+
const updated = {
|
|
37
|
+
...this.attributes
|
|
38
|
+
};
|
|
39
|
+
for (const k of keys) {
|
|
40
|
+
delete updated[k];
|
|
41
|
+
}
|
|
42
|
+
this.attributes = updated;
|
|
43
|
+
};
|
|
44
|
+
getAttribute = key => {
|
|
45
|
+
return this.attributes[key];
|
|
46
|
+
};
|
|
21
47
|
getAttributes = () => {
|
|
22
48
|
return this.attributes;
|
|
23
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AttributesProvider","attributes","
|
|
1
|
+
{"version":3,"names":["AttributesProvider","attributes","addAttribute","key","value","newAttributes","removeAttribute","updatedAttributes","addAttributes","removeAttributes","keys","updated","k","getAttribute","getAttributes","AttributesSingleton","attributesProvider","getInstance","reset","exports"],"sourceRoot":"../../../../src","sources":["sdk/AttributesSingleton/AttributesSingleton.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;;AAIA,MAAMA,kBAAkB,CAAC;EACbC,UAAU,GAAe,CAAC,CAAC;EAEnCC,YAAY,GAAGA,CAACC,GAAW,EAAEC,KAAc,KAAK;IAC5C,MAAMC,aAAa,GAAG;MAAE,GAAG,IAAI,CAACJ;IAAW,CAAC;IAC5CI,aAAa,CAACF,GAAG,CAAC,GAAGC,KAAK;IAC1B,IAAI,CAACH,UAAU,GAAGI,aAAa;EACnC,CAAC;EAEDC,eAAe,GAAIH,GAAW,IAAK;IAC/B,MAAMI,iBAAiB,GAAG;MAAE,GAAG,IAAI,CAACN;IAAW,CAAC;IAChD,OAAOM,iBAAiB,CAACJ,GAAG,CAAC;IAC7B,IAAI,CAACF,UAAU,GAAGM,iBAAiB;EACvC,CAAC;EAEDC,aAAa,GAAIP,UAAsB,IAAK;IACxC,IAAI,CAACA,UAAU,GAAG;MACd,GAAG,IAAI,CAACA,UAAU;MAClB,GAAGA;IACP,CAAC;EACL,CAAC;EAEDQ,gBAAgB,GAAIC,IAAc,IAAK;IACnC,MAAMC,OAAO,GAAG;MAAE,GAAG,IAAI,CAACV;IAAW,CAAC;IACtC,KAAK,MAAMW,CAAC,IAAIF,IAAI,EAAE;MAClB,OAAOC,OAAO,CAACC,CAAC,CAAC;IACrB;IACA,IAAI,CAACX,UAAU,GAAGU,OAAO;EAC7B,CAAC;EAEDE,YAAY,GAAIV,GAAW,IAA0B;IACjD,OAAO,IAAI,CAACF,UAAU,CAACE,GAAG,CAAC;EAC/B,CAAC;EAEDW,aAAa,GAAGA,CAAA,KAAkB;IAC9B,OAAO,IAAI,CAACb,UAAU;EAC1B,CAAC;AACL;AAEO,MAAMc,mBAAmB,CAAC;EAC7B,OAAeC,kBAAkB,GAAG,IAAIhB,kBAAkB,CAAC,CAAC;EAE5D,OAAOiB,WAAW,GAAGA,CAAA,KAA0B;IAC3C,OAAOF,mBAAmB,CAACC,kBAAkB;EACjD,CAAC;EAED,OAAOE,KAAK,GAAGA,CAAA,KAAM;IACjBH,mBAAmB,CAACC,kBAAkB,GAAG,IAAIhB,kBAAkB,CAAC,CAAC;EACrE,CAAC;AACL;AAACmB,OAAA,CAAAJ,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.registerNativeBridge = exports.hasNativeBridge = exports.DdSdkInternalNativeBridge = void 0;
|
|
7
7
|
var _InternalLog = require("../../InternalLog");
|
|
8
|
-
var _SdkVerbosity = require("../../SdkVerbosity");
|
|
9
|
-
var
|
|
8
|
+
var _SdkVerbosity = require("../../config/types/SdkVerbosity");
|
|
9
|
+
var _helper = require("../../rum/helper");
|
|
10
10
|
var _DatadogDefaultEventEmitter = require("../DatadogEventEmitter/DatadogDefaultEventEmitter");
|
|
11
11
|
var _DdSdkInternalNativeBridgeEvent = require("./DdSdkInternalNativeBridgeEvent");
|
|
12
12
|
/*
|
|
@@ -16,7 +16,7 @@ var _DdSdkInternalNativeBridgeEvent = require("./DdSdkInternalNativeBridgeEvent"
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
const DEFAULT_EVENTS = [new _DdSdkInternalNativeBridgeEvent.DdSdkInternalNativeBridgeEvent('RUMSessionStarted', sessionId => {
|
|
19
|
-
(0,
|
|
19
|
+
(0, _helper.setCachedSessionId)(sessionId);
|
|
20
20
|
})];
|
|
21
21
|
const defaultErrorHandler = err => {
|
|
22
22
|
_InternalLog.InternalLog.log(err, _SdkVerbosity.SdkVerbosity.DEBUG);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_InternalLog","require","_SdkVerbosity","
|
|
1
|
+
{"version":3,"names":["_InternalLog","require","_SdkVerbosity","_helper","_DatadogDefaultEventEmitter","_DdSdkInternalNativeBridgeEvent","DEFAULT_EVENTS","BridgeEvent","sessionId","setCachedSessionId","defaultErrorHandler","err","InternalLog","log","SdkVerbosity","DEBUG","DdSdkInternalNativeBridge","_isInitialized","isInitialized","_instance","initialize","eventEmitter","errorHandler","registerDefaultListeners","constructor","forEach","event","addListener","eventName","callback","exports","registerNativeBridge","nativeEventEmitter","DatadogDefaultEventEmitter","hasNativeBridge"],"sourceRoot":"../../../../src","sources":["sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.tsx"],"mappings":";;;;;;AAKA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,2BAAA,GAAAH,OAAA;AAGA,IAAAI,+BAAA,GAAAJ,OAAA;AAXA;AACA;AACA;AACA;AACA;;AASA,MAAMK,cAAc,GAAG,CACnB,IAAIC,8DAAW,CAAS,mBAAmB,EAAGC,SAAiB,IAAK;EAChE,IAAAC,0BAAkB,EAACD,SAAS,CAAC;AACjC,CAAC,CAAC,CACL;AAED,MAAME,mBAAmB,GAAIC,GAAQ,IAAK;EACtCC,wBAAW,CAACC,GAAG,CAACF,GAAG,EAAEG,0BAAY,CAACC,KAAK,CAAC;AAC5C,CAAC;AAEM,MAAMC,yBAAyB,CAAC;EAG3BC,cAAc,GAAY,KAAK;EAGvC,WAAkBC,aAAaA,CAAA,EAAY;IACvC,OAAO,IAAI,CAACC,SAAS,EAAEF,cAAc,IAAI,KAAK;EAClD;EAEA,OAAOG,UAAUA,CACbC,YAAiC,EACjCC,YAAgC,GAAGZ,mBAAmB,EAC7B;IACzB,IAAI,CAACS,SAAS,GAAG,IAAIH,yBAAyB,CAC1CK,YAAY,EACZC,YACJ,CAAC;IACD,IAAI,CAACH,SAAS,CAACF,cAAc,GACzBI,YAAY,CAACD,UAAU,CAAC,CAAC,IACzB,IAAI,CAACD,SAAS,CAACI,wBAAwB,CAAC,CAAC;IAC7C,OAAO,IAAI,CAACJ,SAAS;EACzB;EAEQK,WAAWA,CACfH,YAAiC,EACjCC,YAAgC,EAClC;IACE,IAAI,CAACD,YAAY,GAAGA,YAAY;IAChC,IAAI,CAACC,YAAY,GAAGA,YAAY;EACpC;EAEQC,wBAAwBA,CAAA,EAAY;IACxC,IAAI;MACAjB,cAAc,CAACmB,OAAO,CAACC,KAAK,IAAI;QAC5B,IAAI,CAACL,YAAY,CAACM,WAAW,CAACD,KAAK,CAACE,SAAS,EAAEF,KAAK,CAACG,QAAQ,CAAC;MAClE,CAAC,CAAC;MACF,OAAO,IAAI;IACf,CAAC,CAAC,OAAOlB,GAAG,EAAE;MACV,IAAI,CAACW,YAAY,CACb,2EAA2EX,GAAG,EAClF,CAAC;MACD,OAAO,KAAK;IAChB;EACJ;AACJ;AAACmB,OAAA,CAAAd,yBAAA,GAAAA,yBAAA;AAEM,MAAMe,oBAAoB,GAAGA,CAChCV,YAAkC,EAClCC,YAAgC,GAAGZ,mBAAmB,KACrD;EACD,MAAMsB,kBAAkB,GACpBX,YAAY,IAAI,IAAIY,sDAA0B,CAACX,YAAY,CAAC;EAChEN,yBAAyB,CAACI,UAAU,CAACY,kBAAkB,CAAC;EACxD,IAAI,CAAChB,yBAAyB,CAACE,aAAa,EAAE;IAC1CI,YAAY,CAAC,6CAA6C,CAAC;EAC/D;AACJ,CAAC;AAACQ,OAAA,CAAAC,oBAAA,GAAAA,oBAAA;AAEK,MAAMG,eAAe,GAAGA,CAAA,KAAMlB,yBAAyB,CAACE,aAAa;AAACY,OAAA,CAAAI,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.DdSdkInternalNativeBridgeEvent = void 0;
|
|
7
7
|
var _InternalLog = require("../../InternalLog");
|
|
8
|
-
var _SdkVerbosity = require("../../SdkVerbosity");
|
|
8
|
+
var _SdkVerbosity = require("../../config/types/SdkVerbosity");
|
|
9
9
|
/*
|
|
10
10
|
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
11
11
|
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.BoundedBuffer = void 0;
|
|
7
7
|
var _InternalLog = require("../../../InternalLog");
|
|
8
|
-
var _SdkVerbosity = require("../../../SdkVerbosity");
|
|
9
|
-
var
|
|
10
|
-
var
|
|
8
|
+
var _SdkVerbosity = require("../../../config/types/SdkVerbosity");
|
|
9
|
+
var _errorUtils = require("../../AttributesEncoding/errorUtils");
|
|
10
|
+
var _DdSdkInternal = require("../../DdSdkInternal");
|
|
11
11
|
var _DatadogBuffer = require("./DatadogBuffer");
|
|
12
12
|
/*
|
|
13
13
|
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
@@ -141,7 +141,7 @@ class BoundedBuffer extends _DatadogBuffer.DatadogBuffer {
|
|
|
141
141
|
kind,
|
|
142
142
|
occurrences
|
|
143
143
|
}) => {
|
|
144
|
-
|
|
144
|
+
_DdSdkInternal.NativeDdSdk.telemetryError(`${message} happened ${occurrences} times.`, stack, kind);
|
|
145
145
|
});
|
|
146
146
|
};
|
|
147
147
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_InternalLog","require","_SdkVerbosity","
|
|
1
|
+
{"version":3,"names":["_InternalLog","require","_SdkVerbosity","_errorUtils","_DdSdkInternal","_DatadogBuffer","DEFAULT_BUFFER_SIZE","BoundedBuffer","DatadogBuffer","buffer","idTable","telemetryBuffer","constructor","bufferSize","addCallback","callback","length","push","_type","logBufferOverflow","Promise","resolve","undefined","addCallbackReturningId","bufferId","generateRandomBufferId","returnedBufferId","error","logRandomIdGenerationError","addCallbackWithId","withBufferId","drain","bufferIndex","item","callbackId","InternalLog","log","SdkVerbosity","WARN","drainTelemetry","addTelemetryEvent","getErrorStackTrace","console","warn","Math","random","tries","hash","toString","slice","Error","message","stack","kind","occurrences","Object","values","forEach","NativeDdSdk","telemetryError","exports"],"sourceRoot":"../../../../../src","sources":["sdk/DatadogProvider/Buffer/BoundedBuffer.ts"],"mappings":";;;;;;AAMA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAEA,IAAAI,cAAA,GAAAJ,OAAA;AAXA;AACA;AACA;AACA;AACA;;AASA,MAAMK,mBAAmB,GAAG,GAAG;AAqBxB,MAAMC,aAAa,SAASC,4BAAa,CAAC;EAErCC,MAAM,GAAiB,EAAE;EACzBC,OAAO,GAA0C,CAAC,CAAC;EACnDC,eAAe,GAOnB,CAAC,CAAC;EAENC,WAAWA,CAACC,UAAkB,GAAGP,mBAAmB,EAAE;IAClD,KAAK,CAAC,CAAC;IACP,IAAI,CAACO,UAAU,GAAGA,UAAU;EAChC;EAEAC,WAAW,GAAIC,QAA6B,IAAK;IAC7C,IAAI,IAAI,CAACN,MAAM,CAACO,MAAM,GAAG,IAAI,CAACH,UAAU,EAAE;MACtC,IAAI,CAACJ,MAAM,CAACQ,IAAI,CAAC;QAAEF,QAAQ;QAAEG,KAAK,EAAE;MAAO,CAAC,CAAC;IACjD,CAAC,MAAM;MACH,IAAI,CAACC,iBAAiB,CAAC,CAAC;IAC5B;IAEA,OAAO,IAAIC,OAAO,CAAOC,OAAO,IAAIA,OAAO,CAACC,SAAS,CAAC,CAAC;EAC3D,CAAC;EAEDC,sBAAsB,GAAIR,QAA+B,IAAK;IAC1D,IAAI;MACA,MAAMS,QAAQ,GAAG,IAAI,CAACC,sBAAsB,CAAC,CAAC;MAC9C,IAAI,IAAI,CAAChB,MAAM,CAACO,MAAM,GAAG,IAAI,CAACH,UAAU,EAAE;QACtC,IAAI,CAACJ,MAAM,CAACQ,I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
|
exports.__internalResetIsInitializedForTesting = exports.DatadogProvider = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _DdSdkReactNativeConfiguration = require("../../DdSdkReactNativeConfiguration");
|
|
9
8
|
var _DdSdkReactNative = require("../../DdSdkReactNative");
|
|
10
9
|
var _InternalLog = require("../../InternalLog");
|
|
11
|
-
var
|
|
10
|
+
var _DatadogProviderConfiguration = require("../../config/DatadogProviderConfiguration");
|
|
11
|
+
var _CoreConfiguration = require("../../config/features/CoreConfiguration");
|
|
12
|
+
var _SdkVerbosity = require("../../config/types/SdkVerbosity");
|
|
13
|
+
var _DatadogProviderState = require("./DatadogProviderState");
|
|
12
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
16
|
/*
|
|
@@ -17,14 +19,13 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
17
19
|
* Copyright 2016-Present Datadog, Inc.
|
|
18
20
|
*/
|
|
19
21
|
|
|
20
|
-
let isInitialized = false;
|
|
21
22
|
const isConfigurationPartial = configuration => {
|
|
22
|
-
if (configuration instanceof
|
|
23
|
+
if (configuration instanceof _DatadogProviderConfiguration.DatadogProviderConfiguration) {
|
|
23
24
|
return false;
|
|
24
25
|
}
|
|
25
|
-
if (configuration instanceof
|
|
26
|
+
if (configuration instanceof _CoreConfiguration.CoreConfiguration) {
|
|
26
27
|
// Not using InternalLog here as it is not yet instantiated
|
|
27
|
-
console.warn('A
|
|
28
|
+
console.warn('A CoreConfiguration was passed to DatadogProvider. Please use DatadogProviderConfiguration instead.');
|
|
28
29
|
return false;
|
|
29
30
|
}
|
|
30
31
|
return true;
|
|
@@ -48,7 +49,7 @@ const DatadogProvider = ({
|
|
|
48
49
|
configuration,
|
|
49
50
|
onInitialization
|
|
50
51
|
}) => {
|
|
51
|
-
if (!isInitialized) {
|
|
52
|
+
if (!_DatadogProviderState.DatadogProviderState.isInitialized) {
|
|
52
53
|
// Here we cannot use a useEffect hook since it would be called after
|
|
53
54
|
// the first render. Thus, we wouldn't enable auto-instrumentation on
|
|
54
55
|
// the elements rendered in this first render and what happens during
|
|
@@ -59,7 +60,7 @@ const DatadogProvider = ({
|
|
|
59
60
|
} else {
|
|
60
61
|
initializeDatadog(configuration, onInitialization);
|
|
61
62
|
}
|
|
62
|
-
|
|
63
|
+
_DatadogProviderState.DatadogProviderState.setInitialized();
|
|
63
64
|
}
|
|
64
65
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
65
66
|
children: children
|
|
@@ -78,7 +79,7 @@ DatadogProvider.initialize = async configuration => {
|
|
|
78
79
|
}
|
|
79
80
|
};
|
|
80
81
|
const __internalResetIsInitializedForTesting = () => {
|
|
81
|
-
|
|
82
|
+
_DatadogProviderState.DatadogProviderState._reset();
|
|
82
83
|
};
|
|
83
84
|
exports.__internalResetIsInitializedForTesting = __internalResetIsInitializedForTesting;
|
|
84
85
|
//# sourceMappingURL=DatadogProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_DdSdkReactNative","_InternalLog","_DatadogProviderConfiguration","_CoreConfiguration","_SdkVerbosity","_DatadogProviderState","_jsxRuntime","e","__esModule","default","isConfigurationPartial","configuration","DatadogProviderConfiguration","CoreConfiguration","console","warn","initializeDatadog","onInitialization","DdSdkReactNative","_initializeFromDatadogProvider","error","InternalLog","log","SdkVerbosity","WARN","DatadogProvider","children","DatadogProviderState","isInitialized","_enableFeaturesFromDatadogProvider","setInitialized","jsx","Fragment","exports","initialize","_initializeFromDatadogProviderWithConfigurationAsync","__internalResetIsInitializedForTesting","_reset"],"sourceRoot":"../../../../src","sources":["sdk/DatadogProvider/DatadogProvider.tsx"],"mappings":";;;;;;AAKA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,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BAAgB,GAAGA,gBAAgB;IACvD,CAAC,MAAM;MACHD,iBAAiB,CAACL,aAAa,EAAEM,gBAAgB,CAAC;IACtD;IACAU,0CAAoB,CAACG,cAAc,CAAC,CAAC;EACzC;EAEA,oBAAO,IAAAxB,WAAA,CAAAyB,GAAA,EAAAzB,WAAA,CAAA0B,QAAA;IAAAN,QAAA,EAAGA;EAAQ,CAAG,CAAC;AAC1B,CAAC;;AAED;AACA;AACA;AACA;AAHAO,OAAA,CAAAR,eAAA,GAAAA,eAAA;AAIAA,eAAe,CAACS,UAAU,GAAG,MACzBvB,aAAiD,IAChD;EACD,MAAMO,kCAAgB,CAACiB,oDAAoD,CACvExB,aACJ,CAAC;EACD,IAAIc,eAAe,CAACR,gBAAgB,EAAE;IAClCQ,eAAe,CAACR,gBAAgB,CAAC,CAAC;EACtC;AACJ,CAAC;AAEM,MAAMmB,sCAAsC,GAAGA,CAAA,KAAM;EACxDT,0CAAoB,CAACU,MAAM,CAAC,CAAC;AACjC,CAAC;AAACJ,OAAA,CAAAG,sCAAA,GAAAA,sCAAA","ignoreList":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.DatadogProviderState = void 0;
|
|
7
|
+
var _singletonUtils = require("../../utils/singletonUtils");
|
|
8
|
+
/*
|
|
9
|
+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
10
|
+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
11
|
+
* Copyright 2016-Present Datadog, Inc.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const DATADOG_PROVIDER_STATE_MODULE = 'com.datadog.reactnative.rum.datadog_provider_state';
|
|
15
|
+
class _DatadogProviderState {
|
|
16
|
+
_isInitialized = false;
|
|
17
|
+
get isInitialized() {
|
|
18
|
+
return this._isInitialized;
|
|
19
|
+
}
|
|
20
|
+
setInitialized() {
|
|
21
|
+
this._isInitialized = true;
|
|
22
|
+
}
|
|
23
|
+
_reset() {
|
|
24
|
+
this._isInitialized = false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const DatadogProviderState = exports.DatadogProviderState = (0, _singletonUtils.getGlobalInstance)(DATADOG_PROVIDER_STATE_MODULE, () => new _DatadogProviderState());
|
|
28
|
+
//# sourceMappingURL=DatadogProviderState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_singletonUtils","require","DATADOG_PROVIDER_STATE_MODULE","_DatadogProviderState","_isInitialized","isInitialized","setInitialized","_reset","DatadogProviderState","exports","getGlobalInstance"],"sourceRoot":"../../../../src","sources":["sdk/DatadogProvider/DatadogProviderState.ts"],"mappings":";;;;;;AAKA,IAAAA,eAAA,GAAAC,OAAA;AALA;AACA;AACA;AACA;AACA;;AAGA,MAAMC,6BAA6B,GAC/B,oDAAoD;AAExD,MAAMC,qBAAqB,CAAC;EAChBC,cAAc,GAAY,KAAK;EAEvC,IAAIC,aAAaA,CAAA,EAAY;IACzB,OAAO,IAAI,CAACD,cAAc;EAC9B;EAEAE,cAAcA,CAAA,EAAG;IACb,IAAI,CAACF,cAAc,GAAG,IAAI;EAC9B;EAEAG,MAAMA,CAAA,EAAG;IACL,IAAI,CAACH,cAAc,GAAG,KAAK;EAC/B;AACJ;AAEO,MAAMI,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAAG,IAAAE,iCAAiB,EACjDR,6BAA6B,EAC7B,MAAM,IAAIC,qBAAqB,CAAC,CACpC,CAAC","ignoreList":[]}
|
|
@@ -4,12 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.DdSdk = void 0;
|
|
7
|
+
var _singletonUtils = require("../utils/singletonUtils");
|
|
8
|
+
var _DdSdkInternal = require("./DdSdkInternal");
|
|
7
9
|
/*
|
|
8
10
|
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
9
11
|
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
10
12
|
* Copyright 2016-Present Datadog, Inc.
|
|
11
13
|
*/
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
const DdSdk = exports.DdSdk =
|
|
15
|
+
const CORE_MODULE = 'com.datadog.reactnative.core';
|
|
16
|
+
const DdSdk = exports.DdSdk = (0, _singletonUtils.getGlobalInstance)(CORE_MODULE, () => new _DdSdkInternal.DdSdkWrapper());
|
|
15
17
|
//# sourceMappingURL=DdSdk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DdSdk","exports","
|
|
1
|
+
{"version":3,"names":["_singletonUtils","require","_DdSdkInternal","CORE_MODULE","DdSdk","exports","getGlobalInstance","DdSdkWrapper"],"sourceRoot":"../../../src","sources":["sdk/DdSdk.ts"],"mappings":";;;;;;AAKA,IAAAA,eAAA,GAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AAPA;AACA;AACA;AACA;AACA;;AAMA,MAAME,WAAW,GAAG,8BAA8B;AAC3C,MAAMC,KAAK,GAAAC,OAAA,CAAAD,KAAA,GAAG,IAAAE,iCAAiB,EAClCH,WAAW,EACX,MAAM,IAAII,2BAAY,CAAC,CAC3B,CAAc","ignoreList":[]}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.NativeDdSdk = exports.DdSdkWrapper = void 0;
|
|
7
|
+
/*
|
|
8
|
+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
9
|
+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
10
|
+
* Copyright 2016-Present Datadog, Inc.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
|
14
|
+
const NativeDdSdk = exports.NativeDdSdk = require('../specs/NativeDdSdk').default;
|
|
15
|
+
class DdSdkWrapper {
|
|
16
|
+
get attributeEncoders() {
|
|
17
|
+
return this._attributeEncoders;
|
|
18
|
+
}
|
|
19
|
+
_attributeEncoders = [];
|
|
20
|
+
initialize(configuration) {
|
|
21
|
+
this._attributeEncoders = [...configuration.attributeEncoders];
|
|
22
|
+
return NativeDdSdk.initialize(configuration);
|
|
23
|
+
}
|
|
24
|
+
getConstants() {
|
|
25
|
+
return NativeDdSdk.getConstants();
|
|
26
|
+
}
|
|
27
|
+
setUserInfo(user) {
|
|
28
|
+
return NativeDdSdk.setUserInfo(user);
|
|
29
|
+
}
|
|
30
|
+
clearUserInfo() {
|
|
31
|
+
return NativeDdSdk.clearUserInfo();
|
|
32
|
+
}
|
|
33
|
+
addUserExtraInfo(extraInfo) {
|
|
34
|
+
return NativeDdSdk.addUserExtraInfo(extraInfo);
|
|
35
|
+
}
|
|
36
|
+
addAttribute(key, value) {
|
|
37
|
+
return NativeDdSdk.addAttribute(key, value);
|
|
38
|
+
}
|
|
39
|
+
removeAttribute(key) {
|
|
40
|
+
return NativeDdSdk.removeAttribute(key);
|
|
41
|
+
}
|
|
42
|
+
addAttributes(attributes) {
|
|
43
|
+
return NativeDdSdk.addAttributes(attributes);
|
|
44
|
+
}
|
|
45
|
+
removeAttributes(keys) {
|
|
46
|
+
return NativeDdSdk.removeAttributes(keys);
|
|
47
|
+
}
|
|
48
|
+
setAccountInfo(account) {
|
|
49
|
+
return NativeDdSdk.setAccountInfo(account);
|
|
50
|
+
}
|
|
51
|
+
clearAccountInfo() {
|
|
52
|
+
return NativeDdSdk.clearAccountInfo();
|
|
53
|
+
}
|
|
54
|
+
addAccountExtraInfo(extraInfo) {
|
|
55
|
+
return NativeDdSdk.addAccountExtraInfo(extraInfo);
|
|
56
|
+
}
|
|
57
|
+
setTrackingConsent(trackingConsent) {
|
|
58
|
+
return NativeDdSdk.setTrackingConsent(trackingConsent);
|
|
59
|
+
}
|
|
60
|
+
sendTelemetryLog(message, attributes, config) {
|
|
61
|
+
return NativeDdSdk.sendTelemetryLog(message, attributes, config);
|
|
62
|
+
}
|
|
63
|
+
telemetryDebug(message) {
|
|
64
|
+
return NativeDdSdk.telemetryDebug(message);
|
|
65
|
+
}
|
|
66
|
+
telemetryError(message, stack, kind) {
|
|
67
|
+
return NativeDdSdk.telemetryError(message, stack, kind);
|
|
68
|
+
}
|
|
69
|
+
consumeWebviewEvent(message) {
|
|
70
|
+
return NativeDdSdk.consumeWebviewEvent(message);
|
|
71
|
+
}
|
|
72
|
+
clearAllData() {
|
|
73
|
+
return NativeDdSdk.clearAllData();
|
|
74
|
+
}
|
|
75
|
+
addListener(eventType) {
|
|
76
|
+
return NativeDdSdk.addListener(eventType);
|
|
77
|
+
}
|
|
78
|
+
removeListeners(count) {
|
|
79
|
+
return NativeDdSdk.removeListeners(count);
|
|
80
|
+
}
|
|
81
|
+
_setAttributeEncodersForTesting(attributeEncoders) {
|
|
82
|
+
this._attributeEncoders = [...attributeEncoders];
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
exports.DdSdkWrapper = DdSdkWrapper;
|
|
86
|
+
//# sourceMappingURL=DdSdkInternal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NativeDdSdk","exports","require","default","DdSdkWrapper","attributeEncoders","_attributeEncoders","initialize","configuration","getConstants","setUserInfo","user","clearUserInfo","addUserExtraInfo","extraInfo","addAttribute","key","value","removeAttribute","addAttributes","attributes","removeAttributes","keys","setAccountInfo","account","clearAccountInfo","addAccountExtraInfo","setTrackingConsent","trackingConsent","sendTelemetryLog","message","config","telemetryDebug","telemetryError","stack","kind","consumeWebviewEvent","clearAllData","addListener","eventType","removeListeners","count","_setAttributeEncodersForTesting"],"sourceRoot":"../../../src","sources":["sdk/DdSdkInternal.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;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ule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.EventMapper = void 0;
|
|
7
7
|
var _InternalLog = require("../../InternalLog");
|
|
8
|
-
var _SdkVerbosity = require("../../SdkVerbosity");
|
|
9
|
-
var
|
|
8
|
+
var _SdkVerbosity = require("../../config/types/SdkVerbosity");
|
|
9
|
+
var _AccountInfoSingleton = require("../AccountInfoSingleton/AccountInfoSingleton");
|
|
10
10
|
var _AttributesSingleton = require("../AttributesSingleton/AttributesSingleton");
|
|
11
|
+
var _DdSdkInternal = require("../DdSdkInternal");
|
|
11
12
|
var _UserInfoSingleton = require("../UserInfoSingleton/UserInfoSingleton");
|
|
12
13
|
var _deepClone = require("./utils/deepClone");
|
|
13
14
|
/*
|
|
@@ -40,9 +41,11 @@ class EventMapper {
|
|
|
40
41
|
|
|
41
42
|
// formatting
|
|
42
43
|
const userInfo = _UserInfoSingleton.UserInfoSingleton.getInstance().getUserInfo();
|
|
44
|
+
const accountInfo = _AccountInfoSingleton.AccountInfoSingleton.getInstance().getAccountInfo();
|
|
43
45
|
const attributes = _AttributesSingleton.AttributesSingleton.getInstance().getAttributes();
|
|
44
46
|
const initialEvent = this.formatRawEventForMapper(rawEvent, {
|
|
45
47
|
userInfo,
|
|
48
|
+
accountInfo,
|
|
46
49
|
attributes
|
|
47
50
|
});
|
|
48
51
|
|
|
@@ -56,7 +59,7 @@ class EventMapper {
|
|
|
56
59
|
return this.formatMapperEventForNative(mappedEvent, backupEvent);
|
|
57
60
|
} catch (error) {
|
|
58
61
|
_InternalLog.InternalLog.log(`The event mapper crashed when mapping ${JSON.stringify(backupEvent)}: ${error}`, _SdkVerbosity.SdkVerbosity.WARN);
|
|
59
|
-
|
|
62
|
+
_DdSdkInternal.NativeDdSdk.telemetryDebug('Error while running the event mapper');
|
|
60
63
|
return this.formatMapperEventForNative(backupEvent, backupEvent);
|
|
61
64
|
}
|
|
62
65
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_InternalLog","require","_SdkVerbosity","
|
|
1
|
+
{"version":3,"names":["_InternalLog","require","_SdkVerbosity","_AccountInfoSingleton","_AttributesSingleton","_DdSdkInternal","_UserInfoSingleton","_deepClone","EventMapper","constructor","eventMapper","formatRawEventForMapper","formatMapperEventForNative","formatRawEventForNative","applyEventMapper","rawEvent","userInfo","UserInfoSingleton","getInstance","getUserInfo","accountInfo","AccountInfoSingleton","getAccountInfo","attributes","AttributesSingleton","getAttributes","initialEvent","backupEvent","deepClone","mappedEvent","error","InternalLog","log","JSON","stringify","SdkVerbosity","WARN","NativeDdSdk","telemetryDebug","exports"],"sourceRoot":"../../../../src","sources":["sdk/EventMappers/EventMapper.ts"],"mappings":";;;;;;AAMA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,qBAAA,GAAAF,OAAA;AAEA,IAAAG,oBAAA,GAAAH,OAAA;AAEA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,kBAAA,GAAAL,OAAA;AAGA,IAAAM,UAAA,GAAAN,OAAA;AAhBA;AACA;AACA;AACA;AACA;;AAoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMO,WAAW,CAAqC;EAYzDC,WAAWA,CACPC,WAAqE,EACrEC,uBAGgB,EAChBC,0BAGgB,EAChBC,uBAAyD,EAC3D;IACE,IAAI,CAACH,WAAW,GAAGA,WAAW;IAC9B,IAAI,CAACC,uBAAuB,GAAGA,uBAAuB;IACtD,IAAI,CAACC,0BAA0B,GAAGA,0BAA0B;IAC5D,IAAI,CAACC,uBAAuB,GAAGA,uBAAuB;EAC1D;EAEOC,gBAAgB,GAAIC,QAAkB,IAAyB;IAClE,IAAI,CAAC,IAAI,CAACL,WAAW,EAAE;MACnB,OAAO,IAAI,CAACG,uBAAuB,CAACE,QAAQ,CAAC;IACjD;;IAEA;IACA,MAAMC,QAAQ,GAAGC,oCAAiB,CAACC,WAAW,CAAC,CAAC,CAACC,WAAW,CA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