@datadog/mobile-react-native 2.4.1 → 2.4.3
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/android/build.gradle +1 -0
- package/android/src/main/kotlin/com/datadog/reactnative/DdRumImplementation.kt +6 -0
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkImplementation.kt +31 -24
- package/android/src/main/kotlin/com/datadog/reactnative/FrameRateProvider.kt +63 -0
- package/android/src/main/kotlin/com/datadog/reactnative/SdkVersion.kt +1 -1
- package/android/src/main/kotlin/com/datadog/reactnative/UiThreadExecutor.kt +25 -0
- package/android/src/newarch/kotlin/com/datadog/reactnative/DdRum.kt +10 -1
- package/android/src/oldarch/kotlin/com/datadog/reactnative/DdRum.kt +10 -1
- package/android/src/test/kotlin/com/datadog/reactnative/DdRumTest.kt +29 -0
- package/android/src/test/kotlin/com/datadog/reactnative/DdSdkTest.kt +12 -4
- package/android/src/test/kotlin/com/datadog/tools/unit/TestUiThreadExecutor.kt +16 -0
- package/datadog-sourcemaps.gradle +3 -5
- package/ios/Sources/DdRum.mm +4 -3
- package/ios/Sources/DdRumImplementation.swift +15 -2
- package/ios/Sources/SdkVersion.swift +1 -1
- package/lib/commonjs/DdSdkReactNative.js +107 -145
- package/lib/commonjs/DdSdkReactNative.js.map +1 -1
- package/lib/commonjs/DdSdkReactNativeConfiguration.js +54 -119
- package/lib/commonjs/DdSdkReactNativeConfiguration.js.map +1 -1
- package/lib/commonjs/InternalLog.js +8 -19
- package/lib/commonjs/InternalLog.js.map +1 -1
- package/lib/commonjs/ProxyConfiguration.js +3 -15
- package/lib/commonjs/ProxyConfiguration.js.map +1 -1
- package/lib/commonjs/SdkVerbosity.js +3 -7
- package/lib/commonjs/SdkVerbosity.js.map +1 -1
- package/lib/commonjs/TrackingConsent.js +3 -7
- package/lib/commonjs/TrackingConsent.js.map +1 -1
- package/lib/commonjs/index.js +50 -66
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/logs/DdLogs.js +103 -123
- package/lib/commonjs/logs/DdLogs.js.map +1 -1
- package/lib/commonjs/logs/eventMapper.js +4 -11
- package/lib/commonjs/logs/eventMapper.js.map +1 -1
- package/lib/commonjs/logs/types.js +4 -0
- package/lib/commonjs/logs/types.js.map +1 -1
- package/lib/commonjs/nativeModulesTypes.js +4 -3
- package/lib/commonjs/nativeModulesTypes.js.map +1 -1
- package/lib/commonjs/polyfills.js +1 -4
- package/lib/commonjs/polyfills.js.map +1 -1
- package/lib/commonjs/rum/DdAttributes.js +26 -0
- package/lib/commonjs/rum/DdAttributes.js.map +1 -0
- package/lib/commonjs/rum/DdRum.js +143 -208
- package/lib/commonjs/rum/DdRum.js.map +1 -1
- package/lib/commonjs/rum/eventMappers/actionEventMapper.js +5 -8
- package/lib/commonjs/rum/eventMappers/actionEventMapper.js.map +1 -1
- package/lib/commonjs/rum/eventMappers/errorEventMapper.js +3 -7
- package/lib/commonjs/rum/eventMappers/errorEventMapper.js.map +1 -1
- package/lib/commonjs/rum/eventMappers/resourceEventMapper.js +5 -8
- package/lib/commonjs/rum/eventMappers/resourceEventMapper.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/DdRumErrorTracking.js +68 -89
- package/lib/commonjs/rum/instrumentation/DdRumErrorTracking.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdEventsInterceptor.js +13 -46
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdEventsInterceptor.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js +52 -66
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/interactionTracking/EventsInterceptor.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/interactionTracking/NoOpEventsInterceptor.js +3 -4
- package/lib/commonjs/rum/instrumentation/interactionTracking/NoOpEventsInterceptor.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/interactionTracking/ShallowObjectEqualityChecker.js +0 -6
- package/lib/commonjs/rum/instrumentation/interactionTracking/ShallowObjectEqualityChecker.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/interactionTracking/getJsxRuntime.js +18 -19
- package/lib/commonjs/rum/instrumentation/interactionTracking/getJsxRuntime.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/DdRumResourceTracking.js +6 -21
- package/lib/commonjs/rum/instrumentation/resourceTracking/DdRumResourceTracking.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js +32 -55
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js +1 -9
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js +15 -41
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js +3 -13
- package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/graphql/graphqlHeaders.js +5 -10
- package/lib/commonjs/rum/instrumentation/resourceTracking/graphql/graphqlHeaders.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/ResourceReporter.js +16 -35
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/ResourceReporter.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/internalDevResourceBlocklist.js +2 -5
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/internalDevResourceBlocklist.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/resourceTiming.js +4 -7
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/resourceTiming.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js +4 -10
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js +25 -58
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js +4 -26
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/interfaces/RequestProxy.js +1 -11
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/interfaces/RequestProxy.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.js +4 -0
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.js.map +1 -1
- package/lib/commonjs/rum/types.js +15 -27
- package/lib/commonjs/rum/types.js.map +1 -1
- package/lib/commonjs/sdk/AttributesSingleton/AttributesSingleton.js +20 -30
- package/lib/commonjs/sdk/AttributesSingleton/AttributesSingleton.js.map +1 -1
- package/lib/commonjs/sdk/AttributesSingleton/types.js.map +1 -1
- package/lib/commonjs/sdk/DatadogProvider/Buffer/BoundedBuffer.js +112 -144
- package/lib/commonjs/sdk/DatadogProvider/Buffer/BoundedBuffer.js.map +1 -1
- package/lib/commonjs/sdk/DatadogProvider/Buffer/BufferSingleton.js +19 -22
- package/lib/commonjs/sdk/DatadogProvider/Buffer/BufferSingleton.js.map +1 -1
- package/lib/commonjs/sdk/DatadogProvider/Buffer/DatadogBuffer.js +1 -15
- package/lib/commonjs/sdk/DatadogProvider/Buffer/DatadogBuffer.js.map +1 -1
- package/lib/commonjs/sdk/DatadogProvider/Buffer/PassThroughBuffer.js +9 -16
- package/lib/commonjs/sdk/DatadogProvider/Buffer/PassThroughBuffer.js.map +1 -1
- package/lib/commonjs/sdk/DatadogProvider/Buffer/bufferNativeCall.js +2 -8
- package/lib/commonjs/sdk/DatadogProvider/Buffer/bufferNativeCall.js.map +1 -1
- package/lib/commonjs/sdk/DatadogProvider/DatadogProvider.js +8 -25
- package/lib/commonjs/sdk/DatadogProvider/DatadogProvider.js.map +1 -1
- package/lib/commonjs/sdk/DdSdk.js +2 -4
- package/lib/commonjs/sdk/DdSdk.js.map +1 -1
- package/lib/commonjs/sdk/EventMappers/EventMapper.js +31 -51
- package/lib/commonjs/sdk/EventMappers/EventMapper.js.map +1 -1
- package/lib/commonjs/sdk/EventMappers/utils/deepClone.js +9 -24
- package/lib/commonjs/sdk/EventMappers/utils/deepClone.js.map +1 -1
- package/lib/commonjs/sdk/FileBasedConfiguration/FileBasedConfiguration.js +6 -38
- package/lib/commonjs/sdk/FileBasedConfiguration/FileBasedConfiguration.js.map +1 -1
- package/lib/commonjs/sdk/GlobalState/GlobalState.js +6 -11
- package/lib/commonjs/sdk/GlobalState/GlobalState.js.map +1 -1
- package/lib/commonjs/sdk/UserInfoSingleton/UserInfoSingleton.js +17 -28
- package/lib/commonjs/sdk/UserInfoSingleton/UserInfoSingleton.js.map +1 -1
- package/lib/commonjs/sdk/UserInfoSingleton/types.js.map +1 -1
- package/lib/commonjs/specs/NativeDdLogs.js +4 -6
- package/lib/commonjs/specs/NativeDdLogs.js.map +1 -1
- package/lib/commonjs/specs/NativeDdRum.js +4 -6
- package/lib/commonjs/specs/NativeDdRum.js.map +1 -1
- package/lib/commonjs/specs/NativeDdSdk.js +4 -6
- package/lib/commonjs/specs/NativeDdSdk.js.map +1 -1
- package/lib/commonjs/specs/NativeDdTrace.js +4 -6
- package/lib/commonjs/specs/NativeDdTrace.js.map +1 -1
- package/lib/commonjs/trace/DdTrace.js +17 -29
- package/lib/commonjs/trace/DdTrace.js.map +1 -1
- package/lib/commonjs/types.js +4 -3
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/utils/Timer.js +7 -22
- package/lib/commonjs/utils/Timer.js.map +1 -1
- package/lib/commonjs/utils/argsUtils.js +3 -11
- package/lib/commonjs/utils/argsUtils.js.map +1 -1
- package/lib/commonjs/utils/errorUtils.js +9 -22
- package/lib/commonjs/utils/errorUtils.js.map +1 -1
- package/lib/commonjs/utils/jsUtils.js +1 -2
- package/lib/commonjs/utils/jsUtils.js.map +1 -1
- package/lib/commonjs/utils/longTasksUtils.js +2 -7
- package/lib/commonjs/utils/longTasksUtils.js.map +1 -1
- package/lib/commonjs/utils/time-provider/DefaultTimeProvider.js +9 -15
- package/lib/commonjs/utils/time-provider/DefaultTimeProvider.js.map +1 -1
- package/lib/commonjs/utils/time-provider/TimeProvider.js +1 -11
- package/lib/commonjs/utils/time-provider/TimeProvider.js.map +1 -1
- package/lib/commonjs/version.js +1 -2
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/DdSdkReactNative.js +104 -116
- package/lib/module/DdSdkReactNative.js.map +1 -1
- package/lib/module/DdSdkReactNativeConfiguration.js +49 -101
- package/lib/module/DdSdkReactNativeConfiguration.js.map +1 -1
- package/lib/module/InternalLog.js +4 -15
- package/lib/module/InternalLog.js.map +1 -1
- package/lib/module/ProxyConfiguration.js +3 -14
- package/lib/module/ProxyConfiguration.js.map +1 -1
- package/lib/module/SdkVerbosity.js +3 -4
- package/lib/module/SdkVerbosity.js.map +1 -1
- package/lib/module/TrackingConsent.js +3 -4
- package/lib/module/TrackingConsent.js.map +1 -1
- package/lib/module/index.js +2 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/logs/DdLogs.js +98 -117
- package/lib/module/logs/DdLogs.js.map +1 -1
- package/lib/module/logs/eventMapper.js +3 -1
- package/lib/module/logs/eventMapper.js.map +1 -1
- package/lib/module/logs/types.js +1 -1
- package/lib/module/logs/types.js.map +1 -1
- package/lib/module/nativeModulesTypes.js +5 -1
- package/lib/module/nativeModulesTypes.js.map +1 -1
- package/lib/module/polyfills.js +1 -3
- package/lib/module/polyfills.js.map +1 -1
- package/lib/module/rum/DdAttributes.js +20 -0
- package/lib/module/rum/DdAttributes.js.map +1 -0
- package/lib/module/rum/DdRum.js +138 -185
- package/lib/module/rum/DdRum.js.map +1 -1
- package/lib/module/rum/eventMappers/actionEventMapper.js +5 -5
- package/lib/module/rum/eventMappers/actionEventMapper.js.map +1 -1
- package/lib/module/rum/eventMappers/errorEventMapper.js +3 -4
- package/lib/module/rum/eventMappers/errorEventMapper.js.map +1 -1
- package/lib/module/rum/eventMappers/resourceEventMapper.js +5 -5
- package/lib/module/rum/eventMappers/resourceEventMapper.js.map +1 -1
- package/lib/module/rum/instrumentation/DdRumErrorTracking.js +64 -79
- package/lib/module/rum/instrumentation/DdRumErrorTracking.js.map +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/DdEventsInterceptor.js +7 -36
- package/lib/module/rum/instrumentation/interactionTracking/DdEventsInterceptor.js.map +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js +49 -54
- package/lib/module/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js.map +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/EventsInterceptor.js.map +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/NoOpEventsInterceptor.js +3 -2
- package/lib/module/rum/instrumentation/interactionTracking/NoOpEventsInterceptor.js.map +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/ShallowObjectEqualityChecker.js +0 -4
- package/lib/module/rum/instrumentation/interactionTracking/ShallowObjectEqualityChecker.js.map +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/getJsxRuntime.js +16 -14
- package/lib/module/rum/instrumentation/interactionTracking/getJsxRuntime.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/DdRumResourceTracking.js +2 -12
- package/lib/module/rum/instrumentation/resourceTracking/DdRumResourceTracking.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js +33 -45
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js +1 -4
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js +2 -10
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js +3 -5
- package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/graphql/graphqlHeaders.js +1 -0
- package/lib/module/rum/instrumentation/resourceTracking/graphql/graphqlHeaders.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/ResourceReporter.js +12 -30
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/ResourceReporter.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/internalDevResourceBlocklist.js +2 -3
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/internalDevResourceBlocklist.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/resourceTiming.js +4 -4
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/resourceTiming.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js +4 -5
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js +20 -48
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js +2 -20
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/interfaces/RequestProxy.js +1 -9
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/interfaces/RequestProxy.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.js +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.js.map +1 -1
- package/lib/module/rum/types.js +14 -18
- package/lib/module/rum/types.js.map +1 -1
- package/lib/module/sdk/AttributesSingleton/AttributesSingleton.js +20 -28
- package/lib/module/sdk/AttributesSingleton/AttributesSingleton.js.map +1 -1
- package/lib/module/sdk/AttributesSingleton/types.js.map +1 -1
- package/lib/module/sdk/DatadogProvider/Buffer/BoundedBuffer.js +108 -137
- package/lib/module/sdk/DatadogProvider/Buffer/BoundedBuffer.js.map +1 -1
- package/lib/module/sdk/DatadogProvider/Buffer/BufferSingleton.js +14 -18
- package/lib/module/sdk/DatadogProvider/Buffer/BufferSingleton.js.map +1 -1
- package/lib/module/sdk/DatadogProvider/Buffer/DatadogBuffer.js +1 -13
- package/lib/module/sdk/DatadogProvider/Buffer/DatadogBuffer.js.map +1 -1
- package/lib/module/sdk/DatadogProvider/Buffer/PassThroughBuffer.js +5 -14
- package/lib/module/sdk/DatadogProvider/Buffer/PassThroughBuffer.js.map +1 -1
- package/lib/module/sdk/DatadogProvider/Buffer/bufferNativeCall.js +1 -0
- package/lib/module/sdk/DatadogProvider/Buffer/bufferNativeCall.js.map +1 -1
- package/lib/module/sdk/DatadogProvider/DatadogProvider.js +6 -14
- package/lib/module/sdk/DatadogProvider/DatadogProvider.js.map +1 -1
- package/lib/module/sdk/DdSdk.js +1 -1
- package/lib/module/sdk/DdSdk.js.map +1 -1
- package/lib/module/sdk/EventMappers/EventMapper.js +27 -41
- package/lib/module/sdk/EventMappers/EventMapper.js.map +1 -1
- package/lib/module/sdk/EventMappers/utils/deepClone.js +9 -22
- package/lib/module/sdk/EventMappers/utils/deepClone.js.map +1 -1
- package/lib/module/sdk/FileBasedConfiguration/FileBasedConfiguration.js +5 -29
- package/lib/module/sdk/FileBasedConfiguration/FileBasedConfiguration.js.map +1 -1
- package/lib/module/sdk/GlobalState/GlobalState.js +6 -9
- package/lib/module/sdk/GlobalState/GlobalState.js.map +1 -1
- package/lib/module/sdk/UserInfoSingleton/UserInfoSingleton.js +17 -26
- package/lib/module/sdk/UserInfoSingleton/UserInfoSingleton.js.map +1 -1
- package/lib/module/sdk/UserInfoSingleton/types.js.map +1 -1
- package/lib/module/specs/NativeDdLogs.js +2 -0
- package/lib/module/specs/NativeDdLogs.js.map +1 -1
- package/lib/module/specs/NativeDdRum.js +2 -0
- package/lib/module/specs/NativeDdRum.js.map +1 -1
- package/lib/module/specs/NativeDdSdk.js +2 -0
- package/lib/module/specs/NativeDdSdk.js.map +1 -1
- package/lib/module/specs/NativeDdTrace.js +2 -0
- package/lib/module/specs/NativeDdTrace.js.map +1 -1
- package/lib/module/trace/DdTrace.js +12 -19
- package/lib/module/trace/DdTrace.js.map +1 -1
- package/lib/module/types.js +5 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/Timer.js +3 -20
- package/lib/module/utils/Timer.js.map +1 -1
- package/lib/module/utils/argsUtils.js +3 -5
- package/lib/module/utils/argsUtils.js.map +1 -1
- package/lib/module/utils/errorUtils.js +6 -9
- package/lib/module/utils/errorUtils.js.map +1 -1
- package/lib/module/utils/jsUtils.js +1 -0
- package/lib/module/utils/jsUtils.js.map +1 -1
- package/lib/module/utils/longTasksUtils.js +2 -5
- package/lib/module/utils/longTasksUtils.js.map +1 -1
- package/lib/module/utils/time-provider/DefaultTimeProvider.js +5 -13
- package/lib/module/utils/time-provider/DefaultTimeProvider.js.map +1 -1
- package/lib/module/utils/time-provider/TimeProvider.js +1 -9
- package/lib/module/utils/time-provider/TimeProvider.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/DdSdkReactNative.d.ts +1 -0
- package/lib/typescript/DdSdkReactNative.d.ts.map +1 -0
- package/lib/typescript/DdSdkReactNativeConfiguration.d.ts +1 -0
- package/lib/typescript/DdSdkReactNativeConfiguration.d.ts.map +1 -0
- package/lib/typescript/InternalLog.d.ts +1 -0
- package/lib/typescript/InternalLog.d.ts.map +1 -0
- package/lib/typescript/ProxyConfiguration.d.ts +1 -0
- package/lib/typescript/ProxyConfiguration.d.ts.map +1 -0
- package/lib/typescript/SdkVerbosity.d.ts +1 -0
- package/lib/typescript/SdkVerbosity.d.ts.map +1 -0
- package/lib/typescript/TrackingConsent.d.ts +1 -0
- package/lib/typescript/TrackingConsent.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/logs/DdLogs.d.ts +1 -0
- package/lib/typescript/logs/DdLogs.d.ts.map +1 -0
- package/lib/typescript/logs/eventMapper.d.ts +1 -0
- package/lib/typescript/logs/eventMapper.d.ts.map +1 -0
- package/lib/typescript/logs/types.d.ts +6 -1
- package/lib/typescript/logs/types.d.ts.map +1 -0
- package/lib/typescript/nativeModulesTypes.d.ts +3 -1
- package/lib/typescript/nativeModulesTypes.d.ts.map +1 -0
- package/lib/typescript/rum/DdAttributes.d.ts +14 -0
- package/lib/typescript/rum/DdAttributes.d.ts.map +1 -0
- package/lib/typescript/rum/DdRum.d.ts +3 -2
- package/lib/typescript/rum/DdRum.d.ts.map +1 -0
- package/lib/typescript/rum/eventMappers/actionEventMapper.d.ts +1 -0
- package/lib/typescript/rum/eventMappers/actionEventMapper.d.ts.map +1 -0
- package/lib/typescript/rum/eventMappers/errorEventMapper.d.ts +3 -0
- package/lib/typescript/rum/eventMappers/errorEventMapper.d.ts.map +1 -0
- package/lib/typescript/rum/eventMappers/resourceEventMapper.d.ts +1 -0
- package/lib/typescript/rum/eventMappers/resourceEventMapper.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/DdRumErrorTracking.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/DdRumErrorTracking.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/interactionTracking/DdEventsInterceptor.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/interactionTracking/DdEventsInterceptor.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.d.ts +2 -0
- package/lib/typescript/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/interactionTracking/EventsInterceptor.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/interactionTracking/EventsInterceptor.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/interactionTracking/NoOpEventsInterceptor.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/interactionTracking/NoOpEventsInterceptor.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/interactionTracking/ShallowObjectEqualityChecker.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/interactionTracking/ShallowObjectEqualityChecker.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/interactionTracking/getJsxRuntime.d.ts +2 -1
- package/lib/typescript/rum/instrumentation/interactionTracking/getJsxRuntime.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/DdRumResourceTracking.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/DdRumResourceTracking.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/graphql/graphqlHeaders.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/graphql/graphqlHeaders.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/ResourceReporter.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/ResourceReporter.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/internalDevResourceBlocklist.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/internalDevResourceBlocklist.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/resourceTiming.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/resourceTiming.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/interfaces/RequestProxy.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/interfaces/RequestProxy.d.ts.map +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.d.ts.map +1 -0
- package/lib/typescript/rum/types.d.ts +1 -0
- package/lib/typescript/rum/types.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesSingleton/AttributesSingleton.d.ts +1 -0
- package/lib/typescript/sdk/AttributesSingleton/AttributesSingleton.d.ts.map +1 -0
- package/lib/typescript/sdk/AttributesSingleton/types.d.ts +1 -0
- package/lib/typescript/sdk/AttributesSingleton/types.d.ts.map +1 -0
- package/lib/typescript/sdk/DatadogProvider/Buffer/BoundedBuffer.d.ts +1 -0
- package/lib/typescript/sdk/DatadogProvider/Buffer/BoundedBuffer.d.ts.map +1 -0
- package/lib/typescript/sdk/DatadogProvider/Buffer/BufferSingleton.d.ts +1 -0
- package/lib/typescript/sdk/DatadogProvider/Buffer/BufferSingleton.d.ts.map +1 -0
- package/lib/typescript/sdk/DatadogProvider/Buffer/DatadogBuffer.d.ts +1 -0
- package/lib/typescript/sdk/DatadogProvider/Buffer/DatadogBuffer.d.ts.map +1 -0
- package/lib/typescript/sdk/DatadogProvider/Buffer/PassThroughBuffer.d.ts +1 -0
- package/lib/typescript/sdk/DatadogProvider/Buffer/PassThroughBuffer.d.ts.map +1 -0
- package/lib/typescript/sdk/DatadogProvider/Buffer/bufferNativeCall.d.ts +1 -0
- package/lib/typescript/sdk/DatadogProvider/Buffer/bufferNativeCall.d.ts.map +1 -0
- package/lib/typescript/sdk/DatadogProvider/DatadogProvider.d.ts +1 -0
- package/lib/typescript/sdk/DatadogProvider/DatadogProvider.d.ts.map +1 -0
- package/lib/typescript/sdk/DdSdk.d.ts +1 -0
- package/lib/typescript/sdk/DdSdk.d.ts.map +1 -0
- package/lib/typescript/sdk/EventMappers/EventMapper.d.ts +1 -0
- package/lib/typescript/sdk/EventMappers/EventMapper.d.ts.map +1 -0
- package/lib/typescript/sdk/EventMappers/utils/deepClone.d.ts +1 -0
- package/lib/typescript/sdk/EventMappers/utils/deepClone.d.ts.map +1 -0
- package/lib/typescript/sdk/FileBasedConfiguration/FileBasedConfiguration.d.ts +1 -0
- package/lib/typescript/sdk/FileBasedConfiguration/FileBasedConfiguration.d.ts.map +1 -0
- package/lib/typescript/sdk/GlobalState/GlobalState.d.ts +1 -0
- package/lib/typescript/sdk/GlobalState/GlobalState.d.ts.map +1 -0
- package/lib/typescript/sdk/UserInfoSingleton/UserInfoSingleton.d.ts +1 -0
- package/lib/typescript/sdk/UserInfoSingleton/UserInfoSingleton.d.ts.map +1 -0
- package/lib/typescript/sdk/UserInfoSingleton/types.d.ts +1 -0
- package/lib/typescript/sdk/UserInfoSingleton/types.d.ts.map +1 -0
- package/lib/typescript/specs/NativeDdLogs.d.ts +1 -0
- package/lib/typescript/specs/NativeDdLogs.d.ts.map +1 -0
- package/lib/typescript/specs/NativeDdRum.d.ts +3 -1
- package/lib/typescript/specs/NativeDdRum.d.ts.map +1 -0
- package/lib/typescript/specs/NativeDdSdk.d.ts +1 -0
- package/lib/typescript/specs/NativeDdSdk.d.ts.map +1 -0
- package/lib/typescript/specs/NativeDdTrace.d.ts +1 -0
- package/lib/typescript/specs/NativeDdTrace.d.ts.map +1 -0
- package/lib/typescript/trace/DdTrace.d.ts +1 -0
- package/lib/typescript/trace/DdTrace.d.ts.map +1 -0
- package/lib/typescript/types.d.ts +1 -0
- package/lib/typescript/types.d.ts.map +1 -0
- package/lib/typescript/utils/Timer.d.ts +1 -0
- package/lib/typescript/utils/Timer.d.ts.map +1 -0
- package/lib/typescript/utils/argsUtils.d.ts +1 -0
- package/lib/typescript/utils/argsUtils.d.ts.map +1 -0
- package/lib/typescript/utils/errorUtils.d.ts +1 -0
- package/lib/typescript/utils/errorUtils.d.ts.map +1 -0
- package/lib/typescript/utils/jsUtils.d.ts +1 -0
- package/lib/typescript/utils/jsUtils.d.ts.map +1 -0
- package/lib/typescript/utils/longTasksUtils.d.ts +1 -0
- package/lib/typescript/utils/longTasksUtils.d.ts.map +1 -0
- package/lib/typescript/utils/time-provider/DefaultTimeProvider.d.ts +1 -0
- package/lib/typescript/utils/time-provider/DefaultTimeProvider.d.ts.map +1 -0
- package/lib/typescript/utils/time-provider/TimeProvider.d.ts +1 -0
- package/lib/typescript/utils/time-provider/TimeProvider.d.ts.map +1 -0
- package/lib/typescript/version.d.ts +2 -1
- package/lib/typescript/version.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/__tests__/DdSdkReactNative.test.tsx +2 -1
- package/src/__tests__/rum/instrumentation/DdRumErrorTracking.test.tsx +32 -16
- package/src/__tests__/rum/instrumentation/DdRumUserInteractionTracking.test.tsx +17 -15
- package/src/logs/DdLogs.ts +25 -8
- package/src/logs/__tests__/DdLogs.test.ts +122 -0
- package/src/logs/types.ts +5 -1
- package/src/nativeModulesTypes.ts +3 -1
- package/src/rum/DdAttributes.ts +20 -0
- package/src/rum/DdRum.ts +11 -6
- package/src/rum/__tests__/DdRum.test.ts +40 -4
- package/src/rum/eventMappers/errorEventMapper.ts +2 -0
- package/src/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.tsx +33 -10
- package/src/rum/instrumentation/interactionTracking/getJsxRuntime.ts +10 -3
- package/src/sdk/DatadogProvider/__tests__/initialization.test.tsx +1 -1
- package/src/specs/NativeDdRum.ts +3 -1
- package/src/version.ts +1 -1
- package/android/src/main/kotlin/com/datadog/reactnative/VitalFrameCallback.kt +0 -41
package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_InternalLog","require","_SdkVerbosity","MISSING_RESOURCE_SIZE","RESOURCE_SIZE_ERROR_MESSAGE","exports","byteLength","str","unescape","encodeURI","length","getResponseContentLengthFromHeader","xhr","contentLengthHeader","parseInt","getResponseHeader","isNaN","calculateResponseSize","response","size","responseType","JSON","stringify","e","InternalLog","log","SdkVerbosity","ERROR"],"sourceRoot":"../../../../../../../src","sources":["rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.ts"],"mappings":";;;;;;;AAMA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAPA;AACA;AACA;AACA;AACA;;AAKA,MAAME,qBAAqB,GAAG,CAAC,CAAC;AACzB,MAAMC,2BAA2B,GAAAC,OAAA,CAAAD,2BAAA,GACpC,yDAAyD;AAE7D,SAASE,UAAUA,CAACC,GAAW,EAAU;EACrC;EACA;EACA,OAAOC,QAAQ,CAACC,SAAS,CAACF,GAAG,CAAC,CAAC,CAACG,MAAM;AAC1C;AAEA,SAASC,kCAAkCA,CACvCC,GAAmB,EACN;EACb,MAAMC,mBAAmB,GAAGC,QAAQ,CAChCF,GAAG,CAACG,iBAAiB,CAAC,gBAAgB,CAAC,IAAI,EAAE,EAC7C,EACJ,CAAC;EACD,IAAI,CAACC,KAAK,CAACH,mBAAmB,CAAC,EAAE;IAC7B,OAAOA,mBAAmB;EAC9B;EACA,OAAO,IAAI;AACf;AAEO,SAASI,qBAAqBA,CAACL,GAAmB,EAAU;EAC/D,MAAMC,mBAAmB,GAAGF,kCAAkC,CAACC,GAAG,CAAC;EACnE,IAAIC,mBAAmB,IAAI,IAAI,EAAE;IAC7B,OAAOA,mBAAmB;EAC9B;EAEA,MAAMK,QAAQ,GAAGN,GAAG,CAACM,QAAQ;EAC7B,IAAI,CAACA,QAAQ,EAAE;IACX,OAAOf,qBAAqB;EAChC;EAEA,IAAIgB,IAAI;EACR,IAAI;IACA,QAAQP,GAAG,CAACQ,YAAY;MACpB,KAAK,EAAE;MACP,KAAK,MAAM;QACP;QACAD,IAAI,GAAGb,UAAU,CAACY,QAAQ,CAAC;QAC3B;MACJ,KAAK,MAAM;QACPC,IAAI,GAAGD,QAAQ,CAACC,IAAI;QACpB;MACJ,KAAK,aAAa;QACdA,IAAI,GAAGD,QAAQ,CAACZ,UAAU;QAC1B;MACJ,KAAK,UAAU;QACX;QACA;QACA;MACJ,KAAK,MAAM;QACP;QACA;QACA;QACA;QACAa,IAAI,GAAGb,UAAU,CAACe,IAAI,CAACC,SAAS,CAACJ,QAAQ,CAAC,CAAC;QAC3C;MACJ;QACI;IACR;EACJ,CAAC,CAAC,OAAOK,CAAC,EAAE;IACRC,wBAAW,CAACC,GAAG,CACX,GAAGrB,2BAA2B,GAAGmB,CAAC,EAAE,EACpCG,0BAAY,CAACC,KACjB,CAAC;EACL;EAEA,IAAI,OAAOR,IAAI,KAAK,QAAQ,EAAE;IAC1B,OAAOhB,qBAAqB;EAChC;EACA,OAAOgB,IAAI;AACf","ignoreList":[]}
|
package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/interfaces/RequestProxy.js
CHANGED
|
@@ -4,22 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.RequestProxy = void 0;
|
|
7
|
-
|
|
8
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
-
|
|
10
7
|
/*
|
|
11
8
|
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
12
9
|
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
13
10
|
* Copyright 2016-Present Datadog, Inc.
|
|
14
11
|
*/
|
|
15
|
-
class RequestProxy {
|
|
16
|
-
constructor() {
|
|
17
|
-
_defineProperty(this, "onTrackingStart", void 0);
|
|
18
|
-
|
|
19
|
-
_defineProperty(this, "onTrackingStop", void 0);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
}
|
|
23
12
|
|
|
13
|
+
class RequestProxy {}
|
|
24
14
|
exports.RequestProxy = RequestProxy;
|
|
25
15
|
//# sourceMappingURL=RequestProxy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["RequestProxy","exports"],"sourceRoot":"../../../../../../../src","sources":["rum/instrumentation/resourceTracking/requestProxy/interfaces/RequestProxy.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;;AAcO,MAAeA,YAAY,CAAC;AAGlCC,OAAA,CAAAD,YAAA,GAAAA,YAAA","ignoreList":[]}
|
package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../../src","sources":["rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -3,33 +3,34 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
|
|
6
|
+
exports.RumActionType = exports.PropagatorType = exports.ErrorSource = void 0;
|
|
8
7
|
/*
|
|
9
8
|
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
10
9
|
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
11
10
|
* Copyright 2016-Present Datadog, Inc.
|
|
12
11
|
*/
|
|
13
|
-
|
|
14
12
|
/**
|
|
15
13
|
* The entry point to use Datadog's RUM feature.
|
|
16
14
|
*/
|
|
17
|
-
|
|
18
15
|
/**
|
|
19
16
|
* Describe the type of a RUM Action.
|
|
20
17
|
*/
|
|
21
|
-
let RumActionType
|
|
22
|
-
exports.RumActionType = RumActionType;
|
|
23
|
-
|
|
24
|
-
(function (RumActionType) {
|
|
18
|
+
let RumActionType = exports.RumActionType = /*#__PURE__*/function (RumActionType) {
|
|
25
19
|
RumActionType["TAP"] = "TAP";
|
|
26
20
|
RumActionType["SCROLL"] = "SCROLL";
|
|
27
21
|
RumActionType["SWIPE"] = "SWIPE";
|
|
28
22
|
RumActionType["BACK"] = "BACK";
|
|
29
23
|
RumActionType["CUSTOM"] = "CUSTOM";
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
let ErrorSource
|
|
24
|
+
return RumActionType;
|
|
25
|
+
}({});
|
|
26
|
+
let ErrorSource = exports.ErrorSource = /*#__PURE__*/function (ErrorSource) {
|
|
27
|
+
ErrorSource["NETWORK"] = "NETWORK";
|
|
28
|
+
ErrorSource["SOURCE"] = "SOURCE";
|
|
29
|
+
ErrorSource["CONSOLE"] = "CONSOLE";
|
|
30
|
+
ErrorSource["WEBVIEW"] = "WEBVIEW";
|
|
31
|
+
ErrorSource["CUSTOM"] = "CUSTOM";
|
|
32
|
+
return ErrorSource;
|
|
33
|
+
}({});
|
|
33
34
|
/**
|
|
34
35
|
* Type of instrumentation on the host.
|
|
35
36
|
* - DATADOG: Datadog’s propagator (`x-datadog-*`)
|
|
@@ -37,24 +38,11 @@ let ErrorSource;
|
|
|
37
38
|
* - B3: B3 single header (`b3`)
|
|
38
39
|
* - B3MULTI: B3 multiple headers (`X-B3-*`)
|
|
39
40
|
*/
|
|
40
|
-
|
|
41
|
-
exports.ErrorSource = ErrorSource;
|
|
42
|
-
|
|
43
|
-
(function (ErrorSource) {
|
|
44
|
-
ErrorSource["NETWORK"] = "NETWORK";
|
|
45
|
-
ErrorSource["SOURCE"] = "SOURCE";
|
|
46
|
-
ErrorSource["CONSOLE"] = "CONSOLE";
|
|
47
|
-
ErrorSource["WEBVIEW"] = "WEBVIEW";
|
|
48
|
-
ErrorSource["CUSTOM"] = "CUSTOM";
|
|
49
|
-
})(ErrorSource || (exports.ErrorSource = ErrorSource = {}));
|
|
50
|
-
|
|
51
|
-
let PropagatorType;
|
|
52
|
-
exports.PropagatorType = PropagatorType;
|
|
53
|
-
|
|
54
|
-
(function (PropagatorType) {
|
|
41
|
+
let PropagatorType = exports.PropagatorType = /*#__PURE__*/function (PropagatorType) {
|
|
55
42
|
PropagatorType["DATADOG"] = "datadog";
|
|
56
43
|
PropagatorType["TRACECONTEXT"] = "tracecontext";
|
|
57
44
|
PropagatorType["B3"] = "b3";
|
|
58
45
|
PropagatorType["B3MULTI"] = "b3multi";
|
|
59
|
-
|
|
46
|
+
return PropagatorType;
|
|
47
|
+
}({});
|
|
60
48
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["RumActionType","exports","ErrorSource","PropagatorType"],"sourceRoot":"../../../src","sources":["rum/types.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAoJA;AACA;AACA;AAFA,IAGYA,aAAa,GAAAC,OAAA,CAAAD,aAAA,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAAA,IA0BbE,WAAW,GAAAD,OAAA,CAAAC,WAAA,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAQvB;AACA;AACA;AACA;AACA;AACA;AACA;AANA,IAOYC,cAAc,GAAAF,OAAA,CAAAE,cAAA,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA","ignoreList":[]}
|
|
@@ -4,42 +4,32 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.AttributesSingleton = void 0;
|
|
7
|
-
|
|
8
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
-
|
|
10
7
|
/*
|
|
11
8
|
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
12
9
|
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
13
10
|
* Copyright 2016-Present Datadog, Inc.
|
|
14
11
|
*/
|
|
15
|
-
class AttributesProvider {
|
|
16
|
-
constructor() {
|
|
17
|
-
_defineProperty(this, "attributes", {});
|
|
18
|
-
|
|
19
|
-
_defineProperty(this, "setAttributes", attributes => {
|
|
20
|
-
this.attributes = { ...this.attributes,
|
|
21
|
-
...attributes
|
|
22
|
-
};
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
_defineProperty(this, "getAttributes", () => {
|
|
26
|
-
return this.attributes;
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
12
|
|
|
13
|
+
class AttributesProvider {
|
|
14
|
+
attributes = {};
|
|
15
|
+
setAttributes = attributes => {
|
|
16
|
+
this.attributes = {
|
|
17
|
+
...this.attributes,
|
|
18
|
+
...attributes
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
getAttributes = () => {
|
|
22
|
+
return this.attributes;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
class AttributesSingleton {
|
|
26
|
+
static attributesProvider = new AttributesProvider();
|
|
27
|
+
static getInstance = () => {
|
|
28
|
+
return AttributesSingleton.attributesProvider;
|
|
29
|
+
};
|
|
30
|
+
static reset = () => {
|
|
31
|
+
AttributesSingleton.attributesProvider = new AttributesProvider();
|
|
32
|
+
};
|
|
30
33
|
}
|
|
31
|
-
|
|
32
|
-
class AttributesSingleton {}
|
|
33
|
-
|
|
34
34
|
exports.AttributesSingleton = AttributesSingleton;
|
|
35
|
-
|
|
36
|
-
_defineProperty(AttributesSingleton, "attributesProvider", new AttributesProvider());
|
|
37
|
-
|
|
38
|
-
_defineProperty(AttributesSingleton, "getInstance", () => {
|
|
39
|
-
return AttributesSingleton.attributesProvider;
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
_defineProperty(AttributesSingleton, "reset", () => {
|
|
43
|
-
AttributesSingleton.attributesProvider = new AttributesProvider();
|
|
44
|
-
});
|
|
45
35
|
//# sourceMappingURL=AttributesSingleton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["AttributesProvider","attributes","setAttributes","getAttributes","AttributesSingleton","attributesProvider","getInstance","reset","exports"],"sourceRoot":"../../../../src","sources":["sdk/AttributesSingleton/AttributesSingleton.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;;AAIA,MAAMA,kBAAkB,CAAC;EACbC,UAAU,GAAe,CAAC,CAAC;EAEnCC,aAAa,GAAID,UAAsB,IAAK;IACxC,IAAI,CAACA,UAAU,GAAG;MACd,GAAG,IAAI,CAACA,UAAU;MAClB,GAAGA;IACP,CAAC;EACL,CAAC;EAEDE,aAAa,GAAGA,CAAA,KAAkB;IAC9B,OAAO,IAAI,CAACF,UAAU;EAC1B,CAAC;AACL;AAEO,MAAMG,mBAAmB,CAAC;EAC7B,OAAeC,kBAAkB,GAAG,IAAIL,kBAAkB,CAAC,CAAC;EAE5D,OAAOM,WAAW,GAAGA,CAAA,KAA0B;IAC3C,OAAOF,mBAAmB,CAACC,kBAAkB;EACjD,CAAC;EAED,OAAOE,KAAK,GAAGA,CAAA,KAAM;IACjBH,mBAAmB,CAACC,kBAAkB,GAAG,IAAIL,kBAAkB,CAAC,CAAC;EACrE,CAAC;AACL;AAACQ,OAAA,CAAAJ,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["sdk/AttributesSingleton/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -4,178 +4,146 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.BoundedBuffer = void 0;
|
|
7
|
-
|
|
8
7
|
var _InternalLog = require("../../../InternalLog");
|
|
9
|
-
|
|
10
8
|
var _SdkVerbosity = require("../../../SdkVerbosity");
|
|
11
|
-
|
|
12
9
|
var _DdSdk = require("../../../sdk/DdSdk");
|
|
13
|
-
|
|
14
10
|
var _errorUtils = require("../../../utils/errorUtils");
|
|
15
|
-
|
|
16
11
|
var _DatadogBuffer = require("./DatadogBuffer");
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
/*
|
|
13
|
+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
14
|
+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
15
|
+
* Copyright 2016-Present Datadog, Inc.
|
|
16
|
+
*/
|
|
19
17
|
|
|
20
18
|
const DEFAULT_BUFFER_SIZE = 100;
|
|
21
|
-
|
|
22
19
|
class BoundedBuffer extends _DatadogBuffer.DatadogBuffer {
|
|
20
|
+
buffer = [];
|
|
21
|
+
idTable = {};
|
|
22
|
+
telemetryBuffer = {};
|
|
23
23
|
constructor(bufferSize = DEFAULT_BUFFER_SIZE) {
|
|
24
24
|
super();
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
this.bufferSize = bufferSize;
|
|
26
|
+
}
|
|
27
|
+
addCallback = callback => {
|
|
28
|
+
if (this.buffer.length < this.bufferSize) {
|
|
29
|
+
this.buffer.push({
|
|
30
|
+
callback,
|
|
31
|
+
_type: 'VOID'
|
|
32
|
+
});
|
|
33
|
+
} else {
|
|
34
|
+
this.logBufferOverflow();
|
|
35
|
+
}
|
|
36
|
+
return new Promise(resolve => resolve(undefined));
|
|
37
|
+
};
|
|
38
|
+
addCallbackReturningId = callback => {
|
|
39
|
+
try {
|
|
40
|
+
const bufferId = this.generateRandomBufferId();
|
|
35
41
|
if (this.buffer.length < this.bufferSize) {
|
|
36
42
|
this.buffer.push({
|
|
37
43
|
callback,
|
|
38
|
-
|
|
44
|
+
returnedBufferId: bufferId,
|
|
45
|
+
_type: 'RETURNING_ID'
|
|
39
46
|
});
|
|
47
|
+
this.idTable[bufferId] = null;
|
|
40
48
|
} else {
|
|
41
49
|
this.logBufferOverflow();
|
|
42
50
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
51
|
+
return new Promise(resolve => resolve(bufferId));
|
|
52
|
+
} catch (error) {
|
|
53
|
+
this.logRandomIdGenerationError(error);
|
|
54
|
+
return new Promise(resolve => resolve(''));
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
addCallbackWithId = (callback, bufferId) => {
|
|
58
|
+
if (this.idTable[bufferId] !== undefined) {
|
|
59
|
+
this.buffer.push({
|
|
60
|
+
callback,
|
|
61
|
+
withBufferId: bufferId,
|
|
62
|
+
_type: 'WITH_ID'
|
|
63
|
+
});
|
|
64
|
+
} else {
|
|
65
|
+
this.logBufferOverflow();
|
|
66
|
+
}
|
|
67
|
+
return new Promise(resolve => resolve(undefined));
|
|
68
|
+
};
|
|
69
|
+
drain = async () => {
|
|
70
|
+
for (let bufferIndex = 0; bufferIndex < this.buffer.length; bufferIndex++) {
|
|
48
71
|
try {
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
callback
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
this.logBufferOverflow();
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
return new Promise(resolve => resolve(bufferId));
|
|
63
|
-
} catch (error) {
|
|
64
|
-
this.logRandomIdGenerationError(error);
|
|
65
|
-
return new Promise(resolve => resolve(''));
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
_defineProperty(this, "addCallbackWithId", (callback, bufferId) => {
|
|
70
|
-
if (this.idTable[bufferId] !== undefined) {
|
|
71
|
-
this.buffer.push({
|
|
72
|
-
callback,
|
|
73
|
-
withBufferId: bufferId,
|
|
74
|
-
_type: 'WITH_ID'
|
|
75
|
-
});
|
|
76
|
-
} else {
|
|
77
|
-
this.logBufferOverflow();
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
return new Promise(resolve => resolve(undefined));
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
_defineProperty(this, "drain", async () => {
|
|
84
|
-
for (let bufferIndex = 0; bufferIndex < this.buffer.length; bufferIndex++) {
|
|
85
|
-
try {
|
|
86
|
-
const item = this.buffer[bufferIndex];
|
|
87
|
-
|
|
88
|
-
if (item._type === 'RETURNING_ID') {
|
|
89
|
-
try {
|
|
90
|
-
// Here we want to await the callback result to make sure that it has registered the id returned
|
|
91
|
-
// by the callback before executing the callback needing this id.
|
|
92
|
-
// eslint-disable-next-line no-await-in-loop
|
|
93
|
-
const callbackId = await item.callback();
|
|
94
|
-
this.idTable[item.returnedBufferId] = callbackId;
|
|
95
|
-
} catch (error) {
|
|
96
|
-
_InternalLog.InternalLog.log(`Error running a callback returning an id in Buffer: ${error}`, _SdkVerbosity.SdkVerbosity.WARN);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
continue;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
if (item._type === 'WITH_ID') {
|
|
103
|
-
const callbackId = this.idTable[item.withBufferId]; // callbackId can be `null` if the callback supposed to return the id errored. In this case, let's ignore the next callback.
|
|
104
|
-
|
|
105
|
-
if (callbackId !== null && callbackId !== undefined) {
|
|
106
|
-
item.callback(callbackId);
|
|
107
|
-
delete this.idTable[item.withBufferId];
|
|
108
|
-
} else {
|
|
109
|
-
_InternalLog.InternalLog.log(`1 event was not sent as callback id was ${callbackId === null ? 'not set' : 'already unset'}`, _SdkVerbosity.SdkVerbosity.WARN);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
continue;
|
|
72
|
+
const item = this.buffer[bufferIndex];
|
|
73
|
+
if (item._type === 'RETURNING_ID') {
|
|
74
|
+
try {
|
|
75
|
+
// Here we want to await the callback result to make sure that it has registered the id returned
|
|
76
|
+
// by the callback before executing the callback needing this id.
|
|
77
|
+
// eslint-disable-next-line no-await-in-loop
|
|
78
|
+
const callbackId = await item.callback();
|
|
79
|
+
this.idTable[item.returnedBufferId] = callbackId;
|
|
80
|
+
} catch (error) {
|
|
81
|
+
_InternalLog.InternalLog.log(`Error running a callback returning an id in Buffer: ${error}`, _SdkVerbosity.SdkVerbosity.WARN);
|
|
113
82
|
}
|
|
114
|
-
|
|
115
|
-
item.callback();
|
|
116
|
-
} catch (error) {
|
|
117
|
-
_InternalLog.InternalLog.log(`Error while draining Datadog Buffer: ${error}`, _SdkVerbosity.SdkVerbosity.WARN);
|
|
83
|
+
continue;
|
|
118
84
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
_defineProperty(this, "generateRandomBufferId", () => {
|
|
132
|
-
let tries = 0;
|
|
133
|
-
|
|
134
|
-
while (tries < 20) {
|
|
135
|
-
const hash = Math.random().toString(36).slice(2);
|
|
136
|
-
|
|
137
|
-
if (this.idTable[hash] !== undefined) {
|
|
138
|
-
tries++;
|
|
139
|
-
} else {
|
|
140
|
-
return hash;
|
|
85
|
+
if (item._type === 'WITH_ID') {
|
|
86
|
+
const callbackId = this.idTable[item.withBufferId];
|
|
87
|
+
// callbackId can be `null` if the callback supposed to return the id errored. In this case, let's ignore the next callback.
|
|
88
|
+
if (callbackId !== null && callbackId !== undefined) {
|
|
89
|
+
item.callback(callbackId);
|
|
90
|
+
delete this.idTable[item.withBufferId];
|
|
91
|
+
} else {
|
|
92
|
+
_InternalLog.InternalLog.log(`1 event was not sent as callback id was ${callbackId === null ? 'not set' : 'already unset'}`, _SdkVerbosity.SdkVerbosity.WARN);
|
|
93
|
+
}
|
|
94
|
+
continue;
|
|
141
95
|
}
|
|
96
|
+
item.callback();
|
|
97
|
+
} catch (error) {
|
|
98
|
+
_InternalLog.InternalLog.log(`Error while draining Datadog Buffer: ${error}`, _SdkVerbosity.SdkVerbosity.WARN);
|
|
142
99
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
100
|
+
}
|
|
101
|
+
this.buffer = [];
|
|
102
|
+
this.drainTelemetry();
|
|
103
|
+
};
|
|
104
|
+
logBufferOverflow() {
|
|
105
|
+
this.addTelemetryEvent('Buffer overflow', '', 'BufferOverflow');
|
|
106
|
+
}
|
|
107
|
+
logRandomIdGenerationError = error => {
|
|
108
|
+
this.addTelemetryEvent('Could not generate enough random numbers', (0, _errorUtils.getErrorStackTrace)(error), 'RandomIdGenerationError');
|
|
109
|
+
|
|
110
|
+
// Not using InternalLog here as it is not yet instantiated
|
|
111
|
+
console.warn(`[Datadog] Could not generate enough random numbers for RUM buffer. Please check that Math.random is not overwritten. Math.random returns: ${Math.random()}`);
|
|
112
|
+
};
|
|
113
|
+
generateRandomBufferId = () => {
|
|
114
|
+
let tries = 0;
|
|
115
|
+
while (tries < 20) {
|
|
116
|
+
const hash = Math.random().toString(36).slice(2);
|
|
117
|
+
if (this.idTable[hash] !== undefined) {
|
|
118
|
+
tries++;
|
|
150
119
|
} else {
|
|
151
|
-
|
|
152
|
-
message,
|
|
153
|
-
stack,
|
|
154
|
-
kind,
|
|
155
|
-
occurrences: 1
|
|
156
|
-
};
|
|
120
|
+
return hash;
|
|
157
121
|
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
122
|
+
}
|
|
123
|
+
throw new Error('Could not generate random Buffer id');
|
|
124
|
+
};
|
|
125
|
+
addTelemetryEvent = (message, stack, kind) => {
|
|
126
|
+
if (this.telemetryBuffer[kind]) {
|
|
127
|
+
this.telemetryBuffer[kind].occurrences++;
|
|
128
|
+
} else {
|
|
129
|
+
this.telemetryBuffer[kind] = {
|
|
162
130
|
message,
|
|
163
131
|
stack,
|
|
164
132
|
kind,
|
|
165
|
-
occurrences
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
|
|
133
|
+
occurrences: 1
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
drainTelemetry = () => {
|
|
138
|
+
Object.values(this.telemetryBuffer).forEach(({
|
|
139
|
+
message,
|
|
140
|
+
stack,
|
|
141
|
+
kind,
|
|
142
|
+
occurrences
|
|
143
|
+
}) => {
|
|
144
|
+
_DdSdk.DdSdk.telemetryError(`${message} happened ${occurrences} times.`, stack, kind);
|
|
169
145
|
});
|
|
170
|
-
|
|
171
|
-
this.bufferSize = bufferSize;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
logBufferOverflow() {
|
|
175
|
-
this.addTelemetryEvent('Buffer overflow', '', 'BufferOverflow');
|
|
176
|
-
}
|
|
177
|
-
|
|
146
|
+
};
|
|
178
147
|
}
|
|
179
|
-
|
|
180
148
|
exports.BoundedBuffer = BoundedBuffer;
|
|
181
149
|
//# sourceMappingURL=BoundedBuffer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["BoundedBuffer.ts"],"names":["DEFAULT_BUFFER_SIZE","BoundedBuffer","DatadogBuffer","constructor","bufferSize","callback","buffer","length","push","_type","logBufferOverflow","Promise","resolve","undefined","bufferId","generateRandomBufferId","returnedBufferId","idTable","error","logRandomIdGenerationError","withBufferId","bufferIndex","item","callbackId","InternalLog","log","SdkVerbosity","WARN","drainTelemetry","addTelemetryEvent","console","warn","Math","random","tries","hash","toString","slice","Error","message","stack","kind","telemetryBuffer","occurrences","Object","values","forEach","DdSdk","telemetryError"],"mappings":";;;;;;;AAMA;;AACA;;AACA;;AACA;;AAEA;;;;AAEA,MAAMA,mBAAmB,GAAG,GAA5B;;AAqBO,MAAMC,aAAN,SAA4BC,4BAA5B,CAA0C;AAa7CC,EAAAA,WAAW,CAACC,UAAkB,GAAGJ,mBAAtB,EAA2C;AAClD;;AADkD;;AAAA,oCAXvB,EAWuB;;AAAA,qCAVG,EAUH;;AAAA,6CAFlD,EAEkD;;AAAA,yCAKvCK,QAAD,IAAmC;AAC7C,UAAI,KAAKC,MAAL,CAAYC,MAAZ,GAAqB,KAAKH,UAA9B,EAA0C;AACtC,aAAKE,MAAL,CAAYE,IAAZ,CAAiB;AAAEH,UAAAA,QAAF;AAAYI,UAAAA,KAAK,EAAE;AAAnB,SAAjB;AACH,OAFD,MAEO;AACH,aAAKC,iBAAL;AACH;;AAED,aAAO,IAAIC,OAAJ,CAAkBC,OAAO,IAAIA,OAAO,CAACC,SAAD,CAApC,CAAP;AACH,KAbqD;;AAAA,oDAe5BR,QAAD,IAAqC;AAC1D,UAAI;AACA,cAAMS,QAAQ,GAAG,KAAKC,sBAAL,EAAjB;;AACA,YAAI,KAAKT,MAAL,CAAYC,MAAZ,GAAqB,KAAKH,UAA9B,EAA0C;AACtC,eAAKE,MAAL,CAAYE,IAAZ,CAAiB;AACbH,YAAAA,QADa;AAEbW,YAAAA,gBAAgB,EAAEF,QAFL;AAGbL,YAAAA,KAAK,EAAE;AAHM,WAAjB;AAKA,eAAKQ,OAAL,CAAaH,QAAb,IAAyB,IAAzB;AACH,SAPD,MAOO;AACH,eAAKJ,iBAAL;AACH;;AAED,eAAO,IAAIC,OAAJ,CAAoBC,OAAO,IAAIA,OAAO,CAACE,QAAD,CAAtC,CAAP;AACH,OAdD,CAcE,OAAOI,KAAP,EAAmB;AACjB,aAAKC,0BAAL,CAAgCD,KAAhC;AACA,eA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aAAKD,eAAL,CAAqBD,IAArB,IAA6B;AACzBF,UAAAA,OADyB;AAEzBC,UAAAA,KAFyB;AAGzBC,UAAAA,IAHyB;AAIzBE,UAAAA,WAAW,EAAE;AAJY,SAA7B;AAMH;AACJ,KA5JqD;;AAAA,4CA8J7B,MAAM;AAC3BC,MAAAA,MAAM,CAACC,MAAP,CAAc,KAAKH,eAAnB,EAAoCI,OAApC,CACI,CAAC;AAAEP,QAAAA,OAAF;AAAWC,QAAAA,KAAX;AAAkBC,QAAAA,IAAlB;AAAwBE,QAAAA;AAAxB,OAAD,KAA2C;AACvCI,qBAAMC,cAAN,CACK,GAAET,OAAQ,aAAYI,WAAY,SADvC,EAEIH,KAFJ,EAGIC,IAHJ;AAKH,OAPL;AASH,KAxKqD;;AAElD,SAAKrC,UAAL,GAAkBA,UAAlB;AACH;;AA2GOM,EAAAA,iBAAiB,GAAG;AACxB,SAAKmB,iBAAL,CAAuB,iBAAvB,EAA0C,EAA1C,EAA8C,gBAA9C;AACH;;AA7H4C","sourcesContent":["/*\n * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.\n * This product includes software developed at Datadog (https://www.datadoghq.com/).\n * Copyright 2016-Present Datadog, Inc.\n */\n\nimport { InternalLog } from '../../../InternalLog';\nimport { SdkVerbosity } from '../../../SdkVerbosity';\nimport { DdSdk } from '../../../sdk/DdSdk';\nimport { getErrorStackTrace } from '../../../utils/errorUtils';\n\nimport { DatadogBuffer } from './DatadogBuffer';\n\nconst DEFAULT_BUFFER_SIZE = 100;\n\ntype VoidCallback = {\n callback: () => Promise<void>;\n _type: 'VOID';\n};\n\ntype CallbackReturningId = {\n callback: () => Promise<string>;\n returnedBufferId: string;\n _type: 'RETURNING_ID';\n};\n\ntype CallbackWithId = {\n callback: (id: string) => Promise<void>;\n withBufferId: string;\n _type: 'WITH_ID';\n};\n\ntype BufferItem = VoidCallback | CallbackReturningId | CallbackWithId;\n\nexport class BoundedBuffer extends DatadogBuffer {\n private bufferSize: number;\n private buffer: BufferItem[] = [];\n private idTable: { [bufferId: string]: string | null } = {};\n private telemetryBuffer: {\n [kind: string]: {\n message: string;\n stack: string;\n kind: string;\n occurrences: number;\n };\n } = {};\n\n constructor(bufferSize: number = DEFAULT_BUFFER_SIZE) {\n super();\n this.bufferSize = bufferSize;\n }\n\n addCallback = (callback: () => Promise<void>) => {\n if (this.buffer.length < this.bufferSize) {\n this.buffer.push({ callback, _type: 'VOID' });\n } else {\n this.logBufferOverflow();\n }\n\n return new Promise<void>(resolve => resolve(undefined));\n };\n\n addCallbackReturningId = (callback: () => Promise<string>) => {\n try {\n const bufferId = this.generateRandomBufferId();\n if (this.buffer.length < this.bufferSize) {\n this.buffer.push({\n callback,\n returnedBufferId: bufferId,\n _type: 'RETURNING_ID'\n });\n this.idTable[bufferId] = null;\n } else {\n this.logBufferOverflow();\n }\n\n return new Promise<string>(resolve => resolve(bufferId));\n } catch (error: any) {\n this.logRandomIdGenerationError(error);\n return new Promise<string>(resolve => resolve(''));\n }\n };\n\n addCallbackWithId = (\n callback: (id: string) => Promise<void>,\n bufferId: string\n ) => {\n if (this.idTable[bufferId] !== undefined) {\n this.buffer.push({\n callback,\n withBufferId: bufferId,\n _type: 'WITH_ID'\n });\n } else {\n this.logBufferOverflow();\n }\n\n return new Promise<void>(resolve => resolve(undefined));\n };\n\n drain = async () => {\n for (\n let bufferIndex = 0;\n bufferIndex < this.buffer.length;\n bufferIndex++\n ) {\n try {\n const item = this.buffer[bufferIndex];\n if (item._type === 'RETURNING_ID') {\n try {\n // Here we want to await the callback result to make sure that it has registered the id returned\n // by the callback before executing the callback needing this id.\n // eslint-disable-next-line no-await-in-loop\n const callbackId = await item.callback();\n this.idTable[item.returnedBufferId] = callbackId;\n } catch (error) {\n InternalLog.log(\n `Error running a callback returning an id in Buffer: ${error}`,\n SdkVerbosity.WARN\n );\n }\n continue;\n }\n\n if (item._type === 'WITH_ID') {\n const callbackId = this.idTable[item.withBufferId];\n // callbackId can be `null` if the callback supposed to return the id errored. In this case, let's ignore the next callback.\n if (callbackId !== null && callbackId !== undefined) {\n item.callback(callbackId);\n delete this.idTable[item.withBufferId];\n } else {\n InternalLog.log(\n `1 event was not sent as callback id was ${\n callbackId === null\n ? 'not set'\n : 'already unset'\n }`,\n SdkVerbosity.WARN\n );\n }\n continue;\n }\n\n item.callback();\n } catch (error) {\n InternalLog.log(\n `Error while draining Datadog Buffer: ${error}`,\n SdkVerbosity.WARN\n );\n }\n }\n\n this.buffer = [];\n\n this.drainTelemetry();\n };\n\n private logBufferOverflow() {\n this.addTelemetryEvent('Buffer overflow', '', 'BufferOverflow');\n }\n\n private logRandomIdGenerationError = (error: any): void => {\n this.addTelemetryEvent(\n 'Could not generate enough random numbers',\n getErrorStackTrace(error),\n 'RandomIdGenerationError'\n );\n\n // Not using InternalLog here as it is not yet instantiated\n console.warn(\n `[Datadog] Could not generate enough random numbers for RUM buffer. Please check that Math.random is not overwritten. Math.random returns: ${Math.random()}`\n );\n };\n\n private generateRandomBufferId = (): string => {\n let tries = 0;\n while (tries < 20) {\n const hash = Math.random().toString(36).slice(2);\n if (this.idTable[hash] !== undefined) {\n tries++;\n } else {\n return hash;\n }\n }\n\n throw new Error('Could not generate random Buffer id');\n };\n\n private addTelemetryEvent = (\n message: string,\n stack: string,\n kind: string\n ) => {\n if (this.telemetryBuffer[kind]) {\n this.telemetryBuffer[kind].occurrences++;\n } else {\n this.telemetryBuffer[kind] = {\n message,\n stack,\n kind,\n occurrences: 1\n };\n }\n };\n\n private drainTelemetry = () => {\n Object.values(this.telemetryBuffer).forEach(\n ({ message, stack, kind, occurrences }) => {\n DdSdk.telemetryError(\n `${message} happened ${occurrences} times.`,\n stack,\n kind\n );\n }\n );\n };\n}\n"]}
|
|
1
|
+
{"version":3,"names":["_InternalLog","require","_SdkVerbosity","_DdSdk","_errorUtils","_DatadogBuffer","DEFAULT_BUFFER_SIZE","BoundedBuffer","DatadogBuffer","buffer","idTable","telemetryBuffer","constructor","bufferSize","addCallback","callback","length","push","_type","logBufferOverflow","Promise","resolve","undefined","addCallbackReturningId","bufferId","generateRandomBufferId","returnedBufferId","error","logRandomIdGenerationError","addCallbackWithId","withBufferId","drain","bufferIndex","item","callbackId","InternalLog","log","SdkVerbosity","WARN","drainTelemetry","addTelemetryEvent","getErrorStackTrace","console","warn","Math","random","tries","hash","toString","slice","Error","message","stack","kind","occurrences","Object","values","forEach","DdSdk","telemetryError","exports"],"sourceRoot":"../../../../../src","sources":["sdk/DatadogProvider/Buffer/BoundedBuffer.ts"],"mappings":";;;;;;AAMA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAEA,IAAAI,cAAA,GAAAJ,OAAA;AAXA;AACA;AACA;AACA;AACA;;AASA,MAAMK,mBAAmB,GAAG,GAAG;AAqBxB,MAAMC,aAAa,SAASC,4BAAa,CAAC;EAErCC,MAAM,GAAiB,EAAE;EACzBC,OAAO,GAA0C,CAAC,CAAC;EACnDC,eAAe,GAOnB,CAAC,CAAC;EAENC,WAAWA,CAACC,UAAkB,GAAGP,mBAAmB,EAAE;IAClD,KAAK,CAAC,CAAC;IACP,IAAI,CAACO,UAAU,GAAGA,UAAU;EAChC;EAEAC,WAAW,GAAIC,QAA6B,IAAK;IAC7C,IAAI,IAAI,CAACN,MAAM,CAACO,MAAM,GAAG,IAAI,CAACH,UAAU,EAAE;MACtC,IAAI,CAACJ,MAAM,CAACQ,IAAI,CAAC;QAAEF,QAAQ;QAAEG,KAAK,EAAE;MAAO,CAAC,CAAC;IACjD,CAAC,MAAM;MACH,IAAI,CAACC,iBAAiB,CAAC,CAAC;IAC5B;IAEA,OAAO,IAAIC,OAAO,CAAOC,OAAO,IAAIA,OAAO,CAACC,SAAS,CAAC,CAAC;EAC3D,CAAC;EAEDC,sBAAsB,GAAIR,QAA+B,IAAK;IAC1D,IAAI;MACA,MAAMS,QAAQ,GA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AC;EACL,CAAC;AACL;AAACO,OAAA,CAAArD,aAAA,GAAAA,aAAA","ignoreList":[]}
|
|
@@ -4,29 +4,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.BufferSingleton = void 0;
|
|
7
|
-
|
|
8
7
|
var _BoundedBuffer = require("./BoundedBuffer");
|
|
9
|
-
|
|
10
8
|
var _PassThroughBuffer = require("./PassThroughBuffer");
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
/*
|
|
10
|
+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
11
|
+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
* Copyright 2016-Present Datadog, Inc.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
class BufferSingleton {
|
|
16
|
+
static bufferInstance = new _BoundedBuffer.BoundedBuffer();
|
|
17
|
+
static getInstance = () => {
|
|
18
|
+
return BufferSingleton.bufferInstance;
|
|
19
|
+
};
|
|
20
|
+
static onInitialization = () => {
|
|
21
|
+
BufferSingleton.bufferInstance.drain();
|
|
22
|
+
BufferSingleton.bufferInstance = new _PassThroughBuffer.PassThroughBuffer();
|
|
23
|
+
};
|
|
24
|
+
static reset = () => {
|
|
25
|
+
BufferSingleton.bufferInstance = new _BoundedBuffer.BoundedBuffer();
|
|
26
|
+
};
|
|
27
|
+
}
|
|
16
28
|
exports.BufferSingleton = BufferSingleton;
|
|
17
|
-
|
|
18
|
-
_defineProperty(BufferSingleton, "bufferInstance", new _BoundedBuffer.BoundedBuffer());
|
|
19
|
-
|
|
20
|
-
_defineProperty(BufferSingleton, "getInstance", () => {
|
|
21
|
-
return BufferSingleton.bufferInstance;
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
_defineProperty(BufferSingleton, "onInitialization", () => {
|
|
25
|
-
BufferSingleton.bufferInstance.drain();
|
|
26
|
-
BufferSingleton.bufferInstance = new _PassThroughBuffer.PassThroughBuffer();
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
_defineProperty(BufferSingleton, "reset", () => {
|
|
30
|
-
BufferSingleton.bufferInstance = new _BoundedBuffer.BoundedBuffer();
|
|
31
|
-
});
|
|
32
29
|
//# sourceMappingURL=BufferSingleton.js.map
|