@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DdRumErrorTracking.d.ts","sourceRoot":"","sources":["../../../../src/rum/instrumentation/DdRumErrorTracking.tsx"],"names":[],"mappings":"AAsBA;;GAEG;AACH,qBAAa,kBAAkB;IAC3B,OAAO,CAAC,MAAM,CAAC,UAAU,CAAS;IAElC,OAAO,CAAC,MAAM,CAAC,uBAAuB,CAAS;IAG/C,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAAiE;IAGnG,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAAiC;IAEnE;;OAEG;IACH,MAAM,CAAC,aAAa,IAAI,IAAI;IA8B5B,MAAM,CAAC,aAAa,UAAW,GAAG,YAAY,OAAO,KAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"DdRumErrorTracking.d.ts","sourceRoot":"","sources":["../../../../src/rum/instrumentation/DdRumErrorTracking.tsx"],"names":[],"mappings":"AAsBA;;GAEG;AACH,qBAAa,kBAAkB;IAC3B,OAAO,CAAC,MAAM,CAAC,UAAU,CAAS;IAElC,OAAO,CAAC,MAAM,CAAC,uBAAuB,CAAS;IAG/C,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAAiE;IAGnG,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAAiC;IAEnE;;OAEG;IACH,MAAM,CAAC,aAAa,IAAI,IAAI;IA8B5B,MAAM,CAAC,aAAa,UAAW,GAAG,YAAY,OAAO,KAAG,IAAI,CAsB1D;IAEF,MAAM,CAAC,cAAc,cAAe,OAAO,EAAE,KAAG,IAAI,CAyClD;IAEF,OAAO,CAAC,MAAM,CAAC,WAAW,CAOxB;CACL"}
|
package/lib/typescript/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.d.ts
CHANGED
|
@@ -16,16 +16,15 @@ type TargetObject = {
|
|
|
16
16
|
accessibilityLabel: string[];
|
|
17
17
|
[key: string]: any;
|
|
18
18
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
static config: BabelConfig;
|
|
19
|
+
declare class BabelInteractionTracking {
|
|
20
|
+
config: BabelConfig;
|
|
22
21
|
private timeProvider;
|
|
23
22
|
private telemetrySent;
|
|
24
23
|
private ddRum;
|
|
25
24
|
isInitialized: boolean;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
getInstance(): BabelInteractionTracking;
|
|
26
|
+
attachRumInstance(ddRum: typeof DdRum): void;
|
|
27
|
+
getTelemetryConfig(): {
|
|
29
28
|
babel_plugin: {
|
|
30
29
|
enabled: boolean;
|
|
31
30
|
track_interactions: boolean;
|
|
@@ -34,5 +33,6 @@ export declare class DdBabelInteractionTracking {
|
|
|
34
33
|
private getTargetName;
|
|
35
34
|
wrapRumAction(func: (...args: any[]) => any, action: RumActionType, targetObject: TargetObject): (...args: any[]) => any;
|
|
36
35
|
}
|
|
36
|
+
export declare const DdBabelInteractionTracking: BabelInteractionTracking;
|
|
37
37
|
export {};
|
|
38
38
|
//# sourceMappingURL=DdBabelInteractionTracking.d.ts.map
|
package/lib/typescript/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DdBabelInteractionTracking.d.ts","sourceRoot":"","sources":["../../../../../src/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DdBabelInteractionTracking.d.ts","sourceRoot":"","sources":["../../../../../src/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAMjD,KAAK,WAAW,GAAG;IACf,iBAAiB,EAAE,OAAO,CAAC;IAC3B,qBAAqB,EAAE,OAAO,CAAC;CAClC,CAAC;AAEF,KAAK,YAAY,GAAG;IAChB,UAAU,EAAE,CAAC,MAAM,MAAM,EAAE,CAAC,GAAG,SAAS,CAAC;IACzC,OAAO,EAAE;QAAE,UAAU,EAAE,OAAO,CAAC;QAAC,aAAa,EAAE,OAAO,CAAA;KAAE,CAAC;IACzD,WAAW,EAAE,GAAG,EAAE,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB,CAAC;AAEF,cAAM,wBAAwB;IAC1B,MAAM,EAAE,WAAW,CAGjB;IAEF,OAAO,CAAC,YAAY,CAA2C;IAE/D,OAAO,CAAC,aAAa,CAAkB;IAEvC,OAAO,CAAC,KAAK,CAA6B;IAE1C,aAAa,EAAE,OAAO,CAAS;IAE/B,WAAW;IAIX,iBAAiB,CAAC,KAAK,EAAE,OAAO,KAAK;IAKrC,kBAAkB;;;;;;IASlB,OAAO,CAAC,aAAa;IAqDrB,aAAa,CACT,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAC7B,MAAM,EAAE,aAAa,EACrB,YAAY,EAAE,YAAY,GAC3B,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG;CAsC7B;AAED,eAAO,MAAM,0BAA0B,0BAGtC,CAAC"}
|
package/lib/typescript/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import type { DdEventsInterceptorOptions } from './DdEventsInterceptor';
|
|
|
2
2
|
/**
|
|
3
3
|
* Provides RUM auto-instrumentation feature to track user interaction as RUM events.
|
|
4
4
|
* For now we are only covering the "onPress" events.
|
|
5
|
+
*
|
|
6
|
+
* @deprecated since 3.0.0 – Use `@datadog/mobile-react-native-babel-plugin` instead.
|
|
5
7
|
*/
|
|
6
8
|
export declare class DdRumUserInteractionTracking {
|
|
7
9
|
private static isTracking;
|
|
@@ -15,8 +17,13 @@ export declare class DdRumUserInteractionTracking {
|
|
|
15
17
|
* Starts tracking user interactions and sends a RUM Action event every time a new interaction was detected.
|
|
16
18
|
* Please note that we are only considering as valid - for - tracking only the user interactions that have
|
|
17
19
|
* a visible output (either an UI state change or a Resource request)
|
|
20
|
+
*
|
|
21
|
+
* @deprecated since version 3.0.0
|
|
18
22
|
*/
|
|
19
23
|
static startTracking(options: DdEventsInterceptorOptions): void;
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated since version 3.0.0
|
|
26
|
+
*/
|
|
20
27
|
static stopTracking(): void;
|
|
21
28
|
}
|
|
22
29
|
//# sourceMappingURL=DdRumUserInteractionTracking.d.ts.map
|
package/lib/typescript/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DdRumUserInteractionTracking.d.ts","sourceRoot":"","sources":["../../../../../src/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAOxE
|
|
1
|
+
{"version":3,"file":"DdRumUserInteractionTracking.d.ts","sourceRoot":"","sources":["../../../../../src/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAOxE;;;;;GAKG;AACH,qBAAa,4BAA4B;IACrC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAS;IAClC,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAkD;IAClF,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAAuB;IAC3D,OAAO,CAAC,MAAM,CAAC,YAAY,CAAc;IACzC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAQ;IAClC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAQ;IAErC,OAAO,CAAC,MAAM,CAAC,0BAA0B,CAuBvC;IAEF;;;;;;OAMG;IACH,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,0BAA0B,GAAG,IAAI;IAsG/D;;OAEG;IACH,MAAM,CAAC,YAAY;CActB"}
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
+
import BigInt from 'big-integer';
|
|
1
2
|
import type { FirstPartyHost } from '../../types';
|
|
2
3
|
/**
|
|
3
4
|
* Provides RUM auto-instrumentation feature to track resources (fetch, XHR, axios) as RUM events.
|
|
4
5
|
*/
|
|
5
|
-
|
|
6
|
-
private
|
|
7
|
-
private
|
|
6
|
+
declare class RumResourceTracking {
|
|
7
|
+
private _isTracking;
|
|
8
|
+
private _requestProxy;
|
|
9
|
+
private _maxSampledTraceId;
|
|
10
|
+
get isTracking(): boolean;
|
|
11
|
+
get maxSampledTraceId(): BigInt.BigInteger;
|
|
8
12
|
/**
|
|
9
13
|
* Starts tracking resources and sends a RUM Resource event every time a network request is detected.
|
|
10
14
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
15
|
+
startTracking({ resourceTraceSampleRate, firstPartyHosts }: {
|
|
16
|
+
resourceTraceSampleRate: number;
|
|
13
17
|
firstPartyHosts: FirstPartyHost[];
|
|
14
18
|
}): void;
|
|
15
|
-
|
|
19
|
+
stopTracking(): void;
|
|
16
20
|
}
|
|
21
|
+
export declare const DdRumResourceTracking: RumResourceTracking;
|
|
22
|
+
export {};
|
|
17
23
|
//# sourceMappingURL=DdRumResourceTracking.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DdRumResourceTracking.d.ts","sourceRoot":"","sources":["../../../../../src/rum/instrumentation/resourceTracking/DdRumResourceTracking.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DdRumResourceTracking.d.ts","sourceRoot":"","sources":["../../../../../src/rum/instrumentation/resourceTracking/DdRumResourceTracking.tsx"],"names":[],"mappings":"AAMA,OAAO,MAAM,MAAM,aAAa,CAAC;AAKjC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAUlD;;GAEG;AACH,cAAM,mBAAmB;IACrB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,aAAa,CAA6B;IAClD,OAAO,CAAC,kBAAkB,CAAkC;IAE5D,IAAI,UAAU,IAAI,OAAO,CAExB;IAED,IAAI,iBAAiB,IAAI,MAAM,CAAC,UAAU,CAEzC;IAED;;OAEG;IACH,aAAa,CAAC,EACV,uBAAuB,EACvB,eAAe,EAClB,EAAE;QACC,uBAAuB,EAAE,MAAM,CAAC;QAChC,eAAe,EAAE,cAAc,EAAE,CAAC;KACrC,GAAG,IAAI;IA6BR,YAAY,IAAI,IAAI;CAUvB;AAED,eAAO,MAAM,qBAAqB,qBAGjC,CAAC"}
|
|
@@ -41,5 +41,6 @@ export declare class DatadogTracingContext {
|
|
|
41
41
|
* @param inject a callback that is called for each attribute that should be added to your RUM Resource context.
|
|
42
42
|
*/
|
|
43
43
|
injectRumResourceContext(inject: (attribute: string, value: string | number) => void): void;
|
|
44
|
+
private processHeaders;
|
|
44
45
|
}
|
|
45
46
|
//# sourceMappingURL=DatadogTracingContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatadogTracingContext.d.ts","sourceRoot":"","sources":["../../../../../../src/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DatadogTracingContext.d.ts","sourceRoot":"","sources":["../../../../../../src/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG3D;;;GAGG;AACH,qBAAa,qBAAqB;IAC9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAsC;IACxE,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAkC;IACrE,QAAQ,CAAC,OAAO,CAAC,EAAE,wBAAwB,CAAC;IAC5C,QAAQ,CAAC,MAAM,CAAC,EAAE,wBAAwB,CAAC;gBAGvC,cAAc,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,EACnD,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAChD,OAAO,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,EACnC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAUrC;;;OAGG;IACH,oBAAoB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAM9C;;;OAGG;IACH,2BAA2B,IAAI;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE;IAIlE;;;OAGG;IACH,qBAAqB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IAIxD;;;OAGG;IACH,uBAAuB,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI;IAMvE;;;OAGG;IACH,wBAAwB,CACpB,MAAM,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI;IAO/D,OAAO,CAAC,cAAc;CAmBzB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { BigInteger } from 'big-integer';
|
|
2
|
+
export declare const MAX_TRACE_ID: BigInteger;
|
|
2
3
|
/**
|
|
3
4
|
* Available formats for representing the {@link TracingIdentifier} as a string.
|
|
4
5
|
*/
|
|
@@ -92,6 +93,13 @@ export declare class TracingIdentifier {
|
|
|
92
93
|
* @returns the generated {@link SpanId}.
|
|
93
94
|
*/
|
|
94
95
|
static createSpanId(): SpanId;
|
|
96
|
+
/**
|
|
97
|
+
* Crate a Tracing Identifier from a given BigInt ID and type.
|
|
98
|
+
* @param id the BigInt ID.
|
|
99
|
+
* @param type the type of tracing identifier.
|
|
100
|
+
* @returns the generated {@link TraceId} or {@link SpanId}.
|
|
101
|
+
*/
|
|
102
|
+
static fromBigInt(id: BigInteger, type: TracingIdType): TraceId | SpanId;
|
|
95
103
|
/**
|
|
96
104
|
* Private constructor to initialize the {@link TracingIdentifier} based on the given
|
|
97
105
|
* {@link TracingIdType}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TracingIdentifier.d.ts","sourceRoot":"","sources":["../../../../../../src/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C;;GAEG;AACH,oBAAY,eAAe;IACvB;;OAEG;IACH,OAAO,IAAA;IAEP;;OAEG;IACH,UAAU,IAAA;IAEV;;OAEG;IACH,WAAW,IAAA;IAEX;;OAEG;IACH,GAAG,IAAA;IAEH;;OAEG;IACH,MAAM,IAAA;IAEN;;OAEG;IACH,OAAO,IAAA;IAEP;;OAEG;IACH,SAAS,IAAA;IAET;;OAEG;IACH,YAAY,IAAA;IAEZ;;OAEG;IACH,aAAa,IAAA;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,iBAAiB,GAAG;IACtC,MAAM,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,iBAAiB,GAAG;IACrC,MAAM,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,oBAAY,aAAa;IACrB;;OAEG;IACH,KAAK,IAAA;IACL;;OAEG;IACH,IAAI,IAAA;CACP;AAgBD;;;;;;;GAOG;AACH,qBAAa,iBAAiB;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,UAAU,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAE7B;;;OAGG;WACW,aAAa,IAAI,OAAO;IAItC;;;OAGG;WACW,YAAY,IAAI,MAAM;IAIpC;;;OAGG;IACH,OAAO;IAKP;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAgCpB;;;;OAIG;IACI,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM;CA6CnD"}
|
|
1
|
+
{"version":3,"file":"TracingIdentifier.d.ts","sourceRoot":"","sources":["../../../../../../src/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,eAAO,MAAM,YAAY,YAA6C,CAAC;AAEvE;;GAEG;AACH,oBAAY,eAAe;IACvB;;OAEG;IACH,OAAO,IAAA;IAEP;;OAEG;IACH,UAAU,IAAA;IAEV;;OAEG;IACH,WAAW,IAAA;IAEX;;OAEG;IACH,GAAG,IAAA;IAEH;;OAEG;IACH,MAAM,IAAA;IAEN;;OAEG;IACH,OAAO,IAAA;IAEP;;OAEG;IACH,SAAS,IAAA;IAET;;OAEG;IACH,YAAY,IAAA;IAEZ;;OAEG;IACH,aAAa,IAAA;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,iBAAiB,GAAG;IACtC,MAAM,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,iBAAiB,GAAG;IACrC,MAAM,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,oBAAY,aAAa;IACrB;;OAEG;IACH,KAAK,IAAA;IACL;;OAEG;IACH,IAAI,IAAA;CACP;AAgBD;;;;;;;GAOG;AACH,qBAAa,iBAAiB;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,UAAU,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAE7B;;;OAGG;WACW,aAAa,IAAI,OAAO;IAItC;;;OAGG;WACW,YAAY,IAAI,MAAM;IAIpC;;;;;OAKG;WACW,UAAU,CACpB,EAAE,EAAE,UAAU,EACd,IAAI,EAAE,aAAa,GACpB,OAAO,GAAG,MAAM;IAInB;;;OAGG;IACH,OAAO;IAKP;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAgCpB;;;;OAIG;IACI,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM;CA6CnD"}
|
|
@@ -1,26 +1,14 @@
|
|
|
1
1
|
import type { PropagatorType } from '../../../types';
|
|
2
2
|
import type { RegexMap } from '../requestProxy/interfaces/RequestProxy';
|
|
3
|
-
import type {
|
|
3
|
+
import type { DdRumResourceTracingAttributes } from './distributedTracingAttributes';
|
|
4
4
|
import type { Hostname } from './firstPartyHosts';
|
|
5
|
-
export
|
|
6
|
-
tracingStrategy: 'KEEP';
|
|
7
|
-
traceId: TraceId;
|
|
8
|
-
spanId: SpanId;
|
|
9
|
-
samplingPriorityHeader: '1' | '0';
|
|
10
|
-
rulePsr: number;
|
|
11
|
-
propagatorTypes: PropagatorType[];
|
|
12
|
-
rumSessionId?: string;
|
|
13
|
-
} | {
|
|
14
|
-
tracingStrategy: 'DISCARD';
|
|
15
|
-
traceId?: void;
|
|
16
|
-
spanId?: void;
|
|
17
|
-
samplingPriorityHeader: '0';
|
|
18
|
-
};
|
|
19
|
-
export declare const getTracingAttributes: ({ hostname, firstPartyHostsRegexMap, tracingSamplingRate, rumSessionId }: {
|
|
5
|
+
export declare const getTracingAttributes: ({ hostname, firstPartyHostsRegexMap, tracingSamplingRate, rumSessionId, userId, accountId }: {
|
|
20
6
|
hostname: Hostname | null;
|
|
21
7
|
firstPartyHostsRegexMap: RegexMap;
|
|
22
8
|
tracingSamplingRate: number;
|
|
23
9
|
rumSessionId?: string | undefined;
|
|
10
|
+
userId?: string | undefined;
|
|
11
|
+
accountId?: string | undefined;
|
|
24
12
|
}) => DdRumResourceTracingAttributes;
|
|
25
|
-
export declare const generateTracingAttributesWithSampling: (tracingSamplingRate: number, propagatorTypes: PropagatorType[], rumSessionId?: string) => DdRumResourceTracingAttributes;
|
|
13
|
+
export declare const generateTracingAttributesWithSampling: (tracingSamplingRate: number, propagatorTypes: PropagatorType[], rumSessionId?: string, userId?: string, accountId?: string) => DdRumResourceTracingAttributes;
|
|
26
14
|
//# sourceMappingURL=distributedTracing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distributedTracing.d.ts","sourceRoot":"","sources":["../../../../../../src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"distributedTracing.d.ts","sourceRoot":"","sources":["../../../../../../src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AAGxE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAErF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAQlD,eAAO,MAAM,oBAAoB;cAQnB,QAAQ,GAAG,IAAI;;yBAEJ,MAAM;;;;MAI3B,8BAkBH,CAAC;AAEF,eAAO,MAAM,qCAAqC,wBACzB,MAAM,mBACV,cAAc,EAAE,iBAClB,MAAM,WACZ,MAAM,cACH,MAAM,KACnB,8BA0BF,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { PropagatorType } from '../../../types';
|
|
2
|
+
import type { SpanId, TraceId } from './TracingIdentifier';
|
|
3
|
+
export type DdRumResourceTracingAttributes = {
|
|
4
|
+
tracingStrategy: 'KEEP';
|
|
5
|
+
traceId: TraceId;
|
|
6
|
+
spanId: SpanId;
|
|
7
|
+
samplingPriorityHeader: '1' | '0';
|
|
8
|
+
rulePsr: number;
|
|
9
|
+
propagatorTypes: PropagatorType[];
|
|
10
|
+
rumSessionId?: string;
|
|
11
|
+
userId?: string;
|
|
12
|
+
accountId?: string;
|
|
13
|
+
baggageHeaders?: Set<string>;
|
|
14
|
+
} | {
|
|
15
|
+
tracingStrategy: 'DISCARD';
|
|
16
|
+
traceId?: void;
|
|
17
|
+
spanId?: void;
|
|
18
|
+
samplingPriorityHeader: '0';
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=distributedTracingAttributes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"distributedTracingAttributes.d.ts","sourceRoot":"","sources":["../../../../../../src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE3D,MAAM,MAAM,8BAA8B,GACpC;IACI,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,sBAAsB,EAAE,GAAG,GAAG,GAAG,CAAC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,cAAc,EAAE,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAChC,GACD;IACI,eAAe,EAAE,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,sBAAsB,EAAE,GAAG,CAAC;CAC/B,CAAC"}
|
|
@@ -1,32 +1,11 @@
|
|
|
1
1
|
import { PropagatorType } from '../../../types';
|
|
2
2
|
import type { FirstPartyHost } from '../../../types';
|
|
3
3
|
import { DatadogTracingContext } from './DatadogTracingContext';
|
|
4
|
-
import type { DdRumResourceTracingAttributes } from './
|
|
5
|
-
export declare const SAMPLING_PRIORITY_HEADER_KEY = "x-datadog-sampling-priority";
|
|
6
|
-
/**
|
|
7
|
-
* Datadog headers
|
|
8
|
-
*/
|
|
9
|
-
export declare const ORIGIN_HEADER_KEY = "x-datadog-origin";
|
|
10
|
-
export declare const ORIGIN_RUM = "rum";
|
|
11
|
-
export declare const TRACE_ID_HEADER_KEY = "x-datadog-trace-id";
|
|
12
|
-
export declare const PARENT_ID_HEADER_KEY = "x-datadog-parent-id";
|
|
13
|
-
export declare const TAGS_HEADER_KEY = "x-datadog-tags";
|
|
14
|
-
export declare const DD_TRACE_ID_TAG = "_dd.p.tid";
|
|
15
|
-
export declare const DD_RUM_SESSION_ID_TAG = "session.id";
|
|
16
|
-
/**
|
|
17
|
-
* OTel headers
|
|
18
|
-
*/
|
|
19
|
-
export declare const TRACECONTEXT_HEADER_KEY = "traceparent";
|
|
20
|
-
export declare const TRACESTATE_HEADER_KEY = "tracestate";
|
|
21
|
-
export declare const BAGGAGE_HEADER_KEY = "baggage";
|
|
22
|
-
export declare const B3_HEADER_KEY = "b3";
|
|
23
|
-
export declare const B3_MULTI_TRACE_ID_HEADER_KEY = "X-B3-TraceId";
|
|
24
|
-
export declare const B3_MULTI_SPAN_ID_HEADER_KEY = "X-B3-SpanId";
|
|
25
|
-
export declare const B3_MULTI_SAMPLED_HEADER_KEY = "X-B3-Sampled";
|
|
4
|
+
import type { DdRumResourceTracingAttributes } from './distributedTracingAttributes';
|
|
26
5
|
export declare const getTracingHeadersFromAttributes: (tracingAttributes: DdRumResourceTracingAttributes) => {
|
|
27
6
|
header: string;
|
|
28
7
|
value: string;
|
|
29
8
|
}[];
|
|
30
|
-
export declare const getTracingContext: (url: string, tracingSamplingRate: number, firstPartyHosts: FirstPartyHost[], rumSessionId?: string) => DatadogTracingContext;
|
|
31
|
-
export declare const getTracingContextForPropagators: (propagators: PropagatorType[], tracingSamplingRate: number, rumSessionId?: string) => DatadogTracingContext;
|
|
9
|
+
export declare const getTracingContext: (url: string, tracingSamplingRate: number, firstPartyHosts: FirstPartyHost[], rumSessionId?: string, userId?: string, accountId?: string) => DatadogTracingContext;
|
|
10
|
+
export declare const getTracingContextForPropagators: (propagators: PropagatorType[], tracingSamplingRate: number, rumSessionId?: string, userId?: string, accountId?: string) => DatadogTracingContext;
|
|
32
11
|
//# sourceMappingURL=distributedTracingHeaders.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distributedTracingHeaders.d.ts","sourceRoot":"","sources":["../../../../../../src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"distributedTracingHeaders.d.ts","sourceRoot":"","sources":["../../../../../../src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AA0BrF,eAAO,MAAM,+BAA+B,sBACrB,8BAA8B,KAClD;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EA4HnC,CAAC;AAEF,eAAO,MAAM,iBAAiB,QACrB,MAAM,uBACU,MAAM,mBACV,cAAc,EAAE,iBAClB,MAAM,WACZ,MAAM,cACH,MAAM,KACnB,qBAkBF,CAAC;AAEF,eAAO,MAAM,+BAA+B,gBAC3B,cAAc,EAAE,uBACR,MAAM,iBACZ,MAAM,WACZ,MAAM,cACH,MAAM,KACnB,qBAWF,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import BigInt from 'big-integer';
|
|
2
|
+
import type { TraceId } from './TracingIdentifier';
|
|
3
|
+
declare class _DistributedTracingSampling {
|
|
4
|
+
private _maxSampledTraceId;
|
|
5
|
+
get maxSampledTraceId(): BigInt.BigInteger;
|
|
6
|
+
setResourceTraceSampleRate(resourceTraceSampleRate: number): void;
|
|
7
|
+
shouldSampleTrace(tracingSamplingRate: number, sessionId: string | null | undefined, traceId: TraceId): boolean;
|
|
8
|
+
private static getMaxTraceId;
|
|
9
|
+
}
|
|
10
|
+
export declare const DistributedTracingSampling: _DistributedTracingSampling;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=distributedTracingSampling.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"distributedTracingSampling.d.ts","sourceRoot":"","sources":["../../../../../../src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.ts"],"names":[],"mappings":"AAIA,OAAO,MAAM,MAAM,aAAa,CAAC;AAKjC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAOnD,cAAM,2BAA2B;IAC7B,OAAO,CAAC,kBAAkB,CAAkC;IAE5D,IAAI,iBAAiB,IAAI,MAAM,CAAC,UAAU,CAEzC;IAED,0BAA0B,CAAC,uBAAuB,EAAE,MAAM;IAM1D,iBAAiB,CACb,mBAAmB,EAAE,MAAM,EAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,EAAE,OAAO,GACjB,OAAO;IAsCV,OAAO,CAAC,MAAM,CAAC,aAAa;CAG/B;AAED,eAAO,MAAM,0BAA0B,6BAGtC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Datadog headers
|
|
3
|
+
*/
|
|
4
|
+
export declare const SAMPLING_PRIORITY_HEADER_KEY = "x-datadog-sampling-priority";
|
|
5
|
+
export declare const ORIGIN_HEADER_KEY = "x-datadog-origin";
|
|
6
|
+
export declare const ORIGIN_RUM = "rum";
|
|
7
|
+
export declare const TRACE_ID_HEADER_KEY = "x-datadog-trace-id";
|
|
8
|
+
export declare const PARENT_ID_HEADER_KEY = "x-datadog-parent-id";
|
|
9
|
+
export declare const TAGS_HEADER_KEY = "x-datadog-tags";
|
|
10
|
+
export declare const DD_TRACE_ID_TAG = "_dd.p.tid";
|
|
11
|
+
export declare const DD_RUM_SESSION_ID_TAG = "session.id";
|
|
12
|
+
export declare const DD_RUM_USER_ID_TAG = "user.id";
|
|
13
|
+
export declare const DD_RUM_ACCOUNT_ID_TAG = "account.id";
|
|
14
|
+
/**
|
|
15
|
+
* OTel headers
|
|
16
|
+
*/
|
|
17
|
+
export declare const TRACECONTEXT_HEADER_KEY = "traceparent";
|
|
18
|
+
export declare const TRACESTATE_HEADER_KEY = "tracestate";
|
|
19
|
+
export declare const BAGGAGE_HEADER_KEY = "baggage";
|
|
20
|
+
export declare const B3_HEADER_KEY = "b3";
|
|
21
|
+
export declare const B3_MULTI_TRACE_ID_HEADER_KEY = "X-B3-TraceId";
|
|
22
|
+
export declare const B3_MULTI_SPAN_ID_HEADER_KEY = "X-B3-SpanId";
|
|
23
|
+
export declare const B3_MULTI_SAMPLED_HEADER_KEY = "X-B3-Sampled";
|
|
24
|
+
//# sourceMappingURL=headers.d.ts.map
|
package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/headers.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../../../../../../src/rum/instrumentation/resourceTracking/distributedTracing/headers.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,eAAO,MAAM,4BAA4B,gCAAgC,CAAC;AAC1E,eAAO,MAAM,iBAAiB,qBAAqB,CAAC;AACpD,eAAO,MAAM,UAAU,QAAQ,CAAC;AAChC,eAAO,MAAM,mBAAmB,uBAAuB,CAAC;AACxD,eAAO,MAAM,oBAAoB,wBAAwB,CAAC;AAC1D,eAAO,MAAM,eAAe,mBAAmB,CAAC;AAChD,eAAO,MAAM,eAAe,cAAc,CAAC;AAC3C,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAClD,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAC5C,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,uBAAuB,gBAAgB,CAAC;AACrD,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAClD,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAC5C,eAAO,MAAM,aAAa,OAAO,CAAC;AAClC,eAAO,MAAM,4BAA4B,iBAAiB,CAAC;AAC3D,eAAO,MAAM,2BAA2B,gBAAgB,CAAC;AACzD,eAAO,MAAM,2BAA2B,iBAAiB,CAAC"}
|
package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RequestProxyOptions } from '../interfaces/RequestProxy';
|
|
2
2
|
import { RequestProxy } from '../interfaces/RequestProxy';
|
|
3
|
-
import
|
|
3
|
+
import { ResourceReporter } from './DatadogRumResource/ResourceReporter';
|
|
4
4
|
interface XHRProxyProviders {
|
|
5
5
|
xhrType: typeof XMLHttpRequest;
|
|
6
6
|
resourceReporter: ResourceReporter;
|
|
@@ -14,6 +14,7 @@ export declare class XHRProxy extends RequestProxy {
|
|
|
14
14
|
private static originalXhrSend;
|
|
15
15
|
private static originalXhrSetRequestHeader;
|
|
16
16
|
constructor(providers: XHRProxyProviders);
|
|
17
|
+
static createWithResourceReporter(): XHRProxy;
|
|
17
18
|
onTrackingStart: (context: RequestProxyOptions) => void;
|
|
18
19
|
onTrackingStop: () => void;
|
|
19
20
|
}
|
package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XHRProxy.d.ts","sourceRoot":"","sources":["../../../../../../../src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"XHRProxy.d.ts","sourceRoot":"","sources":["../../../../../../../src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AA0BzE,UAAU,iBAAiB;IACvB,OAAO,EAAE,OAAO,cAAc,CAAC;IAC/B,gBAAgB,EAAE,gBAAgB,CAAC;CACtC;AAED;;GAEG;AACH,qBAAa,QAAS,SAAQ,YAAY;IACtC,OAAO,CAAC,SAAS,CAAoB;IACrC,OAAO,CAAC,MAAM,CAAC,eAAe,CAAuC;IACrE,OAAO,CAAC,MAAM,CAAC,eAAe,CAAuC;IACrE,OAAO,CAAC,MAAM,CAAC,2BAA2B,CAAmD;gBAEjF,SAAS,EAAE,iBAAiB;IAKxC,MAAM,CAAC,0BAA0B;IAOjC,eAAe,YAAa,mBAAmB,UAK7C;IAEF,cAAc,aAKZ;CACL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baggageHeaderUtils.d.ts","sourceRoot":"","sources":["../../../../../../../src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"baggageHeaderUtils.d.ts","sourceRoot":"","sources":["../../../../../../../src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.ts"],"names":[],"mappings":"AA4BA;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,IAAI,CA0GvE"}
|
package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ResourceKind } from '../../../../types';
|
|
2
|
-
import type { DdRumResourceTracingAttributes } from '../../distributedTracing/
|
|
2
|
+
import type { DdRumResourceTracingAttributes } from '../../distributedTracing/distributedTracingAttributes';
|
|
3
3
|
export interface RUMResource {
|
|
4
4
|
key: string;
|
|
5
5
|
request: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RumResource.d.ts","sourceRoot":"","sources":["../../../../../../../src/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"RumResource.d.ts","sourceRoot":"","sources":["../../../../../../../src/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,uDAAuD,CAAC;AAE5G,MAAM,WAAW,WAAW;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE;QACL,MAAM,EAAE,MAAM,CAAC;QACf,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,YAAY,CAAC;KACtB,CAAC;IACF,iBAAiB,EAAE,8BAA8B,CAAC;IAClD,iBAAiB,CAAC,EAAE,8BAA8B,CAAC;IACnD,QAAQ,EAAE;QACN,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,EAAE;QACL,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC9B,CAAC;IACF,eAAe,CAAC,EAAE,cAAc,CAAC;CACpC;AAED,MAAM,MAAM,8BAA8B,GAAG;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { Attributes } from '../sdk/AttributesSingleton/types';
|
|
2
|
+
import type { ErrorSource, FeatureOperationFailure } from '../types';
|
|
1
3
|
import type { DatadogTracingContext } from './instrumentation/resourceTracking/distributedTracing/DatadogTracingContext';
|
|
2
4
|
import type { DatadogTracingIdentifier } from './instrumentation/resourceTracking/distributedTracing/DatadogTracingIdentifier';
|
|
3
5
|
/**
|
|
@@ -86,6 +88,27 @@ export type DdRumType = {
|
|
|
86
88
|
* @param name: The name of the new custom timing attribute. Timings can be nested up to 8 levels deep. Names using more than 8 levels will be sanitized by SDK.
|
|
87
89
|
*/
|
|
88
90
|
addTiming(name: string): Promise<void>;
|
|
91
|
+
/**
|
|
92
|
+
* Adds a custom attribute to the active RUM View. It will be propagated to all future RUM events associated with the active View.
|
|
93
|
+
* @param key: key for this view attribute.
|
|
94
|
+
* @param value: value for this attribute.
|
|
95
|
+
*/
|
|
96
|
+
addViewAttribute(key: string, value: unknown): Promise<void>;
|
|
97
|
+
/**
|
|
98
|
+
* Removes an attribute from the active RUM View.
|
|
99
|
+
* @param key: key for the attribute to be removed from the view.
|
|
100
|
+
*/
|
|
101
|
+
removeViewAttribute(key: string): Promise<void>;
|
|
102
|
+
/**
|
|
103
|
+
* Adds multiple attributes to the active RUM View. They will be propagated to all future RUM events associated with the active View.
|
|
104
|
+
* @param attributes: key/value object containing all attributes to be added to the view.
|
|
105
|
+
*/
|
|
106
|
+
addViewAttributes(attributes: Attributes): Promise<void>;
|
|
107
|
+
/**
|
|
108
|
+
* Removes multiple attributes from the active RUM View.
|
|
109
|
+
* @param keys: keys for the attributes to be removed from the view.
|
|
110
|
+
*/
|
|
111
|
+
removeViewAttributes(keys: string[]): Promise<void>;
|
|
89
112
|
/**
|
|
90
113
|
* Adds the loading time of the view to the active view.
|
|
91
114
|
* It is calculated as the difference between the current time and the start time of the view.
|
|
@@ -129,6 +152,30 @@ export type DdRumType = {
|
|
|
129
152
|
* Generates a unique 128bit Span ID.
|
|
130
153
|
*/
|
|
131
154
|
generateSpanId(): DatadogTracingIdentifier;
|
|
155
|
+
/**
|
|
156
|
+
* Starts a Feature Operation, representing a high-level logical flow within your application (e.g., `login_flow`).
|
|
157
|
+
* @param name - The name of the feature operation (for example, `"login_flow"`).
|
|
158
|
+
* @param operationKey - An optional key to uniquely identify a specific instance of this operation when multiple are running concurrently.
|
|
159
|
+
* @param attributes - Custom attributes to attach to this operation.
|
|
160
|
+
*/
|
|
161
|
+
startFeatureOperation(name: string, operationKey: string | null, attributes: object): Promise<void>;
|
|
162
|
+
/**
|
|
163
|
+
* Marks a Feature Operation as successfully completed.
|
|
164
|
+
* Should be called when a previously started operation (via `startFeatureOperation`) finishes without error.
|
|
165
|
+
* @param name - The name of the feature operation (for example, `"login_flow"`).
|
|
166
|
+
* @param operationKey - The key for the operation instance to complete, if it was specified when starting it.
|
|
167
|
+
* @param attributes - Custom attributes to attach to this operation’s completion event.
|
|
168
|
+
*/
|
|
169
|
+
succeedFeatureOperation(name: string, operationKey: string | null, attributes: object): Promise<void>;
|
|
170
|
+
/**
|
|
171
|
+
* Marks a Feature Operation as failed.
|
|
172
|
+
* Should be called when a previously started operation (via `startFeatureOperation`) ends with an error.
|
|
173
|
+
* @param name - The name of the feature operation (for example, `"login_flow"`).
|
|
174
|
+
* @param operationKey - The key for the operation instance to fail, if it was specified when starting it.
|
|
175
|
+
* @param reason - The reason for the failure.
|
|
176
|
+
* @param attributes - Custom attributes to attach to this operation’s failure event.
|
|
177
|
+
*/
|
|
178
|
+
failFeatureOperation(name: string, operationKey: string | null, reason: FeatureOperationFailure, attributes: object): Promise<void>;
|
|
132
179
|
};
|
|
133
180
|
/**
|
|
134
181
|
* Describe the type of a RUM Action.
|
|
@@ -146,13 +193,6 @@ export declare enum RumActionType {
|
|
|
146
193
|
CUSTOM = "CUSTOM"
|
|
147
194
|
}
|
|
148
195
|
export type ResourceKind = 'image' | 'xhr' | 'beacon' | 'css' | 'document' | 'fetch' | 'font' | 'js' | 'media' | 'other' | 'native';
|
|
149
|
-
export declare enum ErrorSource {
|
|
150
|
-
NETWORK = "NETWORK",
|
|
151
|
-
SOURCE = "SOURCE",
|
|
152
|
-
CONSOLE = "CONSOLE",
|
|
153
|
-
WEBVIEW = "WEBVIEW",
|
|
154
|
-
CUSTOM = "CUSTOM"
|
|
155
|
-
}
|
|
156
196
|
/**
|
|
157
197
|
* Type of instrumentation on the host.
|
|
158
198
|
* - DATADOG: Datadog’s propagator (`x-datadog-*`)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/rum/types.ts"],"names":[],"mappings":"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
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/rum/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AccountInfo } from './types';
|
|
2
|
+
declare class AccountInfoProvider {
|
|
3
|
+
private accountInfo;
|
|
4
|
+
setAccountInfo: (accountInfo: AccountInfo) => void;
|
|
5
|
+
addAccountExtraInfo: (extraInfo: AccountInfo['extraInfo']) => void;
|
|
6
|
+
getAccountInfo: () => AccountInfo | undefined;
|
|
7
|
+
clearAccountInfo: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare class AccountInfoSingleton {
|
|
10
|
+
private static accountInfoProvider;
|
|
11
|
+
static getInstance: () => AccountInfoProvider;
|
|
12
|
+
static reset: () => void;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=AccountInfoSingleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountInfoSingleton.d.ts","sourceRoot":"","sources":["../../../../src/sdk/AccountInfoSingleton/AccountInfoSingleton.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,cAAM,mBAAmB;IACrB,OAAO,CAAC,WAAW,CAAsC;IAEzD,cAAc,gBAAiB,WAAW,UAGxC;IAEF,mBAAmB,cAAe,WAAW,CAAC,WAAW,CAAC,UASxD;IAEF,cAAc,QAAO,WAAW,GAAG,SAAS,CAE1C;IAEF,gBAAgB,aAEd;CACL;AAED,qBAAa,oBAAoB;IAC7B,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAA6B;IAE/D,MAAM,CAAC,WAAW,QAAO,mBAAmB,CAE1C;IAEF,MAAM,CAAC,KAAK,aAEV;CACL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/sdk/AccountInfoSingleton/types.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,WAAW,GAAG;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Encodable } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Encodes arbitrary input into a flat dictionary of attributes.
|
|
4
|
+
* - Objects are flattened using dot syntax. Max depth handling is done on the native layer by the
|
|
5
|
+
* Android and iOS SDKs.
|
|
6
|
+
* - We assume the input does not always conform to Record<string, Encodable> and we:
|
|
7
|
+
* - Fallback to { context: givenValue } if a primitive is passed
|
|
8
|
+
* - Apply built-in and consumer encoders to all values
|
|
9
|
+
* - Drop values of unsupported types
|
|
10
|
+
* - Internal SDK attributes (starting with '_dd.') are preserved as-is without flattening
|
|
11
|
+
*/
|
|
12
|
+
export declare function encodeAttributes(input: unknown): Record<string, Encodable>;
|
|
13
|
+
//# sourceMappingURL=attributesEncoding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attributesEncoding.d.ts","sourceRoot":"","sources":["../../../../src/sdk/AttributesEncoding/attributesEncoding.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CA+B1E"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { AttributeEncoder } from './types';
|
|
2
|
+
/** Primitives: keep them explicit so the full pipeline is used uniformly. */
|
|
3
|
+
export declare const stringEncoder: AttributeEncoder<string>;
|
|
4
|
+
export declare const numberEncoder: AttributeEncoder<number>;
|
|
5
|
+
export declare const booleanEncoder: AttributeEncoder<boolean>;
|
|
6
|
+
export declare const nullishEncoder: AttributeEncoder<null | undefined>;
|
|
7
|
+
/**
|
|
8
|
+
* Array encoder:
|
|
9
|
+
* - Sanitizes each item through the encoder pipeline.
|
|
10
|
+
* - Returns the sanitized array (it may later be flattened by the visitor if it still contains objects).
|
|
11
|
+
*/
|
|
12
|
+
export declare const arrayEncoder: AttributeEncoder<unknown[]>;
|
|
13
|
+
/**
|
|
14
|
+
* Default Datadog Date Encoder.
|
|
15
|
+
* This does not make assumptions on format; uses String(date).
|
|
16
|
+
*/
|
|
17
|
+
export declare const dateEncoder: AttributeEncoder<Date>;
|
|
18
|
+
/**
|
|
19
|
+
* Extended Error Encoder.
|
|
20
|
+
* Serializes name, message, stack, and cause (ES2022+) for Error objects.
|
|
21
|
+
* If the error has other enumerable properties, they are included and sanitized.
|
|
22
|
+
*/
|
|
23
|
+
export declare const errorEncoder: AttributeEncoder<any>;
|
|
24
|
+
/**
|
|
25
|
+
* Map encoder:
|
|
26
|
+
* - Converts Map into an array of entries.
|
|
27
|
+
* - Each entry is { key: string, keyType: string, value: Encodable }.
|
|
28
|
+
* - Keys are stringified with type info to reduce collision risk.
|
|
29
|
+
* - Entries with un-stringifiable keys are dropped (with a warning).
|
|
30
|
+
*/
|
|
31
|
+
export declare const mapEncoder: AttributeEncoder<Map<unknown, unknown>>;
|
|
32
|
+
export declare const builtInEncoders: (AttributeEncoder<string> | AttributeEncoder<number> | AttributeEncoder<boolean> | AttributeEncoder<null | undefined> | AttributeEncoder<unknown[]> | AttributeEncoder<Date> | AttributeEncoder<Map<unknown, unknown>>)[];
|
|
33
|
+
//# sourceMappingURL=defaultEncoders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultEncoders.d.ts","sourceRoot":"","sources":["../../../../src/sdk/AttributesEncoding/defaultEncoders.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,gBAAgB,EAAa,MAAM,SAAS,CAAC;AAG3D,6EAA6E;AAC7E,eAAO,MAAM,aAAa,EAAE,gBAAgB,CAAC,MAAM,CAGlD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,gBAAgB,CAAC,MAAM,CAGlD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,gBAAgB,CAAC,OAAO,CAGpD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,gBAAgB,CAAC,IAAI,GAAG,SAAS,CAG7D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,gBAAgB,CAAC,OAAO,EAAE,CAMpD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,gBAAgB,CAAC,IAAI,CAG9C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,gBAAgB,CAAC,GAAG,CA+B9C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,EAAE,gBAAgB,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAuD9D,CAAC;AAEF,eAAO,MAAM,eAAe,2NAS3B,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const getErrorMessage: (error: any | undefined) => string;
|
|
1
|
+
export declare const ERROR_EMPTY_STACKTRACE = "";
|
|
2
|
+
export declare const ERROR_EMPTY_MESSAGE = "Unknown Error";
|
|
3
|
+
export declare const ERROR_DEFAULT_NAME = "Error";
|
|
5
4
|
/**
|
|
6
5
|
* Will extract the stack from the error, taking the first key found among:
|
|
7
6
|
* `stacktrace`, `stack`, `componentStack` (component tree for component errors,
|
|
@@ -11,5 +10,6 @@ export declare const getErrorMessage: (error: any | undefined) => string;
|
|
|
11
10
|
* generate a stack from this information.
|
|
12
11
|
*/
|
|
13
12
|
export declare const getErrorStackTrace: (error: any | undefined) => string;
|
|
13
|
+
export declare const getErrorMessage: (error: any | undefined) => string;
|
|
14
14
|
export declare const getErrorName: (error: unknown) => string;
|
|
15
15
|
//# sourceMappingURL=errorUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errorUtils.d.ts","sourceRoot":"","sources":["../../../../src/sdk/AttributesEncoding/errorUtils.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AACnD,eAAO,MAAM,kBAAkB,UAAU,CAAC;AAE1C;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,UAAW,GAAG,GAAG,SAAS,KAAG,MA2B3D,CAAC;AAEF,eAAO,MAAM,eAAe,UAAW,GAAG,GAAG,SAAS,KAAG,MAwCxD,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,OAAO,KAAG,MAY7C,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AttributeEncoder, Encodable } from './types';
|
|
2
|
+
export interface EncodeContext {
|
|
3
|
+
numOfAttributes: number;
|
|
4
|
+
limitReachedWarned?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Recursive in-place encoder: flattens values into `out` dictionary.
|
|
8
|
+
* Never applies "context", that's only for the root.
|
|
9
|
+
*/
|
|
10
|
+
export declare function encodeAttributesInPlace(input: unknown, out: Record<string, Encodable>, path: string[], encoders: AttributeEncoder<any>[], context?: EncodeContext): void;
|
|
11
|
+
/**
|
|
12
|
+
* Sanitize unknown input to be JSON-serializable using encoders.
|
|
13
|
+
* This does not flatten—it's a pure sanitization pass (used by some encoders).
|
|
14
|
+
*/
|
|
15
|
+
export declare function sanitizeForJson(value: unknown, encoders: AttributeEncoder<any>[], context?: EncodeContext): Encodable;
|
|
16
|
+
export declare function applyEncoders(value: unknown, encoders: AttributeEncoder<any>[]): Encodable;
|
|
17
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/sdk/AttributesEncoding/helpers.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAK3D,MAAM,WAAW,aAAa;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACnC,KAAK,EAAE,OAAO,EACd,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,EAC9B,IAAI,EAAE,MAAM,EAAE,EACd,QAAQ,EAAE,gBAAgB,CAAC,GAAG,CAAC,EAAE,EACjC,OAAO,GAAE,aAAsC,GAChD,IAAI,CA0EN;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC3B,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,gBAAgB,CAAC,GAAG,CAAC,EAAE,EACjC,OAAO,GAAE,aAAsC,GAChD,SAAS,CAkBX;AAED,wBAAgB,aAAa,CACzB,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,gBAAgB,CAAC,GAAG,CAAC,EAAE,GAClC,SAAS,CAaX"}
|