@datadog/mobile-react-native 2.14.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DatadogSDKReactNative.podspec +6 -6
- package/README.md +23 -13
- package/android/build.gradle +10 -11
- package/android/gradle.properties +1 -1
- package/android/src/main/kotlin/com/datadog/reactnative/DatadogSDKWrapper.kt +36 -93
- package/android/src/main/kotlin/com/datadog/reactnative/DatadogWrapper.kt +46 -59
- package/android/src/main/kotlin/com/datadog/reactnative/DdLogsImplementation.kt +2 -1
- package/android/src/main/kotlin/com/datadog/reactnative/DdRumImplementation.kt +98 -0
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkConfiguration.kt +125 -75
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkConfigurationExt.kt +199 -90
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkImplementation.kt +151 -24
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkNativeInitialization.kt +57 -33
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkReactNativePackage.kt +2 -1
- package/android/src/main/kotlin/com/datadog/reactnative/DdTelemetry.kt +96 -0
- package/android/src/main/kotlin/com/datadog/reactnative/DdTraceImplementation.kt +20 -19
- package/android/src/main/kotlin/com/datadog/reactnative/SdkVersion.kt +1 -1
- package/android/src/newarch/kotlin/com/datadog/reactnative/DdRum.kt +100 -1
- package/android/src/newarch/kotlin/com/datadog/reactnative/DdSdk.kt +68 -14
- package/android/src/oldarch/kotlin/com/datadog/reactnative/DdRum.kt +94 -0
- package/android/src/oldarch/kotlin/com/datadog/reactnative/DdSdk.kt +70 -11
- package/android/src/test/kotlin/com/datadog/reactnative/DdRumTest.kt +58 -0
- package/android/src/test/kotlin/com/datadog/reactnative/DdSdkNativeInitializationTest.kt +63 -43
- package/android/src/test/kotlin/com/datadog/reactnative/DdSdkTest.kt +2024 -1199
- package/android/src/test/kotlin/com/datadog/reactnative/DdTraceTest.kt +44 -40
- package/android/src/test/kotlin/com/datadog/tools/unit/DdSdkConfigurationExt.kt +60 -91
- package/android/src/test/kotlin/com/datadog/tools/unit/MockRumMonitor.kt +34 -14
- package/android/src/test/kotlin/com/datadog/tools/unit/forge/DdSdkConfigurationForgeryFactory.kt +47 -43
- package/android/src/test/kotlin/com/datadog/tools/unit/forge/TelemetryConfigurationEventForgeryFactory.kt +0 -1
- package/android/src/test/resources/input/complete-configuration.json +32 -28
- package/android/src/test/resources/input/malformed-configuration.json +1 -1
- package/android/src/test/resources/input/minimal-configuration.json +4 -2
- package/datadog-configuration.schema.json +187 -139
- package/datadog-sourcemaps.gradle +2 -1
- package/ios/Sources/AnyEncodable.swift +14 -7
- package/ios/Sources/Attributes.swift +0 -7
- package/ios/Sources/DatadogSDKWrapper.swift +12 -128
- package/ios/Sources/DdLogsImplementation.swift +9 -39
- package/ios/Sources/DdRum.mm +89 -1
- package/ios/Sources/DdRumImplementation.swift +79 -0
- package/ios/Sources/DdSdk.mm +76 -11
- package/ios/Sources/DdSdkConfiguration.swift +159 -117
- package/ios/Sources/DdSdkImplementation.swift +235 -82
- package/ios/Sources/DdSdkNativeInitialization.swift +116 -80
- package/ios/Sources/DdTelemetry.swift +49 -0
- package/ios/Sources/GlobalState.swift +1 -1
- package/ios/Sources/RNDdSdkConfiguration.swift +334 -172
- package/ios/Sources/SdkVersion.swift +1 -1
- package/jest/mock.js +43 -4
- package/lib/commonjs/DdAttributes.js.map +1 -0
- package/lib/commonjs/DdSdkReactNative.js +159 -56
- package/lib/commonjs/DdSdkReactNative.js.map +1 -1
- package/lib/commonjs/InternalLog.js +1 -1
- package/lib/commonjs/config/DatadogProviderConfiguration.js +25 -0
- package/lib/commonjs/config/DatadogProviderConfiguration.js.map +1 -0
- package/lib/commonjs/config/FileBasedConfiguration.js +349 -0
- package/lib/commonjs/config/FileBasedConfiguration.js.map +1 -0
- package/lib/commonjs/config/FileBasedConfiguration.type.js +6 -0
- package/lib/commonjs/config/FileBasedConfiguration.type.js.map +1 -0
- package/lib/commonjs/config/async/AutoInstrumentationConfiguration.js +51 -0
- package/lib/commonjs/config/async/AutoInstrumentationConfiguration.js.map +1 -0
- package/lib/commonjs/config/async/PartialInitializationConfiguration.js +6 -0
- package/lib/commonjs/config/async/PartialInitializationConfiguration.js.map +1 -0
- package/lib/commonjs/config/async/asyncInitializationHelper.js +44 -0
- package/lib/commonjs/config/async/asyncInitializationHelper.js.map +1 -0
- package/lib/commonjs/config/features/CoreConfiguration.js +104 -0
- package/lib/commonjs/config/features/CoreConfiguration.js.map +1 -0
- package/lib/commonjs/config/features/CoreConfiguration.type.js +6 -0
- package/lib/commonjs/config/features/CoreConfiguration.type.js.map +1 -0
- package/lib/commonjs/config/features/CoreConfigurationNative.js +38 -0
- package/lib/commonjs/config/features/CoreConfigurationNative.js.map +1 -0
- package/lib/commonjs/config/features/LogsConfiguration.js +36 -0
- package/lib/commonjs/config/features/LogsConfiguration.js.map +1 -0
- package/lib/commonjs/config/features/LogsConfiguration.type.js +6 -0
- package/lib/commonjs/config/features/LogsConfiguration.type.js.map +1 -0
- package/lib/commonjs/config/features/LogsConfigurationNative.js +2 -0
- package/lib/commonjs/config/features/LogsConfigurationNative.js.map +1 -0
- package/lib/commonjs/config/features/RumConfiguration.js +120 -0
- package/lib/commonjs/config/features/RumConfiguration.js.map +1 -0
- package/lib/commonjs/config/features/RumConfiguration.type.js +6 -0
- package/lib/commonjs/config/features/RumConfiguration.type.js.map +1 -0
- package/lib/commonjs/config/features/RumConfigurationNative.js +2 -0
- package/lib/commonjs/config/features/RumConfigurationNative.js.map +1 -0
- package/lib/commonjs/config/features/TraceConfiguration.js +24 -0
- package/lib/commonjs/config/features/TraceConfiguration.js.map +1 -0
- package/lib/commonjs/config/features/TraceConfiguration.type.js +2 -0
- package/lib/commonjs/config/features/TraceConfiguration.type.js.map +1 -0
- package/lib/commonjs/config/features/TraceConfigurationNative.js +2 -0
- package/lib/commonjs/config/features/TraceConfigurationNative.js.map +1 -0
- package/lib/commonjs/config/types/BatchProcessingLevel.js +30 -0
- package/lib/commonjs/config/types/BatchProcessingLevel.js.map +1 -0
- package/lib/commonjs/config/types/BatchSize.js +31 -0
- package/lib/commonjs/config/types/BatchSize.js.map +1 -0
- package/lib/commonjs/config/types/InitializationMode.js +17 -0
- package/lib/commonjs/config/types/InitializationMode.js.map +1 -0
- package/lib/commonjs/config/types/InitializationModeForTelemetry.js +2 -0
- package/lib/commonjs/config/types/InitializationModeForTelemetry.js.map +1 -0
- package/lib/commonjs/{ProxyConfiguration.js → config/types/ProxyConfiguration.js} +6 -0
- package/lib/commonjs/config/types/ProxyConfiguration.js.map +1 -0
- package/lib/commonjs/config/types/SdkVerbosity.js.map +1 -0
- package/lib/commonjs/config/types/TrackingConsent.js.map +1 -0
- package/lib/commonjs/config/types/UploadFrequency.js +30 -0
- package/lib/commonjs/config/types/UploadFrequency.js.map +1 -0
- package/lib/commonjs/config/types/VitalsUpdateFrequency.js +19 -0
- package/lib/commonjs/config/types/VitalsUpdateFrequency.js.map +1 -0
- package/lib/commonjs/config/types/index.js +68 -0
- package/lib/commonjs/config/types/index.js.map +1 -0
- package/lib/commonjs/index.js +51 -21
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/logs/DdLogs.js +13 -9
- package/lib/commonjs/logs/DdLogs.js.map +1 -1
- package/lib/commonjs/logs/eventMapper.js +4 -1
- package/lib/commonjs/logs/eventMapper.js.map +1 -1
- package/lib/commonjs/metro/plugin/metroSerializer.js.map +1 -1
- package/lib/commonjs/nativeModulesTypes.js +0 -45
- package/lib/commonjs/nativeModulesTypes.js.map +1 -1
- package/lib/commonjs/rum/DdRum.js +56 -28
- package/lib/commonjs/rum/DdRum.js.map +1 -1
- package/lib/commonjs/rum/helper.js +63 -0
- package/lib/commonjs/rum/helper.js.map +1 -0
- package/lib/commonjs/rum/instrumentation/DdRumErrorTracking.js +14 -18
- package/lib/commonjs/rum/instrumentation/DdRumErrorTracking.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js +16 -27
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdEventsInterceptor.js +1 -1
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js +15 -5
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/DdRumResourceTracking.js +34 -22
- package/lib/commonjs/rum/instrumentation/resourceTracking/DdRumResourceTracking.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.js +21 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js +16 -3
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js +10 -12
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.js +6 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.js.map +1 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js +41 -47
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.js +62 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.js.map +1 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/headers.js +36 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/headers.js.map +1 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js +19 -8
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js +90 -48
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js +1 -1
- package/lib/commonjs/rum/types.js +1 -9
- package/lib/commonjs/rum/types.js.map +1 -1
- package/lib/commonjs/sdk/AccountInfoSingleton/AccountInfoSingleton.js +46 -0
- package/lib/commonjs/sdk/AccountInfoSingleton/AccountInfoSingleton.js.map +1 -0
- package/lib/commonjs/sdk/AccountInfoSingleton/types.js +2 -0
- package/lib/commonjs/sdk/AccountInfoSingleton/types.js.map +1 -0
- package/lib/commonjs/sdk/AttributesEncoding/attributesEncoding.js +51 -0
- package/lib/commonjs/sdk/AttributesEncoding/attributesEncoding.js.map +1 -0
- package/lib/commonjs/sdk/AttributesEncoding/defaultEncoders.js +140 -0
- package/lib/commonjs/sdk/AttributesEncoding/defaultEncoders.js.map +1 -0
- package/lib/commonjs/{utils → sdk/AttributesEncoding}/errorUtils.js +39 -22
- package/lib/commonjs/sdk/AttributesEncoding/errorUtils.js.map +1 -0
- package/lib/commonjs/sdk/AttributesEncoding/helpers.js +123 -0
- package/lib/commonjs/sdk/AttributesEncoding/helpers.js.map +1 -0
- package/lib/commonjs/sdk/AttributesEncoding/types.js +2 -0
- package/lib/commonjs/sdk/AttributesEncoding/types.js.map +1 -0
- package/lib/commonjs/sdk/AttributesEncoding/utils.js +36 -0
- package/lib/commonjs/sdk/AttributesEncoding/utils.js.map +1 -0
- package/lib/commonjs/sdk/AttributesSingleton/AttributesSingleton.js +27 -1
- package/lib/commonjs/sdk/AttributesSingleton/AttributesSingleton.js.map +1 -1
- package/lib/commonjs/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.js +3 -3
- package/lib/commonjs/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.js.map +1 -1
- package/lib/commonjs/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.js +1 -1
- package/lib/commonjs/sdk/DatadogProvider/Buffer/BoundedBuffer.js +4 -4
- package/lib/commonjs/sdk/DatadogProvider/Buffer/BoundedBuffer.js.map +1 -1
- package/lib/commonjs/sdk/DatadogProvider/DatadogProvider.js +10 -9
- package/lib/commonjs/sdk/DatadogProvider/DatadogProvider.js.map +1 -1
- package/lib/commonjs/sdk/DatadogProvider/DatadogProviderState.js +28 -0
- package/lib/commonjs/sdk/DatadogProvider/DatadogProviderState.js.map +1 -0
- package/lib/commonjs/sdk/DdSdk.js +4 -2
- package/lib/commonjs/sdk/DdSdk.js.map +1 -1
- package/lib/commonjs/sdk/DdSdkInternal.js +86 -0
- package/lib/commonjs/sdk/DdSdkInternal.js.map +1 -0
- package/lib/commonjs/sdk/EventMappers/EventMapper.js +6 -3
- package/lib/commonjs/sdk/EventMappers/EventMapper.js.map +1 -1
- package/lib/commonjs/sdk/GlobalState/GlobalState.js +5 -11
- package/lib/commonjs/sdk/GlobalState/GlobalState.js.map +1 -1
- package/lib/commonjs/sdk/UserInfoSingleton/UserInfoSingleton.js +6 -1
- package/lib/commonjs/sdk/UserInfoSingleton/UserInfoSingleton.js.map +1 -1
- package/lib/commonjs/specs/NativeDdRum.js.map +1 -1
- package/lib/commonjs/specs/NativeDdSdk.js.map +1 -1
- package/lib/commonjs/trace/DdTrace.js +7 -5
- package/lib/commonjs/trace/DdTrace.js.map +1 -1
- package/lib/commonjs/types.js +19 -46
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/utils/longTasksUtils.js.map +1 -1
- package/lib/commonjs/utils/singletonUtils.js +21 -0
- package/lib/commonjs/utils/singletonUtils.js.map +1 -0
- package/lib/commonjs/version.js +1 -1
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/DdAttributes.js.map +1 -0
- package/lib/module/DdSdkReactNative.js +155 -52
- package/lib/module/DdSdkReactNative.js.map +1 -1
- package/lib/module/InternalLog.js +1 -1
- package/lib/module/InternalLog.js.map +1 -1
- package/lib/module/config/DatadogProviderConfiguration.js +18 -0
- package/lib/module/config/DatadogProviderConfiguration.js.map +1 -0
- package/lib/module/config/FileBasedConfiguration.js +341 -0
- package/lib/module/config/FileBasedConfiguration.js.map +1 -0
- package/lib/module/config/FileBasedConfiguration.type.js +2 -0
- package/lib/module/config/FileBasedConfiguration.type.js.map +1 -0
- package/lib/module/config/async/AutoInstrumentationConfiguration.js +45 -0
- package/lib/module/config/async/AutoInstrumentationConfiguration.js.map +1 -0
- package/lib/module/config/async/PartialInitializationConfiguration.js +2 -0
- package/lib/module/config/async/PartialInitializationConfiguration.js.map +1 -0
- package/lib/module/config/async/asyncInitializationHelper.js +36 -0
- package/lib/module/config/async/asyncInitializationHelper.js.map +1 -0
- package/lib/module/config/features/CoreConfiguration.js +98 -0
- package/lib/module/config/features/CoreConfiguration.js.map +1 -0
- package/lib/module/config/features/CoreConfiguration.type.js +2 -0
- package/lib/module/config/features/CoreConfiguration.type.js.map +1 -0
- package/lib/module/config/features/CoreConfigurationNative.js +31 -0
- package/lib/module/config/features/CoreConfigurationNative.js.map +1 -0
- package/lib/module/config/features/LogsConfiguration.js +30 -0
- package/lib/module/config/features/LogsConfiguration.js.map +1 -0
- package/lib/module/config/features/LogsConfiguration.type.js +2 -0
- package/lib/module/config/features/LogsConfiguration.type.js.map +1 -0
- package/lib/module/config/features/LogsConfigurationNative.js +2 -0
- package/lib/module/config/features/LogsConfigurationNative.js.map +1 -0
- package/lib/module/config/features/RumConfiguration.js +114 -0
- package/lib/module/config/features/RumConfiguration.js.map +1 -0
- package/lib/module/config/features/RumConfiguration.type.js +2 -0
- package/lib/module/config/features/RumConfiguration.type.js.map +1 -0
- package/lib/module/config/features/RumConfigurationNative.js +2 -0
- package/lib/module/config/features/RumConfigurationNative.js.map +1 -0
- package/lib/module/config/features/TraceConfiguration.js +18 -0
- package/lib/module/config/features/TraceConfiguration.js.map +1 -0
- package/lib/module/config/features/TraceConfiguration.type.js +2 -0
- package/lib/module/config/features/TraceConfiguration.type.js.map +1 -0
- package/lib/module/config/features/TraceConfigurationNative.js +2 -0
- package/lib/module/config/features/TraceConfigurationNative.js.map +1 -0
- package/lib/module/config/types/BatchProcessingLevel.js +25 -0
- package/lib/module/config/types/BatchProcessingLevel.js.map +1 -0
- package/lib/module/config/types/BatchSize.js +26 -0
- package/lib/module/config/types/BatchSize.js.map +1 -0
- package/lib/module/config/types/InitializationMode.js +11 -0
- package/lib/module/config/types/InitializationMode.js.map +1 -0
- package/lib/module/config/types/InitializationModeForTelemetry.js +2 -0
- package/lib/module/config/types/InitializationModeForTelemetry.js.map +1 -0
- package/lib/module/{ProxyConfiguration.js → config/types/ProxyConfiguration.js} +6 -0
- package/lib/module/config/types/ProxyConfiguration.js.map +1 -0
- package/lib/module/config/types/SdkVerbosity.js.map +1 -0
- package/lib/module/config/types/TrackingConsent.js.map +1 -0
- package/lib/module/config/types/UploadFrequency.js +25 -0
- package/lib/module/config/types/UploadFrequency.js.map +1 -0
- package/lib/module/config/types/VitalsUpdateFrequency.js +13 -0
- package/lib/module/config/types/VitalsUpdateFrequency.js.map +1 -0
- package/lib/module/config/types/index.js +15 -0
- package/lib/module/config/types/index.js.map +1 -0
- package/lib/module/index.js +13 -7
- package/lib/module/index.js.map +1 -1
- package/lib/module/logs/DdLogs.js +13 -9
- package/lib/module/logs/DdLogs.js.map +1 -1
- package/lib/module/logs/eventMapper.js +4 -1
- package/lib/module/logs/eventMapper.js.map +1 -1
- package/lib/module/metro/plugin/metroSerializer.js.map +1 -1
- package/lib/module/nativeModulesTypes.js +1 -43
- package/lib/module/nativeModulesTypes.js.map +1 -1
- package/lib/module/rum/DdRum.js +54 -26
- package/lib/module/rum/DdRum.js.map +1 -1
- package/lib/module/rum/helper.js +49 -0
- package/lib/module/rum/helper.js.map +1 -0
- package/lib/module/rum/instrumentation/DdRumErrorTracking.js +14 -18
- package/lib/module/rum/instrumentation/DdRumErrorTracking.js.map +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js +16 -26
- package/lib/module/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js.map +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/DdEventsInterceptor.js +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/DdEventsInterceptor.js.map +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js +15 -5
- package/lib/module/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/DdRumResourceTracking.js +33 -21
- package/lib/module/rum/instrumentation/resourceTracking/DdRumResourceTracking.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.js +22 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js +13 -2
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js +10 -11
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.js +2 -0
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.js.map +1 -0
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js +27 -33
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.js +54 -0
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.js.map +1 -0
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/headers.js +30 -0
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/headers.js.map +1 -0
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js +14 -3
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js +90 -48
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js.map +1 -1
- package/lib/module/rum/types.js +0 -9
- package/lib/module/rum/types.js.map +1 -1
- package/lib/module/sdk/AccountInfoSingleton/AccountInfoSingleton.js +39 -0
- package/lib/module/sdk/AccountInfoSingleton/AccountInfoSingleton.js.map +1 -0
- package/lib/module/sdk/AccountInfoSingleton/types.js +2 -0
- package/lib/module/sdk/AccountInfoSingleton/types.js.map +1 -0
- package/lib/module/sdk/AttributesEncoding/attributesEncoding.js +46 -0
- package/lib/module/sdk/AttributesEncoding/attributesEncoding.js.map +1 -0
- package/lib/module/sdk/AttributesEncoding/defaultEncoders.js +134 -0
- package/lib/module/sdk/AttributesEncoding/defaultEncoders.js.map +1 -0
- package/lib/module/{utils → sdk/AttributesEncoding}/errorUtils.js +37 -20
- package/lib/module/sdk/AttributesEncoding/errorUtils.js.map +1 -0
- package/lib/module/sdk/AttributesEncoding/helpers.js +115 -0
- package/lib/module/sdk/AttributesEncoding/helpers.js.map +1 -0
- package/lib/module/sdk/AttributesEncoding/types.js +2 -0
- package/lib/module/sdk/AttributesEncoding/types.js.map +1 -0
- package/lib/module/sdk/AttributesEncoding/utils.js +28 -0
- package/lib/module/sdk/AttributesEncoding/utils.js.map +1 -0
- package/lib/module/sdk/AttributesSingleton/AttributesSingleton.js +27 -1
- package/lib/module/sdk/AttributesSingleton/AttributesSingleton.js.map +1 -1
- package/lib/module/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.js +2 -2
- package/lib/module/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.js.map +1 -1
- package/lib/module/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.js +1 -1
- package/lib/module/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.js.map +1 -1
- package/lib/module/sdk/DatadogProvider/Buffer/BoundedBuffer.js +4 -4
- package/lib/module/sdk/DatadogProvider/Buffer/BoundedBuffer.js.map +1 -1
- package/lib/module/sdk/DatadogProvider/DatadogProvider.js +9 -8
- package/lib/module/sdk/DatadogProvider/DatadogProvider.js.map +1 -1
- package/lib/module/sdk/DatadogProvider/DatadogProviderState.js +21 -0
- package/lib/module/sdk/DatadogProvider/DatadogProviderState.js.map +1 -0
- package/lib/module/sdk/DdSdk.js +4 -4
- package/lib/module/sdk/DdSdk.js.map +1 -1
- package/lib/module/sdk/DdSdkInternal.js +80 -0
- package/lib/module/sdk/DdSdkInternal.js.map +1 -0
- package/lib/module/sdk/EventMappers/EventMapper.js +6 -3
- package/lib/module/sdk/EventMappers/EventMapper.js.map +1 -1
- package/lib/module/sdk/GlobalState/GlobalState.js +5 -10
- package/lib/module/sdk/GlobalState/GlobalState.js.map +1 -1
- package/lib/module/sdk/UserInfoSingleton/UserInfoSingleton.js +6 -1
- package/lib/module/sdk/UserInfoSingleton/UserInfoSingleton.js.map +1 -1
- package/lib/module/specs/NativeDdRum.js.map +1 -1
- package/lib/module/specs/NativeDdSdk.js.map +1 -1
- package/lib/module/trace/DdTrace.js +7 -6
- package/lib/module/trace/DdTrace.js.map +1 -1
- package/lib/module/types.js +22 -42
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/longTasksUtils.js.map +1 -1
- package/lib/module/utils/singletonUtils.js +14 -0
- package/lib/module/utils/singletonUtils.js.map +1 -0
- package/lib/module/version.js +1 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/DdAttributes.d.ts.map +1 -0
- package/lib/typescript/DdSdkReactNative.d.ts +49 -12
- package/lib/typescript/DdSdkReactNative.d.ts.map +1 -1
- package/lib/typescript/InternalLog.d.ts +1 -1
- package/lib/typescript/InternalLog.d.ts.map +1 -1
- package/lib/typescript/config/DatadogProviderConfiguration.d.ts +12 -0
- package/lib/typescript/config/DatadogProviderConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/FileBasedConfiguration.d.ts +17 -0
- package/lib/typescript/config/FileBasedConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/FileBasedConfiguration.type.d.ts +52 -0
- package/lib/typescript/config/FileBasedConfiguration.type.d.ts.map +1 -0
- package/lib/typescript/config/async/AutoInstrumentationConfiguration.d.ts +60 -0
- package/lib/typescript/config/async/AutoInstrumentationConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/async/PartialInitializationConfiguration.d.ts +47 -0
- package/lib/typescript/config/async/PartialInitializationConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/async/asyncInitializationHelper.d.ts +5 -0
- package/lib/typescript/config/async/asyncInitializationHelper.d.ts.map +1 -0
- package/lib/typescript/config/features/CoreConfiguration.d.ts +52 -0
- package/lib/typescript/config/features/CoreConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/features/CoreConfiguration.type.d.ts +90 -0
- package/lib/typescript/config/features/CoreConfiguration.type.d.ts.map +1 -0
- package/lib/typescript/config/features/CoreConfigurationNative.d.ts +54 -0
- package/lib/typescript/config/features/CoreConfigurationNative.d.ts.map +1 -0
- package/lib/typescript/config/features/LogsConfiguration.d.ts +17 -0
- package/lib/typescript/config/features/LogsConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/features/LogsConfiguration.type.d.ts +24 -0
- package/lib/typescript/config/features/LogsConfiguration.type.d.ts.map +1 -0
- package/lib/typescript/config/features/LogsConfigurationNative.d.ts +6 -0
- package/lib/typescript/config/features/LogsConfigurationNative.d.ts.map +1 -0
- package/lib/typescript/config/features/RumConfiguration.d.ts +66 -0
- package/lib/typescript/config/features/RumConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/features/RumConfiguration.type.d.ts +131 -0
- package/lib/typescript/config/features/RumConfiguration.type.d.ts.map +1 -0
- package/lib/typescript/config/features/RumConfigurationNative.d.ts +25 -0
- package/lib/typescript/config/features/RumConfigurationNative.d.ts.map +1 -0
- package/lib/typescript/config/features/TraceConfiguration.d.ts +10 -0
- package/lib/typescript/config/features/TraceConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/features/TraceConfiguration.type.d.ts +11 -0
- package/lib/typescript/config/features/TraceConfiguration.type.d.ts.map +1 -0
- package/lib/typescript/config/features/TraceConfigurationNative.d.ts +4 -0
- package/lib/typescript/config/features/TraceConfigurationNative.d.ts.map +1 -0
- package/lib/typescript/config/types/BatchProcessingLevel.d.ts +18 -0
- package/lib/typescript/config/types/BatchProcessingLevel.d.ts.map +1 -0
- package/lib/typescript/config/types/BatchSize.d.ts +19 -0
- package/lib/typescript/config/types/BatchSize.d.ts.map +1 -0
- package/lib/typescript/config/types/InitializationMode.d.ts +5 -0
- package/lib/typescript/config/types/InitializationMode.d.ts.map +1 -0
- package/lib/typescript/config/types/InitializationModeForTelemetry.d.ts +2 -0
- package/lib/typescript/config/types/InitializationModeForTelemetry.d.ts.map +1 -0
- package/lib/typescript/config/types/ProxyConfiguration.d.ts.map +1 -0
- package/lib/typescript/config/types/SdkVerbosity.d.ts.map +1 -0
- package/lib/typescript/config/types/TrackingConsent.d.ts.map +1 -0
- package/lib/typescript/config/types/UploadFrequency.d.ts +18 -0
- package/lib/typescript/config/types/UploadFrequency.d.ts.map +1 -0
- package/lib/typescript/config/types/VitalsUpdateFrequency.d.ts +7 -0
- package/lib/typescript/config/types/VitalsUpdateFrequency.d.ts.map +1 -0
- package/lib/typescript/config/types/index.d.ts +10 -0
- package/lib/typescript/config/types/index.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +20 -9
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/logs/DdLogs.d.ts +2 -1
- package/lib/typescript/logs/DdLogs.d.ts.map +1 -1
- package/lib/typescript/logs/eventMapper.d.ts +3 -2
- package/lib/typescript/logs/eventMapper.d.ts.map +1 -1
- package/lib/typescript/logs/types.d.ts +1 -16
- package/lib/typescript/logs/types.d.ts.map +1 -1
- package/lib/typescript/nativeModulesTypes.d.ts +2 -15
- package/lib/typescript/nativeModulesTypes.d.ts.map +1 -1
- package/lib/typescript/rum/DdRum.d.ts +10 -1
- package/lib/typescript/rum/DdRum.d.ts.map +1 -1
- package/lib/typescript/rum/eventMappers/errorEventMapper.d.ts +1 -1
- package/lib/typescript/rum/eventMappers/errorEventMapper.d.ts.map +1 -1
- package/lib/typescript/rum/helper.d.ts +10 -0
- package/lib/typescript/rum/helper.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/DdRumErrorTracking.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.d.ts +6 -6
- package/lib/typescript/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.d.ts +7 -0
- package/lib/typescript/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/DdRumResourceTracking.d.ts +12 -6
- package/lib/typescript/rum/instrumentation/resourceTracking/DdRumResourceTracking.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.d.ts +8 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.d.ts +5 -17
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.d.ts +20 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.d.ts +3 -24
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.d.ts +12 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/headers.d.ts +24 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/headers.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.d.ts +2 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.d.ts +1 -1
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.d.ts.map +1 -1
- package/lib/typescript/rum/types.d.ts +47 -7
- package/lib/typescript/rum/types.d.ts.map +1 -1
- package/lib/typescript/sdk/AccountInfoSingleton/AccountInfoSingleton.d.ts +15 -0
- package/lib/typescript/sdk/AccountInfoSingleton/AccountInfoSingleton.d.ts.map +1 -0
- package/lib/typescript/sdk/AccountInfoSingleton/types.d.ts +6 -0
- package/lib/typescript/sdk/AccountInfoSingleton/types.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesEncoding/attributesEncoding.d.ts +13 -0
- package/lib/typescript/sdk/AttributesEncoding/attributesEncoding.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesEncoding/defaultEncoders.d.ts +33 -0
- package/lib/typescript/sdk/AttributesEncoding/defaultEncoders.d.ts.map +1 -0
- package/lib/typescript/{utils → sdk/AttributesEncoding}/errorUtils.d.ts +4 -4
- package/lib/typescript/sdk/AttributesEncoding/errorUtils.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesEncoding/helpers.d.ts +17 -0
- package/lib/typescript/sdk/AttributesEncoding/helpers.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesEncoding/types.d.ts +21 -0
- package/lib/typescript/sdk/AttributesEncoding/types.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesEncoding/utils.d.ts +7 -0
- package/lib/typescript/sdk/AttributesEncoding/utils.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesSingleton/AttributesSingleton.d.ts +5 -1
- package/lib/typescript/sdk/AttributesSingleton/AttributesSingleton.d.ts.map +1 -1
- package/lib/typescript/sdk/DatadogProvider/DatadogProvider.d.ts +4 -3
- package/lib/typescript/sdk/DatadogProvider/DatadogProvider.d.ts.map +1 -1
- package/lib/typescript/sdk/DatadogProvider/DatadogProviderState.d.ts +9 -0
- package/lib/typescript/sdk/DatadogProvider/DatadogProviderState.d.ts.map +1 -0
- package/lib/typescript/sdk/DdSdk.d.ts +2 -3
- package/lib/typescript/sdk/DdSdk.d.ts.map +1 -1
- package/lib/typescript/sdk/DdSdkInternal.d.ts +39 -0
- package/lib/typescript/sdk/DdSdkInternal.d.ts.map +1 -0
- package/lib/typescript/sdk/EventMappers/EventMapper.d.ts +3 -1
- package/lib/typescript/sdk/EventMappers/EventMapper.d.ts.map +1 -1
- package/lib/typescript/sdk/GlobalState/GlobalState.d.ts +3 -3
- package/lib/typescript/sdk/GlobalState/GlobalState.d.ts.map +1 -1
- package/lib/typescript/sdk/UserInfoSingleton/UserInfoSingleton.d.ts +2 -1
- package/lib/typescript/sdk/UserInfoSingleton/UserInfoSingleton.d.ts.map +1 -1
- package/lib/typescript/sdk/UserInfoSingleton/types.d.ts +1 -2
- package/lib/typescript/sdk/UserInfoSingleton/types.d.ts.map +1 -1
- package/lib/typescript/specs/NativeDdRum.d.ts +45 -0
- package/lib/typescript/specs/NativeDdRum.d.ts.map +1 -1
- package/lib/typescript/specs/NativeDdSdk.d.ts +34 -6
- package/lib/typescript/specs/NativeDdSdk.d.ts.map +1 -1
- package/lib/typescript/trace/DdTrace.d.ts +1 -2
- package/lib/typescript/trace/DdTrace.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +74 -92
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/utils/longTasksUtils.d.ts +1 -1
- package/lib/typescript/utils/longTasksUtils.d.ts.map +1 -1
- package/lib/typescript/utils/singletonUtils.d.ts +2 -0
- package/lib/typescript/utils/singletonUtils.d.ts.map +1 -0
- package/lib/typescript/version.d.ts +1 -1
- package/lib/typescript/version.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/DdSdkReactNative.tsx +246 -104
- package/src/InternalLog.tsx +1 -1
- package/src/__tests__/DdSdkReactNative.test.tsx +415 -207
- package/src/__tests__/DdSdkReactNativeConfiguration.test.ts +237 -153
- package/src/__tests__/InternalLog.test.tsx +1 -1
- package/src/__tests__/rum/instrumentation/DdEventsInterceptor.test.tsx +2 -2
- package/src/__tests__/rum/instrumentation/DdRumErrorTracking.test.tsx +139 -216
- package/src/__tests__/rum/instrumentation/DdRumUserInteractionTracking.test.tsx +10 -7
- package/src/config/DatadogProviderConfiguration.ts +17 -0
- package/src/config/FileBasedConfiguration.ts +464 -0
- package/src/config/FileBasedConfiguration.type.ts +66 -0
- package/src/config/__tests__/FileBasedConfiguration.test.ts +334 -0
- package/src/config/__tests__/__fixtures__/configuration-all-fields.json +57 -0
- package/src/config/__tests__/__fixtures__/malformed-configuration.json +4 -0
- package/src/config/async/AutoInstrumentationConfiguration.ts +126 -0
- package/src/config/async/PartialInitializationConfiguration.ts +58 -0
- package/src/config/async/asyncInitializationHelper.tsx +51 -0
- package/src/config/features/CoreConfiguration.ts +130 -0
- package/src/config/features/CoreConfiguration.type.ts +119 -0
- package/src/config/features/CoreConfigurationNative.ts +50 -0
- package/src/config/features/LogsConfiguration.ts +38 -0
- package/src/config/features/LogsConfiguration.type.ts +33 -0
- package/src/config/features/LogsConfigurationNative.ts +10 -0
- package/src/config/features/RumConfiguration.ts +137 -0
- package/src/config/features/RumConfiguration.type.ts +164 -0
- package/src/config/features/RumConfigurationNative.ts +26 -0
- package/src/config/features/TraceConfiguration.ts +24 -0
- package/src/config/features/TraceConfiguration.type.ts +17 -0
- package/src/config/features/TraceConfigurationNative.ts +8 -0
- package/src/config/types/BatchProcessingLevel.ts +23 -0
- package/src/config/types/BatchSize.ts +24 -0
- package/src/config/types/InitializationMode.ts +9 -0
- package/src/config/types/InitializationModeForTelemetry.ts +11 -0
- package/src/{ProxyConfiguration.tsx → config/types/ProxyConfiguration.ts} +6 -0
- package/src/config/types/UploadFrequency.tsx +23 -0
- package/src/config/types/VitalsUpdateFrequency.ts +11 -0
- package/src/config/types/index.ts +15 -0
- package/src/index.tsx +33 -16
- package/src/logs/DdLogs.ts +14 -13
- package/src/logs/__tests__/DdLogs.test.ts +60 -107
- package/src/logs/__tests__/eventMapper.test.ts +1 -1
- package/src/logs/eventMapper.ts +5 -4
- package/src/logs/types.ts +1 -20
- package/src/metro/plugin/metroSerializer.ts +3 -3
- package/src/nativeModulesTypes.ts +2 -17
- package/src/rum/DdRum.ts +139 -42
- package/src/rum/__tests__/DdRum.test.ts +217 -47
- package/src/rum/eventMappers/errorEventMapper.ts +1 -1
- package/src/rum/helper.ts +62 -0
- package/src/rum/instrumentation/DdRumErrorTracking.tsx +20 -38
- package/src/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.ts +21 -35
- package/src/rum/instrumentation/interactionTracking/DdEventsInterceptor.tsx +1 -1
- package/src/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.tsx +18 -5
- package/src/rum/instrumentation/resourceTracking/DdRumResourceTracking.tsx +44 -23
- package/src/rum/instrumentation/resourceTracking/__tests__/DdRumResourceTracking.test.ts +2 -2
- package/src/rum/instrumentation/resourceTracking/__tests__/__utils__/XMLHttpRequestMock.ts +44 -23
- package/src/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.ts +24 -1
- package/src/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.tsx +17 -2
- package/src/rum/instrumentation/resourceTracking/distributedTracing/__tests__/distributedTracing.test.ts +327 -1
- package/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.tsx +22 -31
- package/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.ts +29 -0
- package/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.ts +54 -35
- package/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.ts +80 -0
- package/src/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.ts +1 -1
- package/src/rum/instrumentation/resourceTracking/distributedTracing/headers.ts +29 -0
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.ts +1 -1
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.ts +19 -7
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/__tests__/XHRProxy.test.ts +177 -119
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/__tests__/baggageHeaderUtils.test.ts +85 -13
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.ts +110 -52
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.ts +1 -1
- package/src/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.ts +1 -1
- package/src/rum/types.ts +68 -8
- package/src/sdk/AccountInfoSingleton/AccountInfoSingleton.ts +49 -0
- package/src/sdk/AccountInfoSingleton/__tests__/AccountInfoSingleton.test.ts +90 -0
- package/src/sdk/AccountInfoSingleton/types.ts +11 -0
- package/src/sdk/AttributesEncoding/__tests__/attributesEncoding.test.ts +518 -0
- package/src/sdk/AttributesEncoding/__tests__/defaultEncoders.test.ts +198 -0
- package/src/sdk/AttributesEncoding/attributesEncoding.ts +56 -0
- package/src/sdk/AttributesEncoding/defaultEncoders.ts +175 -0
- package/src/{utils → sdk/AttributesEncoding}/errorUtils.ts +50 -22
- package/src/sdk/AttributesEncoding/helpers.ts +176 -0
- package/src/sdk/AttributesEncoding/types.ts +33 -0
- package/src/sdk/AttributesEncoding/utils.ts +31 -0
- package/src/sdk/AttributesSingleton/AttributesSingleton.ts +25 -1
- package/src/sdk/AttributesSingleton/__tests__/AttributesSingleton.test.ts +52 -8
- package/src/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.tsx +2 -2
- package/src/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.tsx +1 -1
- package/src/sdk/DatadogInternalBridge/__tests__/DdSdkNativeBridge.test.tsx +1 -1
- package/src/sdk/DatadogProvider/Buffer/BoundedBuffer.ts +4 -4
- package/src/sdk/DatadogProvider/Buffer/__tests__/BoundedBuffer.test.ts +5 -5
- package/src/sdk/DatadogProvider/DatadogProvider.tsx +12 -16
- package/src/sdk/DatadogProvider/DatadogProviderState.ts +30 -0
- package/src/sdk/DatadogProvider/__tests__/__utils__/renderWithProvider.tsx +18 -7
- package/src/sdk/DatadogProvider/__tests__/initialization.test.tsx +59 -33
- package/src/sdk/DatadogProvider/__tests__/initializationModes.test.tsx +26 -10
- package/src/sdk/DdSdk.ts +8 -5
- package/src/sdk/DdSdkInternal.ts +121 -0
- package/src/sdk/EventMappers/EventMapper.ts +9 -4
- package/src/sdk/EventMappers/__tests__/EventMapper.test.ts +3 -3
- package/src/sdk/GlobalState/GlobalState.tsx +10 -11
- package/src/sdk/UserInfoSingleton/UserInfoSingleton.ts +9 -2
- package/src/sdk/UserInfoSingleton/__tests__/UserInfoSingleton.test.ts +46 -9
- package/src/sdk/UserInfoSingleton/types.ts +1 -4
- package/src/specs/NativeDdRum.ts +65 -0
- package/src/specs/NativeDdSdk.ts +40 -6
- package/src/trace/DdTrace.ts +11 -7
- package/src/trace/__tests__/DdTrace.test.ts +7 -8
- package/src/types.tsx +97 -76
- package/src/utils/__tests__/errorUtils.test.ts +1 -1
- package/src/utils/__tests__/singletonUtils.test.ts +75 -0
- package/src/utils/longTasksUtils.ts +1 -3
- package/src/utils/singletonUtils.ts +17 -0
- package/src/version.ts +1 -1
- package/lib/commonjs/DdSdkReactNativeConfiguration.js +0 -412
- package/lib/commonjs/DdSdkReactNativeConfiguration.js.map +0 -1
- package/lib/commonjs/ProxyConfiguration.js.map +0 -1
- package/lib/commonjs/SdkVerbosity.js.map +0 -1
- package/lib/commonjs/TrackingConsent.js.map +0 -1
- package/lib/commonjs/rum/DdAttributes.js.map +0 -1
- package/lib/commonjs/sdk/FileBasedConfiguration/FileBasedConfiguration.js +0 -185
- package/lib/commonjs/sdk/FileBasedConfiguration/FileBasedConfiguration.js.map +0 -1
- package/lib/commonjs/utils/argsUtils.js +0 -41
- package/lib/commonjs/utils/argsUtils.js.map +0 -1
- package/lib/commonjs/utils/errorUtils.js.map +0 -1
- package/lib/module/DdSdkReactNativeConfiguration.js +0 -403
- package/lib/module/DdSdkReactNativeConfiguration.js.map +0 -1
- package/lib/module/ProxyConfiguration.js.map +0 -1
- package/lib/module/SdkVerbosity.js.map +0 -1
- package/lib/module/TrackingConsent.js.map +0 -1
- package/lib/module/rum/DdAttributes.js.map +0 -1
- package/lib/module/sdk/FileBasedConfiguration/FileBasedConfiguration.js +0 -176
- package/lib/module/sdk/FileBasedConfiguration/FileBasedConfiguration.js.map +0 -1
- package/lib/module/utils/argsUtils.js +0 -35
- package/lib/module/utils/argsUtils.js.map +0 -1
- package/lib/module/utils/errorUtils.js.map +0 -1
- package/lib/typescript/DdSdkReactNativeConfiguration.d.ts +0 -376
- package/lib/typescript/DdSdkReactNativeConfiguration.d.ts.map +0 -1
- package/lib/typescript/ProxyConfiguration.d.ts.map +0 -1
- package/lib/typescript/SdkVerbosity.d.ts.map +0 -1
- package/lib/typescript/TrackingConsent.d.ts.map +0 -1
- package/lib/typescript/rum/DdAttributes.d.ts.map +0 -1
- package/lib/typescript/sdk/FileBasedConfiguration/FileBasedConfiguration.d.ts +0 -34
- package/lib/typescript/sdk/FileBasedConfiguration/FileBasedConfiguration.d.ts.map +0 -1
- package/lib/typescript/utils/argsUtils.d.ts +0 -8
- package/lib/typescript/utils/argsUtils.d.ts.map +0 -1
- package/lib/typescript/utils/errorUtils.d.ts.map +0 -1
- package/src/DdSdkReactNativeConfiguration.tsx +0 -582
- package/src/sdk/FileBasedConfiguration/FileBasedConfiguration.ts +0 -241
- package/src/sdk/FileBasedConfiguration/__tests__/FileBasedConfiguration.test.ts +0 -255
- package/src/sdk/FileBasedConfiguration/__tests__/__fixtures__/configuration-all-fields.json +0 -27
- package/src/sdk/FileBasedConfiguration/__tests__/__fixtures__/malformed-configuration.json +0 -5
- package/src/utils/__tests__/argsUtils.test.ts +0 -66
- package/src/utils/argsUtils.ts +0 -41
- /package/lib/commonjs/{rum/DdAttributes.js → DdAttributes.js} +0 -0
- /package/lib/commonjs/{SdkVerbosity.js → config/types/SdkVerbosity.js} +0 -0
- /package/lib/commonjs/{TrackingConsent.js → config/types/TrackingConsent.js} +0 -0
- /package/lib/module/{rum/DdAttributes.js → DdAttributes.js} +0 -0
- /package/lib/module/{SdkVerbosity.js → config/types/SdkVerbosity.js} +0 -0
- /package/lib/module/{TrackingConsent.js → config/types/TrackingConsent.js} +0 -0
- /package/lib/typescript/{rum/DdAttributes.d.ts → DdAttributes.d.ts} +0 -0
- /package/lib/typescript/{ProxyConfiguration.d.ts → config/types/ProxyConfiguration.d.ts} +0 -0
- /package/lib/typescript/{SdkVerbosity.d.ts → config/types/SdkVerbosity.d.ts} +0 -0
- /package/lib/typescript/{TrackingConsent.d.ts → config/types/TrackingConsent.d.ts} +0 -0
- /package/src/{rum/DdAttributes.ts → DdAttributes.ts} +0 -0
- /package/src/{SdkVerbosity.tsx → config/types/SdkVerbosity.ts} +0 -0
- /package/src/{TrackingConsent.tsx → config/types/TrackingConsent.ts} +0 -0
|
@@ -10,72 +10,105 @@ import com.datadog.android.core.configuration.BatchProcessingLevel
|
|
|
10
10
|
import com.datadog.android.trace.TracingHeaderType
|
|
11
11
|
import java.net.Proxy
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
13
|
/**
|
|
16
|
-
* A configuration object to initialize Datadog's
|
|
14
|
+
* A configuration object used to initialize Datadog's core SDK and its feature modules.
|
|
15
|
+
*
|
|
16
|
+
* @param additionalConfiguration Additional configuration parameters forwarded to the native Datadog SDK.
|
|
17
17
|
* @param clientToken A valid Datadog client token.
|
|
18
18
|
* @param env The application’s environment, for example: prod, pre-prod, staging, etc.
|
|
19
|
-
* @param applicationId The RUM application ID.
|
|
20
|
-
* @param nativeCrashReportEnabled Whether the SDK should track native (pure iOS or pure Android) crashes (default is false).
|
|
21
|
-
* @param nativeLongTaskThresholdMs The threshold for native long tasks reporting in milliseconds.
|
|
22
|
-
* @param longTaskThresholdMs The threshold for javascript long tasks reporting in milliseconds.
|
|
23
|
-
* @param sampleRate The sample rate (between 0 and 100) of RUM sessions kept.
|
|
24
19
|
* @param site The Datadog site of your organization (can be 'US', 'EU' or 'GOV', default is 'US').
|
|
20
|
+
* @param service Custom service name.
|
|
21
|
+
* @param verbosity Verbosity level of the SDK’s internal logging.
|
|
25
22
|
* @param trackingConsent Consent, which can take one of the following values: 'pending', 'granted', 'not_granted'.
|
|
26
|
-
* @param telemetrySampleRate The sample rate (between 0 and 100) of telemetry events.
|
|
27
|
-
* @param vitalsUpdateFrequency The frequency to which vitals update are sent (can be 'NEVER', 'RARE', 'AVERAGE' (default), 'FREQUENT').
|
|
28
|
-
* @param trackFrustrations Whether to track frustration signals or not.
|
|
29
23
|
* @param uploadFrequency The frequency to which batches of data are sent (can be 'RARE', 'AVERAGE' (default), 'FREQUENT')
|
|
30
24
|
* @param batchSize The preferred size for uploaded batches of data (can be 'SMALL', 'MEDIUM' (default), 'LARGE')
|
|
31
|
-
* @param trackBackgroundEvents Enables/Disables tracking RUM event when no RUM View is active. Might increase number of sessions and billing.
|
|
32
|
-
* @param customEndpoints Custom endpoints for RUM/Logs/Trace features.
|
|
33
|
-
* @param additionalConfig Additional configuration parameters.
|
|
34
|
-
* @param configurationForTelemetry Additional configuration data for Datadog telemetry.
|
|
35
|
-
* @param nativeViewTracking Enables/Disables tracking RUM Views on the native level.
|
|
36
|
-
* @param nativeInteractionTracking Enables/Disables tracking RUM Actions on the native level.
|
|
37
|
-
* @param verbosity Verbosity level of the SDK.
|
|
38
|
-
* @param proxyConfig Configuration for proxying SDK data.
|
|
39
|
-
* @param serviceName Custom service name.
|
|
40
|
-
* @param firstPartyHosts List of backend hosts to enable tracing with.
|
|
41
|
-
* @param bundleLogsWithRum Enables RUM correlation with logs.
|
|
42
|
-
* @param bundleLogsWithTraces Enables Traces correlation with logs.
|
|
43
|
-
* @param trackNonFatalAnrs Enables tracking of non-fatal ANRs on Android.
|
|
44
25
|
* @param batchProcessingLevel The preferred number of batches of data that will be sent in a single upload (can be 'LOW', 'MEDIUM' (default), 'HIGH')
|
|
45
|
-
* @param
|
|
26
|
+
* @param proxyConfiguration Configuration for proxying SDK data.
|
|
27
|
+
* @param firstPartyHosts List of backend hosts to enable tracing with.
|
|
28
|
+
* @param rumConfiguration Configuration for the RUM feature module, including RUM application ID and RUM-specific options.
|
|
29
|
+
* @param logsConfiguration Configuration for the Logs feature module.
|
|
30
|
+
* @param traceConfiguration Configuration for the Traces (APM) feature module.
|
|
31
|
+
* @param configurationForTelemetry Additional configuration data for Datadog telemetry.
|
|
46
32
|
*/
|
|
47
33
|
data class DdSdkConfiguration(
|
|
34
|
+
val additionalConfiguration: Map<String, Any?>? = null,
|
|
48
35
|
val clientToken: String,
|
|
49
36
|
val env: String,
|
|
50
|
-
val applicationId: String,
|
|
51
|
-
val nativeCrashReportEnabled: Boolean? = null,
|
|
52
|
-
val nativeLongTaskThresholdMs: Double? = null,
|
|
53
|
-
val longTaskThresholdMs: Double? = null,
|
|
54
|
-
val sampleRate: Double? = null,
|
|
55
37
|
val site: String? = null,
|
|
38
|
+
val service: String? = null,
|
|
39
|
+
val verbosity: String? = null,
|
|
56
40
|
val trackingConsent: String? = null,
|
|
57
|
-
val telemetrySampleRate: Double? = null,
|
|
58
|
-
val vitalsUpdateFrequency: String? = null,
|
|
59
|
-
val trackFrustrations: Boolean? = null,
|
|
60
41
|
val uploadFrequency: String? = null,
|
|
61
42
|
val batchSize: String? = null,
|
|
43
|
+
val batchProcessingLevel: String? = null,
|
|
44
|
+
val proxyConfiguration: Pair<Proxy, ProxyAuthenticator?>? = null,
|
|
45
|
+
val firstPartyHosts: Map<String, Set<TracingHeaderType>>? = null,
|
|
46
|
+
val rumConfiguration: RumConfiguration? = null,
|
|
47
|
+
val logsConfiguration: LogsConfiguration? = null,
|
|
48
|
+
val traceConfiguration: TraceConfiguration? = null,
|
|
49
|
+
val configurationForTelemetry: ConfigurationForTelemetry? = null
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* A configuration object for the Datadog RUM feature.
|
|
54
|
+
*
|
|
55
|
+
* @param applicationId The RUM application ID.
|
|
56
|
+
* @param trackFrustrations Whether to track frustration signals or not.
|
|
57
|
+
* @param longTaskThresholdMs The threshold for javascript long tasks reporting in milliseconds.
|
|
58
|
+
* @param sessionSampleRate The sample rate (between 0 and 100) of RUM sessions kept.
|
|
59
|
+
* @param resourceTraceSampleRate Percentage (0–100) of tracing integrations for network calls between your app and your backend.
|
|
60
|
+
* @param vitalsUpdateFrequency The frequency to which vitals update are sent (can be 'NEVER', 'RARE', 'AVERAGE' (default), 'FREQUENT').
|
|
61
|
+
* @param trackBackgroundEvents Enables/Disables tracking RUM event when no RUM View is active. Might increase number of sessions and billing.
|
|
62
|
+
* @param nativeCrashReportEnabled Whether the SDK should track native Android crashes (default is false).
|
|
63
|
+
* @param nativeLongTaskThresholdMs The threshold for native long tasks reporting in milliseconds.
|
|
64
|
+
* @param nativeViewTracking Enables/Disables tracking RUM Views on the native level.
|
|
65
|
+
* @param nativeInteractionTracking Enables/Disables tracking RUM Actions on the native level.
|
|
66
|
+
* @param trackNonFatalAnrs Enables tracking of non-fatal ANRs on Android.
|
|
67
|
+
* @param initialResourceThreshold The amount of time after a view starts where a Resource should be considered when calculating Time to Network-Settled (TNS).
|
|
68
|
+
* @param telemetrySampleRate The sample rate (between 0 and 100) of telemetry events.
|
|
69
|
+
* @param customEndpoint Custom RUM intake endpoint used to override the default Datadog intake.
|
|
70
|
+
*/
|
|
71
|
+
data class RumConfiguration(
|
|
72
|
+
val applicationId: String,
|
|
73
|
+
val trackFrustrations: Boolean? = null,
|
|
74
|
+
val longTaskThresholdMs: Double? = null,
|
|
75
|
+
val sessionSampleRate: Double? = null,
|
|
76
|
+
val resourceTraceSampleRate: Double? = null,
|
|
77
|
+
val vitalsUpdateFrequency: String? = null,
|
|
62
78
|
val trackBackgroundEvents: Boolean? = null,
|
|
63
|
-
val
|
|
64
|
-
val
|
|
65
|
-
val configurationForTelemetry: ConfigurationForTelemetry? = null,
|
|
79
|
+
val nativeCrashReportEnabled: Boolean? = null,
|
|
80
|
+
val nativeLongTaskThresholdMs: Double? = null,
|
|
66
81
|
val nativeViewTracking: Boolean? = null,
|
|
67
82
|
val nativeInteractionTracking: Boolean? = null,
|
|
68
|
-
val verbosity: String? = null,
|
|
69
|
-
val proxyConfig: Pair<Proxy, ProxyAuthenticator?>? = null,
|
|
70
|
-
val serviceName: String? = null,
|
|
71
|
-
val firstPartyHosts: Map<String, Set<TracingHeaderType>>? = null,
|
|
72
|
-
val bundleLogsWithRum: Boolean? = null,
|
|
73
|
-
val bundleLogsWithTraces: Boolean? = null,
|
|
74
83
|
val trackNonFatalAnrs: Boolean? = null,
|
|
75
|
-
val
|
|
76
|
-
val
|
|
84
|
+
val initialResourceThreshold: Double? = null,
|
|
85
|
+
val telemetrySampleRate: Double? = null,
|
|
86
|
+
val customEndpoint: String? = null
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* A configuration object for Datadog Logs features.
|
|
91
|
+
*
|
|
92
|
+
* @param bundleLogsWithRum Enables RUM correlation with logs.
|
|
93
|
+
* @param bundleLogsWithTraces Enables Traces correlation with logs.
|
|
94
|
+
* @param customEndpoint Custom Logs intake endpoint used to override the default Datadog intake.
|
|
95
|
+
*/
|
|
96
|
+
data class LogsConfiguration(
|
|
97
|
+
val bundleLogsWithRum: Boolean,
|
|
98
|
+
val bundleLogsWithTraces: Boolean,
|
|
99
|
+
val customEndpoint: String? = null
|
|
77
100
|
)
|
|
78
101
|
|
|
102
|
+
/**
|
|
103
|
+
* A configuration object for Datadog Traces (APM) features.
|
|
104
|
+
*
|
|
105
|
+
* @param customEndpoint Custom Trace intake endpoint used to override the default Datadog intake.
|
|
106
|
+
*/
|
|
107
|
+
data class TraceConfiguration(
|
|
108
|
+
val customEndpoint: String? = null
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
|
|
79
112
|
internal data class JSONConfigurationFile(
|
|
80
113
|
val configuration: JSONDdSdkConfiguration
|
|
81
114
|
)
|
|
@@ -83,33 +116,62 @@ internal data class JSONConfigurationFile(
|
|
|
83
116
|
internal data class JSONDdSdkConfiguration(
|
|
84
117
|
val clientToken: String,
|
|
85
118
|
val env: String,
|
|
86
|
-
val applicationId: String,
|
|
87
|
-
val nativeCrashReportEnabled: Boolean? = null,
|
|
88
|
-
val nativeLongTaskThresholdMs: Double? = null,
|
|
89
|
-
val longTaskThresholdMs: Double? = null,
|
|
90
|
-
val sessionSamplingRate: Double? = null,
|
|
91
|
-
val site: String? = null,
|
|
92
119
|
val trackingConsent: String? = null,
|
|
93
|
-
val
|
|
94
|
-
val vitalsUpdateFrequency: String? = null,
|
|
95
|
-
val trackFrustrations: Boolean? = null,
|
|
96
|
-
val uploadFrequency: String? = null,
|
|
120
|
+
val additionalConfiguration: Map<String, Any?>? = null,
|
|
97
121
|
val batchSize: String? = null,
|
|
98
|
-
val
|
|
99
|
-
val
|
|
100
|
-
val
|
|
101
|
-
val
|
|
122
|
+
val batchProcessingLevel: String? = null,
|
|
123
|
+
val proxyConfiguration: JSONProxyConfiguration? = null,
|
|
124
|
+
val service: String? = null,
|
|
125
|
+
val uploadFrequency: String? = null,
|
|
102
126
|
val verbosity: String? = null,
|
|
103
|
-
val
|
|
104
|
-
val
|
|
127
|
+
val version: String? = null,
|
|
128
|
+
val versionSuffix: String? = null,
|
|
129
|
+
val site: String? = null,
|
|
105
130
|
val firstPartyHosts: List<JSONFirstPartyHost>? = null,
|
|
131
|
+
val rumConfiguration: JSONRumConfiguration? = null,
|
|
132
|
+
val logsConfiguration: JSONLogsConfiguration? = null,
|
|
133
|
+
val traceConfiguration: JSONTraceConfiguration? = null
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
internal data class JSONRumConfiguration(
|
|
137
|
+
val applicationId: String? = null,
|
|
138
|
+
val useAccessibilityLabel: Boolean? = null,
|
|
139
|
+
val trackInteractions: Boolean? = null,
|
|
140
|
+
val trackResources: Boolean? = null,
|
|
141
|
+
val trackErrors: Boolean? = null,
|
|
142
|
+
val actionNameAttribute: String? = null,
|
|
143
|
+
val appHangThreshold: Double? = null,
|
|
144
|
+
val initialResourceThreshold: Double? = null,
|
|
145
|
+
|
|
146
|
+
// schema: integer | boolean, we only support numeric in JSON file
|
|
147
|
+
val longTaskThresholdMs: Double? = null,
|
|
148
|
+
val nativeCrashReportEnabled: Boolean? = null,
|
|
149
|
+
val nativeLongTaskThresholdMs: Double? = null, // we treat only numeric in JSON
|
|
150
|
+
val nativeViewTracking: Boolean? = null,
|
|
151
|
+
val nativeInteractionTracking: Boolean? = null,
|
|
152
|
+
val sessionSampleRate: Double? = null,
|
|
153
|
+
val resourceTraceSampleRate: Double? = null,
|
|
154
|
+
val trackBackgroundEvents: Boolean? = null,
|
|
155
|
+
val trackFrustrations: Boolean? = null,
|
|
156
|
+
val trackNonFatalAnrs: Boolean? = null,
|
|
157
|
+
val trackWatchdogTerminations: Boolean? = null,
|
|
158
|
+
val vitalsUpdateFrequency: String? = null,
|
|
159
|
+
val trackMemoryWarnings: Boolean? = null,
|
|
160
|
+
val telemetrySampleRate: Double? = null,
|
|
161
|
+
val customEndpoint: String? = null
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
internal data class JSONLogsConfiguration(
|
|
106
165
|
val bundleLogsWithRum: Boolean? = null,
|
|
107
166
|
val bundleLogsWithTraces: Boolean? = null,
|
|
108
|
-
val
|
|
109
|
-
val batchProcessingLevel: String? = null,
|
|
110
|
-
val initialResourceThreshold: Double? = null
|
|
167
|
+
val customEndpoint: String? = null
|
|
111
168
|
)
|
|
112
169
|
|
|
170
|
+
internal data class JSONTraceConfiguration(
|
|
171
|
+
val customEndpoint: String? = null
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
|
|
113
175
|
internal data class JSONProxyConfiguration(
|
|
114
176
|
val type: String,
|
|
115
177
|
val address: String,
|
|
@@ -140,15 +202,3 @@ data class ConfigurationForTelemetry(
|
|
|
140
202
|
val reactVersion: String? = null,
|
|
141
203
|
val reactNativeVersion: String? = null
|
|
142
204
|
)
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Custom endpoints for features.
|
|
146
|
-
* @param rum Custom endpoint for RUM.
|
|
147
|
-
* @param logs Custom endpoint for Logs.
|
|
148
|
-
* @param trace Custom endpoint for Trace.
|
|
149
|
-
*/
|
|
150
|
-
data class CustomEndpoints(
|
|
151
|
-
val rum: String? = null,
|
|
152
|
-
val logs: String? = null,
|
|
153
|
-
val trace: String? = null
|
|
154
|
-
)
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright 2016-Present Datadog, Inc.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
@file:Suppress("TooManyFunctions")
|
|
7
|
+
@file:Suppress("TooManyFunctions", "StringLiteralDuplication")
|
|
8
8
|
|
|
9
9
|
package com.datadog.reactnative
|
|
10
10
|
|
|
@@ -12,47 +12,80 @@ import android.util.Log
|
|
|
12
12
|
import com.datadog.android.trace.TracingHeaderType
|
|
13
13
|
import com.facebook.react.bridge.ReadableArray
|
|
14
14
|
import com.facebook.react.bridge.ReadableMap
|
|
15
|
+
import com.facebook.react.bridge.WritableNativeArray
|
|
15
16
|
import com.facebook.react.bridge.WritableNativeMap
|
|
16
17
|
import java.net.InetSocketAddress
|
|
17
18
|
import java.net.Proxy
|
|
18
19
|
import java.util.Locale
|
|
19
20
|
|
|
20
21
|
internal fun ReadableMap.asDdSdkConfiguration(): DdSdkConfiguration {
|
|
22
|
+
val additionalConfiguration = getMap("additionalConfiguration")?.toHashMap()
|
|
23
|
+
|
|
24
|
+
val rumMap = getMap("rumConfiguration")
|
|
25
|
+
val logsMap = getMap("logsConfiguration")
|
|
26
|
+
val traceMap = getMap("traceConfiguration")
|
|
27
|
+
val telemetryMap = getMap("configurationForTelemetry")
|
|
28
|
+
|
|
29
|
+
val rumConfiguration: RumConfiguration? = rumMap?.let { rm ->
|
|
30
|
+
val applicationId = rm.getString("applicationId").orEmpty()
|
|
31
|
+
|
|
32
|
+
RumConfiguration(
|
|
33
|
+
applicationId = applicationId,
|
|
34
|
+
trackFrustrations = rm.getBooleanOrNull("trackFrustrations"),
|
|
35
|
+
longTaskThresholdMs = rm.getDoubleOrNull("longTaskThresholdMs") ?: 0.0,
|
|
36
|
+
sessionSampleRate = rm.getDoubleOrNull("sessionSampleRate"),
|
|
37
|
+
resourceTraceSampleRate = rm.getDoubleOrNull("resourceTraceSampleRate"),
|
|
38
|
+
vitalsUpdateFrequency = rm.getString("vitalsUpdateFrequency"),
|
|
39
|
+
trackBackgroundEvents = rm.getBooleanOrNull("trackBackgroundEvents"),
|
|
40
|
+
nativeCrashReportEnabled = rm.getBooleanOrNull("nativeCrashReportEnabled"),
|
|
41
|
+
nativeLongTaskThresholdMs = rm.getDoubleOrNull("nativeLongTaskThresholdMs"),
|
|
42
|
+
nativeViewTracking = rm.getBooleanOrNull("nativeViewTracking"),
|
|
43
|
+
nativeInteractionTracking = rm.getBooleanOrNull("nativeInteractionTracking"),
|
|
44
|
+
trackNonFatalAnrs = rm.getBooleanOrNull("trackNonFatalAnrs"),
|
|
45
|
+
initialResourceThreshold = rm.getDoubleOrNull("initialResourceThreshold"),
|
|
46
|
+
telemetrySampleRate = rm.getDoubleOrNull("telemetrySampleRate"),
|
|
47
|
+
customEndpoint = rm.getString("customEndpoint")
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
val logsConfiguration: LogsConfiguration? = logsMap?.let { lm ->
|
|
52
|
+
LogsConfiguration(
|
|
53
|
+
bundleLogsWithRum = lm.getBooleanOrNull("bundleLogsWithRum") ?: true,
|
|
54
|
+
bundleLogsWithTraces = lm.getBooleanOrNull("bundleLogsWithTraces") ?: true,
|
|
55
|
+
customEndpoint = lm.getString("customEndpoint")
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
val traceConfiguration: TraceConfiguration? = traceMap?.let { tm ->
|
|
60
|
+
TraceConfiguration(
|
|
61
|
+
customEndpoint = tm.getString("customEndpoint")
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
val configurationForTelemetry: ConfigurationForTelemetry? =
|
|
66
|
+
telemetryMap?.asConfigurationForTelemetry()
|
|
67
|
+
|
|
21
68
|
return DdSdkConfiguration(
|
|
69
|
+
additionalConfiguration = additionalConfiguration?.mapValues { it.value },
|
|
22
70
|
clientToken = getString("clientToken").orEmpty(),
|
|
23
71
|
env = getString("env").orEmpty(),
|
|
24
|
-
applicationId = getString("applicationId").orEmpty(),
|
|
25
|
-
nativeCrashReportEnabled = getBoolean("nativeCrashReportEnabled"),
|
|
26
|
-
nativeLongTaskThresholdMs = getDouble("nativeLongTaskThresholdMs"),
|
|
27
|
-
longTaskThresholdMs = getDouble("longTaskThresholdMs"),
|
|
28
|
-
sampleRate = getDouble("sampleRate"),
|
|
29
72
|
site = getString("site"),
|
|
73
|
+
service = getString("service"),
|
|
74
|
+
verbosity = getString("verbosity"),
|
|
30
75
|
trackingConsent = getString("trackingConsent"),
|
|
31
|
-
telemetrySampleRate = getDouble("telemetrySampleRate"),
|
|
32
|
-
vitalsUpdateFrequency = getString("vitalsUpdateFrequency"),
|
|
33
|
-
trackFrustrations = getBoolean("trackFrustrations"),
|
|
34
76
|
uploadFrequency = getString("uploadFrequency"),
|
|
35
77
|
batchSize = getString("batchSize"),
|
|
36
|
-
trackBackgroundEvents = getBoolean("trackBackgroundEvents"),
|
|
37
|
-
customEndpoints = getMap("customEndpoints")?.asCustomEndpoints(),
|
|
38
|
-
additionalConfig = getMap("additionalConfiguration")?.toHashMap(),
|
|
39
|
-
configurationForTelemetry = getMap(
|
|
40
|
-
"configurationForTelemetry"
|
|
41
|
-
)?.asConfigurationForTelemetry(),
|
|
42
|
-
nativeViewTracking = getBoolean("nativeViewTracking"),
|
|
43
|
-
nativeInteractionTracking = getBoolean("nativeInteractionTracking"),
|
|
44
|
-
verbosity = getString("verbosity"),
|
|
45
|
-
proxyConfig = getMap("proxyConfig")?.asProxyConfig(),
|
|
46
|
-
serviceName = getString("serviceName"),
|
|
47
|
-
firstPartyHosts = getArray("firstPartyHosts")?.asFirstPartyHosts(),
|
|
48
|
-
bundleLogsWithRum = getBoolean("bundleLogsWithRum"),
|
|
49
|
-
bundleLogsWithTraces = getBoolean("bundleLogsWithTraces"),
|
|
50
|
-
trackNonFatalAnrs = getBooleanOrNull("trackNonFatalAnrs"),
|
|
51
78
|
batchProcessingLevel = getString("batchProcessingLevel"),
|
|
52
|
-
|
|
79
|
+
proxyConfiguration = getMap("proxyConfiguration")?.asProxyConfig(),
|
|
80
|
+
firstPartyHosts = getArray("firstPartyHosts")?.asFirstPartyHosts(),
|
|
81
|
+
rumConfiguration = rumConfiguration,
|
|
82
|
+
logsConfiguration = logsConfiguration,
|
|
83
|
+
traceConfiguration = traceConfiguration,
|
|
84
|
+
configurationForTelemetry = configurationForTelemetry
|
|
53
85
|
)
|
|
54
86
|
}
|
|
55
87
|
|
|
88
|
+
|
|
56
89
|
internal fun ReadableMap.asConfigurationForTelemetry(): ConfigurationForTelemetry {
|
|
57
90
|
return ConfigurationForTelemetry(
|
|
58
91
|
initializationType = getString("initializationType"),
|
|
@@ -64,14 +97,6 @@ internal fun ReadableMap.asConfigurationForTelemetry(): ConfigurationForTelemetr
|
|
|
64
97
|
)
|
|
65
98
|
}
|
|
66
99
|
|
|
67
|
-
internal fun ReadableMap.asCustomEndpoints(): CustomEndpoints {
|
|
68
|
-
return CustomEndpoints(
|
|
69
|
-
rum = getString("rum"),
|
|
70
|
-
logs = getString("logs"),
|
|
71
|
-
trace = getString("trace"),
|
|
72
|
-
)
|
|
73
|
-
}
|
|
74
|
-
|
|
75
100
|
@Suppress("CyclomaticComplexMethod")
|
|
76
101
|
internal fun ReadableMap.asProxyConfig(): Pair<Proxy, ProxyAuthenticator?>? {
|
|
77
102
|
val address: String? = getString("address")
|
|
@@ -144,42 +169,66 @@ internal object DefaultConfiguration {
|
|
|
144
169
|
|
|
145
170
|
@Suppress("CyclomaticComplexMethod")
|
|
146
171
|
internal fun JSONDdSdkConfiguration.asDdSdkConfiguration(): DdSdkConfiguration {
|
|
172
|
+
val rumConfiguration: RumConfiguration? = this.rumConfiguration?.let { rum ->
|
|
173
|
+
RumConfiguration(
|
|
174
|
+
applicationId = rum.applicationId ?: "",
|
|
175
|
+
trackFrustrations = rum.trackFrustrations ?: DefaultConfiguration.trackFrustrations,
|
|
176
|
+
longTaskThresholdMs = rum.longTaskThresholdMs ?: DefaultConfiguration.longTaskThresholdMs,
|
|
177
|
+
sessionSampleRate = rum.sessionSampleRate ?: DefaultConfiguration.sessionSamplingRate,
|
|
178
|
+
resourceTraceSampleRate = rum.resourceTraceSampleRate,
|
|
179
|
+
vitalsUpdateFrequency = rum.vitalsUpdateFrequency ?: DefaultConfiguration.vitalsUpdateFrequency,
|
|
180
|
+
trackBackgroundEvents = rum.trackBackgroundEvents ?: DefaultConfiguration.trackBackgroundEvents,
|
|
181
|
+
nativeCrashReportEnabled = rum.nativeCrashReportEnabled ?: DefaultConfiguration.nativeCrashReportEnabled,
|
|
182
|
+
nativeLongTaskThresholdMs = rum.nativeLongTaskThresholdMs ?: DefaultConfiguration.nativeLongTaskThresholdMs,
|
|
183
|
+
nativeViewTracking = rum.nativeViewTracking ?: DefaultConfiguration.nativeViewTracking,
|
|
184
|
+
nativeInteractionTracking = rum.nativeInteractionTracking ?: DefaultConfiguration.nativeInteractionTracking,
|
|
185
|
+
trackNonFatalAnrs = rum.trackNonFatalAnrs,
|
|
186
|
+
initialResourceThreshold = rum.initialResourceThreshold ?: DefaultConfiguration.initialResourceThreshold,
|
|
187
|
+
telemetrySampleRate = rum.telemetrySampleRate?.toDouble()
|
|
188
|
+
?: DefaultConfiguration.telemetrySampleRate,
|
|
189
|
+
customEndpoint = rum.customEndpoint
|
|
190
|
+
)
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
val logsConfiguration: LogsConfiguration? = this.logsConfiguration?.let { logs ->
|
|
194
|
+
LogsConfiguration(
|
|
195
|
+
bundleLogsWithRum = logs.bundleLogsWithRum ?: DefaultConfiguration.bundleLogsWithRum,
|
|
196
|
+
bundleLogsWithTraces = logs.bundleLogsWithTraces ?: DefaultConfiguration.bundleLogsWithTraces,
|
|
197
|
+
customEndpoint = logs.customEndpoint
|
|
198
|
+
)
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
val traceConfiguration: TraceConfiguration? = this.traceConfiguration?.let { trace ->
|
|
202
|
+
TraceConfiguration(
|
|
203
|
+
customEndpoint = trace.customEndpoint
|
|
204
|
+
)
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
val baseAdditionalConfig = this.additionalConfiguration?.toMutableMap() ?: mutableMapOf()
|
|
208
|
+
baseAdditionalConfig["_dd.source"] = "react-native"
|
|
209
|
+
baseAdditionalConfig["_dd.sdk_version"] = SDK_VERSION
|
|
210
|
+
|
|
147
211
|
return DdSdkConfiguration(
|
|
148
|
-
|
|
149
|
-
this.
|
|
150
|
-
this.
|
|
151
|
-
this.
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
this.
|
|
155
|
-
this.
|
|
156
|
-
this.
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
mapOf(
|
|
165
|
-
"_dd.source" to "react-native",
|
|
166
|
-
"_dd.sdk_version" to SDK_VERSION
|
|
167
|
-
),
|
|
168
|
-
null,
|
|
169
|
-
this.nativeViewTracking ?: DefaultConfiguration.nativeViewTracking,
|
|
170
|
-
this.nativeInteractionTracking ?: DefaultConfiguration.nativeInteractionTracking,
|
|
171
|
-
this.verbosity,
|
|
172
|
-
this.proxy?.asProxyConfig(),
|
|
173
|
-
this.serviceName,
|
|
174
|
-
this.firstPartyHosts?.asFirstPartyHosts(),
|
|
175
|
-
this.bundleLogsWithRum ?: DefaultConfiguration.bundleLogsWithRum,
|
|
176
|
-
this.bundleLogsWithTraces ?: DefaultConfiguration.bundleLogsWithTraces,
|
|
177
|
-
this.trackNonFatalAnrs,
|
|
178
|
-
this.batchProcessingLevel,
|
|
179
|
-
this.initialResourceThreshold ?: DefaultConfiguration.initialResourceThreshold
|
|
212
|
+
additionalConfiguration = baseAdditionalConfig,
|
|
213
|
+
clientToken = this.clientToken,
|
|
214
|
+
env = this.env,
|
|
215
|
+
site = this.site?: DefaultConfiguration.site,
|
|
216
|
+
service = this.service,
|
|
217
|
+
verbosity = this.verbosity,
|
|
218
|
+
trackingConsent = this.trackingConsent ?: DefaultConfiguration.trackingConsent,
|
|
219
|
+
uploadFrequency = this.uploadFrequency ?: DefaultConfiguration.uploadFrequency,
|
|
220
|
+
batchSize = this.batchSize?: DefaultConfiguration.batchSize,
|
|
221
|
+
batchProcessingLevel = this.batchProcessingLevel,
|
|
222
|
+
proxyConfiguration = this.proxyConfiguration?.asProxyConfig(),
|
|
223
|
+
firstPartyHosts = this.firstPartyHosts?.asFirstPartyHosts(),
|
|
224
|
+
rumConfiguration = rumConfiguration,
|
|
225
|
+
logsConfiguration = logsConfiguration,
|
|
226
|
+
traceConfiguration = traceConfiguration,
|
|
227
|
+
configurationForTelemetry = null
|
|
180
228
|
)
|
|
181
229
|
}
|
|
182
230
|
|
|
231
|
+
|
|
183
232
|
internal fun JSONProxyConfiguration.asProxyConfig(): Pair<Proxy, ProxyAuthenticator?>? {
|
|
184
233
|
return buildProxyConfig(type, address, port, username, password)
|
|
185
234
|
}
|
|
@@ -220,30 +269,98 @@ internal fun List<String>.asTracingHeaderTypes(): Set<TracingHeaderType> {
|
|
|
220
269
|
}.toSet()
|
|
221
270
|
}
|
|
222
271
|
|
|
223
|
-
@Suppress("CyclomaticComplexMethod")
|
|
272
|
+
@Suppress("LongMethod", "CyclomaticComplexMethod")
|
|
224
273
|
internal fun DdSdkConfiguration.toReadableMap(): ReadableMap {
|
|
225
274
|
val map = WritableNativeMap()
|
|
275
|
+
|
|
226
276
|
map.putString("clientToken", clientToken)
|
|
227
277
|
map.putString("env", env)
|
|
228
|
-
map.putString("
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
278
|
+
map.putString("site", site.toString())
|
|
279
|
+
service?.let { map.putString("service", it) }
|
|
280
|
+
verbosity?.let { map.putString("verbosity", it) }
|
|
281
|
+
map.putString("trackingConsent", trackingConsent.toString())
|
|
282
|
+
map.putString("uploadFrequency", uploadFrequency.toString())
|
|
283
|
+
map.putString("batchSize", batchSize.toString())
|
|
284
|
+
map.putString("batchProcessingLevel", batchProcessingLevel.toString())
|
|
285
|
+
additionalConfiguration?.let { map.putMap("additionalConfiguration", it.toWritableMap()) }
|
|
286
|
+
proxyConfiguration?.let { (proxy, authenticator) ->
|
|
287
|
+
val proxyMap = WritableNativeMap()
|
|
288
|
+
val addr = proxy.address()
|
|
289
|
+
if (addr is java.net.InetSocketAddress) {
|
|
290
|
+
proxyMap.putString("address", addr.hostString)
|
|
291
|
+
proxyMap.putInt("port", addr.port)
|
|
292
|
+
}
|
|
293
|
+
proxyMap.putString(
|
|
294
|
+
"type",
|
|
295
|
+
when (proxy.type()) {
|
|
296
|
+
Proxy.Type.HTTP -> "HTTP"
|
|
297
|
+
Proxy.Type.SOCKS -> "SOCKS"
|
|
298
|
+
else -> proxy.type().name
|
|
299
|
+
}
|
|
300
|
+
)
|
|
301
|
+
map.putMap("proxyConfiguration", proxyMap)
|
|
302
|
+
}
|
|
303
|
+
firstPartyHosts?.let { hosts ->
|
|
304
|
+
val hostsArray = WritableNativeArray()
|
|
305
|
+
hosts.forEach { (match, types) ->
|
|
306
|
+
val hostMap = WritableNativeMap()
|
|
307
|
+
hostMap.putString("match", match)
|
|
308
|
+
val propagatorsArray = WritableNativeArray()
|
|
309
|
+
types.forEach { type ->
|
|
310
|
+
propagatorsArray.pushString(type.toString())
|
|
311
|
+
}
|
|
312
|
+
hostMap.putArray("propagatorTypes", propagatorsArray)
|
|
313
|
+
hostsArray.pushMap(hostMap)
|
|
314
|
+
}
|
|
315
|
+
map.putArray("firstPartyHosts", hostsArray)
|
|
316
|
+
}
|
|
317
|
+
rumConfiguration?.let { rum ->
|
|
318
|
+
val rumMap = WritableNativeMap()
|
|
319
|
+
rumMap.putString("applicationId", rum.applicationId)
|
|
320
|
+
rum.trackFrustrations?.let { rumMap.putBoolean("trackFrustrations", it) }
|
|
321
|
+
rum.longTaskThresholdMs?.let { map.putDouble("longTaskThresholdMs", it) }
|
|
322
|
+
rum.sessionSampleRate?.let { rumMap.putDouble("sessionSampleRate", it) }
|
|
323
|
+
rum.resourceTraceSampleRate?.let { rumMap.putDouble("resourceTraceSampleRate", it) }
|
|
324
|
+
rum.vitalsUpdateFrequency?.let { rumMap.putString("vitalsUpdateFrequency", it) }
|
|
325
|
+
rum.trackBackgroundEvents?.let { rumMap.putBoolean("trackBackgroundEvents", it) }
|
|
326
|
+
rum.nativeCrashReportEnabled?.let { rumMap.putBoolean("nativeCrashReportEnabled", it) }
|
|
327
|
+
rum.nativeLongTaskThresholdMs?.let { rumMap.putDouble("nativeLongTaskThresholdMs", it) }
|
|
328
|
+
rum.nativeViewTracking?.let { rumMap.putBoolean("nativeViewTracking", it) }
|
|
329
|
+
rum.nativeInteractionTracking?.let { rumMap.putBoolean("nativeInteractionTracking", it) }
|
|
330
|
+
rum.trackNonFatalAnrs?.let { rumMap.putBoolean("trackNonFatalAnrs", it) }
|
|
331
|
+
rum.initialResourceThreshold?.let { rumMap.putDouble("initialResourceThreshold", it) }
|
|
332
|
+
rum.telemetrySampleRate?.let { rumMap.putDouble("telemetrySampleRate", it) }
|
|
333
|
+
rum.customEndpoint?.let { rumMap.putString("customEndpoint", it) }
|
|
334
|
+
|
|
335
|
+
map.putMap("rumConfiguration", rumMap)
|
|
336
|
+
}
|
|
337
|
+
logsConfiguration?.let { logs ->
|
|
338
|
+
val logsMap = WritableNativeMap()
|
|
339
|
+
logsMap.putBoolean("bundleLogsWithRum", logs.bundleLogsWithRum)
|
|
340
|
+
logsMap.putBoolean("bundleLogsWithTraces", logs.bundleLogsWithTraces)
|
|
341
|
+
logs.customEndpoint?.let { logsMap.putString("customEndpoint", it) }
|
|
342
|
+
map.putMap("logsConfiguration", logsMap)
|
|
343
|
+
}
|
|
344
|
+
traceConfiguration?.let { trace ->
|
|
345
|
+
val traceMap = WritableNativeMap()
|
|
346
|
+
trace.customEndpoint?.let { traceMap.putString("customEndpoint", it) }
|
|
347
|
+
map.putMap("traceConfiguration", traceMap)
|
|
348
|
+
}
|
|
349
|
+
configurationForTelemetry?.let { telemetry ->
|
|
350
|
+
val telemetryMap = WritableNativeMap()
|
|
351
|
+
telemetry.initializationType?.let { telemetryMap.putString("initializationType", it) }
|
|
352
|
+
telemetry.trackErrors?.let { telemetryMap.putBoolean("trackErrors", it) }
|
|
353
|
+
telemetry.trackInteractions?.let { telemetryMap.putBoolean("trackInteractions", it) }
|
|
354
|
+
telemetry.trackNetworkRequests?.let { telemetryMap.putBoolean("trackNetworkRequests", it) }
|
|
355
|
+
telemetry.reactVersion?.let { telemetryMap.putString("reactVersion", it) }
|
|
356
|
+
telemetry.reactNativeVersion?.let { telemetryMap.putString("reactNativeVersion", it) }
|
|
357
|
+
map.putMap("configurationForTelemetry", telemetryMap)
|
|
358
|
+
}
|
|
359
|
+
|
|
244
360
|
return map
|
|
245
361
|
}
|
|
246
362
|
|
|
363
|
+
|
|
247
364
|
internal fun ConfigurationForTelemetry.toReadableMap(): ReadableMap {
|
|
248
365
|
val map = WritableNativeMap()
|
|
249
366
|
initializationType?.let { map.putString("initializationType", it) }
|
|
@@ -255,14 +372,6 @@ internal fun ConfigurationForTelemetry.toReadableMap(): ReadableMap {
|
|
|
255
372
|
return map
|
|
256
373
|
}
|
|
257
374
|
|
|
258
|
-
internal fun CustomEndpoints.toReadableMap(): ReadableMap {
|
|
259
|
-
val map = WritableNativeMap()
|
|
260
|
-
rum?.let { map.putString("rum", it) }
|
|
261
|
-
logs?.let { map.putString("logs", it) }
|
|
262
|
-
trace?.let { map.putString("trace", it) }
|
|
263
|
-
return map
|
|
264
|
-
}
|
|
265
|
-
|
|
266
375
|
private fun buildProxyConfig(
|
|
267
376
|
type: String,
|
|
268
377
|
address: String,
|