@datadog/mobile-react-native 2.14.1 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DatadogSDKReactNative.podspec +6 -6
- package/README.md +23 -13
- package/android/build.gradle +10 -11
- package/android/gradle.properties +1 -1
- package/android/src/main/kotlin/com/datadog/reactnative/DatadogSDKWrapper.kt +36 -93
- package/android/src/main/kotlin/com/datadog/reactnative/DatadogWrapper.kt +46 -59
- package/android/src/main/kotlin/com/datadog/reactnative/DdLogsImplementation.kt +2 -1
- package/android/src/main/kotlin/com/datadog/reactnative/DdRumImplementation.kt +98 -0
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkConfiguration.kt +125 -75
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkConfigurationExt.kt +199 -90
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkImplementation.kt +151 -24
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkNativeInitialization.kt +57 -33
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkReactNativePackage.kt +2 -1
- package/android/src/main/kotlin/com/datadog/reactnative/DdTelemetry.kt +96 -0
- package/android/src/main/kotlin/com/datadog/reactnative/DdTraceImplementation.kt +20 -19
- package/android/src/main/kotlin/com/datadog/reactnative/SdkVersion.kt +1 -1
- package/android/src/newarch/kotlin/com/datadog/reactnative/DdRum.kt +100 -1
- package/android/src/newarch/kotlin/com/datadog/reactnative/DdSdk.kt +68 -14
- package/android/src/oldarch/kotlin/com/datadog/reactnative/DdRum.kt +94 -0
- package/android/src/oldarch/kotlin/com/datadog/reactnative/DdSdk.kt +70 -11
- package/android/src/test/kotlin/com/datadog/reactnative/DdRumTest.kt +58 -0
- package/android/src/test/kotlin/com/datadog/reactnative/DdSdkNativeInitializationTest.kt +63 -43
- package/android/src/test/kotlin/com/datadog/reactnative/DdSdkTest.kt +2024 -1199
- package/android/src/test/kotlin/com/datadog/reactnative/DdTraceTest.kt +44 -40
- package/android/src/test/kotlin/com/datadog/tools/unit/DdSdkConfigurationExt.kt +60 -91
- package/android/src/test/kotlin/com/datadog/tools/unit/MockRumMonitor.kt +34 -14
- package/android/src/test/kotlin/com/datadog/tools/unit/forge/DdSdkConfigurationForgeryFactory.kt +47 -43
- package/android/src/test/kotlin/com/datadog/tools/unit/forge/TelemetryConfigurationEventForgeryFactory.kt +0 -1
- package/android/src/test/resources/input/complete-configuration.json +32 -28
- package/android/src/test/resources/input/malformed-configuration.json +1 -1
- package/android/src/test/resources/input/minimal-configuration.json +4 -2
- package/datadog-configuration.schema.json +187 -139
- package/ios/Sources/AnyEncodable.swift +14 -7
- package/ios/Sources/Attributes.swift +0 -7
- package/ios/Sources/DatadogSDKWrapper.swift +12 -128
- package/ios/Sources/DdLogsImplementation.swift +9 -39
- package/ios/Sources/DdRum.mm +89 -1
- package/ios/Sources/DdRumImplementation.swift +79 -0
- package/ios/Sources/DdSdk.mm +76 -11
- package/ios/Sources/DdSdkConfiguration.swift +159 -117
- package/ios/Sources/DdSdkImplementation.swift +235 -82
- package/ios/Sources/DdSdkNativeInitialization.swift +116 -80
- package/ios/Sources/DdTelemetry.swift +49 -0
- package/ios/Sources/GlobalState.swift +1 -1
- package/ios/Sources/RNDdSdkConfiguration.swift +334 -172
- package/ios/Sources/SdkVersion.swift +1 -1
- package/jest/mock.js +43 -4
- package/lib/commonjs/DdAttributes.js.map +1 -0
- package/lib/commonjs/DdSdkReactNative.js +159 -56
- package/lib/commonjs/DdSdkReactNative.js.map +1 -1
- package/lib/commonjs/InternalLog.js +1 -1
- package/lib/commonjs/config/DatadogProviderConfiguration.js +25 -0
- package/lib/commonjs/config/DatadogProviderConfiguration.js.map +1 -0
- package/lib/commonjs/config/FileBasedConfiguration.js +349 -0
- package/lib/commonjs/config/FileBasedConfiguration.js.map +1 -0
- package/lib/commonjs/config/FileBasedConfiguration.type.js +6 -0
- package/lib/commonjs/config/FileBasedConfiguration.type.js.map +1 -0
- package/lib/commonjs/config/async/AutoInstrumentationConfiguration.js +51 -0
- package/lib/commonjs/config/async/AutoInstrumentationConfiguration.js.map +1 -0
- package/lib/commonjs/config/async/PartialInitializationConfiguration.js +6 -0
- package/lib/commonjs/config/async/PartialInitializationConfiguration.js.map +1 -0
- package/lib/commonjs/config/async/asyncInitializationHelper.js +44 -0
- package/lib/commonjs/config/async/asyncInitializationHelper.js.map +1 -0
- package/lib/commonjs/config/features/CoreConfiguration.js +104 -0
- package/lib/commonjs/config/features/CoreConfiguration.js.map +1 -0
- package/lib/commonjs/config/features/CoreConfiguration.type.js +6 -0
- package/lib/commonjs/config/features/CoreConfiguration.type.js.map +1 -0
- package/lib/commonjs/config/features/CoreConfigurationNative.js +38 -0
- package/lib/commonjs/config/features/CoreConfigurationNative.js.map +1 -0
- package/lib/commonjs/config/features/LogsConfiguration.js +36 -0
- package/lib/commonjs/config/features/LogsConfiguration.js.map +1 -0
- package/lib/commonjs/config/features/LogsConfiguration.type.js +6 -0
- package/lib/commonjs/config/features/LogsConfiguration.type.js.map +1 -0
- package/lib/commonjs/config/features/LogsConfigurationNative.js +2 -0
- package/lib/commonjs/config/features/LogsConfigurationNative.js.map +1 -0
- package/lib/commonjs/config/features/RumConfiguration.js +120 -0
- package/lib/commonjs/config/features/RumConfiguration.js.map +1 -0
- package/lib/commonjs/config/features/RumConfiguration.type.js +6 -0
- package/lib/commonjs/config/features/RumConfiguration.type.js.map +1 -0
- package/lib/commonjs/config/features/RumConfigurationNative.js +2 -0
- package/lib/commonjs/config/features/RumConfigurationNative.js.map +1 -0
- package/lib/commonjs/config/features/TraceConfiguration.js +24 -0
- package/lib/commonjs/config/features/TraceConfiguration.js.map +1 -0
- package/lib/commonjs/config/features/TraceConfiguration.type.js +2 -0
- package/lib/commonjs/config/features/TraceConfiguration.type.js.map +1 -0
- package/lib/commonjs/config/features/TraceConfigurationNative.js +2 -0
- package/lib/commonjs/config/features/TraceConfigurationNative.js.map +1 -0
- package/lib/commonjs/config/types/BatchProcessingLevel.js +30 -0
- package/lib/commonjs/config/types/BatchProcessingLevel.js.map +1 -0
- package/lib/commonjs/config/types/BatchSize.js +31 -0
- package/lib/commonjs/config/types/BatchSize.js.map +1 -0
- package/lib/commonjs/config/types/InitializationMode.js +17 -0
- package/lib/commonjs/config/types/InitializationMode.js.map +1 -0
- package/lib/commonjs/config/types/InitializationModeForTelemetry.js +2 -0
- package/lib/commonjs/config/types/InitializationModeForTelemetry.js.map +1 -0
- package/lib/commonjs/{ProxyConfiguration.js → config/types/ProxyConfiguration.js} +6 -0
- package/lib/commonjs/config/types/ProxyConfiguration.js.map +1 -0
- package/lib/commonjs/config/types/SdkVerbosity.js.map +1 -0
- package/lib/commonjs/config/types/TrackingConsent.js.map +1 -0
- package/lib/commonjs/config/types/UploadFrequency.js +30 -0
- package/lib/commonjs/config/types/UploadFrequency.js.map +1 -0
- package/lib/commonjs/config/types/VitalsUpdateFrequency.js +19 -0
- package/lib/commonjs/config/types/VitalsUpdateFrequency.js.map +1 -0
- package/lib/commonjs/config/types/index.js +68 -0
- package/lib/commonjs/config/types/index.js.map +1 -0
- package/lib/commonjs/index.js +51 -21
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/logs/DdLogs.js +13 -9
- package/lib/commonjs/logs/DdLogs.js.map +1 -1
- package/lib/commonjs/logs/eventMapper.js +4 -1
- package/lib/commonjs/logs/eventMapper.js.map +1 -1
- package/lib/commonjs/nativeModulesTypes.js +0 -45
- package/lib/commonjs/nativeModulesTypes.js.map +1 -1
- package/lib/commonjs/rum/DdRum.js +56 -28
- package/lib/commonjs/rum/DdRum.js.map +1 -1
- package/lib/commonjs/rum/helper.js +63 -0
- package/lib/commonjs/rum/helper.js.map +1 -0
- package/lib/commonjs/rum/instrumentation/DdRumErrorTracking.js +14 -18
- package/lib/commonjs/rum/instrumentation/DdRumErrorTracking.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js +15 -25
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdEventsInterceptor.js +1 -1
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js +15 -5
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/DdRumResourceTracking.js +34 -22
- package/lib/commonjs/rum/instrumentation/resourceTracking/DdRumResourceTracking.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.js +21 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js +16 -3
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js +10 -12
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.js +6 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.js.map +1 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js +41 -47
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.js +62 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.js.map +1 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/headers.js +36 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/headers.js.map +1 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js +19 -8
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js +90 -48
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js +1 -1
- package/lib/commonjs/rum/types.js +1 -9
- package/lib/commonjs/rum/types.js.map +1 -1
- package/lib/commonjs/sdk/AccountInfoSingleton/AccountInfoSingleton.js +46 -0
- package/lib/commonjs/sdk/AccountInfoSingleton/AccountInfoSingleton.js.map +1 -0
- package/lib/commonjs/sdk/AccountInfoSingleton/types.js +2 -0
- package/lib/commonjs/sdk/AccountInfoSingleton/types.js.map +1 -0
- package/lib/commonjs/sdk/AttributesEncoding/attributesEncoding.js +51 -0
- package/lib/commonjs/sdk/AttributesEncoding/attributesEncoding.js.map +1 -0
- package/lib/commonjs/sdk/AttributesEncoding/defaultEncoders.js +140 -0
- package/lib/commonjs/sdk/AttributesEncoding/defaultEncoders.js.map +1 -0
- package/lib/commonjs/{utils → sdk/AttributesEncoding}/errorUtils.js +39 -22
- package/lib/commonjs/sdk/AttributesEncoding/errorUtils.js.map +1 -0
- package/lib/commonjs/sdk/AttributesEncoding/helpers.js +123 -0
- package/lib/commonjs/sdk/AttributesEncoding/helpers.js.map +1 -0
- package/lib/commonjs/sdk/AttributesEncoding/types.js +2 -0
- package/lib/commonjs/sdk/AttributesEncoding/types.js.map +1 -0
- package/lib/commonjs/sdk/AttributesEncoding/utils.js +36 -0
- package/lib/commonjs/sdk/AttributesEncoding/utils.js.map +1 -0
- package/lib/commonjs/sdk/AttributesSingleton/AttributesSingleton.js +27 -1
- package/lib/commonjs/sdk/AttributesSingleton/AttributesSingleton.js.map +1 -1
- package/lib/commonjs/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.js +3 -3
- package/lib/commonjs/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.js.map +1 -1
- package/lib/commonjs/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.js +1 -1
- package/lib/commonjs/sdk/DatadogProvider/Buffer/BoundedBuffer.js +4 -4
- package/lib/commonjs/sdk/DatadogProvider/Buffer/BoundedBuffer.js.map +1 -1
- package/lib/commonjs/sdk/DatadogProvider/DatadogProvider.js +10 -9
- package/lib/commonjs/sdk/DatadogProvider/DatadogProvider.js.map +1 -1
- package/lib/commonjs/sdk/DatadogProvider/DatadogProviderState.js +28 -0
- package/lib/commonjs/sdk/DatadogProvider/DatadogProviderState.js.map +1 -0
- package/lib/commonjs/sdk/DdSdk.js +4 -2
- package/lib/commonjs/sdk/DdSdk.js.map +1 -1
- package/lib/commonjs/sdk/DdSdkInternal.js +86 -0
- package/lib/commonjs/sdk/DdSdkInternal.js.map +1 -0
- package/lib/commonjs/sdk/EventMappers/EventMapper.js +6 -3
- package/lib/commonjs/sdk/EventMappers/EventMapper.js.map +1 -1
- package/lib/commonjs/sdk/GlobalState/GlobalState.js +5 -11
- package/lib/commonjs/sdk/GlobalState/GlobalState.js.map +1 -1
- package/lib/commonjs/sdk/UserInfoSingleton/UserInfoSingleton.js +6 -1
- package/lib/commonjs/sdk/UserInfoSingleton/UserInfoSingleton.js.map +1 -1
- package/lib/commonjs/specs/NativeDdRum.js.map +1 -1
- package/lib/commonjs/specs/NativeDdSdk.js.map +1 -1
- package/lib/commonjs/trace/DdTrace.js +7 -5
- package/lib/commonjs/trace/DdTrace.js.map +1 -1
- package/lib/commonjs/types.js +19 -46
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/utils/longTasksUtils.js.map +1 -1
- package/lib/commonjs/utils/singletonUtils.js +21 -0
- package/lib/commonjs/utils/singletonUtils.js.map +1 -0
- package/lib/commonjs/version.js +1 -1
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/DdAttributes.js.map +1 -0
- package/lib/module/DdSdkReactNative.js +155 -52
- package/lib/module/DdSdkReactNative.js.map +1 -1
- package/lib/module/InternalLog.js +1 -1
- package/lib/module/InternalLog.js.map +1 -1
- package/lib/module/config/DatadogProviderConfiguration.js +18 -0
- package/lib/module/config/DatadogProviderConfiguration.js.map +1 -0
- package/lib/module/config/FileBasedConfiguration.js +341 -0
- package/lib/module/config/FileBasedConfiguration.js.map +1 -0
- package/lib/module/config/FileBasedConfiguration.type.js +2 -0
- package/lib/module/config/FileBasedConfiguration.type.js.map +1 -0
- package/lib/module/config/async/AutoInstrumentationConfiguration.js +45 -0
- package/lib/module/config/async/AutoInstrumentationConfiguration.js.map +1 -0
- package/lib/module/config/async/PartialInitializationConfiguration.js +2 -0
- package/lib/module/config/async/PartialInitializationConfiguration.js.map +1 -0
- package/lib/module/config/async/asyncInitializationHelper.js +36 -0
- package/lib/module/config/async/asyncInitializationHelper.js.map +1 -0
- package/lib/module/config/features/CoreConfiguration.js +98 -0
- package/lib/module/config/features/CoreConfiguration.js.map +1 -0
- package/lib/module/config/features/CoreConfiguration.type.js +2 -0
- package/lib/module/config/features/CoreConfiguration.type.js.map +1 -0
- package/lib/module/config/features/CoreConfigurationNative.js +31 -0
- package/lib/module/config/features/CoreConfigurationNative.js.map +1 -0
- package/lib/module/config/features/LogsConfiguration.js +30 -0
- package/lib/module/config/features/LogsConfiguration.js.map +1 -0
- package/lib/module/config/features/LogsConfiguration.type.js +2 -0
- package/lib/module/config/features/LogsConfiguration.type.js.map +1 -0
- package/lib/module/config/features/LogsConfigurationNative.js +2 -0
- package/lib/module/config/features/LogsConfigurationNative.js.map +1 -0
- package/lib/module/config/features/RumConfiguration.js +114 -0
- package/lib/module/config/features/RumConfiguration.js.map +1 -0
- package/lib/module/config/features/RumConfiguration.type.js +2 -0
- package/lib/module/config/features/RumConfiguration.type.js.map +1 -0
- package/lib/module/config/features/RumConfigurationNative.js +2 -0
- package/lib/module/config/features/RumConfigurationNative.js.map +1 -0
- package/lib/module/config/features/TraceConfiguration.js +18 -0
- package/lib/module/config/features/TraceConfiguration.js.map +1 -0
- package/lib/module/config/features/TraceConfiguration.type.js +2 -0
- package/lib/module/config/features/TraceConfiguration.type.js.map +1 -0
- package/lib/module/config/features/TraceConfigurationNative.js +2 -0
- package/lib/module/config/features/TraceConfigurationNative.js.map +1 -0
- package/lib/module/config/types/BatchProcessingLevel.js +25 -0
- package/lib/module/config/types/BatchProcessingLevel.js.map +1 -0
- package/lib/module/config/types/BatchSize.js +26 -0
- package/lib/module/config/types/BatchSize.js.map +1 -0
- package/lib/module/config/types/InitializationMode.js +11 -0
- package/lib/module/config/types/InitializationMode.js.map +1 -0
- package/lib/module/config/types/InitializationModeForTelemetry.js +2 -0
- package/lib/module/config/types/InitializationModeForTelemetry.js.map +1 -0
- package/lib/module/{ProxyConfiguration.js → config/types/ProxyConfiguration.js} +6 -0
- package/lib/module/config/types/ProxyConfiguration.js.map +1 -0
- package/lib/module/config/types/SdkVerbosity.js.map +1 -0
- package/lib/module/config/types/TrackingConsent.js.map +1 -0
- package/lib/module/config/types/UploadFrequency.js +25 -0
- package/lib/module/config/types/UploadFrequency.js.map +1 -0
- package/lib/module/config/types/VitalsUpdateFrequency.js +13 -0
- package/lib/module/config/types/VitalsUpdateFrequency.js.map +1 -0
- package/lib/module/config/types/index.js +15 -0
- package/lib/module/config/types/index.js.map +1 -0
- package/lib/module/index.js +13 -7
- package/lib/module/index.js.map +1 -1
- package/lib/module/logs/DdLogs.js +13 -9
- package/lib/module/logs/DdLogs.js.map +1 -1
- package/lib/module/logs/eventMapper.js +4 -1
- package/lib/module/logs/eventMapper.js.map +1 -1
- package/lib/module/nativeModulesTypes.js +1 -43
- package/lib/module/nativeModulesTypes.js.map +1 -1
- package/lib/module/rum/DdRum.js +54 -26
- package/lib/module/rum/DdRum.js.map +1 -1
- package/lib/module/rum/helper.js +49 -0
- package/lib/module/rum/helper.js.map +1 -0
- package/lib/module/rum/instrumentation/DdRumErrorTracking.js +14 -18
- package/lib/module/rum/instrumentation/DdRumErrorTracking.js.map +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js +15 -24
- package/lib/module/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js.map +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/DdEventsInterceptor.js +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/DdEventsInterceptor.js.map +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js +15 -5
- package/lib/module/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/DdRumResourceTracking.js +33 -21
- package/lib/module/rum/instrumentation/resourceTracking/DdRumResourceTracking.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.js +22 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js +13 -2
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js +10 -11
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.js +2 -0
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.js.map +1 -0
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js +27 -33
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.js +54 -0
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.js.map +1 -0
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/headers.js +30 -0
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/headers.js.map +1 -0
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js +14 -3
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js +90 -48
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js.map +1 -1
- package/lib/module/rum/types.js +0 -9
- package/lib/module/rum/types.js.map +1 -1
- package/lib/module/sdk/AccountInfoSingleton/AccountInfoSingleton.js +39 -0
- package/lib/module/sdk/AccountInfoSingleton/AccountInfoSingleton.js.map +1 -0
- package/lib/module/sdk/AccountInfoSingleton/types.js +2 -0
- package/lib/module/sdk/AccountInfoSingleton/types.js.map +1 -0
- package/lib/module/sdk/AttributesEncoding/attributesEncoding.js +46 -0
- package/lib/module/sdk/AttributesEncoding/attributesEncoding.js.map +1 -0
- package/lib/module/sdk/AttributesEncoding/defaultEncoders.js +134 -0
- package/lib/module/sdk/AttributesEncoding/defaultEncoders.js.map +1 -0
- package/lib/module/{utils → sdk/AttributesEncoding}/errorUtils.js +37 -20
- package/lib/module/sdk/AttributesEncoding/errorUtils.js.map +1 -0
- package/lib/module/sdk/AttributesEncoding/helpers.js +115 -0
- package/lib/module/sdk/AttributesEncoding/helpers.js.map +1 -0
- package/lib/module/sdk/AttributesEncoding/types.js +2 -0
- package/lib/module/sdk/AttributesEncoding/types.js.map +1 -0
- package/lib/module/sdk/AttributesEncoding/utils.js +28 -0
- package/lib/module/sdk/AttributesEncoding/utils.js.map +1 -0
- package/lib/module/sdk/AttributesSingleton/AttributesSingleton.js +27 -1
- package/lib/module/sdk/AttributesSingleton/AttributesSingleton.js.map +1 -1
- package/lib/module/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.js +2 -2
- package/lib/module/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.js.map +1 -1
- package/lib/module/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.js +1 -1
- package/lib/module/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.js.map +1 -1
- package/lib/module/sdk/DatadogProvider/Buffer/BoundedBuffer.js +4 -4
- package/lib/module/sdk/DatadogProvider/Buffer/BoundedBuffer.js.map +1 -1
- package/lib/module/sdk/DatadogProvider/DatadogProvider.js +9 -8
- package/lib/module/sdk/DatadogProvider/DatadogProvider.js.map +1 -1
- package/lib/module/sdk/DatadogProvider/DatadogProviderState.js +21 -0
- package/lib/module/sdk/DatadogProvider/DatadogProviderState.js.map +1 -0
- package/lib/module/sdk/DdSdk.js +4 -4
- package/lib/module/sdk/DdSdk.js.map +1 -1
- package/lib/module/sdk/DdSdkInternal.js +80 -0
- package/lib/module/sdk/DdSdkInternal.js.map +1 -0
- package/lib/module/sdk/EventMappers/EventMapper.js +6 -3
- package/lib/module/sdk/EventMappers/EventMapper.js.map +1 -1
- package/lib/module/sdk/GlobalState/GlobalState.js +5 -10
- package/lib/module/sdk/GlobalState/GlobalState.js.map +1 -1
- package/lib/module/sdk/UserInfoSingleton/UserInfoSingleton.js +6 -1
- package/lib/module/sdk/UserInfoSingleton/UserInfoSingleton.js.map +1 -1
- package/lib/module/specs/NativeDdRum.js.map +1 -1
- package/lib/module/specs/NativeDdSdk.js.map +1 -1
- package/lib/module/trace/DdTrace.js +7 -6
- package/lib/module/trace/DdTrace.js.map +1 -1
- package/lib/module/types.js +22 -42
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/longTasksUtils.js.map +1 -1
- package/lib/module/utils/singletonUtils.js +14 -0
- package/lib/module/utils/singletonUtils.js.map +1 -0
- package/lib/module/version.js +1 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/DdAttributes.d.ts.map +1 -0
- package/lib/typescript/DdSdkReactNative.d.ts +49 -12
- package/lib/typescript/DdSdkReactNative.d.ts.map +1 -1
- package/lib/typescript/InternalLog.d.ts +1 -1
- package/lib/typescript/InternalLog.d.ts.map +1 -1
- package/lib/typescript/config/DatadogProviderConfiguration.d.ts +12 -0
- package/lib/typescript/config/DatadogProviderConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/FileBasedConfiguration.d.ts +17 -0
- package/lib/typescript/config/FileBasedConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/FileBasedConfiguration.type.d.ts +52 -0
- package/lib/typescript/config/FileBasedConfiguration.type.d.ts.map +1 -0
- package/lib/typescript/config/async/AutoInstrumentationConfiguration.d.ts +60 -0
- package/lib/typescript/config/async/AutoInstrumentationConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/async/PartialInitializationConfiguration.d.ts +47 -0
- package/lib/typescript/config/async/PartialInitializationConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/async/asyncInitializationHelper.d.ts +5 -0
- package/lib/typescript/config/async/asyncInitializationHelper.d.ts.map +1 -0
- package/lib/typescript/config/features/CoreConfiguration.d.ts +52 -0
- package/lib/typescript/config/features/CoreConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/features/CoreConfiguration.type.d.ts +90 -0
- package/lib/typescript/config/features/CoreConfiguration.type.d.ts.map +1 -0
- package/lib/typescript/config/features/CoreConfigurationNative.d.ts +54 -0
- package/lib/typescript/config/features/CoreConfigurationNative.d.ts.map +1 -0
- package/lib/typescript/config/features/LogsConfiguration.d.ts +17 -0
- package/lib/typescript/config/features/LogsConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/features/LogsConfiguration.type.d.ts +24 -0
- package/lib/typescript/config/features/LogsConfiguration.type.d.ts.map +1 -0
- package/lib/typescript/config/features/LogsConfigurationNative.d.ts +6 -0
- package/lib/typescript/config/features/LogsConfigurationNative.d.ts.map +1 -0
- package/lib/typescript/config/features/RumConfiguration.d.ts +66 -0
- package/lib/typescript/config/features/RumConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/features/RumConfiguration.type.d.ts +131 -0
- package/lib/typescript/config/features/RumConfiguration.type.d.ts.map +1 -0
- package/lib/typescript/config/features/RumConfigurationNative.d.ts +25 -0
- package/lib/typescript/config/features/RumConfigurationNative.d.ts.map +1 -0
- package/lib/typescript/config/features/TraceConfiguration.d.ts +10 -0
- package/lib/typescript/config/features/TraceConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/features/TraceConfiguration.type.d.ts +11 -0
- package/lib/typescript/config/features/TraceConfiguration.type.d.ts.map +1 -0
- package/lib/typescript/config/features/TraceConfigurationNative.d.ts +4 -0
- package/lib/typescript/config/features/TraceConfigurationNative.d.ts.map +1 -0
- package/lib/typescript/config/types/BatchProcessingLevel.d.ts +18 -0
- package/lib/typescript/config/types/BatchProcessingLevel.d.ts.map +1 -0
- package/lib/typescript/config/types/BatchSize.d.ts +19 -0
- package/lib/typescript/config/types/BatchSize.d.ts.map +1 -0
- package/lib/typescript/config/types/InitializationMode.d.ts +5 -0
- package/lib/typescript/config/types/InitializationMode.d.ts.map +1 -0
- package/lib/typescript/config/types/InitializationModeForTelemetry.d.ts +2 -0
- package/lib/typescript/config/types/InitializationModeForTelemetry.d.ts.map +1 -0
- package/lib/typescript/config/types/ProxyConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/types/SdkVerbosity.d.ts.map +1 -0
- package/lib/typescript/config/types/TrackingConsent.d.ts.map +1 -0
- package/lib/typescript/config/types/UploadFrequency.d.ts +18 -0
- package/lib/typescript/config/types/UploadFrequency.d.ts.map +1 -0
- package/lib/typescript/config/types/VitalsUpdateFrequency.d.ts +7 -0
- package/lib/typescript/config/types/VitalsUpdateFrequency.d.ts.map +1 -0
- package/lib/typescript/config/types/index.d.ts +10 -0
- package/lib/typescript/config/types/index.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +20 -9
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/logs/DdLogs.d.ts +2 -1
- package/lib/typescript/logs/DdLogs.d.ts.map +1 -1
- package/lib/typescript/logs/eventMapper.d.ts +3 -2
- package/lib/typescript/logs/eventMapper.d.ts.map +1 -1
- package/lib/typescript/logs/types.d.ts +1 -16
- package/lib/typescript/logs/types.d.ts.map +1 -1
- package/lib/typescript/nativeModulesTypes.d.ts +2 -15
- package/lib/typescript/nativeModulesTypes.d.ts.map +1 -1
- package/lib/typescript/rum/DdRum.d.ts +10 -1
- package/lib/typescript/rum/DdRum.d.ts.map +1 -1
- package/lib/typescript/rum/eventMappers/errorEventMapper.d.ts +1 -1
- package/lib/typescript/rum/eventMappers/errorEventMapper.d.ts.map +1 -1
- package/lib/typescript/rum/helper.d.ts +10 -0
- package/lib/typescript/rum/helper.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/DdRumErrorTracking.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.d.ts +6 -6
- package/lib/typescript/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.d.ts +7 -0
- package/lib/typescript/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/DdRumResourceTracking.d.ts +12 -6
- package/lib/typescript/rum/instrumentation/resourceTracking/DdRumResourceTracking.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.d.ts +8 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.d.ts +5 -17
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.d.ts +20 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.d.ts +3 -24
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.d.ts +12 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/headers.d.ts +24 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/headers.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.d.ts +2 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.d.ts +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.d.ts.map +1 -1
- package/lib/typescript/rum/types.d.ts +47 -7
- package/lib/typescript/rum/types.d.ts.map +1 -1
- package/lib/typescript/sdk/AccountInfoSingleton/AccountInfoSingleton.d.ts +15 -0
- package/lib/typescript/sdk/AccountInfoSingleton/AccountInfoSingleton.d.ts.map +1 -0
- package/lib/typescript/sdk/AccountInfoSingleton/types.d.ts +6 -0
- package/lib/typescript/sdk/AccountInfoSingleton/types.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesEncoding/attributesEncoding.d.ts +13 -0
- package/lib/typescript/sdk/AttributesEncoding/attributesEncoding.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesEncoding/defaultEncoders.d.ts +33 -0
- package/lib/typescript/sdk/AttributesEncoding/defaultEncoders.d.ts.map +1 -0
- package/lib/typescript/{utils → sdk/AttributesEncoding}/errorUtils.d.ts +4 -4
- package/lib/typescript/sdk/AttributesEncoding/errorUtils.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesEncoding/helpers.d.ts +17 -0
- package/lib/typescript/sdk/AttributesEncoding/helpers.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesEncoding/types.d.ts +21 -0
- package/lib/typescript/sdk/AttributesEncoding/types.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesEncoding/utils.d.ts +7 -0
- package/lib/typescript/sdk/AttributesEncoding/utils.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesSingleton/AttributesSingleton.d.ts +5 -1
- package/lib/typescript/sdk/AttributesSingleton/AttributesSingleton.d.ts.map +1 -1
- package/lib/typescript/sdk/DatadogProvider/DatadogProvider.d.ts +4 -3
- package/lib/typescript/sdk/DatadogProvider/DatadogProvider.d.ts.map +1 -1
- package/lib/typescript/sdk/DatadogProvider/DatadogProviderState.d.ts +9 -0
- package/lib/typescript/sdk/DatadogProvider/DatadogProviderState.d.ts.map +1 -0
- package/lib/typescript/sdk/DdSdk.d.ts +2 -3
- package/lib/typescript/sdk/DdSdk.d.ts.map +1 -1
- package/lib/typescript/sdk/DdSdkInternal.d.ts +39 -0
- package/lib/typescript/sdk/DdSdkInternal.d.ts.map +1 -0
- package/lib/typescript/sdk/EventMappers/EventMapper.d.ts +3 -1
- package/lib/typescript/sdk/EventMappers/EventMapper.d.ts.map +1 -1
- package/lib/typescript/sdk/GlobalState/GlobalState.d.ts +3 -3
- package/lib/typescript/sdk/GlobalState/GlobalState.d.ts.map +1 -1
- package/lib/typescript/sdk/UserInfoSingleton/UserInfoSingleton.d.ts +2 -1
- package/lib/typescript/sdk/UserInfoSingleton/UserInfoSingleton.d.ts.map +1 -1
- package/lib/typescript/sdk/UserInfoSingleton/types.d.ts +1 -2
- package/lib/typescript/sdk/UserInfoSingleton/types.d.ts.map +1 -1
- package/lib/typescript/specs/NativeDdRum.d.ts +45 -0
- package/lib/typescript/specs/NativeDdRum.d.ts.map +1 -1
- package/lib/typescript/specs/NativeDdSdk.d.ts +34 -6
- package/lib/typescript/specs/NativeDdSdk.d.ts.map +1 -1
- package/lib/typescript/trace/DdTrace.d.ts +1 -2
- package/lib/typescript/trace/DdTrace.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +74 -92
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/utils/longTasksUtils.d.ts +1 -1
- package/lib/typescript/utils/longTasksUtils.d.ts.map +1 -1
- package/lib/typescript/utils/singletonUtils.d.ts +2 -0
- package/lib/typescript/utils/singletonUtils.d.ts.map +1 -0
- package/lib/typescript/version.d.ts +1 -1
- package/lib/typescript/version.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/DdSdkReactNative.tsx +246 -104
- package/src/InternalLog.tsx +1 -1
- package/src/__tests__/DdSdkReactNative.test.tsx +415 -207
- package/src/__tests__/DdSdkReactNativeConfiguration.test.ts +237 -153
- package/src/__tests__/InternalLog.test.tsx +1 -1
- package/src/__tests__/rum/instrumentation/DdEventsInterceptor.test.tsx +2 -2
- package/src/__tests__/rum/instrumentation/DdRumErrorTracking.test.tsx +139 -216
- package/src/__tests__/rum/instrumentation/DdRumUserInteractionTracking.test.tsx +10 -7
- package/src/config/DatadogProviderConfiguration.ts +17 -0
- package/src/config/FileBasedConfiguration.ts +464 -0
- package/src/config/FileBasedConfiguration.type.ts +66 -0
- package/src/config/__tests__/FileBasedConfiguration.test.ts +334 -0
- package/src/config/__tests__/__fixtures__/configuration-all-fields.json +57 -0
- package/src/config/__tests__/__fixtures__/malformed-configuration.json +4 -0
- package/src/config/async/AutoInstrumentationConfiguration.ts +126 -0
- package/src/config/async/PartialInitializationConfiguration.ts +58 -0
- package/src/config/async/asyncInitializationHelper.tsx +51 -0
- package/src/config/features/CoreConfiguration.ts +130 -0
- package/src/config/features/CoreConfiguration.type.ts +119 -0
- package/src/config/features/CoreConfigurationNative.ts +50 -0
- package/src/config/features/LogsConfiguration.ts +38 -0
- package/src/config/features/LogsConfiguration.type.ts +33 -0
- package/src/config/features/LogsConfigurationNative.ts +10 -0
- package/src/config/features/RumConfiguration.ts +137 -0
- package/src/config/features/RumConfiguration.type.ts +164 -0
- package/src/config/features/RumConfigurationNative.ts +26 -0
- package/src/config/features/TraceConfiguration.ts +24 -0
- package/src/config/features/TraceConfiguration.type.ts +17 -0
- package/src/config/features/TraceConfigurationNative.ts +8 -0
- package/src/config/types/BatchProcessingLevel.ts +23 -0
- package/src/config/types/BatchSize.ts +24 -0
- package/src/config/types/InitializationMode.ts +9 -0
- package/src/config/types/InitializationModeForTelemetry.ts +11 -0
- package/src/{ProxyConfiguration.tsx → config/types/ProxyConfiguration.ts} +6 -0
- package/src/config/types/UploadFrequency.tsx +23 -0
- package/src/config/types/VitalsUpdateFrequency.ts +11 -0
- package/src/config/types/index.ts +15 -0
- package/src/index.tsx +33 -16
- package/src/logs/DdLogs.ts +14 -13
- package/src/logs/__tests__/DdLogs.test.ts +60 -107
- package/src/logs/__tests__/eventMapper.test.ts +1 -1
- package/src/logs/eventMapper.ts +5 -4
- package/src/logs/types.ts +1 -20
- package/src/nativeModulesTypes.ts +2 -17
- package/src/rum/DdRum.ts +139 -42
- package/src/rum/__tests__/DdRum.test.ts +217 -47
- package/src/rum/eventMappers/errorEventMapper.ts +1 -1
- package/src/rum/helper.ts +62 -0
- package/src/rum/instrumentation/DdRumErrorTracking.tsx +20 -38
- package/src/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.ts +20 -32
- package/src/rum/instrumentation/interactionTracking/DdEventsInterceptor.tsx +1 -1
- package/src/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.tsx +18 -5
- package/src/rum/instrumentation/resourceTracking/DdRumResourceTracking.tsx +44 -23
- package/src/rum/instrumentation/resourceTracking/__tests__/DdRumResourceTracking.test.ts +2 -2
- package/src/rum/instrumentation/resourceTracking/__tests__/__utils__/XMLHttpRequestMock.ts +44 -23
- package/src/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.ts +24 -1
- package/src/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.tsx +17 -2
- package/src/rum/instrumentation/resourceTracking/distributedTracing/__tests__/distributedTracing.test.ts +327 -1
- package/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.tsx +22 -31
- package/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.ts +29 -0
- package/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.ts +54 -35
- package/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.ts +80 -0
- package/src/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.ts +1 -1
- package/src/rum/instrumentation/resourceTracking/distributedTracing/headers.ts +29 -0
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.ts +1 -1
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.ts +19 -7
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/__tests__/XHRProxy.test.ts +177 -119
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/__tests__/baggageHeaderUtils.test.ts +85 -13
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.ts +110 -52
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.ts +1 -1
- package/src/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.ts +1 -1
- package/src/rum/types.ts +68 -8
- package/src/sdk/AccountInfoSingleton/AccountInfoSingleton.ts +49 -0
- package/src/sdk/AccountInfoSingleton/__tests__/AccountInfoSingleton.test.ts +90 -0
- package/src/sdk/AccountInfoSingleton/types.ts +11 -0
- package/src/sdk/AttributesEncoding/__tests__/attributesEncoding.test.ts +518 -0
- package/src/sdk/AttributesEncoding/__tests__/defaultEncoders.test.ts +198 -0
- package/src/sdk/AttributesEncoding/attributesEncoding.ts +56 -0
- package/src/sdk/AttributesEncoding/defaultEncoders.ts +175 -0
- package/src/{utils → sdk/AttributesEncoding}/errorUtils.ts +50 -22
- package/src/sdk/AttributesEncoding/helpers.ts +176 -0
- package/src/sdk/AttributesEncoding/types.ts +33 -0
- package/src/sdk/AttributesEncoding/utils.ts +31 -0
- package/src/sdk/AttributesSingleton/AttributesSingleton.ts +25 -1
- package/src/sdk/AttributesSingleton/__tests__/AttributesSingleton.test.ts +52 -8
- package/src/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.tsx +2 -2
- package/src/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.tsx +1 -1
- package/src/sdk/DatadogInternalBridge/__tests__/DdSdkNativeBridge.test.tsx +1 -1
- package/src/sdk/DatadogProvider/Buffer/BoundedBuffer.ts +4 -4
- package/src/sdk/DatadogProvider/Buffer/__tests__/BoundedBuffer.test.ts +5 -5
- package/src/sdk/DatadogProvider/DatadogProvider.tsx +12 -16
- package/src/sdk/DatadogProvider/DatadogProviderState.ts +30 -0
- package/src/sdk/DatadogProvider/__tests__/__utils__/renderWithProvider.tsx +18 -7
- package/src/sdk/DatadogProvider/__tests__/initialization.test.tsx +59 -33
- package/src/sdk/DatadogProvider/__tests__/initializationModes.test.tsx +26 -10
- package/src/sdk/DdSdk.ts +8 -5
- package/src/sdk/DdSdkInternal.ts +121 -0
- package/src/sdk/EventMappers/EventMapper.ts +9 -4
- package/src/sdk/EventMappers/__tests__/EventMapper.test.ts +3 -3
- package/src/sdk/GlobalState/GlobalState.tsx +10 -11
- package/src/sdk/UserInfoSingleton/UserInfoSingleton.ts +9 -2
- package/src/sdk/UserInfoSingleton/__tests__/UserInfoSingleton.test.ts +46 -9
- package/src/sdk/UserInfoSingleton/types.ts +1 -4
- package/src/specs/NativeDdRum.ts +65 -0
- package/src/specs/NativeDdSdk.ts +40 -6
- package/src/trace/DdTrace.ts +11 -7
- package/src/trace/__tests__/DdTrace.test.ts +7 -8
- package/src/types.tsx +97 -76
- package/src/utils/__tests__/errorUtils.test.ts +1 -1
- package/src/utils/__tests__/singletonUtils.test.ts +75 -0
- package/src/utils/longTasksUtils.ts +1 -3
- package/src/utils/singletonUtils.ts +17 -0
- package/src/version.ts +1 -1
- package/lib/commonjs/DdSdkReactNativeConfiguration.js +0 -412
- package/lib/commonjs/DdSdkReactNativeConfiguration.js.map +0 -1
- package/lib/commonjs/ProxyConfiguration.js.map +0 -1
- package/lib/commonjs/SdkVerbosity.js.map +0 -1
- package/lib/commonjs/TrackingConsent.js.map +0 -1
- package/lib/commonjs/rum/DdAttributes.js.map +0 -1
- package/lib/commonjs/sdk/FileBasedConfiguration/FileBasedConfiguration.js +0 -185
- package/lib/commonjs/sdk/FileBasedConfiguration/FileBasedConfiguration.js.map +0 -1
- package/lib/commonjs/utils/argsUtils.js +0 -41
- package/lib/commonjs/utils/argsUtils.js.map +0 -1
- package/lib/commonjs/utils/errorUtils.js.map +0 -1
- package/lib/module/DdSdkReactNativeConfiguration.js +0 -403
- package/lib/module/DdSdkReactNativeConfiguration.js.map +0 -1
- package/lib/module/ProxyConfiguration.js.map +0 -1
- package/lib/module/SdkVerbosity.js.map +0 -1
- package/lib/module/TrackingConsent.js.map +0 -1
- package/lib/module/rum/DdAttributes.js.map +0 -1
- package/lib/module/sdk/FileBasedConfiguration/FileBasedConfiguration.js +0 -176
- package/lib/module/sdk/FileBasedConfiguration/FileBasedConfiguration.js.map +0 -1
- package/lib/module/utils/argsUtils.js +0 -35
- package/lib/module/utils/argsUtils.js.map +0 -1
- package/lib/module/utils/errorUtils.js.map +0 -1
- package/lib/typescript/DdSdkReactNativeConfiguration.d.ts +0 -376
- package/lib/typescript/DdSdkReactNativeConfiguration.d.ts.map +0 -1
- package/lib/typescript/ProxyConfiguration.d.ts.map +0 -1
- package/lib/typescript/SdkVerbosity.d.ts.map +0 -1
- package/lib/typescript/TrackingConsent.d.ts.map +0 -1
- package/lib/typescript/rum/DdAttributes.d.ts.map +0 -1
- package/lib/typescript/sdk/FileBasedConfiguration/FileBasedConfiguration.d.ts +0 -34
- package/lib/typescript/sdk/FileBasedConfiguration/FileBasedConfiguration.d.ts.map +0 -1
- package/lib/typescript/utils/argsUtils.d.ts +0 -8
- package/lib/typescript/utils/argsUtils.d.ts.map +0 -1
- package/lib/typescript/utils/errorUtils.d.ts.map +0 -1
- package/src/DdSdkReactNativeConfiguration.tsx +0 -582
- package/src/sdk/FileBasedConfiguration/FileBasedConfiguration.ts +0 -241
- package/src/sdk/FileBasedConfiguration/__tests__/FileBasedConfiguration.test.ts +0 -255
- package/src/sdk/FileBasedConfiguration/__tests__/__fixtures__/configuration-all-fields.json +0 -27
- package/src/sdk/FileBasedConfiguration/__tests__/__fixtures__/malformed-configuration.json +0 -5
- package/src/utils/__tests__/argsUtils.test.ts +0 -66
- package/src/utils/argsUtils.ts +0 -41
- /package/lib/commonjs/{rum/DdAttributes.js → DdAttributes.js} +0 -0
- /package/lib/commonjs/{SdkVerbosity.js → config/types/SdkVerbosity.js} +0 -0
- /package/lib/commonjs/{TrackingConsent.js → config/types/TrackingConsent.js} +0 -0
- /package/lib/module/{rum/DdAttributes.js → DdAttributes.js} +0 -0
- /package/lib/module/{SdkVerbosity.js → config/types/SdkVerbosity.js} +0 -0
- /package/lib/module/{TrackingConsent.js → config/types/TrackingConsent.js} +0 -0
- /package/lib/typescript/{rum/DdAttributes.d.ts → DdAttributes.d.ts} +0 -0
- /package/lib/typescript/{ProxyConfiguration.d.ts → config/types/ProxyConfiguration.d.ts} +0 -0
- /package/lib/typescript/{SdkVerbosity.d.ts → config/types/SdkVerbosity.d.ts} +0 -0
- /package/lib/typescript/{TrackingConsent.d.ts → config/types/TrackingConsent.d.ts} +0 -0
- /package/src/{rum/DdAttributes.ts → DdAttributes.ts} +0 -0
- /package/src/{SdkVerbosity.tsx → config/types/SdkVerbosity.ts} +0 -0
- /package/src/{TrackingConsent.tsx → config/types/TrackingConsent.ts} +0 -0
|
@@ -4,19 +4,20 @@
|
|
|
4
4
|
* Copyright 2016-Present Datadog, Inc.
|
|
5
5
|
*/
|
|
6
6
|
import React from 'react';
|
|
7
|
-
import { DatadogProviderConfiguration, DdSdkReactNativeConfiguration } from '../../DdSdkReactNativeConfiguration';
|
|
8
7
|
import { DdSdkReactNative } from '../../DdSdkReactNative';
|
|
9
8
|
import { InternalLog } from '../../InternalLog';
|
|
10
|
-
import {
|
|
9
|
+
import { DatadogProviderConfiguration } from '../../config/DatadogProviderConfiguration';
|
|
10
|
+
import { CoreConfiguration } from '../../config/features/CoreConfiguration';
|
|
11
|
+
import { SdkVerbosity } from '../../config/types/SdkVerbosity';
|
|
12
|
+
import { DatadogProviderState } from './DatadogProviderState';
|
|
11
13
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
let isInitialized = false;
|
|
13
14
|
const isConfigurationPartial = configuration => {
|
|
14
15
|
if (configuration instanceof DatadogProviderConfiguration) {
|
|
15
16
|
return false;
|
|
16
17
|
}
|
|
17
|
-
if (configuration instanceof
|
|
18
|
+
if (configuration instanceof CoreConfiguration) {
|
|
18
19
|
// Not using InternalLog here as it is not yet instantiated
|
|
19
|
-
console.warn('A
|
|
20
|
+
console.warn('A CoreConfiguration was passed to DatadogProvider. Please use DatadogProviderConfiguration instead.');
|
|
20
21
|
return false;
|
|
21
22
|
}
|
|
22
23
|
return true;
|
|
@@ -40,7 +41,7 @@ export const DatadogProvider = ({
|
|
|
40
41
|
configuration,
|
|
41
42
|
onInitialization
|
|
42
43
|
}) => {
|
|
43
|
-
if (!isInitialized) {
|
|
44
|
+
if (!DatadogProviderState.isInitialized) {
|
|
44
45
|
// Here we cannot use a useEffect hook since it would be called after
|
|
45
46
|
// the first render. Thus, we wouldn't enable auto-instrumentation on
|
|
46
47
|
// the elements rendered in this first render and what happens during
|
|
@@ -51,7 +52,7 @@ export const DatadogProvider = ({
|
|
|
51
52
|
} else {
|
|
52
53
|
initializeDatadog(configuration, onInitialization);
|
|
53
54
|
}
|
|
54
|
-
|
|
55
|
+
DatadogProviderState.setInitialized();
|
|
55
56
|
}
|
|
56
57
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
57
58
|
children: children
|
|
@@ -69,6 +70,6 @@ DatadogProvider.initialize = async configuration => {
|
|
|
69
70
|
}
|
|
70
71
|
};
|
|
71
72
|
export const __internalResetIsInitializedForTesting = () => {
|
|
72
|
-
|
|
73
|
+
DatadogProviderState._reset();
|
|
73
74
|
};
|
|
74
75
|
//# sourceMappingURL=DatadogProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","DdSdkReactNative","InternalLog","DatadogProviderConfiguration","CoreConfiguration","SdkVerbosity","DatadogProviderState","Fragment","_Fragment","jsx","_jsx","isConfigurationPartial","configuration","console","warn","initializeDatadog","onInitialization","_initializeFromDatadogProvider","error","log","WARN","DatadogProvider","children","isInitialized","_enableFeaturesFromDatadogProvider","setInitialized","initialize","_initializeFromDatadogProviderWithConfigurationAsync","__internalResetIsInitializedForTesting","_reset"],"sourceRoot":"../../../../src","sources":["sdk/DatadogProvider/DatadogProvider.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAGzB,SAASC,gBAAgB,QAAQ,wBAAwB;AACzD,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,4BAA4B,QAAQ,2CAA2C;AAIxF,SAASC,iBAAiB,QAAQ,yCAAyC;AAC3E,SAASC,YAAY,QAAQ,iCAAiC;AAE9D,SAASC,oBAAoB,QAAQ,wBAAwB;AAAC,SAAAC,QAAA,IAAAC,SAAA,EAAAC,GAAA,IAAAC,IAAA;AAyB9D,MAAMC,sBAAsB,GACxBC,aAEsC,IACc;EACpD,IAAIA,aAAa,YAAYT,4BAA4B,EAAE;IACvD,OAAO,KAAK;EAChB;EACA,IAAIS,aAAa,YAAYR,iBAAiB,EAAE;IAC5C;IACAS,OAAO,CAACC,IAAI,CACR,qGACJ,CAAC;IACD,OAAO,KAAK;EAChB;EACA,OAAO,IAAI;AACf,CAAC;AAED,MAAMC,iBAAiB,GAAG,MAAAA,CACtBH,aAA2C,EAC3CI,gBAA6B,KAC5B;EACD,MAAMf,gBAAgB,CAACgB,8BAA8B,CAACL,aAAa,CAAC;EACpE,IAAII,gBAAgB,EAAE;IAClB,IAAI;MACAA,gBAAgB,CAAC,CAAC;IACtB,CAAC,CAAC,OAAOE,KAAK,EAAE;MACZhB,WAAW,CAACiB,GAAG,CACX,2CAA2CD,KAAK,EAAE,EAClDb,YAAY,CAACe,IACjB,CAAC;IACL;EACJ;AACJ,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMC,eAAmD,GAAGA,CAAC;EAChEC,QAAQ;EACRV,aAAa;EACbI;AACJ,CAAC,KAAK;EACF,IAAI,CAACV,oBAAoB,CAACiB,aAAa,EAAE;IACrC;IACA;IACA;IACA;IACA,IAAIZ,sBAAsB,CAACC,aAAa,CAAC,EAAE;MACvCX,gBAAgB,CAACuB,kCAAkC,CAACZ,aAAa,CAAC;MAClES,eAAe,CAACL,gBAAgB,GAAGA,gBAAgB;IACvD,CAAC,MAAM;MACHD,iBAAiB,CAACH,aAAa,EAAEI,gBAAgB,CAAC;IACtD;IACAV,oBAAoB,CAACmB,cAAc,CAAC,CAAC;EACzC;EAEA,oBAAOf,IAAA,CAAAF,SAAA;IAAAc,QAAA,EAAGA;EAAQ,CAAG,CAAC;AAC1B,CAAC;;AAED;AACA;AACA;AACA;AACAD,eAAe,CAACK,UAAU,GAAG,MACzBd,aAAiD,IAChD;EACD,MAAMX,gBAAgB,CAAC0B,oDAAoD,CACvEf,aACJ,CAAC;EACD,IAAIS,eAAe,CAACL,gBAAgB,EAAE;IAClCK,eAAe,CAACL,gBAAgB,CAAC,CAAC;EACtC;AACJ,CAAC;AAED,OAAO,MAAMY,sCAAsC,GAAGA,CAAA,KAAM;EACxDtB,oBAAoB,CAACuB,MAAM,CAAC,CAAC;AACjC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
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 { getGlobalInstance } from '../../utils/singletonUtils';
|
|
7
|
+
const DATADOG_PROVIDER_STATE_MODULE = 'com.datadog.reactnative.rum.datadog_provider_state';
|
|
8
|
+
class _DatadogProviderState {
|
|
9
|
+
_isInitialized = false;
|
|
10
|
+
get isInitialized() {
|
|
11
|
+
return this._isInitialized;
|
|
12
|
+
}
|
|
13
|
+
setInitialized() {
|
|
14
|
+
this._isInitialized = true;
|
|
15
|
+
}
|
|
16
|
+
_reset() {
|
|
17
|
+
this._isInitialized = false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export const DatadogProviderState = getGlobalInstance(DATADOG_PROVIDER_STATE_MODULE, () => new _DatadogProviderState());
|
|
21
|
+
//# sourceMappingURL=DatadogProviderState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getGlobalInstance","DATADOG_PROVIDER_STATE_MODULE","_DatadogProviderState","_isInitialized","isInitialized","setInitialized","_reset","DatadogProviderState"],"sourceRoot":"../../../../src","sources":["sdk/DatadogProvider/DatadogProviderState.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,SAASA,iBAAiB,QAAQ,4BAA4B;AAE9D,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;AAEA,OAAO,MAAMI,oBAAoB,GAAGP,iBAAiB,CACjDC,6BAA6B,EAC7B,MAAM,IAAIC,qBAAqB,CAAC,CACpC,CAAC","ignoreList":[]}
|
package/lib/module/sdk/DdSdk.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
4
4
|
* Copyright 2016-Present Datadog, Inc.
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
export
|
|
6
|
+
import { getGlobalInstance } from '../utils/singletonUtils';
|
|
7
|
+
import { DdSdkWrapper } from './DdSdkInternal';
|
|
8
|
+
const CORE_MODULE = 'com.datadog.reactnative.core';
|
|
9
|
+
export const DdSdk = getGlobalInstance(CORE_MODULE, () => new DdSdkWrapper());
|
|
10
10
|
//# sourceMappingURL=DdSdk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["getGlobalInstance","DdSdkWrapper","CORE_MODULE","DdSdk"],"sourceRoot":"../../../src","sources":["sdk/DdSdk.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,SAASA,iBAAiB,QAAQ,yBAAyB;AAE3D,SAASC,YAAY,QAAQ,iBAAiB;AAG9C,MAAMC,WAAW,GAAG,8BAA8B;AAClD,OAAO,MAAMC,KAAK,GAAGH,iBAAiB,CAClCE,WAAW,EACX,MAAM,IAAID,YAAY,CAAC,CAC3B,CAAc","ignoreList":[]}
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
|
8
|
+
const NativeDdSdk = require('../specs/NativeDdSdk').default;
|
|
9
|
+
export class DdSdkWrapper {
|
|
10
|
+
get attributeEncoders() {
|
|
11
|
+
return this._attributeEncoders;
|
|
12
|
+
}
|
|
13
|
+
_attributeEncoders = [];
|
|
14
|
+
initialize(configuration) {
|
|
15
|
+
this._attributeEncoders = [...configuration.attributeEncoders];
|
|
16
|
+
return NativeDdSdk.initialize(configuration);
|
|
17
|
+
}
|
|
18
|
+
getConstants() {
|
|
19
|
+
return NativeDdSdk.getConstants();
|
|
20
|
+
}
|
|
21
|
+
setUserInfo(user) {
|
|
22
|
+
return NativeDdSdk.setUserInfo(user);
|
|
23
|
+
}
|
|
24
|
+
clearUserInfo() {
|
|
25
|
+
return NativeDdSdk.clearUserInfo();
|
|
26
|
+
}
|
|
27
|
+
addUserExtraInfo(extraInfo) {
|
|
28
|
+
return NativeDdSdk.addUserExtraInfo(extraInfo);
|
|
29
|
+
}
|
|
30
|
+
addAttribute(key, value) {
|
|
31
|
+
return NativeDdSdk.addAttribute(key, value);
|
|
32
|
+
}
|
|
33
|
+
removeAttribute(key) {
|
|
34
|
+
return NativeDdSdk.removeAttribute(key);
|
|
35
|
+
}
|
|
36
|
+
addAttributes(attributes) {
|
|
37
|
+
return NativeDdSdk.addAttributes(attributes);
|
|
38
|
+
}
|
|
39
|
+
removeAttributes(keys) {
|
|
40
|
+
return NativeDdSdk.removeAttributes(keys);
|
|
41
|
+
}
|
|
42
|
+
setAccountInfo(account) {
|
|
43
|
+
return NativeDdSdk.setAccountInfo(account);
|
|
44
|
+
}
|
|
45
|
+
clearAccountInfo() {
|
|
46
|
+
return NativeDdSdk.clearAccountInfo();
|
|
47
|
+
}
|
|
48
|
+
addAccountExtraInfo(extraInfo) {
|
|
49
|
+
return NativeDdSdk.addAccountExtraInfo(extraInfo);
|
|
50
|
+
}
|
|
51
|
+
setTrackingConsent(trackingConsent) {
|
|
52
|
+
return NativeDdSdk.setTrackingConsent(trackingConsent);
|
|
53
|
+
}
|
|
54
|
+
sendTelemetryLog(message, attributes, config) {
|
|
55
|
+
return NativeDdSdk.sendTelemetryLog(message, attributes, config);
|
|
56
|
+
}
|
|
57
|
+
telemetryDebug(message) {
|
|
58
|
+
return NativeDdSdk.telemetryDebug(message);
|
|
59
|
+
}
|
|
60
|
+
telemetryError(message, stack, kind) {
|
|
61
|
+
return NativeDdSdk.telemetryError(message, stack, kind);
|
|
62
|
+
}
|
|
63
|
+
consumeWebviewEvent(message) {
|
|
64
|
+
return NativeDdSdk.consumeWebviewEvent(message);
|
|
65
|
+
}
|
|
66
|
+
clearAllData() {
|
|
67
|
+
return NativeDdSdk.clearAllData();
|
|
68
|
+
}
|
|
69
|
+
addListener(eventType) {
|
|
70
|
+
return NativeDdSdk.addListener(eventType);
|
|
71
|
+
}
|
|
72
|
+
removeListeners(count) {
|
|
73
|
+
return NativeDdSdk.removeListeners(count);
|
|
74
|
+
}
|
|
75
|
+
_setAttributeEncodersForTesting(attributeEncoders) {
|
|
76
|
+
this._attributeEncoders = [...attributeEncoders];
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
export { NativeDdSdk };
|
|
80
|
+
//# sourceMappingURL=DdSdkInternal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NativeDdSdk","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":"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","ignoreList":[]}
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { InternalLog } from '../../InternalLog';
|
|
8
|
-
import { SdkVerbosity } from '../../SdkVerbosity';
|
|
9
|
-
import {
|
|
8
|
+
import { SdkVerbosity } from '../../config/types/SdkVerbosity';
|
|
9
|
+
import { AccountInfoSingleton } from '../AccountInfoSingleton/AccountInfoSingleton';
|
|
10
10
|
import { AttributesSingleton } from '../AttributesSingleton/AttributesSingleton';
|
|
11
|
+
import { NativeDdSdk } from '../DdSdkInternal';
|
|
11
12
|
import { UserInfoSingleton } from '../UserInfoSingleton/UserInfoSingleton';
|
|
12
13
|
import { deepClone } from './utils/deepClone';
|
|
13
14
|
/**
|
|
@@ -34,9 +35,11 @@ export class EventMapper {
|
|
|
34
35
|
|
|
35
36
|
// formatting
|
|
36
37
|
const userInfo = UserInfoSingleton.getInstance().getUserInfo();
|
|
38
|
+
const accountInfo = AccountInfoSingleton.getInstance().getAccountInfo();
|
|
37
39
|
const attributes = AttributesSingleton.getInstance().getAttributes();
|
|
38
40
|
const initialEvent = this.formatRawEventForMapper(rawEvent, {
|
|
39
41
|
userInfo,
|
|
42
|
+
accountInfo,
|
|
40
43
|
attributes
|
|
41
44
|
});
|
|
42
45
|
|
|
@@ -50,7 +53,7 @@ export class EventMapper {
|
|
|
50
53
|
return this.formatMapperEventForNative(mappedEvent, backupEvent);
|
|
51
54
|
} catch (error) {
|
|
52
55
|
InternalLog.log(`The event mapper crashed when mapping ${JSON.stringify(backupEvent)}: ${error}`, SdkVerbosity.WARN);
|
|
53
|
-
|
|
56
|
+
NativeDdSdk.telemetryDebug('Error while running the event mapper');
|
|
54
57
|
return this.formatMapperEventForNative(backupEvent, backupEvent);
|
|
55
58
|
}
|
|
56
59
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["InternalLog","SdkVerbosity","
|
|
1
|
+
{"version":3,"names":["InternalLog","SdkVerbosity","AccountInfoSingleton","AttributesSingleton","NativeDdSdk","UserInfoSingleton","deepClone","EventMapper","constructor","eventMapper","formatRawEventForMapper","formatMapperEventForNative","formatRawEventForNative","applyEventMapper","rawEvent","userInfo","getInstance","getUserInfo","accountInfo","getAccountInfo","attributes","getAttributes","initialEvent","backupEvent","mappedEvent","error","log","JSON","stringify","WARN","telemetryDebug"],"sourceRoot":"../../../../src","sources":["sdk/EventMappers/EventMapper.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,YAAY,QAAQ,iCAAiC;AAC9D,SAASC,oBAAoB,QAAQ,8CAA8C;AAEnF,SAASC,mBAAmB,QAAQ,4CAA4C;AAEhF,SAASC,WAAW,QAAQ,kBAAkB;AAC9C,SAASC,iBAAiB,QAAQ,wCAAwC;AAG1E,SAASC,SAAS,QAAQ,mBAAmB;AAQ7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,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,GAAGV,iBAAiB,CAACW,WAAW,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC;IAC9D,MAAMC,WAAW,GAAGhB,oBAAoB,CAACc,WAAW,CAAC,CAAC,CAACG,cAAc,CAAC,CAAC;IACvE,MAAMC,UAAU,GAAGjB,mBAAmB,CAACa,WAAW,CAAC,CAAC,CAACK,aAAa,CAAC,CAAC;IACpE,MAAMC,YAAY,GAAG,IAAI,CAACZ,uBAAuB,CAACI,QAAQ,EAAE;MACxDC,QAAQ;MACRG,WAAW;MACXE;IACJ,CAAC,CAAC;;IAEF;IACA,MAAMG,WAAW,GAAGjB,SAAS,CAACgB,YAAY,CAAC;IAC3C,IAAI;MACA,MAAME,WAAW,GAAG,IAAI,CAACf,WAAW,CAACa,YAAY,CAAC;MAClD,IAAI,CAACE,WAAW,EAAE;QACd,OAAO,IAAI;MACf;MACA,OAAO,IAAI,CAACb,0BAA0B,CAACa,WAAW,EAAED,WAAW,CAAC;IACpE,CAAC,CAAC,OAAOE,KAAK,EAAE;MACZzB,WAAW,CAAC0B,GAAG,CACX,yCAAyCC,IAAI,CAACC,SAAS,CACnDL,WACJ,CAAC,KAAKE,KAAK,EAAE,EACbxB,YAAY,CAAC4B,IACjB,CAAC;MACDzB,WAAW,CAAC0B,cAAc,CAAC,sCAAsC,CAAC;MAClE,OAAO,IAAI,CAACnB,0BAA0B,CAACY,WAAW,EAAEA,WAAW,CAAC;IACpE;EACJ,CAAC;AACL","ignoreList":[]}
|
|
@@ -4,23 +4,18 @@
|
|
|
4
4
|
* Copyright 2016-Present Datadog, Inc.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import { getGlobalInstance } from '../../utils/singletonUtils';
|
|
8
|
+
const GLOBAL_STATE_MODULE = 'com.datadog.reactnative.sdk.global_state';
|
|
9
|
+
|
|
7
10
|
/**
|
|
8
11
|
* A singleton container for attributes that are shared internally across all
|
|
9
12
|
* the SDK classes.
|
|
10
13
|
*/
|
|
11
|
-
|
|
14
|
+
class _GlobalState {
|
|
12
15
|
/**
|
|
13
16
|
* `true` if the SDK is initialized, `false` otherwise.
|
|
14
17
|
*/
|
|
15
18
|
isInitialized = false;
|
|
16
|
-
|
|
17
|
-
// Singleton implementation
|
|
18
|
-
static _instance = undefined;
|
|
19
|
-
static get instance() {
|
|
20
|
-
if (this._instance === undefined) {
|
|
21
|
-
this._instance = new GlobalState();
|
|
22
|
-
}
|
|
23
|
-
return this._instance;
|
|
24
|
-
}
|
|
25
19
|
}
|
|
20
|
+
export const GlobalState = getGlobalInstance(GLOBAL_STATE_MODULE, () => new _GlobalState());
|
|
26
21
|
//# sourceMappingURL=GlobalState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["getGlobalInstance","GLOBAL_STATE_MODULE","_GlobalState","isInitialized","GlobalState"],"sourceRoot":"../../../../src","sources":["sdk/GlobalState/GlobalState.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,iBAAiB,QAAQ,4BAA4B;AAE9D,MAAMC,mBAAmB,GAAG,0CAA0C;;AAEtE;AACA;AACA;AACA;AACA,MAAMC,YAAY,CAAC;EACf;AACJ;AACA;EACWC,aAAa,GAAG,KAAK;AAChC;AAEA,OAAO,MAAMC,WAAW,GAAGJ,iBAAiB,CACxCC,mBAAmB,EACnB,MAAM,IAAIC,YAAY,CAAC,CAC3B,CAAC","ignoreList":[]}
|
|
@@ -4,14 +4,19 @@
|
|
|
4
4
|
* Copyright 2016-Present Datadog, Inc.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import { setCachedUserId } from '../../rum/helper';
|
|
7
8
|
class UserInfoProvider {
|
|
8
|
-
userInfo =
|
|
9
|
+
userInfo = undefined;
|
|
9
10
|
setUserInfo = userInfo => {
|
|
10
11
|
this.userInfo = userInfo;
|
|
12
|
+
setCachedUserId(this.userInfo.id);
|
|
11
13
|
};
|
|
12
14
|
getUserInfo = () => {
|
|
13
15
|
return this.userInfo;
|
|
14
16
|
};
|
|
17
|
+
clearUserInfo = () => {
|
|
18
|
+
this.userInfo = undefined;
|
|
19
|
+
};
|
|
15
20
|
}
|
|
16
21
|
export class UserInfoSingleton {
|
|
17
22
|
static userInfoProvider = new UserInfoProvider();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["UserInfoProvider","userInfo","setUserInfo","getUserInfo","UserInfoSingleton","userInfoProvider","getInstance","reset"],"sourceRoot":"../../../../src","sources":["sdk/UserInfoSingleton/UserInfoSingleton.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["setCachedUserId","UserInfoProvider","userInfo","undefined","setUserInfo","id","getUserInfo","clearUserInfo","UserInfoSingleton","userInfoProvider","getInstance","reset"],"sourceRoot":"../../../../src","sources":["sdk/UserInfoSingleton/UserInfoSingleton.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,eAAe,QAAQ,kBAAkB;AAIlD,MAAMC,gBAAgB,CAAC;EACXC,QAAQ,GAAyBC,SAAS;EAElDC,WAAW,GAAIF,QAAkB,IAAK;IAClC,IAAI,CAACA,QAAQ,GAAGA,QAAQ;IACxBF,eAAe,CAAC,IAAI,CAACE,QAAQ,CAACG,EAAE,CAAC;EACrC,CAAC;EAEDC,WAAW,GAAGA,CAAA,KAA4B;IACtC,OAAO,IAAI,CAACJ,QAAQ;EACxB,CAAC;EAEDK,aAAa,GAAGA,CAAA,KAAM;IAClB,IAAI,CAACL,QAAQ,GAAGC,SAAS;EAC7B,CAAC;AACL;AAEA,OAAO,MAAMK,iBAAiB,CAAC;EAC3B,OAAeC,gBAAgB,GAAG,IAAIR,gBAAgB,CAAC,CAAC;EAExD,OAAOS,WAAW,GAAGA,CAAA,KAAwB;IACzC,OAAOF,iBAAiB,CAACC,gBAAgB;EAC7C,CAAC;EAED,OAAOE,KAAK,GAAGA,CAAA,KAAM;IACjBH,iBAAiB,CAACC,gBAAgB,GAAG,IAAIR,gBAAgB,CAAC,CAAC;EAC/D,CAAC;AACL","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TurboModuleRegistry","get"],"sourceRoot":"../../../src","sources":["specs/NativeDdRum.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,SAASA,mBAAmB,QAAQ,cAAc;;AAElD;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","get"],"sourceRoot":"../../../src","sources":["specs/NativeDdRum.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,SAASA,mBAAmB,QAAQ,cAAc;;AAElD;AACA;AACA;;AAyNA;AACA,eAAeA,mBAAmB,CAACC,GAAG,CAAO,OAAO,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TurboModuleRegistry","get"],"sourceRoot":"../../../src","sources":["specs/NativeDdSdk.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,SAASA,mBAAmB,QAAQ,cAAc;;AAElD;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","get"],"sourceRoot":"../../../src","sources":["specs/NativeDdSdk.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,SAASA,mBAAmB,QAAQ,cAAc;;AAElD;AACA;AACA;;AA4HA;AACA,eAAeA,mBAAmB,CAACC,GAAG,CAAO,OAAO,CAAC","ignoreList":[]}
|
|
@@ -5,24 +5,25 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { InternalLog } from '../InternalLog';
|
|
8
|
-
import { SdkVerbosity } from '../SdkVerbosity';
|
|
8
|
+
import { SdkVerbosity } from '../config/types/SdkVerbosity';
|
|
9
|
+
import { encodeAttributes } from '../sdk/AttributesEncoding/attributesEncoding';
|
|
9
10
|
import { bufferNativeCallReturningId, bufferNativeCallWithId } from '../sdk/DatadogProvider/Buffer/bufferNativeCall';
|
|
10
|
-
import {
|
|
11
|
+
import { getGlobalInstance } from '../utils/singletonUtils';
|
|
11
12
|
import { DefaultTimeProvider } from '../utils/time-provider/DefaultTimeProvider';
|
|
13
|
+
const TRACE_MODULE = 'com.datadog.reactnative.trace';
|
|
12
14
|
const timeProvider = new DefaultTimeProvider();
|
|
13
15
|
class DdTraceWrapper {
|
|
14
16
|
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
|
15
17
|
nativeTrace = require('../specs/NativeDdTrace').default;
|
|
16
18
|
startSpan = (operation, context = {}, timestampMs = timeProvider.now()) => {
|
|
17
|
-
const spanId = bufferNativeCallReturningId(() => this.nativeTrace.startSpan(operation,
|
|
19
|
+
const spanId = bufferNativeCallReturningId(() => this.nativeTrace.startSpan(operation, encodeAttributes(context), timestampMs));
|
|
18
20
|
InternalLog.log(`Starting span “${operation}” #${spanId}`, SdkVerbosity.DEBUG);
|
|
19
21
|
return spanId;
|
|
20
22
|
};
|
|
21
23
|
finishSpan = (spanId, context = {}, timestampMs = timeProvider.now()) => {
|
|
22
24
|
InternalLog.log(`Finishing span #${spanId}`, SdkVerbosity.DEBUG);
|
|
23
|
-
return bufferNativeCallWithId(id => this.nativeTrace.finishSpan(id,
|
|
25
|
+
return bufferNativeCallWithId(id => this.nativeTrace.finishSpan(id, encodeAttributes(context), timestampMs), spanId);
|
|
24
26
|
};
|
|
25
27
|
}
|
|
26
|
-
const DdTrace = new DdTraceWrapper();
|
|
27
|
-
export { DdTrace };
|
|
28
|
+
export const DdTrace = getGlobalInstance(TRACE_MODULE, () => new DdTraceWrapper());
|
|
28
29
|
//# sourceMappingURL=DdTrace.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["InternalLog","SdkVerbosity","bufferNativeCallReturningId","bufferNativeCallWithId","
|
|
1
|
+
{"version":3,"names":["InternalLog","SdkVerbosity","encodeAttributes","bufferNativeCallReturningId","bufferNativeCallWithId","getGlobalInstance","DefaultTimeProvider","TRACE_MODULE","timeProvider","DdTraceWrapper","nativeTrace","require","default","startSpan","operation","context","timestampMs","now","spanId","log","DEBUG","finishSpan","id","DdTrace"],"sourceRoot":"../../../src","sources":["trace/DdTrace.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,YAAY,QAAQ,8BAA8B;AAE3D,SAASC,gBAAgB,QAAQ,8CAA8C;AAC/E,SACIC,2BAA2B,EAC3BC,sBAAsB,QACnB,gDAAgD;AAEvD,SAASC,iBAAiB,QAAQ,yBAAyB;AAC3D,SAASC,mBAAmB,QAAQ,4CAA4C;AAEhF,MAAMC,YAAY,GAAG,+BAA+B;AAEpD,MAAMC,YAAY,GAAG,IAAIF,mBAAmB,CAAC,CAAC;AAE9C,MAAMG,cAAc,CAAwB;EACxC;EACQC,WAAW,GAAsBC,OAAO,CAAC,wBAAwB,CAAC,CACrEC,OAAO;EAEZC,SAAS,GAAGA,CACRC,SAAiB,EACjBC,OAAe,GAAG,CAAC,CAAC,EACpBC,WAAmB,GAAGR,YAAY,CAACS,GAAG,CAAC,CAAC,KACtB;IAClB,MAAMC,MAAM,GAAGf,2BAA2B,CAAC,MACvC,IAAI,CAACO,WAAW,CAACG,SAAS,CACtBC,SAAS,EACTZ,gBAAgB,CAACa,OAAO,CAAC,EACzBC,WACJ,CACJ,CAAC;IACDhB,WAAW,CAACmB,GAAG,CACX,kBAAkBL,SAAS,MAAMI,MAAM,EAAE,EACzCjB,YAAY,CAACmB,KACjB,CAAC;IACD,OAAOF,MAAM;EACjB,CAAC;EAEDG,UAAU,GAAGA,CACTH,MAAc,EACdH,OAAe,GAAG,CAAC,CAAC,EACpBC,WAAmB,GAAGR,YAAY,CAACS,GAAG,CAAC,CAAC,KACxB;IAChBjB,WAAW,CAACmB,GAAG,CAAC,mBAAmBD,MAAM,EAAE,EAAEjB,YAAY,CAACmB,KAAK,CAAC;IAChE,OAAOhB,sBAAsB,CACzBkB,EAAE,IACE,IAAI,CAACZ,WAAW,CAACW,UAAU,CACvBC,EAAE,EACFpB,gBAAgB,CAACa,OAAO,CAAC,EACzBC,WACJ,CAAC,EACLE,MACJ,CAAC;EACL,CAAC;AACL;AAEA,OAAO,MAAMK,OAAoB,GAAGlB,iBAAiB,CACjDE,YAAY,EACZ,MAAM,IAAIE,cAAc,CAAC,CAC7B,CAAC","ignoreList":[]}
|
package/lib/module/types.js
CHANGED
|
@@ -4,48 +4,6 @@
|
|
|
4
4
|
* Copyright 2016-Present Datadog, Inc.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* A configuration object to initialize Datadog's features.
|
|
9
|
-
*/
|
|
10
|
-
export class DdSdkConfiguration {
|
|
11
|
-
constructor(clientToken, env, applicationId, nativeCrashReportEnabled, nativeLongTaskThresholdMs, longTaskThresholdMs, sampleRate, site, trackingConsent, additionalConfiguration, telemetrySampleRate, vitalsUpdateFrequency, uploadFrequency, batchSize, trackFrustrations, trackBackgroundEvents, customEndpoints, configurationForTelemetry, nativeViewTracking, nativeInteractionTracking, verbosity, proxyConfig, serviceName, firstPartyHosts, bundleLogsWithRum, bundleLogsWithTraces, trackNonFatalAnrs, appHangThreshold, resourceTracingSamplingRate, trackWatchdogTerminations, batchProcessingLevel,
|
|
12
|
-
// eslint-disable-next-line no-empty-function
|
|
13
|
-
initialResourceThreshold) {
|
|
14
|
-
this.clientToken = clientToken;
|
|
15
|
-
this.env = env;
|
|
16
|
-
this.applicationId = applicationId;
|
|
17
|
-
this.nativeCrashReportEnabled = nativeCrashReportEnabled;
|
|
18
|
-
this.nativeLongTaskThresholdMs = nativeLongTaskThresholdMs;
|
|
19
|
-
this.longTaskThresholdMs = longTaskThresholdMs;
|
|
20
|
-
this.sampleRate = sampleRate;
|
|
21
|
-
this.site = site;
|
|
22
|
-
this.trackingConsent = trackingConsent;
|
|
23
|
-
this.additionalConfiguration = additionalConfiguration;
|
|
24
|
-
this.telemetrySampleRate = telemetrySampleRate;
|
|
25
|
-
this.vitalsUpdateFrequency = vitalsUpdateFrequency;
|
|
26
|
-
this.uploadFrequency = uploadFrequency;
|
|
27
|
-
this.batchSize = batchSize;
|
|
28
|
-
this.trackFrustrations = trackFrustrations;
|
|
29
|
-
this.trackBackgroundEvents = trackBackgroundEvents;
|
|
30
|
-
this.customEndpoints = customEndpoints;
|
|
31
|
-
this.configurationForTelemetry = configurationForTelemetry;
|
|
32
|
-
this.nativeViewTracking = nativeViewTracking;
|
|
33
|
-
this.nativeInteractionTracking = nativeInteractionTracking;
|
|
34
|
-
this.verbosity = verbosity;
|
|
35
|
-
this.proxyConfig = proxyConfig;
|
|
36
|
-
this.serviceName = serviceName;
|
|
37
|
-
this.firstPartyHosts = firstPartyHosts;
|
|
38
|
-
this.bundleLogsWithRum = bundleLogsWithRum;
|
|
39
|
-
this.bundleLogsWithTraces = bundleLogsWithTraces;
|
|
40
|
-
this.trackNonFatalAnrs = trackNonFatalAnrs;
|
|
41
|
-
this.appHangThreshold = appHangThreshold;
|
|
42
|
-
this.resourceTracingSamplingRate = resourceTracingSamplingRate;
|
|
43
|
-
this.trackWatchdogTerminations = trackWatchdogTerminations;
|
|
44
|
-
this.batchProcessingLevel = batchProcessingLevel;
|
|
45
|
-
this.initialResourceThreshold = initialResourceThreshold;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
7
|
/**
|
|
50
8
|
* The entry point to initialize Datadog's features.
|
|
51
9
|
*/
|
|
@@ -53,4 +11,26 @@ export class DdSdkConfiguration {
|
|
|
53
11
|
/**
|
|
54
12
|
* The entry point to use Datadog's Trace feature.
|
|
55
13
|
*/
|
|
14
|
+
|
|
15
|
+
// Shared types across modules
|
|
16
|
+
|
|
17
|
+
// Core
|
|
18
|
+
|
|
19
|
+
// DdLogs
|
|
20
|
+
|
|
21
|
+
// DdRum
|
|
22
|
+
export let ErrorSource = /*#__PURE__*/function (ErrorSource) {
|
|
23
|
+
ErrorSource["NETWORK"] = "NETWORK";
|
|
24
|
+
ErrorSource["SOURCE"] = "SOURCE";
|
|
25
|
+
ErrorSource["CONSOLE"] = "CONSOLE";
|
|
26
|
+
ErrorSource["WEBVIEW"] = "WEBVIEW";
|
|
27
|
+
ErrorSource["CUSTOM"] = "CUSTOM";
|
|
28
|
+
return ErrorSource;
|
|
29
|
+
}({});
|
|
30
|
+
export let FeatureOperationFailure = /*#__PURE__*/function (FeatureOperationFailure) {
|
|
31
|
+
FeatureOperationFailure["ERROR"] = "ERROR";
|
|
32
|
+
FeatureOperationFailure["ABANDONED"] = "ABANDONED";
|
|
33
|
+
FeatureOperationFailure["OTHER"] = "OTHER";
|
|
34
|
+
return FeatureOperationFailure;
|
|
35
|
+
}({});
|
|
56
36
|
//# sourceMappingURL=types.js.map
|
package/lib/module/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["ErrorSource","FeatureOperationFailure"],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;;AAiFA;AACA;AACA;;AA2BA;;AAEA;;AAeA;;AAoBA;AACA,WAAYA,WAAW,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAQvB,WAAYC,uBAAuB,0BAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAA,OAAvBA,uBAAuB;AAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MIN_LONG_TASK_THRESHOLD_MS","MAX_LONG_TASK_THRESHOLD_MS","adaptLongTaskThreshold","longTaskThreshold"],"sourceRoot":"../../../src","sources":["utils/longTasksUtils.ts"],"mappings":"AAAA;AACA;AACA;AACA,MAAMA,0BAA0B,GAAG,GAAG;;AAEtC;AACA;AACA;AACA,MAAMC,0BAA0B,GAAG,IAAI;;AAEvC;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,
|
|
1
|
+
{"version":3,"names":["MIN_LONG_TASK_THRESHOLD_MS","MAX_LONG_TASK_THRESHOLD_MS","adaptLongTaskThreshold","longTaskThreshold"],"sourceRoot":"../../../src","sources":["utils/longTasksUtils.ts"],"mappings":"AAAA;AACA;AACA;AACA,MAAMA,0BAA0B,GAAG,GAAG;;AAEtC;AACA;AACA;AACA,MAAMC,0BAA0B,GAAG,IAAI;;AAEvC;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAIC,iBAAyB,IAAa;EACzE,IAAI,CAACA,iBAAiB,EAAE;IACpB,OAAO,CAAC;EACZ;EACA,IAAIA,iBAAiB,GAAGH,0BAA0B,EAAE;IAChD,OAAOA,0BAA0B;EACrC;EACA,IAAIG,iBAAiB,GAAGF,0BAA0B,EAAE;IAChD,OAAOA,0BAA0B;EACrC;EAEA,OAAOE,iBAAiB;AAC5B,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
export const getGlobalInstance = (key, objectConstructor) => {
|
|
7
|
+
const symbol = Symbol.for(key);
|
|
8
|
+
const g = globalThis;
|
|
9
|
+
if (!(symbol in g)) {
|
|
10
|
+
g[symbol] = objectConstructor();
|
|
11
|
+
}
|
|
12
|
+
return g[symbol];
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=singletonUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getGlobalInstance","key","objectConstructor","symbol","Symbol","for","g","globalThis"],"sourceRoot":"../../../src","sources":["utils/singletonUtils.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,iBAAiB,GAAGA,CAC7BC,GAAW,EACXC,iBAA0B,KACtB;EACJ,MAAMC,MAAM,GAAGC,MAAM,CAACC,GAAG,CAACJ,GAAG,CAAC;EAC9B,MAAMK,CAAC,GAAIC,UAAsD;EAEjE,IAAI,EAAEJ,MAAM,IAAIG,CAAC,CAAC,EAAE;IAChBA,CAAC,CAACH,MAAM,CAAC,GAAGD,iBAAiB,CAAC,CAAC;EACnC;EACA,OAAOI,CAAC,CAACH,MAAM,CAAC;AACpB,CAAC","ignoreList":[]}
|
package/lib/module/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["version"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":"AAAA;AACA,OAAO,MAAMA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"names":["version"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":"AAAA;AACA,OAAO,MAAMA,OAAO,GAAG,OAAO","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DdAttributes.d.ts","sourceRoot":"","sources":["../../src/DdAttributes.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY;IACrB;;;;OAIG;;IAGH;;;OAGG;;IAGH;;;;OAIG;;CAEN,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
3
|
-
import type {
|
|
1
|
+
import type { DatadogProviderConfiguration } from './config/DatadogProviderConfiguration';
|
|
2
|
+
import type { AutoInstrumentationConfiguration } from './config/async/AutoInstrumentationConfiguration';
|
|
3
|
+
import type { PartialInitializationConfiguration } from './config/async/PartialInitializationConfiguration';
|
|
4
|
+
import { CoreConfiguration } from './config/features/CoreConfiguration';
|
|
5
|
+
import type { TrackingConsent } from './config/types/TrackingConsent';
|
|
4
6
|
import type { Attributes } from './sdk/AttributesSingleton/types';
|
|
5
|
-
import type { UserInfo } from './sdk/UserInfoSingleton/types';
|
|
6
7
|
/**
|
|
7
8
|
* This class initializes the Datadog SDK, and sets up communication with the server.
|
|
8
9
|
*/
|
|
@@ -19,7 +20,7 @@ export declare class DdSdkReactNative {
|
|
|
19
20
|
* @param configuration the configuration for the SDK library
|
|
20
21
|
* @returns a Promise.
|
|
21
22
|
*/
|
|
22
|
-
static initialize: (configuration:
|
|
23
|
+
static initialize: (configuration: CoreConfiguration) => Promise<void>;
|
|
23
24
|
private static initializeNativeSDK;
|
|
24
25
|
/**
|
|
25
26
|
* FOR INTERNAL USE ONLY.
|
|
@@ -34,20 +35,28 @@ export declare class DdSdkReactNative {
|
|
|
34
35
|
* FOR INTERNAL USE ONLY.
|
|
35
36
|
*/
|
|
36
37
|
static _initializeFromDatadogProviderWithConfigurationAsync: (configuration: PartialInitializationConfiguration) => Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Adds a specific attribute to the global context attached with all future Logs, Spans and RUM.
|
|
40
|
+
* @param key: Key that identifies the attribute.
|
|
41
|
+
* @param value: Value linked to the attribute.
|
|
42
|
+
*/
|
|
43
|
+
static addAttribute: (key: string, value: unknown) => Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Removes an attribute from the context attached with all future Logs, Spans and RUM events.
|
|
46
|
+
* @param key: They key associated with the attribute to be removed.
|
|
47
|
+
*/
|
|
48
|
+
static removeAttribute: (key: string) => Promise<void>;
|
|
37
49
|
/**
|
|
38
50
|
* Adds a set of attributes to the global context attached with all future Logs, Spans and RUM events.
|
|
39
|
-
* To remove an attribute, set it to `undefined` in a call to `setAttributes`.
|
|
40
51
|
* @param attributes: The global context attributes.
|
|
41
52
|
* @returns a Promise.
|
|
42
53
|
*/
|
|
43
|
-
static
|
|
54
|
+
static addAttributes: (attributes: Attributes) => Promise<void>;
|
|
44
55
|
/**
|
|
45
|
-
*
|
|
46
|
-
* @
|
|
47
|
-
* @param user: The user object (use builtin attributes: 'id', 'email', 'name', and/or any custom attribute).
|
|
48
|
-
* @returns a Promise.
|
|
56
|
+
* Removes a set of attributes from the context attached with all future Logs, Spans and RUM events.
|
|
57
|
+
* @param keys: They keys associated with the attributes to be removed.
|
|
49
58
|
*/
|
|
50
|
-
static
|
|
59
|
+
static removeAttributes: (keys: string[]) => Promise<void>;
|
|
51
60
|
/**
|
|
52
61
|
* Sets the user information.
|
|
53
62
|
* @param id: A mandatory unique user identifier (relevant to your business domain).
|
|
@@ -62,12 +71,40 @@ export declare class DdSdkReactNative {
|
|
|
62
71
|
email?: string;
|
|
63
72
|
extraInfo?: Record<string, unknown>;
|
|
64
73
|
}) => Promise<void>;
|
|
74
|
+
/**
|
|
75
|
+
* Clears the user information.
|
|
76
|
+
* @returns a Promise.
|
|
77
|
+
*/
|
|
78
|
+
static clearUserInfo: () => Promise<void>;
|
|
65
79
|
/**
|
|
66
80
|
* Set the user information.
|
|
67
81
|
* @param extraUserInfo: The additional information. (To set the id, name or email please user setUserInfo).
|
|
68
82
|
* @returns a Promise.
|
|
69
83
|
*/
|
|
70
84
|
static addUserExtraInfo: (extraUserInfo: Record<string, unknown>) => Promise<void>;
|
|
85
|
+
/**
|
|
86
|
+
* Sets the account information.
|
|
87
|
+
* @param id: A mandatory unique account identifier (relevant to your business domain).
|
|
88
|
+
* @param name: The account name.
|
|
89
|
+
* @param extraInfo: Additional information.
|
|
90
|
+
* @returns a Promise.
|
|
91
|
+
*/
|
|
92
|
+
static setAccountInfo: (accountInfo: {
|
|
93
|
+
id: string;
|
|
94
|
+
name?: string;
|
|
95
|
+
extraInfo?: Record<string, unknown>;
|
|
96
|
+
}) => Promise<void>;
|
|
97
|
+
/**
|
|
98
|
+
* Clears the account information.
|
|
99
|
+
* @returns a Promise.
|
|
100
|
+
*/
|
|
101
|
+
static clearAccountInfo: () => Promise<void>;
|
|
102
|
+
/**
|
|
103
|
+
* Set the account information.
|
|
104
|
+
* @param extraAccountInfo: The additional information. (To set the id or name please use setAccountInfo).
|
|
105
|
+
* @returns a Promise.
|
|
106
|
+
*/
|
|
107
|
+
static addAccountExtraInfo: (extraAccountInfo: Record<string, unknown>) => Promise<void>;
|
|
71
108
|
/**
|
|
72
109
|
* Set the tracking consent regarding the data collection.
|
|
73
110
|
* @param trackingConsent: One of TrackingConsent values.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DdSdkReactNative.d.ts","sourceRoot":"","sources":["../../src/DdSdkReactNative.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DdSdkReactNative.d.ts","sourceRoot":"","sources":["../../src/DdSdkReactNative.tsx"],"names":[],"mappings":"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"}
|