@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
|
@@ -4,253 +4,215 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.DdSdkReactNative = void 0;
|
|
7
|
-
|
|
8
7
|
var _reactNative = require("react-native");
|
|
9
|
-
|
|
10
8
|
var _DdSdkReactNativeConfiguration = require("./DdSdkReactNativeConfiguration");
|
|
11
|
-
|
|
12
9
|
var _InternalLog = require("./InternalLog");
|
|
13
|
-
|
|
14
10
|
var _SdkVerbosity = require("./SdkVerbosity");
|
|
15
|
-
|
|
16
11
|
var _DdLogs = require("./logs/DdLogs");
|
|
17
|
-
|
|
18
12
|
var _DdRum = require("./rum/DdRum");
|
|
19
|
-
|
|
20
13
|
var _DdRumErrorTracking = require("./rum/instrumentation/DdRumErrorTracking");
|
|
21
|
-
|
|
22
14
|
var _DdRumUserInteractionTracking = require("./rum/instrumentation/interactionTracking/DdRumUserInteractionTracking");
|
|
23
|
-
|
|
24
15
|
var _DdRumResourceTracking = require("./rum/instrumentation/resourceTracking/DdRumResourceTracking");
|
|
25
|
-
|
|
26
16
|
var _AttributesSingleton = require("./sdk/AttributesSingleton/AttributesSingleton");
|
|
27
|
-
|
|
28
17
|
var _BufferSingleton = require("./sdk/DatadogProvider/Buffer/BufferSingleton");
|
|
29
|
-
|
|
30
18
|
var _DdSdk = require("./sdk/DdSdk");
|
|
31
|
-
|
|
32
19
|
var _FileBasedConfiguration = require("./sdk/FileBasedConfiguration/FileBasedConfiguration");
|
|
33
|
-
|
|
34
20
|
var _GlobalState = require("./sdk/GlobalState/GlobalState");
|
|
35
|
-
|
|
36
21
|
var _UserInfoSingleton = require("./sdk/UserInfoSingleton/UserInfoSingleton");
|
|
37
|
-
|
|
38
22
|
var _types = require("./types");
|
|
39
|
-
|
|
40
23
|
var _longTasksUtils = require("./utils/longTasksUtils");
|
|
41
|
-
|
|
42
24
|
var _version = require("./version");
|
|
43
|
-
|
|
44
|
-
|
|
25
|
+
/*
|
|
26
|
+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
27
|
+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
28
|
+
* Copyright 2016-Present Datadog, Inc.
|
|
29
|
+
*/
|
|
45
30
|
|
|
46
31
|
/**
|
|
47
32
|
* This class initializes the Datadog SDK, and sets up communication with the server.
|
|
48
33
|
*/
|
|
49
34
|
class DdSdkReactNative {
|
|
35
|
+
static DD_SOURCE_KEY = '_dd.source';
|
|
36
|
+
static DD_SDK_VERSION = '_dd.sdk_version';
|
|
37
|
+
static DD_VERSION = '_dd.version';
|
|
38
|
+
static DD_VERSION_SUFFIX = '_dd.version_suffix';
|
|
39
|
+
static wasAutoInstrumented = false;
|
|
50
40
|
/**
|
|
51
41
|
* Initializes the Datadog SDK.
|
|
52
42
|
* @param configuration the configuration for the SDK library
|
|
53
43
|
* @returns a Promise.
|
|
54
44
|
*/
|
|
45
|
+
static initialize = async configuration => {
|
|
46
|
+
await DdSdkReactNative.initializeNativeSDK(configuration, {
|
|
47
|
+
initializationModeForTelemetry: 'LEGACY'
|
|
48
|
+
});
|
|
49
|
+
DdSdkReactNative.enableFeatures(configuration);
|
|
50
|
+
};
|
|
51
|
+
static initializeNativeSDK = async (configuration, params) => {
|
|
52
|
+
if (_GlobalState.GlobalState.instance.isInitialized) {
|
|
53
|
+
_InternalLog.InternalLog.log("Can't initialize Datadog, SDK was already initialized", _SdkVerbosity.SdkVerbosity.WARN);
|
|
54
|
+
if (!__DEV__) {
|
|
55
|
+
_DdSdk.DdSdk.telemetryDebug('RN SDK was already initialized in javascript');
|
|
56
|
+
}
|
|
57
|
+
return new Promise(resolve => resolve());
|
|
58
|
+
}
|
|
59
|
+
_InternalLog.InternalLog.verbosity = configuration.verbosity;
|
|
60
|
+
await _DdSdk.DdSdk.initialize(DdSdkReactNative.buildConfiguration(configuration, params));
|
|
61
|
+
_InternalLog.InternalLog.log('Datadog SDK was initialized', _SdkVerbosity.SdkVerbosity.INFO);
|
|
62
|
+
_GlobalState.GlobalState.instance.isInitialized = true;
|
|
63
|
+
_BufferSingleton.BufferSingleton.onInitialization();
|
|
64
|
+
};
|
|
55
65
|
|
|
56
66
|
/**
|
|
57
67
|
* FOR INTERNAL USE ONLY.
|
|
58
68
|
*/
|
|
59
69
|
static async _initializeFromDatadogProvider(configuration) {
|
|
60
70
|
DdSdkReactNative.enableFeatures(configuration);
|
|
61
|
-
|
|
62
71
|
if (configuration instanceof _FileBasedConfiguration.FileBasedConfiguration) {
|
|
63
72
|
return DdSdkReactNative.initializeNativeSDK(configuration, {
|
|
64
73
|
initializationModeForTelemetry: 'FILE'
|
|
65
74
|
});
|
|
66
75
|
}
|
|
67
|
-
|
|
68
76
|
if (configuration.initializationMode === _DdSdkReactNativeConfiguration.InitializationMode.SYNC) {
|
|
69
77
|
return DdSdkReactNative.initializeNativeSDK(configuration, {
|
|
70
78
|
initializationModeForTelemetry: 'SYNC'
|
|
71
79
|
});
|
|
72
80
|
}
|
|
73
|
-
|
|
74
81
|
if (configuration.initializationMode === _DdSdkReactNativeConfiguration.InitializationMode.ASYNC) {
|
|
75
82
|
return _reactNative.InteractionManager.runAfterInteractions(() => {
|
|
76
83
|
return DdSdkReactNative.initializeNativeSDK(configuration, {
|
|
77
84
|
initializationModeForTelemetry: 'ASYNC'
|
|
78
85
|
});
|
|
79
86
|
});
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
87
|
+
}
|
|
88
|
+
// TODO: Remove when DdSdkReactNativeConfiguration is deprecated
|
|
83
89
|
if (configuration instanceof _DdSdkReactNativeConfiguration.DdSdkReactNativeConfiguration) {
|
|
84
90
|
return DdSdkReactNative.initializeNativeSDK(configuration, {
|
|
85
91
|
initializationModeForTelemetry: 'SYNC'
|
|
86
92
|
});
|
|
87
93
|
}
|
|
88
94
|
}
|
|
95
|
+
|
|
89
96
|
/**
|
|
90
97
|
* FOR INTERNAL USE ONLY.
|
|
91
98
|
*/
|
|
92
|
-
|
|
93
|
-
|
|
94
99
|
static async _enableFeaturesFromDatadogProvider(features) {
|
|
95
100
|
DdSdkReactNative.features = features;
|
|
96
101
|
DdSdkReactNative.enableFeatures((0, _DdSdkReactNativeConfiguration.addDefaultValuesToAutoInstrumentationConfiguration)(features));
|
|
97
102
|
}
|
|
103
|
+
|
|
98
104
|
/**
|
|
99
105
|
* FOR INTERNAL USE ONLY.
|
|
100
106
|
*/
|
|
107
|
+
static _initializeFromDatadogProviderWithConfigurationAsync = async configuration => {
|
|
108
|
+
if (!DdSdkReactNative.features) {
|
|
109
|
+
_InternalLog.InternalLog.log("Can't initialize Datadog, make sure the DatadogProvider component is mounted before calling this function", _SdkVerbosity.SdkVerbosity.WARN);
|
|
110
|
+
return new Promise(resolve => resolve());
|
|
111
|
+
}
|
|
112
|
+
return DdSdkReactNative.initializeNativeSDK((0, _DdSdkReactNativeConfiguration.buildConfigurationFromPartialConfiguration)(DdSdkReactNative.features, configuration), {
|
|
113
|
+
initializationModeForTelemetry: 'PARTIAL'
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Adds a set of attributes to the global context attached with all future Logs, Spans and RUM events.
|
|
119
|
+
* To remove an attribute, set it to `undefined` in a call to `setAttributes`.
|
|
120
|
+
* @param attributes: The global context attributes.
|
|
121
|
+
* @returns a Promise.
|
|
122
|
+
*/
|
|
123
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
124
|
+
static setAttributes = async attributes => {
|
|
125
|
+
_InternalLog.InternalLog.log(`Setting attributes ${JSON.stringify(attributes)}`, _SdkVerbosity.SdkVerbosity.DEBUG);
|
|
126
|
+
await _DdSdk.DdSdk.setAttributes(attributes);
|
|
127
|
+
_AttributesSingleton.AttributesSingleton.getInstance().setAttributes(attributes);
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Set the user information.
|
|
132
|
+
* @param user: The user object (use builtin attributes: 'id', 'email', 'name', and/or any custom attribute).
|
|
133
|
+
* @returns a Promise.
|
|
134
|
+
*/
|
|
135
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
136
|
+
static setUser = async user => {
|
|
137
|
+
_InternalLog.InternalLog.log(`Setting user ${JSON.stringify(user)}`, _SdkVerbosity.SdkVerbosity.DEBUG);
|
|
138
|
+
await _DdSdk.DdSdk.setUser(user);
|
|
139
|
+
_UserInfoSingleton.UserInfoSingleton.getInstance().setUserInfo(user);
|
|
140
|
+
};
|
|
101
141
|
|
|
142
|
+
/**
|
|
143
|
+
* Set the tracking consent regarding the data collection.
|
|
144
|
+
* @param trackingConsent: One of TrackingConsent values.
|
|
145
|
+
* @returns a Promise.
|
|
146
|
+
*/
|
|
147
|
+
static setTrackingConsent = consent => {
|
|
148
|
+
_InternalLog.InternalLog.log(`Setting consent ${consent}`, _SdkVerbosity.SdkVerbosity.DEBUG);
|
|
149
|
+
return _DdSdk.DdSdk.setTrackingConsent(consent);
|
|
150
|
+
};
|
|
102
151
|
|
|
152
|
+
/**
|
|
153
|
+
* Clears all data that has not already been sent to Datadog servers
|
|
154
|
+
* @returns a Promise
|
|
155
|
+
*/
|
|
156
|
+
static clearAllData = () => {
|
|
157
|
+
_InternalLog.InternalLog.log('Clearing all data', _SdkVerbosity.SdkVerbosity.DEBUG);
|
|
158
|
+
return _DdSdk.DdSdk.clearAllData();
|
|
159
|
+
};
|
|
160
|
+
static buildConfiguration = (configuration, params) => {
|
|
161
|
+
configuration.additionalConfiguration[DdSdkReactNative.DD_SOURCE_KEY] = 'react-native';
|
|
162
|
+
configuration.additionalConfiguration[DdSdkReactNative.DD_SDK_VERSION] = _version.version;
|
|
163
|
+
if (configuration.version) {
|
|
164
|
+
configuration.additionalConfiguration[DdSdkReactNative.DD_VERSION] = `${configuration.version}${configuration.versionSuffix ? `-${configuration.versionSuffix}` : ''}`;
|
|
165
|
+
}
|
|
166
|
+
// If both version and version suffix are provided, we merge them into the version field.
|
|
167
|
+
// To avoid adding it in again the native part, we only set it if the version isn't set.
|
|
168
|
+
if (configuration.versionSuffix && !configuration.version) {
|
|
169
|
+
configuration.additionalConfiguration[DdSdkReactNative.DD_VERSION_SUFFIX] = `-${configuration.versionSuffix}`;
|
|
170
|
+
}
|
|
171
|
+
return new _types.DdSdkConfiguration(configuration.clientToken, configuration.env, configuration.applicationId, configuration.nativeCrashReportEnabled, (0, _longTasksUtils.adaptLongTaskThreshold)(configuration.nativeLongTaskThresholdMs), (0, _longTasksUtils.adaptLongTaskThreshold)(configuration.longTaskThresholdMs), configuration.sampleRate === undefined ? configuration.sessionSamplingRate : configuration.sampleRate, configuration.site, configuration.trackingConsent, configuration.additionalConfiguration, configuration.telemetrySampleRate, configuration.vitalsUpdateFrequency, configuration.uploadFrequency, configuration.batchSize, configuration.trackFrustrations, configuration.trackBackgroundEvents, configuration.customEndpoints, {
|
|
172
|
+
initializationType: params.initializationModeForTelemetry,
|
|
173
|
+
trackErrors: configuration.trackErrors,
|
|
174
|
+
trackInteractions: configuration.trackInteractions,
|
|
175
|
+
trackNetworkRequests: configuration.trackResources,
|
|
176
|
+
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
|
177
|
+
reactNativeVersion: require('react-native/package.json').version,
|
|
178
|
+
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
|
179
|
+
reactVersion: require('react/package.json').version
|
|
180
|
+
}, configuration.nativeViewTracking, configuration.nativeInteractionTracking, configuration.verbosity, configuration.proxyConfig, configuration.serviceName, (0, _DdSdkReactNativeConfiguration.formatFirstPartyHosts)(configuration.firstPartyHosts), configuration.bundleLogsWithRum, configuration.bundleLogsWithTraces);
|
|
181
|
+
};
|
|
103
182
|
static enableFeatures(configuration) {
|
|
104
183
|
if (DdSdkReactNative.wasAutoInstrumented) {
|
|
105
184
|
_InternalLog.InternalLog.log("Can't auto instrument Datadog, SDK was already instrumented", _SdkVerbosity.SdkVerbosity.WARN);
|
|
106
|
-
|
|
107
185
|
return;
|
|
108
186
|
}
|
|
109
|
-
|
|
110
187
|
if (configuration.trackInteractions) {
|
|
111
188
|
_DdRumUserInteractionTracking.DdRumUserInteractionTracking.startTracking({
|
|
112
189
|
actionNameAttribute: configuration.actionNameAttribute,
|
|
113
190
|
useAccessibilityLabel: configuration.useAccessibilityLabel
|
|
114
191
|
});
|
|
115
192
|
}
|
|
116
|
-
|
|
117
193
|
if (configuration.trackResources) {
|
|
118
194
|
_DdRumResourceTracking.DdRumResourceTracking.startTracking({
|
|
119
195
|
tracingSamplingRate: configuration.resourceTracingSamplingRate,
|
|
120
196
|
firstPartyHosts: (0, _DdSdkReactNativeConfiguration.formatFirstPartyHosts)(configuration.firstPartyHosts)
|
|
121
197
|
});
|
|
122
198
|
}
|
|
123
|
-
|
|
124
199
|
if (configuration.trackErrors) {
|
|
125
200
|
_DdRumErrorTracking.DdRumErrorTracking.startTracking();
|
|
126
201
|
}
|
|
127
|
-
|
|
128
202
|
if (configuration.logEventMapper) {
|
|
129
203
|
_DdLogs.DdLogs.registerLogEventMapper(configuration.logEventMapper);
|
|
130
204
|
}
|
|
131
|
-
|
|
132
205
|
if (configuration.errorEventMapper) {
|
|
133
206
|
_DdRum.DdRum.registerErrorEventMapper(configuration.errorEventMapper);
|
|
134
207
|
}
|
|
135
|
-
|
|
136
208
|
if (configuration.resourceEventMapper) {
|
|
137
209
|
_DdRum.DdRum.registerResourceEventMapper(configuration.resourceEventMapper);
|
|
138
210
|
}
|
|
139
|
-
|
|
140
211
|
if (configuration.actionEventMapper) {
|
|
141
212
|
_DdRum.DdRum.registerActionEventMapper(configuration.actionEventMapper);
|
|
142
213
|
}
|
|
143
|
-
|
|
144
214
|
DdSdkReactNative.wasAutoInstrumented = true;
|
|
145
215
|
}
|
|
146
|
-
|
|
147
216
|
}
|
|
148
|
-
|
|
149
217
|
exports.DdSdkReactNative = DdSdkReactNative;
|
|
150
|
-
|
|
151
|
-
_defineProperty(DdSdkReactNative, "DD_SOURCE_KEY", '_dd.source');
|
|
152
|
-
|
|
153
|
-
_defineProperty(DdSdkReactNative, "DD_SDK_VERSION", '_dd.sdk_version');
|
|
154
|
-
|
|
155
|
-
_defineProperty(DdSdkReactNative, "DD_VERSION", '_dd.version');
|
|
156
|
-
|
|
157
|
-
_defineProperty(DdSdkReactNative, "DD_VERSION_SUFFIX", '_dd.version_suffix');
|
|
158
|
-
|
|
159
|
-
_defineProperty(DdSdkReactNative, "wasAutoInstrumented", false);
|
|
160
|
-
|
|
161
|
-
_defineProperty(DdSdkReactNative, "features", void 0);
|
|
162
|
-
|
|
163
|
-
_defineProperty(DdSdkReactNative, "initialize", async configuration => {
|
|
164
|
-
await DdSdkReactNative.initializeNativeSDK(configuration, {
|
|
165
|
-
initializationModeForTelemetry: 'LEGACY'
|
|
166
|
-
});
|
|
167
|
-
DdSdkReactNative.enableFeatures(configuration);
|
|
168
|
-
});
|
|
169
|
-
|
|
170
|
-
_defineProperty(DdSdkReactNative, "initializeNativeSDK", async (configuration, params) => {
|
|
171
|
-
if (_GlobalState.GlobalState.instance.isInitialized) {
|
|
172
|
-
_InternalLog.InternalLog.log("Can't initialize Datadog, SDK was already initialized", _SdkVerbosity.SdkVerbosity.WARN);
|
|
173
|
-
|
|
174
|
-
if (!__DEV__) {
|
|
175
|
-
_DdSdk.DdSdk.telemetryDebug('RN SDK was already initialized in javascript');
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
return new Promise(resolve => resolve());
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
_InternalLog.InternalLog.verbosity = configuration.verbosity;
|
|
182
|
-
await _DdSdk.DdSdk.initialize(DdSdkReactNative.buildConfiguration(configuration, params));
|
|
183
|
-
|
|
184
|
-
_InternalLog.InternalLog.log('Datadog SDK was initialized', _SdkVerbosity.SdkVerbosity.INFO);
|
|
185
|
-
|
|
186
|
-
_GlobalState.GlobalState.instance.isInitialized = true;
|
|
187
|
-
|
|
188
|
-
_BufferSingleton.BufferSingleton.onInitialization();
|
|
189
|
-
});
|
|
190
|
-
|
|
191
|
-
_defineProperty(DdSdkReactNative, "_initializeFromDatadogProviderWithConfigurationAsync", async configuration => {
|
|
192
|
-
if (!DdSdkReactNative.features) {
|
|
193
|
-
_InternalLog.InternalLog.log("Can't initialize Datadog, make sure the DatadogProvider component is mounted before calling this function", _SdkVerbosity.SdkVerbosity.WARN);
|
|
194
|
-
|
|
195
|
-
return new Promise(resolve => resolve());
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
return DdSdkReactNative.initializeNativeSDK((0, _DdSdkReactNativeConfiguration.buildConfigurationFromPartialConfiguration)(DdSdkReactNative.features, configuration), {
|
|
199
|
-
initializationModeForTelemetry: 'PARTIAL'
|
|
200
|
-
});
|
|
201
|
-
});
|
|
202
|
-
|
|
203
|
-
_defineProperty(DdSdkReactNative, "setAttributes", async attributes => {
|
|
204
|
-
_InternalLog.InternalLog.log(`Setting attributes ${JSON.stringify(attributes)}`, _SdkVerbosity.SdkVerbosity.DEBUG);
|
|
205
|
-
|
|
206
|
-
await _DdSdk.DdSdk.setAttributes(attributes);
|
|
207
|
-
|
|
208
|
-
_AttributesSingleton.AttributesSingleton.getInstance().setAttributes(attributes);
|
|
209
|
-
});
|
|
210
|
-
|
|
211
|
-
_defineProperty(DdSdkReactNative, "setUser", async user => {
|
|
212
|
-
_InternalLog.InternalLog.log(`Setting user ${JSON.stringify(user)}`, _SdkVerbosity.SdkVerbosity.DEBUG);
|
|
213
|
-
|
|
214
|
-
await _DdSdk.DdSdk.setUser(user);
|
|
215
|
-
|
|
216
|
-
_UserInfoSingleton.UserInfoSingleton.getInstance().setUserInfo(user);
|
|
217
|
-
});
|
|
218
|
-
|
|
219
|
-
_defineProperty(DdSdkReactNative, "setTrackingConsent", consent => {
|
|
220
|
-
_InternalLog.InternalLog.log(`Setting consent ${consent}`, _SdkVerbosity.SdkVerbosity.DEBUG);
|
|
221
|
-
|
|
222
|
-
return _DdSdk.DdSdk.setTrackingConsent(consent);
|
|
223
|
-
});
|
|
224
|
-
|
|
225
|
-
_defineProperty(DdSdkReactNative, "clearAllData", () => {
|
|
226
|
-
_InternalLog.InternalLog.log('Clearing all data', _SdkVerbosity.SdkVerbosity.DEBUG);
|
|
227
|
-
|
|
228
|
-
return _DdSdk.DdSdk.clearAllData();
|
|
229
|
-
});
|
|
230
|
-
|
|
231
|
-
_defineProperty(DdSdkReactNative, "buildConfiguration", (configuration, params) => {
|
|
232
|
-
configuration.additionalConfiguration[DdSdkReactNative.DD_SOURCE_KEY] = 'react-native';
|
|
233
|
-
configuration.additionalConfiguration[DdSdkReactNative.DD_SDK_VERSION] = _version.version;
|
|
234
|
-
|
|
235
|
-
if (configuration.version) {
|
|
236
|
-
configuration.additionalConfiguration[DdSdkReactNative.DD_VERSION] = `${configuration.version}${configuration.versionSuffix ? `-${configuration.versionSuffix}` : ''}`;
|
|
237
|
-
} // If both version and version suffix are provided, we merge them into the version field.
|
|
238
|
-
// To avoid adding it in again the native part, we only set it if the version isn't set.
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
if (configuration.versionSuffix && !configuration.version) {
|
|
242
|
-
configuration.additionalConfiguration[DdSdkReactNative.DD_VERSION_SUFFIX] = `-${configuration.versionSuffix}`;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
return new _types.DdSdkConfiguration(configuration.clientToken, configuration.env, configuration.applicationId, configuration.nativeCrashReportEnabled, (0, _longTasksUtils.adaptLongTaskThreshold)(configuration.nativeLongTaskThresholdMs), (0, _longTasksUtils.adaptLongTaskThreshold)(configuration.longTaskThresholdMs), configuration.sampleRate === undefined ? configuration.sessionSamplingRate : configuration.sampleRate, configuration.site, configuration.trackingConsent, configuration.additionalConfiguration, configuration.telemetrySampleRate, configuration.vitalsUpdateFrequency, configuration.uploadFrequency, configuration.batchSize, configuration.trackFrustrations, configuration.trackBackgroundEvents, configuration.customEndpoints, {
|
|
246
|
-
initializationType: params.initializationModeForTelemetry,
|
|
247
|
-
trackErrors: configuration.trackErrors,
|
|
248
|
-
trackInteractions: configuration.trackInteractions,
|
|
249
|
-
trackNetworkRequests: configuration.trackResources,
|
|
250
|
-
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
|
251
|
-
reactNativeVersion: require('react-native/package.json').version,
|
|
252
|
-
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
|
253
|
-
reactVersion: require('react/package.json').version
|
|
254
|
-
}, configuration.nativeViewTracking, configuration.nativeInteractionTracking, configuration.verbosity, configuration.proxyConfig, configuration.serviceName, (0, _DdSdkReactNativeConfiguration.formatFirstPartyHosts)(configuration.firstPartyHosts), configuration.bundleLogsWithRum, configuration.bundleLogsWithTraces);
|
|
255
|
-
});
|
|
256
218
|
//# sourceMappingURL=DdSdkReactNative.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DdSdkReactNative.tsx"],"names":["DdSdkReactNative","_initializeFromDatadogProvider","configuration","enableFeatures","FileBasedConfiguration","initializeNativeSDK","initializationModeForTelemetry","initializationMode","InitializationMode","SYNC","ASYNC","InteractionManager","runAfterInteractions","DdSdkReactNativeConfiguration","_enableFeaturesFromDatadogProvider","features","wasAutoInstrumented","InternalLog","log","SdkVerbosity","WARN","trackInteractions","DdRumUserInteractionTracking","startTracking","actionNameAttribute","useAccessibilityLabel","trackResources","DdRumResourceTracking","tracingSamplingRate","resourceTracingSamplingRate","firstPartyHosts","trackErrors","DdRumErrorTracking","logEventMapper","DdLogs","registerLogEventMapper","errorEventMapper","DdRum","registerErrorEventMapper","resourceEventMapper","registerResourceEventMapper","actionEventMapper","registerActionEventMapper","params","GlobalState","instance","isInitialized","__DEV__","DdSdk","telemetryDebug","Promise","resolve","verbosity","initialize","buildConfiguration","INFO","BufferSingleton","onInitialization","attributes","JSON","stringify","DEBUG","setAttributes","AttributesSingleton","getInstance","user","setUser","UserInfoSingleton","setUserInfo","consent","setTrackingConsent","clearAllData","additionalConfiguration","DD_SOURCE_KEY","DD_SDK_VERSION","sdkVersion","version","DD_VERSION","versionSuffix","DD_VERSION_SUFFIX","DdSdkConfiguration","clientToken","env","applicationId","nativeCrashReportEnabled","nativeLongTaskThresholdMs","longTaskThresholdMs","sampleRate","undefined","sessionSamplingRate","site","trackingConsent","telemetrySampleRate","vitalsUpdateFrequency","uploadFrequency","batchSize","trackFrustrations","trackBackgroundEvents","customEndpoints","initializationType","trackNetworkRequests","reactNativeVersion","require","reactVersion","nativeViewTracking","nativeInteractionTracking","proxyConfig","serviceName","bundleLogsWithRum","bundleLogsWithTraces"],"mappings":";;;;;;;AAMA;;AAEA;;AAcA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;;;AAEA;AACA;AACA;AACO,MAAMA,gBAAN,CAAuB;AAS1B;AACJ;AACA;AACA;AACA;;AAuCI;AACJ;AACA;AAC+C,eAA9BC,8BAA8B,CACvCC,aADuC,EAE1B;AACbF,IAAAA,gBAAgB,CAACG,cAAjB,CAAgCD,aAAhC;;AACA,QAAIA,aAAa,YAAYE,8CAA7B,EAAqD;AACjD,aAAOJ,gBAAgB,CAACK,mBAAjB,CAAqCH,aAArC,EAAoD;AACvDI,QAAAA,8BAA8B,EAAE;AADuB,OAApD,CAAP;AAGH;;AACD,QAAIJ,aAAa,CAACK,kBAAd,KAAqCC,kDAAmBC,IAA5D,EAAkE;AAC9D,aAAOT,gBAAgB,CAACK,mBAAjB,CAAqCH,aAArC,EAAoD;AACvDI,QAAAA,8BAA8B,EAAE;AADuB,OAApD,CAAP;AAGH;;AACD,QAAIJ,aAAa,CAACK,kBAAd,KAAqCC,kDAAmBE,KAA5D,EAAmE;AAC/D,aAAOC,gCAAmBC,oBAAnB,CAAwC,MAAM;AACjD,eAAOZ,gBAAgB,CAACK,mBAAjB,CAAqCH,aAArC,EAAoD;AACvDI,UAAAA,8BAA8B,EAAE;AADuB,SAApD,CAAP;AAGH,OAJM,CAAP;AAKH,KAlBY,CAmBb;;;AACA,QAAIJ,aAAa,YAAYW,4DAA7B,EAA4D;A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,kBAAkB,EAAExD,MAAM,CAACrC,8BAD/B;AAEIyB,IAAAA,WAAW,EAAE7B,aAAa,CAAC6B,WAF/B;AAGIV,IAAAA,iBAAiB,EAAEnB,aAAa,CAACmB,iBAHrC;AAII+E,IAAAA,oBAAoB,EAAElG,aAAa,CAACwB,cAJxC;AAKI;AACA2E,IAAAA,kBAAkB,EAAEC,OAAO,CAAC,2BAAD,CAAP,CACf1B,OAPT;AAQI;AACA2B,IAAAA,YAAY,EAAED,OAAO,CAAC,oBAAD,CAAP,CAA8B1B;AAThD,GApBG,EA+BH1E,aAAa,CAACsG,kBA/BX,EAgCHtG,aAAa,CAACuG,yBAhCX,EAiCHvG,aAAa,CAACkD,SAjCX,EAkCHlD,aAAa,CAACwG,WAlCX,EAmCHxG,aAAa,CAACyG,WAnCX,EAoCH,0DAAsBzG,aAAa,CAAC4B,eAApC,CApCG,EAqCH5B,aAAa,CAAC0G,iBArCX,EAsCH1G,aAAa,CAAC2G,oBAtCX,CAAP;AAwCH,C","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 { InteractionManager } from 'react-native';\n\nimport {\n DdSdkReactNativeConfiguration,\n buildConfigurationFromPartialConfiguration,\n addDefaultValuesToAutoInstrumentationConfiguration,\n InitializationMode,\n formatFirstPartyHosts\n} from './DdSdkReactNativeConfiguration';\nimport type {\n AutoInstrumentationParameters,\n DatadogProviderConfiguration,\n PartialInitializationConfiguration,\n AutoInstrumentationConfiguration,\n InitializationModeForTelemetry\n} from './DdSdkReactNativeConfiguration';\nimport { InternalLog } from './InternalLog';\nimport { SdkVerbosity } from './SdkVerbosity';\nimport type { TrackingConsent } from './TrackingConsent';\nimport { DdLogs } from './logs/DdLogs';\nimport { DdRum } from './rum/DdRum';\nimport { DdRumErrorTracking } from './rum/instrumentation/DdRumErrorTracking';\nimport { DdRumUserInteractionTracking } from './rum/instrumentation/interactionTracking/DdRumUserInteractionTracking';\nimport { DdRumResourceTracking } from './rum/instrumentation/resourceTracking/DdRumResourceTracking';\nimport { AttributesSingleton } from './sdk/AttributesSingleton/AttributesSingleton';\nimport type { Attributes } from './sdk/AttributesSingleton/types';\nimport { BufferSingleton } from './sdk/DatadogProvider/Buffer/BufferSingleton';\nimport { DdSdk } from './sdk/DdSdk';\nimport { FileBasedConfiguration } from './sdk/FileBasedConfiguration/FileBasedConfiguration';\nimport { GlobalState } from './sdk/GlobalState/GlobalState';\nimport { UserInfoSingleton } from './sdk/UserInfoSingleton/UserInfoSingleton';\nimport type { UserInfo } from './sdk/UserInfoSingleton/types';\nimport { DdSdkConfiguration } from './types';\nimport { adaptLongTaskThreshold } from './utils/longTasksUtils';\nimport { version as sdkVersion } from './version';\n\n/**\n * This class initializes the Datadog SDK, and sets up communication with the server.\n */\nexport class DdSdkReactNative {\n private static readonly DD_SOURCE_KEY = '_dd.source';\n private static readonly DD_SDK_VERSION = '_dd.sdk_version';\n private static readonly DD_VERSION = '_dd.version';\n private static readonly DD_VERSION_SUFFIX = '_dd.version_suffix';\n\n private static wasAutoInstrumented = false;\n private static features?: AutoInstrumentationConfiguration;\n\n /**\n * Initializes the Datadog SDK.\n * @param configuration the configuration for the SDK library\n * @returns a Promise.\n */\n static initialize = async (\n configuration: DdSdkReactNativeConfiguration\n ): Promise<void> => {\n await DdSdkReactNative.initializeNativeSDK(configuration, {\n initializationModeForTelemetry: 'LEGACY'\n });\n DdSdkReactNative.enableFeatures(configuration);\n };\n\n private static initializeNativeSDK = async (\n configuration: DdSdkReactNativeConfiguration,\n params: {\n initializationModeForTelemetry: InitializationModeForTelemetry;\n }\n ): Promise<void> => {\n if (GlobalState.instance.isInitialized) {\n InternalLog.log(\n \"Can't initialize Datadog, SDK was already initialized\",\n SdkVerbosity.WARN\n );\n if (!__DEV__) {\n DdSdk.telemetryDebug(\n 'RN SDK was already initialized in javascript'\n );\n }\n return new Promise(resolve => resolve());\n }\n\n InternalLog.verbosity = configuration.verbosity;\n\n await DdSdk.initialize(\n DdSdkReactNative.buildConfiguration(configuration, params)\n );\n InternalLog.log('Datadog SDK was initialized', SdkVerbosity.INFO);\n GlobalState.instance.isInitialized = true;\n BufferSingleton.onInitialization();\n };\n\n /**\n * FOR INTERNAL USE ONLY.\n */\n static async _initializeFromDatadogProvider(\n configuration: DatadogProviderConfiguration\n ): Promise<void> {\n DdSdkReactNative.enableFeatures(configuration);\n if (configuration instanceof FileBasedConfiguration) {\n return DdSdkReactNative.initializeNativeSDK(configuration, {\n initializationModeForTelemetry: 'FILE'\n });\n }\n if (configuration.initializationMode === InitializationMode.SYNC) {\n return DdSdkReactNative.initializeNativeSDK(configuration, {\n initializationModeForTelemetry: 'SYNC'\n });\n }\n if (configuration.initializationMode === InitializationMode.ASYNC) {\n return InteractionManager.runAfterInteractions(() => {\n return DdSdkReactNative.initializeNativeSDK(configuration, {\n initializationModeForTelemetry: 'ASYNC'\n });\n });\n }\n // TODO: Remove when DdSdkReactNativeConfiguration is deprecated\n if (configuration instanceof DdSdkReactNativeConfiguration) {\n return DdSdkReactNative.initializeNativeSDK(configuration, {\n initializationModeForTelemetry: 'SYNC'\n });\n }\n }\n\n /**\n * FOR INTERNAL USE ONLY.\n */\n static async _enableFeaturesFromDatadogProvider(\n features: AutoInstrumentationConfiguration\n ): Promise<void> {\n DdSdkReactNative.features = features;\n DdSdkReactNative.enableFeatures(\n addDefaultValuesToAutoInstrumentationConfiguration(features)\n );\n }\n\n /**\n * FOR INTERNAL USE ONLY.\n */\n static _initializeFromDatadogProviderWithConfigurationAsync = async (\n configuration: PartialInitializationConfiguration\n ): Promise<void> => {\n if (!DdSdkReactNative.features) {\n InternalLog.log(\n \"Can't initialize Datadog, make sure the DatadogProvider component is mounted before calling this function\",\n SdkVerbosity.WARN\n );\n return new Promise(resolve => resolve());\n }\n\n return DdSdkReactNative.initializeNativeSDK(\n buildConfigurationFromPartialConfiguration(\n DdSdkReactNative.features,\n configuration\n ),\n { initializationModeForTelemetry: 'PARTIAL' }\n );\n };\n\n /**\n * Adds a set of attributes to the global context attached with all future Logs, Spans and RUM events.\n * To remove an attribute, set it to `undefined` in a call to `setAttributes`.\n * @param attributes: The global context attributes.\n * @returns a Promise.\n */\n // eslint-disable-next-line @typescript-eslint/ban-types\n static setAttributes = async (attributes: Attributes): Promise<void> => {\n InternalLog.log(\n `Setting attributes ${JSON.stringify(attributes)}`,\n SdkVerbosity.DEBUG\n );\n await DdSdk.setAttributes(attributes);\n AttributesSingleton.getInstance().setAttributes(attributes);\n };\n\n /**\n * Set the user information.\n * @param user: The user object (use builtin attributes: 'id', 'email', 'name', and/or any custom attribute).\n * @returns a Promise.\n */\n // eslint-disable-next-line @typescript-eslint/ban-types\n static setUser = async (user: UserInfo): Promise<void> => {\n InternalLog.log(\n `Setting user ${JSON.stringify(user)}`,\n SdkVerbosity.DEBUG\n );\n await DdSdk.setUser(user);\n UserInfoSingleton.getInstance().setUserInfo(user);\n };\n\n /**\n * Set the tracking consent regarding the data collection.\n * @param trackingConsent: One of TrackingConsent values.\n * @returns a Promise.\n */\n static setTrackingConsent = (consent: TrackingConsent): Promise<void> => {\n InternalLog.log(`Setting consent ${consent}`, SdkVerbosity.DEBUG);\n return DdSdk.setTrackingConsent(consent);\n };\n\n /**\n * Clears all data that has not already been sent to Datadog servers\n * @returns a Promise\n */\n static clearAllData = (): Promise<void> => {\n InternalLog.log('Clearing all data', SdkVerbosity.DEBUG);\n return DdSdk.clearAllData();\n };\n\n private static buildConfiguration = (\n configuration: DdSdkReactNativeConfiguration,\n params: {\n initializationModeForTelemetry: InitializationModeForTelemetry;\n }\n ): DdSdkConfiguration => {\n configuration.additionalConfiguration[DdSdkReactNative.DD_SOURCE_KEY] =\n 'react-native';\n configuration.additionalConfiguration[\n DdSdkReactNative.DD_SDK_VERSION\n ] = sdkVersion;\n\n if (configuration.version) {\n configuration.additionalConfiguration[\n DdSdkReactNative.DD_VERSION\n ] = `${configuration.version}${\n configuration.versionSuffix\n ? `-${configuration.versionSuffix}`\n : ''\n }`;\n }\n // If both version and version suffix are provided, we merge them into the version field.\n // To avoid adding it in again the native part, we only set it if the version isn't set.\n if (configuration.versionSuffix && !configuration.version) {\n configuration.additionalConfiguration[\n DdSdkReactNative.DD_VERSION_SUFFIX\n ] = `-${configuration.versionSuffix}`;\n }\n\n return new DdSdkConfiguration(\n configuration.clientToken,\n configuration.env,\n configuration.applicationId,\n configuration.nativeCrashReportEnabled,\n adaptLongTaskThreshold(configuration.nativeLongTaskThresholdMs),\n adaptLongTaskThreshold(configuration.longTaskThresholdMs),\n configuration.sampleRate === undefined\n ? configuration.sessionSamplingRate\n : configuration.sampleRate,\n configuration.site,\n configuration.trackingConsent,\n configuration.additionalConfiguration,\n configuration.telemetrySampleRate,\n configuration.vitalsUpdateFrequency,\n configuration.uploadFrequency,\n configuration.batchSize,\n configuration.trackFrustrations,\n configuration.trackBackgroundEvents,\n configuration.customEndpoints,\n {\n initializationType: params.initializationModeForTelemetry,\n trackErrors: configuration.trackErrors,\n trackInteractions: configuration.trackInteractions,\n trackNetworkRequests: configuration.trackResources,\n // eslint-disable-next-line global-require, @typescript-eslint/no-var-requires\n reactNativeVersion: require('react-native/package.json')\n .version,\n // eslint-disable-next-line global-require, @typescript-eslint/no-var-requires\n reactVersion: require('react/package.json').version\n },\n configuration.nativeViewTracking,\n configuration.nativeInteractionTracking,\n configuration.verbosity,\n configuration.proxyConfig,\n configuration.serviceName,\n formatFirstPartyHosts(configuration.firstPartyHosts),\n configuration.bundleLogsWithRum,\n configuration.bundleLogsWithTraces\n );\n };\n\n private static enableFeatures(\n configuration: AutoInstrumentationParameters\n ) {\n if (DdSdkReactNative.wasAutoInstrumented) {\n InternalLog.log(\n \"Can't auto instrument Datadog, SDK was already instrumented\",\n SdkVerbosity.WARN\n );\n return;\n }\n\n if (configuration.trackInteractions) {\n DdRumUserInteractionTracking.startTracking({\n actionNameAttribute: configuration.actionNameAttribute,\n useAccessibilityLabel: configuration.useAccessibilityLabel\n });\n }\n\n if (configuration.trackResources) {\n DdRumResourceTracking.startTracking({\n tracingSamplingRate: configuration.resourceTracingSamplingRate,\n firstPartyHosts: formatFirstPartyHosts(\n configuration.firstPartyHosts\n )\n });\n }\n\n if (configuration.trackErrors) {\n DdRumErrorTracking.startTracking();\n }\n\n if (configuration.logEventMapper) {\n DdLogs.registerLogEventMapper(configuration.logEventMapper);\n }\n\n if (configuration.errorEventMapper) {\n DdRum.registerErrorEventMapper(configuration.errorEventMapper);\n }\n\n if (configuration.resourceEventMapper) {\n DdRum.registerResourceEventMapper(\n configuration.resourceEventMapper\n );\n }\n\n if (configuration.actionEventMapper) {\n DdRum.registerActionEventMapper(configuration.actionEventMapper);\n }\n\n DdSdkReactNative.wasAutoInstrumented = true;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_DdSdkReactNativeConfiguration","_InternalLog","_SdkVerbosity","_DdLogs","_DdRum","_DdRumErrorTracking","_DdRumUserInteractionTracking","_DdRumResourceTracking","_AttributesSingleton","_BufferSingleton","_DdSdk","_FileBasedConfiguration","_GlobalState","_UserInfoSingleton","_types","_longTasksUtils","_version","DdSdkReactNative","DD_SOURCE_KEY","DD_SDK_VERSION","DD_VERSION","DD_VERSION_SUFFIX","wasAutoInstrumented","initialize","configuration","initializeNativeSDK","initializationModeForTelemetry","enableFeatures","params","GlobalState","instance","isInitialized","InternalLog","log","SdkVerbosity","WARN","__DEV__","DdSdk","telemetryDebug","Promise","resolve","verbosity","buildConfiguration","INFO","BufferSingleton","onInitialization","_initializeFromDatadogProvider","FileBasedConfiguration","initializationMode","InitializationMode","SYNC","ASYNC","InteractionManager","runAfterInteractions","DdSdkReactNativeConfiguration","_enableFeaturesFromDatadogProvider","features","addDefaultValuesToAutoInstrumentationConfiguration","_initializeFromDatadogProviderWithConfigurationAsync","buildConfigurationFromPartialConfiguration","setAttributes","attributes","JSON","stringify","DEBUG","AttributesSingleton","getInstance","setUser","user","UserInfoSingleton","setUserInfo","setTrackingConsent","consent","clearAllData","additionalConfiguration","sdkVersion","version","versionSuffix","DdSdkConfiguration","clientToken","env","applicationId","nativeCrashReportEnabled","adaptLongTaskThreshold","nativeLongTaskThresholdMs","longTaskThresholdMs","sampleRate","undefined","sessionSamplingRate","site","trackingConsent","telemetrySampleRate","vitalsUpdateFrequency","uploadFrequency","batchSize","trackFrustrations","trackBackgroundEvents","customEndpoints","initializationType","trackErrors","trackInteractions","trackNetworkRequests","trackResources","reactNativeVersion","reactVersion","nativeViewTracking","nativeInteractionTracking","proxyConfig","serviceName","formatFirstPartyHosts","firstPartyHosts","bundleLogsWithRum","bundleLogsWithTraces","DdRumUserInteractionTracking","startTracking","actionNameAttribute","useAccessibilityLabel","DdRumResourceTracking","tracingSamplingRate","resourceTracingSamplingRate","DdRumErrorTracking","logEventMapper","DdLogs","registerLogEventMapper","errorEventMapper","DdRum","registerErrorEventMapper","resourceEventMapper","registerResourceEventMapper","actionEventMapper","registerActionEventMapper","exports"],"sourceRoot":"../../src","sources":["DdSdkReactNative.tsx"],"mappings":";;;;;;AAMA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,8BAAA,GAAAD,OAAA;AAcA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AAEA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAN,OAAA;AACA,IAAAO,6BAAA,GAAAP,OAAA;AACA,IAAAQ,sBAAA,GAAAR,OAAA;AACA,IAAAS,oBAAA,GAAAT,OAAA;AAEA,IAAAU,gBAAA,GAAAV,OAAA;AACA,IAAAW,MAAA,GAAAX,OAAA;AACA,IAAAY,uBAAA,GAAAZ,OAAA;AACA,IAAAa,YAAA,GAAAb,OAAA;AACA,IAAAc,kBAAA,GAAAd,OAAA;AAEA,IAAAe,MAAA,GAAAf,OAAA;AACA,IAAAgB,eAAA,GAAAhB,OA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