@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
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
3
|
+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
4
|
+
* Copyright 2016-Present Datadog, Inc.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { DdSdk } from '../DdSdk';
|
|
8
|
+
import { builtInEncoders } from './defaultEncoders';
|
|
9
|
+
import { encodeAttributesInPlace } from './helpers';
|
|
10
|
+
import { isPlainObject, warn } from './utils';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Encodes arbitrary input into a flat dictionary of attributes.
|
|
14
|
+
* - Objects are flattened using dot syntax. Max depth handling is done on the native layer by the
|
|
15
|
+
* Android and iOS SDKs.
|
|
16
|
+
* - We assume the input does not always conform to Record<string, Encodable> and we:
|
|
17
|
+
* - Fallback to { context: givenValue } if a primitive is passed
|
|
18
|
+
* - Apply built-in and consumer encoders to all values
|
|
19
|
+
* - Drop values of unsupported types
|
|
20
|
+
* - Internal SDK attributes (starting with '_dd.') are preserved as-is without flattening
|
|
21
|
+
*/
|
|
22
|
+
export function encodeAttributes(input) {
|
|
23
|
+
const result = {};
|
|
24
|
+
const allEncoders = [...DdSdk.attributeEncoders, ...builtInEncoders];
|
|
25
|
+
const context = {
|
|
26
|
+
numOfAttributes: 0
|
|
27
|
+
};
|
|
28
|
+
if (isPlainObject(input)) {
|
|
29
|
+
for (const [k, v] of Object.entries(input)) {
|
|
30
|
+
// Internal SDK attributes (starting with '_dd.') should not be flattened
|
|
31
|
+
// as they have a specific structure expected by the native SDK
|
|
32
|
+
if (k.startsWith('_dd.')) {
|
|
33
|
+
result[k] = v;
|
|
34
|
+
context.numOfAttributes++;
|
|
35
|
+
} else {
|
|
36
|
+
encodeAttributesInPlace(v, result, [k], allEncoders, context);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
} else {
|
|
40
|
+
// Fallback for primitive values passed as root
|
|
41
|
+
encodeAttributesInPlace(input, result, ['context'], allEncoders, context);
|
|
42
|
+
warn('Warning: attributes root should be an object.\n' + 'Received a primitive/array instead, which will be wrapped under the "context" key.');
|
|
43
|
+
}
|
|
44
|
+
return result;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=attributesEncoding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DdSdk","builtInEncoders","encodeAttributesInPlace","isPlainObject","warn","encodeAttributes","input","result","allEncoders","attributeEncoders","context","numOfAttributes","k","v","Object","entries","startsWith"],"sourceRoot":"../../../../src","sources":["sdk/AttributesEncoding/attributesEncoding.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,KAAK,QAAQ,UAAU;AAEhC,SAASC,eAAe,QAAQ,mBAAmB;AAEnD,SAASC,uBAAuB,QAAQ,WAAW;AAEnD,SAASC,aAAa,EAAEC,IAAI,QAAQ,SAAS;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAACC,KAAc,EAA6B;EACxE,MAAMC,MAAiC,GAAG,CAAC,CAAC;EAC5C,MAAMC,WAAW,GAAG,CAAC,GAAGR,KAAK,CAACS,iBAAiB,EAAE,GAAGR,eAAe,CAAC;EACpE,MAAMS,OAAsB,GAAG;IAAEC,eAAe,EAAE;EAAE,CAAC;EACrD,IAAIR,aAAa,CAACG,KAAK,CAAC,EAAE;IACtB,KAAK,MAAM,CAACM,CAAC,EAAEC,CAAC,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACT,KAAK,CAAC,EAAE;MACxC;MACA;MACA,IAAIM,CAAC,CAACI,UAAU,CAAC,MAAM,CAAC,EAAE;QACtBT,MAAM,CAACK,CAAC,CAAC,GAAGC,CAAc;QAC1BH,OAAO,CAACC,eAAe,EAAE;MAC7B,CAAC,MAAM;QACHT,uBAAuB,CAACW,CAAC,EAAEN,MAAM,EAAE,CAACK,CAAC,CAAC,EAAEJ,WAAW,EAAEE,OAAO,CAAC;MACjE;IACJ;EACJ,CAAC,MAAM;IACH;IACAR,uBAAuB,CACnBI,KAAK,EACLC,MAAM,EACN,CAAC,SAAS,CAAC,EACXC,WAAW,EACXE,OACJ,CAAC;IACDN,IAAI,CACA,iDAAiD,GAC7C,oFACR,CAAC;EACL;EAEA,OAAOG,MAAM;AACjB","ignoreList":[]}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
3
|
+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
4
|
+
* Copyright 2016-Present Datadog, Inc.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/* ----------------------------------------
|
|
8
|
+
* Built-in encoders
|
|
9
|
+
* -------------------------------------- */
|
|
10
|
+
import { DdSdk } from '../DdSdk';
|
|
11
|
+
import { getErrorMessage, getErrorName, getErrorStackTrace } from './errorUtils';
|
|
12
|
+
import { encodeAttributesInPlace, sanitizeForJson } from './helpers';
|
|
13
|
+
import { warn } from './utils';
|
|
14
|
+
|
|
15
|
+
/** Primitives: keep them explicit so the full pipeline is used uniformly. */
|
|
16
|
+
export const stringEncoder = {
|
|
17
|
+
check: v => typeof v === 'string',
|
|
18
|
+
encode: v => v
|
|
19
|
+
};
|
|
20
|
+
export const numberEncoder = {
|
|
21
|
+
check: v => typeof v === 'number',
|
|
22
|
+
encode: v => Number.isFinite(v) ? v : undefined // drop non-finite
|
|
23
|
+
};
|
|
24
|
+
export const booleanEncoder = {
|
|
25
|
+
check: v => typeof v === 'boolean',
|
|
26
|
+
encode: v => v
|
|
27
|
+
};
|
|
28
|
+
export const nullishEncoder = {
|
|
29
|
+
check: v => v === null || v === undefined,
|
|
30
|
+
encode: v => v
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Array encoder:
|
|
35
|
+
* - Sanitizes each item through the encoder pipeline.
|
|
36
|
+
* - Returns the sanitized array (it may later be flattened by the visitor if it still contains objects).
|
|
37
|
+
*/
|
|
38
|
+
export const arrayEncoder = {
|
|
39
|
+
check: Array.isArray,
|
|
40
|
+
encode: arr => arr.map(x => sanitizeForJson(x, [...DdSdk.attributeEncoders, ...builtInEncoders]))
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Default Datadog Date Encoder.
|
|
45
|
+
* This does not make assumptions on format; uses String(date).
|
|
46
|
+
*/
|
|
47
|
+
export const dateEncoder = {
|
|
48
|
+
check: v => v instanceof Date,
|
|
49
|
+
encode: d => String(d)
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Extended Error Encoder.
|
|
54
|
+
* Serializes name, message, stack, and cause (ES2022+) for Error objects.
|
|
55
|
+
* If the error has other enumerable properties, they are included and sanitized.
|
|
56
|
+
*/
|
|
57
|
+
export const errorEncoder = {
|
|
58
|
+
check: v => v instanceof Error,
|
|
59
|
+
encode: e => {
|
|
60
|
+
const extraAttributes = {};
|
|
61
|
+
|
|
62
|
+
// In React Native, some errors have extra fields we want to capture
|
|
63
|
+
if (e && typeof e === 'object') {
|
|
64
|
+
const allEncoders = [...DdSdk.attributeEncoders, ...builtInEncoders];
|
|
65
|
+
encodeAttributesInPlace(e, extraAttributes, [], allEncoders);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Remove fields that are duplicated in the dedicated fields below
|
|
69
|
+
if ('stacktrace' in e) {
|
|
70
|
+
delete extraAttributes['stacktrace'];
|
|
71
|
+
} else if ('stack' in e) {
|
|
72
|
+
delete extraAttributes['stack'];
|
|
73
|
+
} else if ('componentStack' in e) {
|
|
74
|
+
delete extraAttributes['componentStack'];
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
...extraAttributes,
|
|
78
|
+
name: getErrorName(e),
|
|
79
|
+
message: getErrorMessage(e),
|
|
80
|
+
stack: getErrorStackTrace(e),
|
|
81
|
+
cause: e.cause
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Map encoder:
|
|
88
|
+
* - Converts Map into an array of entries.
|
|
89
|
+
* - Each entry is { key: string, keyType: string, value: Encodable }.
|
|
90
|
+
* - Keys are stringified with type info to reduce collision risk.
|
|
91
|
+
* - Entries with un-stringifiable keys are dropped (with a warning).
|
|
92
|
+
*/
|
|
93
|
+
export const mapEncoder = {
|
|
94
|
+
check: v => v instanceof Map,
|
|
95
|
+
encode: map => {
|
|
96
|
+
const entries = [];
|
|
97
|
+
for (const [k, v] of map.entries()) {
|
|
98
|
+
try {
|
|
99
|
+
const keyType = typeof k;
|
|
100
|
+
let keyStr;
|
|
101
|
+
if (k === null) {
|
|
102
|
+
keyStr = 'null';
|
|
103
|
+
} else if (k === undefined) {
|
|
104
|
+
keyStr = 'undefined';
|
|
105
|
+
} else if (keyType === 'string' || keyType === 'number' || keyType === 'boolean' || keyType === 'bigint') {
|
|
106
|
+
keyStr = String(k);
|
|
107
|
+
} else if (typeof k === 'symbol') {
|
|
108
|
+
keyStr = k.description ? `Symbol(${k.description})` : 'Symbol';
|
|
109
|
+
} else if (typeof k === 'object' || typeof k === 'function') {
|
|
110
|
+
// Try to get a descriptive form
|
|
111
|
+
if (typeof k.toString === 'function') {
|
|
112
|
+
keyStr = k.toString();
|
|
113
|
+
} else {
|
|
114
|
+
keyStr = Object.prototype.toString.call(k); // e.g. "[object Object]"
|
|
115
|
+
}
|
|
116
|
+
} else {
|
|
117
|
+
warn(`Dropping Map entry: unsupported key type "${keyType}".`);
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
const allEncoders = [...DdSdk.attributeEncoders, ...builtInEncoders];
|
|
121
|
+
entries.push({
|
|
122
|
+
key: keyStr,
|
|
123
|
+
keyType,
|
|
124
|
+
value: sanitizeForJson(v, allEncoders)
|
|
125
|
+
});
|
|
126
|
+
} catch (err) {
|
|
127
|
+
warn(`Failed to encode Map key: ${k}. ERROR: ${String(err)}`);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return entries;
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
export const builtInEncoders = [stringEncoder, numberEncoder, booleanEncoder, nullishEncoder, arrayEncoder, dateEncoder, errorEncoder, mapEncoder];
|
|
134
|
+
//# sourceMappingURL=defaultEncoders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DdSdk","getErrorMessage","getErrorName","getErrorStackTrace","encodeAttributesInPlace","sanitizeForJson","warn","stringEncoder","check","v","encode","numberEncoder","Number","isFinite","undefined","booleanEncoder","nullishEncoder","arrayEncoder","Array","isArray","arr","map","x","attributeEncoders","builtInEncoders","dateEncoder","Date","d","String","errorEncoder","Error","e","extraAttributes","allEncoders","name","message","stack","cause","mapEncoder","Map","entries","k","keyType","keyStr","description","toString","Object","prototype","call","push","key","value","err"],"sourceRoot":"../../../../src","sources":["sdk/AttributesEncoding/defaultEncoders.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAASA,KAAK,QAAQ,UAAU;AAEhC,SACIC,eAAe,EACfC,YAAY,EACZC,kBAAkB,QACf,cAAc;AACrB,SAASC,uBAAuB,EAAEC,eAAe,QAAQ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,aAAa,EACbI,aAAa,EACbI,cAAc,EACdC,cAAc,EACdC,YAAY,EACZQ,WAAW,EACXI,YAAY,EACZS,UAAU,CACb","ignoreList":[]}
|
|
@@ -3,21 +3,9 @@
|
|
|
3
3
|
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
4
4
|
* Copyright 2016-Present Datadog, Inc.
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
export const
|
|
8
|
-
export const
|
|
9
|
-
export const DEFAULT_ERROR_NAME = 'Error';
|
|
10
|
-
export const getErrorMessage = error => {
|
|
11
|
-
let message = EMPTY_MESSAGE;
|
|
12
|
-
if (error === undefined || error === null) {
|
|
13
|
-
message = EMPTY_MESSAGE;
|
|
14
|
-
} else if (typeof error === 'object' && 'message' in error) {
|
|
15
|
-
message = String(error.message);
|
|
16
|
-
} else {
|
|
17
|
-
message = String(error);
|
|
18
|
-
}
|
|
19
|
-
return message;
|
|
20
|
-
};
|
|
6
|
+
export const ERROR_EMPTY_STACKTRACE = '';
|
|
7
|
+
export const ERROR_EMPTY_MESSAGE = 'Unknown Error';
|
|
8
|
+
export const ERROR_DEFAULT_NAME = 'Error';
|
|
21
9
|
|
|
22
10
|
/**
|
|
23
11
|
* Will extract the stack from the error, taking the first key found among:
|
|
@@ -28,12 +16,12 @@ export const getErrorMessage = error => {
|
|
|
28
16
|
* generate a stack from this information.
|
|
29
17
|
*/
|
|
30
18
|
export const getErrorStackTrace = error => {
|
|
31
|
-
let stack =
|
|
19
|
+
let stack = ERROR_EMPTY_STACKTRACE;
|
|
32
20
|
try {
|
|
33
21
|
if (error === undefined || error === null) {
|
|
34
|
-
stack =
|
|
22
|
+
stack = ERROR_EMPTY_STACKTRACE;
|
|
35
23
|
} else if (typeof error === 'string') {
|
|
36
|
-
stack =
|
|
24
|
+
stack = ERROR_EMPTY_STACKTRACE;
|
|
37
25
|
} else if (typeof error === 'object') {
|
|
38
26
|
if ('stacktrace' in error) {
|
|
39
27
|
stack = String(error.stacktrace);
|
|
@@ -50,10 +38,39 @@ export const getErrorStackTrace = error => {
|
|
|
50
38
|
}
|
|
51
39
|
return stack;
|
|
52
40
|
};
|
|
41
|
+
export const getErrorMessage = error => {
|
|
42
|
+
if (error == null) {
|
|
43
|
+
return ERROR_EMPTY_MESSAGE;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// If it's an actual Error (or subclass)
|
|
47
|
+
if (error instanceof Error) {
|
|
48
|
+
// Prefer .message if defined, otherwise fallback to .toString()
|
|
49
|
+
return error.message || error.toString() || ERROR_EMPTY_MESSAGE;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// If it's an object with a message property (not necessarily Error)
|
|
53
|
+
if (typeof error === 'object' && 'message' in error && typeof error.message === 'string') {
|
|
54
|
+
return error.message || ERROR_EMPTY_MESSAGE;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// If it’s a primitive (string, number, boolean, symbol)
|
|
58
|
+
if (typeof error === 'string' || typeof error === 'number' || typeof error === 'boolean' || typeof error === 'symbol') {
|
|
59
|
+
return String(error);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// If it has its own toString (not the default Object one)
|
|
63
|
+
if (typeof error?.toString === 'function' && error.toString !== Object.prototype.toString) {
|
|
64
|
+
return error.toString();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Fallback
|
|
68
|
+
return ERROR_EMPTY_MESSAGE;
|
|
69
|
+
};
|
|
53
70
|
export const getErrorName = error => {
|
|
54
71
|
try {
|
|
55
72
|
if (typeof error !== 'object' || error === null) {
|
|
56
|
-
return
|
|
73
|
+
return ERROR_DEFAULT_NAME;
|
|
57
74
|
}
|
|
58
75
|
if (typeof error.name === 'string') {
|
|
59
76
|
return error.name;
|
|
@@ -61,6 +78,6 @@ export const getErrorName = error => {
|
|
|
61
78
|
} catch (e) {
|
|
62
79
|
// Do nothing
|
|
63
80
|
}
|
|
64
|
-
return
|
|
81
|
+
return ERROR_DEFAULT_NAME;
|
|
65
82
|
};
|
|
66
83
|
//# sourceMappingURL=errorUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ERROR_EMPTY_STACKTRACE","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;AACA,OAAO,MAAMA,sBAAsB,GAAG,EAAE;AACxC,OAAO,MAAMC,mBAAmB,GAAG,eAAe;AAClD,OAAO,MAAMC,kBAAkB,GAAG,OAAO;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,GAAIC,KAAsB,IAAa;EAClE,IAAIC,KAAK,GAAGL,sBAAsB;EAElC,IAAI;IACA,IAAII,KAAK,KAAKE,SAAS,IAAIF,KAAK,KAAK,IAAI,EAAE;MACvCC,KAAK,GAAGL,sBAAsB;IAClC,CAAC,MAAM,IAAI,OAAOI,KAAK,KAAK,QAAQ,EAAE;MAClCC,KAAK,GAAGL,sBAAsB;IAClC,CAAC,MAAM,IAAI,OAAOI,KAAK,KAAK,QAAQ,EAAE;MAClC,IAAI,YAAY,IAAIA,KAAK,EAAE;QACvBC,KAAK,GAAGE,MAAM,CAACH,KAAK,CAACI,UAAU,CAAC;MACpC,CAAC,MAAM,IAAI,OAAO,IAAIJ,KAAK,EAAE;QACzBC,KAAK,GAAGE,MAAM,CAACH,KAAK,CAACC,KAAK,CAAC;MAC/B,CAAC,MAAM,IAAI,gBAAgB,IAAID,KAAK,EAAE;QAClCC,KAAK,GAAGE,MAAM,CAACH,KAAK,CAACK,cAAc,CAAC;MACxC,CAAC,MAAM,IACH,WAAW,IAAIL,KAAK,IACpB,MAAM,IAAIA,KAAK,IACf,QAAQ,IAAIA,KAAK,EACnB;QACEC,KAA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AE;MACzC,OAAQjB,KAAK,CAASiB,IAAI;IAC9B;EACJ,CAAC,CAAC,OAAOR,CAAC,EAAE;IACR;EAAA;EAEJ,OAAOX,kBAAkB;AAC7B,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
3
|
+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
4
|
+
* Copyright 2016-Present Datadog, Inc.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { formatPathForLog, isPlainObject, warn } from './utils';
|
|
8
|
+
const MAX_ATTRIBUTES = 128;
|
|
9
|
+
/**
|
|
10
|
+
* Recursive in-place encoder: flattens values into `out` dictionary.
|
|
11
|
+
* Never applies "context", that's only for the root.
|
|
12
|
+
*/
|
|
13
|
+
export function encodeAttributesInPlace(input, out, path, encoders, context = {
|
|
14
|
+
numOfAttributes: 0
|
|
15
|
+
}) {
|
|
16
|
+
const value = applyEncoders(input, encoders);
|
|
17
|
+
|
|
18
|
+
// Nullish / primitive
|
|
19
|
+
if (value === null || value === undefined || typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
|
|
20
|
+
addEncodedAttribute(out, path, value, context);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Arrays
|
|
25
|
+
if (Array.isArray(value)) {
|
|
26
|
+
const normalize = x => {
|
|
27
|
+
const v = applyEncoders(x, encoders);
|
|
28
|
+
|
|
29
|
+
// Primitive / nullish are fine
|
|
30
|
+
if (v === null || v === undefined || typeof v === 'string' || typeof v === 'number' || typeof v === 'boolean') {
|
|
31
|
+
return v;
|
|
32
|
+
}
|
|
33
|
+
if (isPlainObject(v)) {
|
|
34
|
+
const nested = {};
|
|
35
|
+
encodeAttributesInPlace(v, nested, [], encoders, context);
|
|
36
|
+
return nested;
|
|
37
|
+
}
|
|
38
|
+
if (Array.isArray(v)) {
|
|
39
|
+
return v.map(normalize);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Unsupported
|
|
43
|
+
warn(`Dropped unsupported value in array at '${formatPathForLog(path)}': ${String(v)}`);
|
|
44
|
+
return undefined;
|
|
45
|
+
};
|
|
46
|
+
addEncodedAttribute(out, path, value.map(normalize).filter(item => item !== undefined), context);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Plain object
|
|
51
|
+
if (isPlainObject(value)) {
|
|
52
|
+
for (const [k, v] of Object.entries(value)) {
|
|
53
|
+
encodeAttributesInPlace(v, out, [...path, k], encoders, context);
|
|
54
|
+
}
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Unsupported
|
|
59
|
+
warn(`Dropped unsupported value at '${formatPathForLog(path)}': ${String(value)}`);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Sanitize unknown input to be JSON-serializable using encoders.
|
|
64
|
+
* This does not flatten—it's a pure sanitization pass (used by some encoders).
|
|
65
|
+
*/
|
|
66
|
+
export function sanitizeForJson(value, encoders, context = {
|
|
67
|
+
numOfAttributes: 0
|
|
68
|
+
}) {
|
|
69
|
+
const v = applyEncoders(value, encoders);
|
|
70
|
+
|
|
71
|
+
// If still a plain object, sanitize shallowly
|
|
72
|
+
if (isPlainObject(v)) {
|
|
73
|
+
const out = {};
|
|
74
|
+
for (const [k, val] of Object.entries(v)) {
|
|
75
|
+
encodeAttributesInPlace(val, out, [k], encoders, context);
|
|
76
|
+
}
|
|
77
|
+
return out;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// If array, sanitize items
|
|
81
|
+
if (Array.isArray(v)) {
|
|
82
|
+
return v.map(item => sanitizeForJson(item, encoders, context));
|
|
83
|
+
}
|
|
84
|
+
return v;
|
|
85
|
+
}
|
|
86
|
+
export function applyEncoders(value, encoders) {
|
|
87
|
+
for (const enc of encoders) {
|
|
88
|
+
try {
|
|
89
|
+
if (enc.check(value)) {
|
|
90
|
+
return enc.encode(value);
|
|
91
|
+
}
|
|
92
|
+
} catch (err) {
|
|
93
|
+
warn(`Encoder error: ${String(err)}`);
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
// Not matched by any encoder; leave as-is for the visitor to decide
|
|
98
|
+
return value;
|
|
99
|
+
}
|
|
100
|
+
function addEncodedAttribute(out, path, value, context) {
|
|
101
|
+
if (context.numOfAttributes >= MAX_ATTRIBUTES) {
|
|
102
|
+
// Only warn once to avoid log spam
|
|
103
|
+
if (!context.limitReachedWarned) {
|
|
104
|
+
warn(`Attribute limit of ${MAX_ATTRIBUTES} reached; further attributes will be dropped.`);
|
|
105
|
+
context.limitReachedWarned = true;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Optional: warn for specific dropped attribute (if desired)
|
|
109
|
+
warn(`Dropped attribute at '${formatPathForLog(path)}' because limit of ${MAX_ATTRIBUTES} attributes was reached. All further attributes will be dropped.`);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
out[path.join('.')] = value;
|
|
113
|
+
context.numOfAttributes++;
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["formatPathForLog","isPlainObject","warn","MAX_ATTRIBUTES","encodeAttributesInPlace","input","out","path","encoders","context","numOfAttributes","value","applyEncoders","undefined","addEncodedAttribute","Array","isArray","normalize","x","v","nested","map","String","filter","item","k","Object","entries","sanitizeForJson","val","enc","check","encode","err","limitReachedWarned","join"],"sourceRoot":"../../../../src","sources":["sdk/AttributesEncoding/helpers.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAGA,SAASA,gBAAgB,EAAEC,aAAa,EAAEC,IAAI,QAAQ,SAAS;AAE/D,MAAMC,cAAc,GAAG,GAAG;AAO1B;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CACnC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,OAAO,CAAC,CAAC;EAClE;EAEA,OAAOU,CAAC;AACZ;AAEA,OAAO,SAASP,aAAaA,CACzBD,KAAc,EACdH,QAAiC,EACxB;EACT,KAAK,MAAMsB,GAAG,IAAItB,QAAQ,EAAE;IACxB,IAAI;MACA,IAAIsB,GAAG,CAACC,KAAK,CAACpB,KAAK,CAAC,EAAE;QAClB,OAAOmB,GAAG,CAACE,MAAM,CAACrB,KAAc,CAAC;MACrC;IACJ,CAAC,CAAC,OAAOsB,GAAG,EAAE;MACV/B,IAAI,CAAC,kBAAkBoB,MAAM,CAACW,GAAG,CAAC,EAAE,CAAC;MACrC,OAAOpB,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,CAACyB,kBAAkB,EAAE;MAC7BhC,IAAI,CACA,sBAAsBC,cAAc,+CACxC,CAAC;MACDM,OAAO,CAACyB,kBAAkB,GAAG,IAAI;IACrC;;IAEA;IACAhC,IAAI,CACA,yBAAyBF,gBAAgB,CACrCO,IACJ,CAAC,sBAAsBJ,cAAc,kEACzC,CAAC;IAED;EACJ;EAEAG,GAAG,CAACC,IAAI,CAAC4B,IAAI,CAAC,GAAG,CAAC,CAAC,GAAGxB,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,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
3
|
+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
4
|
+
* Copyright 2016-Present Datadog, Inc.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { InternalLog } from '../../InternalLog';
|
|
8
|
+
import { SdkVerbosity } from '../../config/types/SdkVerbosity';
|
|
9
|
+
export function warn(text) {
|
|
10
|
+
InternalLog.log(`[ATTRIBUTES] ${text}`, SdkVerbosity.WARN);
|
|
11
|
+
}
|
|
12
|
+
export function isPlainObject(v) {
|
|
13
|
+
return !!v && typeof v === 'object' && v.constructor === Object;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Utility: format a path array into dot/bracket notation (for logs).
|
|
18
|
+
*/
|
|
19
|
+
export function formatPathForLog(path) {
|
|
20
|
+
return path.map((segment, index) => {
|
|
21
|
+
const s = String(segment);
|
|
22
|
+
if (/^\d/.test(s)) {
|
|
23
|
+
return `[${s}]`;
|
|
24
|
+
}
|
|
25
|
+
return index === 0 ? s : `.${s}`;
|
|
26
|
+
}).join('');
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["InternalLog","SdkVerbosity","warn","text","log","WARN","isPlainObject","v","constructor","Object","formatPathForLog","path","map","segment","index","s","String","test","join"],"sourceRoot":"../../../../src","sources":["sdk/AttributesEncoding/utils.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,YAAY,QAAQ,iCAAiC;AAE9D,OAAO,SAASC,IAAIA,CAACC,IAAY,EAAE;EAC/BH,WAAW,CAACI,GAAG,CAAC,gBAAgBD,IAAI,EAAE,EAAEF,YAAY,CAACI,IAAI,CAAC;AAC9D;AAEA,OAAO,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;AACA,OAAO,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":[]}
|
|
@@ -6,12 +6,38 @@
|
|
|
6
6
|
|
|
7
7
|
class AttributesProvider {
|
|
8
8
|
attributes = {};
|
|
9
|
-
|
|
9
|
+
addAttribute = (key, value) => {
|
|
10
|
+
const newAttributes = {
|
|
11
|
+
...this.attributes
|
|
12
|
+
};
|
|
13
|
+
newAttributes[key] = value;
|
|
14
|
+
this.attributes = newAttributes;
|
|
15
|
+
};
|
|
16
|
+
removeAttribute = key => {
|
|
17
|
+
const updatedAttributes = {
|
|
18
|
+
...this.attributes
|
|
19
|
+
};
|
|
20
|
+
delete updatedAttributes[key];
|
|
21
|
+
this.attributes = updatedAttributes;
|
|
22
|
+
};
|
|
23
|
+
addAttributes = attributes => {
|
|
10
24
|
this.attributes = {
|
|
11
25
|
...this.attributes,
|
|
12
26
|
...attributes
|
|
13
27
|
};
|
|
14
28
|
};
|
|
29
|
+
removeAttributes = keys => {
|
|
30
|
+
const updated = {
|
|
31
|
+
...this.attributes
|
|
32
|
+
};
|
|
33
|
+
for (const k of keys) {
|
|
34
|
+
delete updated[k];
|
|
35
|
+
}
|
|
36
|
+
this.attributes = updated;
|
|
37
|
+
};
|
|
38
|
+
getAttribute = key => {
|
|
39
|
+
return this.attributes[key];
|
|
40
|
+
};
|
|
15
41
|
getAttributes = () => {
|
|
16
42
|
return this.attributes;
|
|
17
43
|
};
|
|
@@ -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"],"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;AAEA,OAAO,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","ignoreList":[]}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Copyright 2016-Present Datadog, Inc.
|
|
5
5
|
*/
|
|
6
6
|
import { InternalLog } from '../../InternalLog';
|
|
7
|
-
import { SdkVerbosity } from '../../SdkVerbosity';
|
|
8
|
-
import { setCachedSessionId } from '../../rum/
|
|
7
|
+
import { SdkVerbosity } from '../../config/types/SdkVerbosity';
|
|
8
|
+
import { setCachedSessionId } from '../../rum/helper';
|
|
9
9
|
import { DatadogDefaultEventEmitter } from '../DatadogEventEmitter/DatadogDefaultEventEmitter';
|
|
10
10
|
import { DdSdkInternalNativeBridgeEvent as BridgeEvent } from './DdSdkInternalNativeBridgeEvent';
|
|
11
11
|
const DEFAULT_EVENTS = [new BridgeEvent('RUMSessionStarted', sessionId => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["InternalLog","SdkVerbosity","setCachedSessionId","DatadogDefaultEventEmitter","DdSdkInternalNativeBridgeEvent","BridgeEvent","DEFAULT_EVENTS","sessionId","defaultErrorHandler","err","log","DEBUG","DdSdkInternalNativeBridge","_isInitialized","isInitialized","_instance","initialize","eventEmitter","errorHandler","registerDefaultListeners","constructor","forEach","event","addListener","eventName","callback","registerNativeBridge","nativeEventEmitter","hasNativeBridge"],"sourceRoot":"../../../../src","sources":["sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,YAAY,QAAQ,
|
|
1
|
+
{"version":3,"names":["InternalLog","SdkVerbosity","setCachedSessionId","DatadogDefaultEventEmitter","DdSdkInternalNativeBridgeEvent","BridgeEvent","DEFAULT_EVENTS","sessionId","defaultErrorHandler","err","log","DEBUG","DdSdkInternalNativeBridge","_isInitialized","isInitialized","_instance","initialize","eventEmitter","errorHandler","registerDefaultListeners","constructor","forEach","event","addListener","eventName","callback","registerNativeBridge","nativeEventEmitter","hasNativeBridge"],"sourceRoot":"../../../../src","sources":["sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,YAAY,QAAQ,iCAAiC;AAC9D,SAASC,kBAAkB,QAAQ,kBAAkB;AACrD,SAASC,0BAA0B,QAAQ,mDAAmD;AAG9F,SAASC,8BAA8B,IAAIC,WAAW,QAAQ,kCAAkC;AAEhG,MAAMC,cAAc,GAAG,CACnB,IAAID,WAAW,CAAS,mBAAmB,EAAGE,SAAiB,IAAK;EAChEL,kBAAkB,CAACK,SAAS,CAAC;AACjC,CAAC,CAAC,CACL;AAED,MAAMC,mBAAmB,GAAIC,GAAQ,IAAK;EACtCT,WAAW,CAACU,GAAG,CAACD,GAAG,EAAER,YAAY,CAACU,KAAK,CAAC;AAC5C,CAAC;AAED,OAAO,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,GAAGV,mBAAmB,EAC7B;IACzB,IAAI,CAACO,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;MACAb,cAAc,CAACe,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,OAAOhB,GAAG,EAAE;MACV,IAAI,CAACS,YAAY,CACb,2EAA2ET,GAAG,EAClF,CAAC;MACD,OAAO,KAAK;IAChB;EACJ;AACJ;AAEA,OAAO,MAAMiB,oBAAoB,GAAGA,CAChCT,YAAkC,EAClCC,YAAgC,GAAGV,mBAAmB,KACrD;EACD,MAAMmB,kBAAkB,GACpBV,YAAY,IAAI,IAAId,0BAA0B,CAACe,YAAY,CAAC;EAChEN,yBAAyB,CAACI,UAAU,CAACW,kBAAkB,CAAC;EACxD,IAAI,CAACf,yBAAyB,CAACE,aAAa,EAAE;IAC1CI,YAAY,CAAC,6CAA6C,CAAC;EAC/D;AACJ,CAAC;AAED,OAAO,MAAMU,eAAe,GAAGA,CAAA,KAAMhB,yBAAyB,CAACE,aAAa","ignoreList":[]}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright 2016-Present Datadog, Inc.
|
|
5
5
|
*/
|
|
6
6
|
import { InternalLog } from '../../InternalLog';
|
|
7
|
-
import { SdkVerbosity } from '../../SdkVerbosity';
|
|
7
|
+
import { SdkVerbosity } from '../../config/types/SdkVerbosity';
|
|
8
8
|
export class DdSdkInternalNativeBridgeEvent {
|
|
9
9
|
constructor(eventName, callback) {
|
|
10
10
|
this.eventName = eventName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["InternalLog","SdkVerbosity","DdSdkInternalNativeBridgeEvent","constructor","eventName","callback","data","log","JSON","stringify","DEBUG"],"sourceRoot":"../../../../src","sources":["sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,YAAY,QAAQ,
|
|
1
|
+
{"version":3,"names":["InternalLog","SdkVerbosity","DdSdkInternalNativeBridgeEvent","constructor","eventName","callback","data","log","JSON","stringify","DEBUG"],"sourceRoot":"../../../../src","sources":["sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,YAAY,QAAQ,iCAAiC;AAE9D,OAAO,MAAMC,8BAA8B,CAAW;EAIlDC,WAAWA,CAACC,SAAiB,EAAEC,QAAkC,EAAE;IAC/D,IAAI,CAACD,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACC,QAAQ,GAAIC,IAAc,IAAK;MAChC,IAAI,CAACA,IAAI,EAAE;QACPN,WAAW,CAACO,GAAG,CACX,mCAAmCH,SAAS,YACxCE,IAAI,GAAGE,IAAI,CAACC,SAAS,CAACH,IAAI,CAAC,GAAG,WAAW,EAC3C,EACFL,YAAY,CAACS,KACjB,CAAC;QACD;MACJ;MAEAV,WAAW,CAACO,GAAG,CACX,kCAAkCH,SAAS,YACvCE,IAAI,GAAGE,IAAI,CAACC,SAAS,CAACH,IAAI,CAAC,GAAG,WAAW,EAC3C,EACFL,YAAY,CAACS,KACjB,CAAC;MAEDL,QAAQ,CAACC,IAAI,CAAC;IAClB,CAAC;EACL;AACJ","ignoreList":[]}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { InternalLog } from '../../../InternalLog';
|
|
8
|
-
import { SdkVerbosity } from '../../../SdkVerbosity';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { SdkVerbosity } from '../../../config/types/SdkVerbosity';
|
|
9
|
+
import { getErrorStackTrace } from '../../AttributesEncoding/errorUtils';
|
|
10
|
+
import { NativeDdSdk } from '../../DdSdkInternal';
|
|
11
11
|
import { DatadogBuffer } from './DatadogBuffer';
|
|
12
12
|
const DEFAULT_BUFFER_SIZE = 100;
|
|
13
13
|
export class BoundedBuffer extends DatadogBuffer {
|
|
@@ -135,7 +135,7 @@ export class BoundedBuffer extends DatadogBuffer {
|
|
|
135
135
|
kind,
|
|
136
136
|
occurrences
|
|
137
137
|
}) => {
|
|
138
|
-
|
|
138
|
+
NativeDdSdk.telemetryError(`${message} happened ${occurrences} times.`, stack, kind);
|
|
139
139
|
});
|
|
140
140
|
};
|
|
141
141
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["InternalLog","SdkVerbosity","
|
|
1
|
+
{"version":3,"names":["InternalLog","SdkVerbosity","getErrorStackTrace","NativeDdSdk","DatadogBuffer","DEFAULT_BUFFER_SIZE","BoundedBuffer","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","log","WARN","drainTelemetry","addTelemetryEvent","console","warn","Math","random","tries","hash","toString","slice","Error","message","stack","kind","occurrences","Object","values","forEach","telemetryError"],"sourceRoot":"../../../../../src","sources":["sdk/DatadogProvider/Buffer/BoundedBuffer.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,WAAW,QAAQ,sBAAsB;AAClD,SAASC,YAAY,QAAQ,oCAAoC;AACjE,SAASC,kBAAkB,QAAQ,qCAAqC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