@datadog/mobile-react-native 2.14.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (674) hide show
  1. package/DatadogSDKReactNative.podspec +6 -6
  2. package/README.md +23 -13
  3. package/android/build.gradle +10 -11
  4. package/android/gradle.properties +1 -1
  5. package/android/src/main/kotlin/com/datadog/reactnative/DatadogSDKWrapper.kt +36 -93
  6. package/android/src/main/kotlin/com/datadog/reactnative/DatadogWrapper.kt +46 -59
  7. package/android/src/main/kotlin/com/datadog/reactnative/DdLogsImplementation.kt +2 -1
  8. package/android/src/main/kotlin/com/datadog/reactnative/DdRumImplementation.kt +98 -0
  9. package/android/src/main/kotlin/com/datadog/reactnative/DdSdkConfiguration.kt +125 -75
  10. package/android/src/main/kotlin/com/datadog/reactnative/DdSdkConfigurationExt.kt +199 -90
  11. package/android/src/main/kotlin/com/datadog/reactnative/DdSdkImplementation.kt +151 -24
  12. package/android/src/main/kotlin/com/datadog/reactnative/DdSdkNativeInitialization.kt +57 -33
  13. package/android/src/main/kotlin/com/datadog/reactnative/DdSdkReactNativePackage.kt +2 -1
  14. package/android/src/main/kotlin/com/datadog/reactnative/DdTelemetry.kt +96 -0
  15. package/android/src/main/kotlin/com/datadog/reactnative/DdTraceImplementation.kt +20 -19
  16. package/android/src/main/kotlin/com/datadog/reactnative/SdkVersion.kt +1 -1
  17. package/android/src/newarch/kotlin/com/datadog/reactnative/DdRum.kt +100 -1
  18. package/android/src/newarch/kotlin/com/datadog/reactnative/DdSdk.kt +68 -14
  19. package/android/src/oldarch/kotlin/com/datadog/reactnative/DdRum.kt +94 -0
  20. package/android/src/oldarch/kotlin/com/datadog/reactnative/DdSdk.kt +70 -11
  21. package/android/src/test/kotlin/com/datadog/reactnative/DdRumTest.kt +58 -0
  22. package/android/src/test/kotlin/com/datadog/reactnative/DdSdkNativeInitializationTest.kt +63 -43
  23. package/android/src/test/kotlin/com/datadog/reactnative/DdSdkTest.kt +2024 -1199
  24. package/android/src/test/kotlin/com/datadog/reactnative/DdTraceTest.kt +44 -40
  25. package/android/src/test/kotlin/com/datadog/tools/unit/DdSdkConfigurationExt.kt +60 -91
  26. package/android/src/test/kotlin/com/datadog/tools/unit/MockRumMonitor.kt +34 -14
  27. package/android/src/test/kotlin/com/datadog/tools/unit/forge/DdSdkConfigurationForgeryFactory.kt +47 -43
  28. package/android/src/test/kotlin/com/datadog/tools/unit/forge/TelemetryConfigurationEventForgeryFactory.kt +0 -1
  29. package/android/src/test/resources/input/complete-configuration.json +32 -28
  30. package/android/src/test/resources/input/malformed-configuration.json +1 -1
  31. package/android/src/test/resources/input/minimal-configuration.json +4 -2
  32. package/datadog-configuration.schema.json +187 -139
  33. package/datadog-sourcemaps.gradle +2 -1
  34. package/ios/Sources/AnyEncodable.swift +14 -7
  35. package/ios/Sources/Attributes.swift +0 -7
  36. package/ios/Sources/DatadogSDKWrapper.swift +12 -128
  37. package/ios/Sources/DdLogsImplementation.swift +9 -39
  38. package/ios/Sources/DdRum.mm +89 -1
  39. package/ios/Sources/DdRumImplementation.swift +79 -0
  40. package/ios/Sources/DdSdk.mm +76 -11
  41. package/ios/Sources/DdSdkConfiguration.swift +159 -117
  42. package/ios/Sources/DdSdkImplementation.swift +235 -82
  43. package/ios/Sources/DdSdkNativeInitialization.swift +116 -80
  44. package/ios/Sources/DdTelemetry.swift +49 -0
  45. package/ios/Sources/GlobalState.swift +1 -1
  46. package/ios/Sources/RNDdSdkConfiguration.swift +334 -172
  47. package/ios/Sources/SdkVersion.swift +1 -1
  48. package/jest/mock.js +43 -4
  49. package/lib/commonjs/DdAttributes.js.map +1 -0
  50. package/lib/commonjs/DdSdkReactNative.js +159 -56
  51. package/lib/commonjs/DdSdkReactNative.js.map +1 -1
  52. package/lib/commonjs/InternalLog.js +1 -1
  53. package/lib/commonjs/config/DatadogProviderConfiguration.js +25 -0
  54. package/lib/commonjs/config/DatadogProviderConfiguration.js.map +1 -0
  55. package/lib/commonjs/config/FileBasedConfiguration.js +349 -0
  56. package/lib/commonjs/config/FileBasedConfiguration.js.map +1 -0
  57. package/lib/commonjs/config/FileBasedConfiguration.type.js +6 -0
  58. package/lib/commonjs/config/FileBasedConfiguration.type.js.map +1 -0
  59. package/lib/commonjs/config/async/AutoInstrumentationConfiguration.js +51 -0
  60. package/lib/commonjs/config/async/AutoInstrumentationConfiguration.js.map +1 -0
  61. package/lib/commonjs/config/async/PartialInitializationConfiguration.js +6 -0
  62. package/lib/commonjs/config/async/PartialInitializationConfiguration.js.map +1 -0
  63. package/lib/commonjs/config/async/asyncInitializationHelper.js +44 -0
  64. package/lib/commonjs/config/async/asyncInitializationHelper.js.map +1 -0
  65. package/lib/commonjs/config/features/CoreConfiguration.js +104 -0
  66. package/lib/commonjs/config/features/CoreConfiguration.js.map +1 -0
  67. package/lib/commonjs/config/features/CoreConfiguration.type.js +6 -0
  68. package/lib/commonjs/config/features/CoreConfiguration.type.js.map +1 -0
  69. package/lib/commonjs/config/features/CoreConfigurationNative.js +38 -0
  70. package/lib/commonjs/config/features/CoreConfigurationNative.js.map +1 -0
  71. package/lib/commonjs/config/features/LogsConfiguration.js +36 -0
  72. package/lib/commonjs/config/features/LogsConfiguration.js.map +1 -0
  73. package/lib/commonjs/config/features/LogsConfiguration.type.js +6 -0
  74. package/lib/commonjs/config/features/LogsConfiguration.type.js.map +1 -0
  75. package/lib/commonjs/config/features/LogsConfigurationNative.js +2 -0
  76. package/lib/commonjs/config/features/LogsConfigurationNative.js.map +1 -0
  77. package/lib/commonjs/config/features/RumConfiguration.js +120 -0
  78. package/lib/commonjs/config/features/RumConfiguration.js.map +1 -0
  79. package/lib/commonjs/config/features/RumConfiguration.type.js +6 -0
  80. package/lib/commonjs/config/features/RumConfiguration.type.js.map +1 -0
  81. package/lib/commonjs/config/features/RumConfigurationNative.js +2 -0
  82. package/lib/commonjs/config/features/RumConfigurationNative.js.map +1 -0
  83. package/lib/commonjs/config/features/TraceConfiguration.js +24 -0
  84. package/lib/commonjs/config/features/TraceConfiguration.js.map +1 -0
  85. package/lib/commonjs/config/features/TraceConfiguration.type.js +2 -0
  86. package/lib/commonjs/config/features/TraceConfiguration.type.js.map +1 -0
  87. package/lib/commonjs/config/features/TraceConfigurationNative.js +2 -0
  88. package/lib/commonjs/config/features/TraceConfigurationNative.js.map +1 -0
  89. package/lib/commonjs/config/types/BatchProcessingLevel.js +30 -0
  90. package/lib/commonjs/config/types/BatchProcessingLevel.js.map +1 -0
  91. package/lib/commonjs/config/types/BatchSize.js +31 -0
  92. package/lib/commonjs/config/types/BatchSize.js.map +1 -0
  93. package/lib/commonjs/config/types/InitializationMode.js +17 -0
  94. package/lib/commonjs/config/types/InitializationMode.js.map +1 -0
  95. package/lib/commonjs/config/types/InitializationModeForTelemetry.js +2 -0
  96. package/lib/commonjs/config/types/InitializationModeForTelemetry.js.map +1 -0
  97. package/lib/commonjs/{ProxyConfiguration.js → config/types/ProxyConfiguration.js} +6 -0
  98. package/lib/commonjs/config/types/ProxyConfiguration.js.map +1 -0
  99. package/lib/commonjs/config/types/SdkVerbosity.js.map +1 -0
  100. package/lib/commonjs/config/types/TrackingConsent.js.map +1 -0
  101. package/lib/commonjs/config/types/UploadFrequency.js +30 -0
  102. package/lib/commonjs/config/types/UploadFrequency.js.map +1 -0
  103. package/lib/commonjs/config/types/VitalsUpdateFrequency.js +19 -0
  104. package/lib/commonjs/config/types/VitalsUpdateFrequency.js.map +1 -0
  105. package/lib/commonjs/config/types/index.js +68 -0
  106. package/lib/commonjs/config/types/index.js.map +1 -0
  107. package/lib/commonjs/index.js +51 -21
  108. package/lib/commonjs/index.js.map +1 -1
  109. package/lib/commonjs/logs/DdLogs.js +13 -9
  110. package/lib/commonjs/logs/DdLogs.js.map +1 -1
  111. package/lib/commonjs/logs/eventMapper.js +4 -1
  112. package/lib/commonjs/logs/eventMapper.js.map +1 -1
  113. package/lib/commonjs/metro/plugin/metroSerializer.js.map +1 -1
  114. package/lib/commonjs/nativeModulesTypes.js +0 -45
  115. package/lib/commonjs/nativeModulesTypes.js.map +1 -1
  116. package/lib/commonjs/rum/DdRum.js +56 -28
  117. package/lib/commonjs/rum/DdRum.js.map +1 -1
  118. package/lib/commonjs/rum/helper.js +63 -0
  119. package/lib/commonjs/rum/helper.js.map +1 -0
  120. package/lib/commonjs/rum/instrumentation/DdRumErrorTracking.js +14 -18
  121. package/lib/commonjs/rum/instrumentation/DdRumErrorTracking.js.map +1 -1
  122. package/lib/commonjs/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js +16 -27
  123. package/lib/commonjs/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js.map +1 -1
  124. package/lib/commonjs/rum/instrumentation/interactionTracking/DdEventsInterceptor.js +1 -1
  125. package/lib/commonjs/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js +15 -5
  126. package/lib/commonjs/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js.map +1 -1
  127. package/lib/commonjs/rum/instrumentation/resourceTracking/DdRumResourceTracking.js +34 -22
  128. package/lib/commonjs/rum/instrumentation/resourceTracking/DdRumResourceTracking.js.map +1 -1
  129. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.js +21 -1
  130. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.js.map +1 -1
  131. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js +16 -3
  132. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js.map +1 -1
  133. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js +10 -12
  134. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js.map +1 -1
  135. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.js +6 -0
  136. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.js.map +1 -0
  137. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js +41 -47
  138. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js.map +1 -1
  139. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.js +62 -0
  140. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.js.map +1 -0
  141. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js +1 -1
  142. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/headers.js +36 -0
  143. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/headers.js.map +1 -0
  144. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js +1 -1
  145. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js +19 -8
  146. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js.map +1 -1
  147. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js +90 -48
  148. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js.map +1 -1
  149. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js +1 -1
  150. package/lib/commonjs/rum/types.js +1 -9
  151. package/lib/commonjs/rum/types.js.map +1 -1
  152. package/lib/commonjs/sdk/AccountInfoSingleton/AccountInfoSingleton.js +46 -0
  153. package/lib/commonjs/sdk/AccountInfoSingleton/AccountInfoSingleton.js.map +1 -0
  154. package/lib/commonjs/sdk/AccountInfoSingleton/types.js +2 -0
  155. package/lib/commonjs/sdk/AccountInfoSingleton/types.js.map +1 -0
  156. package/lib/commonjs/sdk/AttributesEncoding/attributesEncoding.js +51 -0
  157. package/lib/commonjs/sdk/AttributesEncoding/attributesEncoding.js.map +1 -0
  158. package/lib/commonjs/sdk/AttributesEncoding/defaultEncoders.js +140 -0
  159. package/lib/commonjs/sdk/AttributesEncoding/defaultEncoders.js.map +1 -0
  160. package/lib/commonjs/{utils → sdk/AttributesEncoding}/errorUtils.js +39 -22
  161. package/lib/commonjs/sdk/AttributesEncoding/errorUtils.js.map +1 -0
  162. package/lib/commonjs/sdk/AttributesEncoding/helpers.js +123 -0
  163. package/lib/commonjs/sdk/AttributesEncoding/helpers.js.map +1 -0
  164. package/lib/commonjs/sdk/AttributesEncoding/types.js +2 -0
  165. package/lib/commonjs/sdk/AttributesEncoding/types.js.map +1 -0
  166. package/lib/commonjs/sdk/AttributesEncoding/utils.js +36 -0
  167. package/lib/commonjs/sdk/AttributesEncoding/utils.js.map +1 -0
  168. package/lib/commonjs/sdk/AttributesSingleton/AttributesSingleton.js +27 -1
  169. package/lib/commonjs/sdk/AttributesSingleton/AttributesSingleton.js.map +1 -1
  170. package/lib/commonjs/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.js +3 -3
  171. package/lib/commonjs/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.js.map +1 -1
  172. package/lib/commonjs/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.js +1 -1
  173. package/lib/commonjs/sdk/DatadogProvider/Buffer/BoundedBuffer.js +4 -4
  174. package/lib/commonjs/sdk/DatadogProvider/Buffer/BoundedBuffer.js.map +1 -1
  175. package/lib/commonjs/sdk/DatadogProvider/DatadogProvider.js +10 -9
  176. package/lib/commonjs/sdk/DatadogProvider/DatadogProvider.js.map +1 -1
  177. package/lib/commonjs/sdk/DatadogProvider/DatadogProviderState.js +28 -0
  178. package/lib/commonjs/sdk/DatadogProvider/DatadogProviderState.js.map +1 -0
  179. package/lib/commonjs/sdk/DdSdk.js +4 -2
  180. package/lib/commonjs/sdk/DdSdk.js.map +1 -1
  181. package/lib/commonjs/sdk/DdSdkInternal.js +86 -0
  182. package/lib/commonjs/sdk/DdSdkInternal.js.map +1 -0
  183. package/lib/commonjs/sdk/EventMappers/EventMapper.js +6 -3
  184. package/lib/commonjs/sdk/EventMappers/EventMapper.js.map +1 -1
  185. package/lib/commonjs/sdk/GlobalState/GlobalState.js +5 -11
  186. package/lib/commonjs/sdk/GlobalState/GlobalState.js.map +1 -1
  187. package/lib/commonjs/sdk/UserInfoSingleton/UserInfoSingleton.js +6 -1
  188. package/lib/commonjs/sdk/UserInfoSingleton/UserInfoSingleton.js.map +1 -1
  189. package/lib/commonjs/specs/NativeDdRum.js.map +1 -1
  190. package/lib/commonjs/specs/NativeDdSdk.js.map +1 -1
  191. package/lib/commonjs/trace/DdTrace.js +7 -5
  192. package/lib/commonjs/trace/DdTrace.js.map +1 -1
  193. package/lib/commonjs/types.js +19 -46
  194. package/lib/commonjs/types.js.map +1 -1
  195. package/lib/commonjs/utils/longTasksUtils.js.map +1 -1
  196. package/lib/commonjs/utils/singletonUtils.js +21 -0
  197. package/lib/commonjs/utils/singletonUtils.js.map +1 -0
  198. package/lib/commonjs/version.js +1 -1
  199. package/lib/commonjs/version.js.map +1 -1
  200. package/lib/module/DdAttributes.js.map +1 -0
  201. package/lib/module/DdSdkReactNative.js +155 -52
  202. package/lib/module/DdSdkReactNative.js.map +1 -1
  203. package/lib/module/InternalLog.js +1 -1
  204. package/lib/module/InternalLog.js.map +1 -1
  205. package/lib/module/config/DatadogProviderConfiguration.js +18 -0
  206. package/lib/module/config/DatadogProviderConfiguration.js.map +1 -0
  207. package/lib/module/config/FileBasedConfiguration.js +341 -0
  208. package/lib/module/config/FileBasedConfiguration.js.map +1 -0
  209. package/lib/module/config/FileBasedConfiguration.type.js +2 -0
  210. package/lib/module/config/FileBasedConfiguration.type.js.map +1 -0
  211. package/lib/module/config/async/AutoInstrumentationConfiguration.js +45 -0
  212. package/lib/module/config/async/AutoInstrumentationConfiguration.js.map +1 -0
  213. package/lib/module/config/async/PartialInitializationConfiguration.js +2 -0
  214. package/lib/module/config/async/PartialInitializationConfiguration.js.map +1 -0
  215. package/lib/module/config/async/asyncInitializationHelper.js +36 -0
  216. package/lib/module/config/async/asyncInitializationHelper.js.map +1 -0
  217. package/lib/module/config/features/CoreConfiguration.js +98 -0
  218. package/lib/module/config/features/CoreConfiguration.js.map +1 -0
  219. package/lib/module/config/features/CoreConfiguration.type.js +2 -0
  220. package/lib/module/config/features/CoreConfiguration.type.js.map +1 -0
  221. package/lib/module/config/features/CoreConfigurationNative.js +31 -0
  222. package/lib/module/config/features/CoreConfigurationNative.js.map +1 -0
  223. package/lib/module/config/features/LogsConfiguration.js +30 -0
  224. package/lib/module/config/features/LogsConfiguration.js.map +1 -0
  225. package/lib/module/config/features/LogsConfiguration.type.js +2 -0
  226. package/lib/module/config/features/LogsConfiguration.type.js.map +1 -0
  227. package/lib/module/config/features/LogsConfigurationNative.js +2 -0
  228. package/lib/module/config/features/LogsConfigurationNative.js.map +1 -0
  229. package/lib/module/config/features/RumConfiguration.js +114 -0
  230. package/lib/module/config/features/RumConfiguration.js.map +1 -0
  231. package/lib/module/config/features/RumConfiguration.type.js +2 -0
  232. package/lib/module/config/features/RumConfiguration.type.js.map +1 -0
  233. package/lib/module/config/features/RumConfigurationNative.js +2 -0
  234. package/lib/module/config/features/RumConfigurationNative.js.map +1 -0
  235. package/lib/module/config/features/TraceConfiguration.js +18 -0
  236. package/lib/module/config/features/TraceConfiguration.js.map +1 -0
  237. package/lib/module/config/features/TraceConfiguration.type.js +2 -0
  238. package/lib/module/config/features/TraceConfiguration.type.js.map +1 -0
  239. package/lib/module/config/features/TraceConfigurationNative.js +2 -0
  240. package/lib/module/config/features/TraceConfigurationNative.js.map +1 -0
  241. package/lib/module/config/types/BatchProcessingLevel.js +25 -0
  242. package/lib/module/config/types/BatchProcessingLevel.js.map +1 -0
  243. package/lib/module/config/types/BatchSize.js +26 -0
  244. package/lib/module/config/types/BatchSize.js.map +1 -0
  245. package/lib/module/config/types/InitializationMode.js +11 -0
  246. package/lib/module/config/types/InitializationMode.js.map +1 -0
  247. package/lib/module/config/types/InitializationModeForTelemetry.js +2 -0
  248. package/lib/module/config/types/InitializationModeForTelemetry.js.map +1 -0
  249. package/lib/module/{ProxyConfiguration.js → config/types/ProxyConfiguration.js} +6 -0
  250. package/lib/module/config/types/ProxyConfiguration.js.map +1 -0
  251. package/lib/module/config/types/SdkVerbosity.js.map +1 -0
  252. package/lib/module/config/types/TrackingConsent.js.map +1 -0
  253. package/lib/module/config/types/UploadFrequency.js +25 -0
  254. package/lib/module/config/types/UploadFrequency.js.map +1 -0
  255. package/lib/module/config/types/VitalsUpdateFrequency.js +13 -0
  256. package/lib/module/config/types/VitalsUpdateFrequency.js.map +1 -0
  257. package/lib/module/config/types/index.js +15 -0
  258. package/lib/module/config/types/index.js.map +1 -0
  259. package/lib/module/index.js +13 -7
  260. package/lib/module/index.js.map +1 -1
  261. package/lib/module/logs/DdLogs.js +13 -9
  262. package/lib/module/logs/DdLogs.js.map +1 -1
  263. package/lib/module/logs/eventMapper.js +4 -1
  264. package/lib/module/logs/eventMapper.js.map +1 -1
  265. package/lib/module/metro/plugin/metroSerializer.js.map +1 -1
  266. package/lib/module/nativeModulesTypes.js +1 -43
  267. package/lib/module/nativeModulesTypes.js.map +1 -1
  268. package/lib/module/rum/DdRum.js +54 -26
  269. package/lib/module/rum/DdRum.js.map +1 -1
  270. package/lib/module/rum/helper.js +49 -0
  271. package/lib/module/rum/helper.js.map +1 -0
  272. package/lib/module/rum/instrumentation/DdRumErrorTracking.js +14 -18
  273. package/lib/module/rum/instrumentation/DdRumErrorTracking.js.map +1 -1
  274. package/lib/module/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js +16 -26
  275. package/lib/module/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js.map +1 -1
  276. package/lib/module/rum/instrumentation/interactionTracking/DdEventsInterceptor.js +1 -1
  277. package/lib/module/rum/instrumentation/interactionTracking/DdEventsInterceptor.js.map +1 -1
  278. package/lib/module/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js +15 -5
  279. package/lib/module/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js.map +1 -1
  280. package/lib/module/rum/instrumentation/resourceTracking/DdRumResourceTracking.js +33 -21
  281. package/lib/module/rum/instrumentation/resourceTracking/DdRumResourceTracking.js.map +1 -1
  282. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.js +22 -1
  283. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.js.map +1 -1
  284. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js +13 -2
  285. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js.map +1 -1
  286. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js +10 -11
  287. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js.map +1 -1
  288. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.js +2 -0
  289. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.js.map +1 -0
  290. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js +27 -33
  291. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js.map +1 -1
  292. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.js +54 -0
  293. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.js.map +1 -0
  294. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js +1 -1
  295. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js.map +1 -1
  296. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/headers.js +30 -0
  297. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/headers.js.map +1 -0
  298. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js +1 -1
  299. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js.map +1 -1
  300. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js +14 -3
  301. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js.map +1 -1
  302. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js +90 -48
  303. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js.map +1 -1
  304. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js +1 -1
  305. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js.map +1 -1
  306. package/lib/module/rum/types.js +0 -9
  307. package/lib/module/rum/types.js.map +1 -1
  308. package/lib/module/sdk/AccountInfoSingleton/AccountInfoSingleton.js +39 -0
  309. package/lib/module/sdk/AccountInfoSingleton/AccountInfoSingleton.js.map +1 -0
  310. package/lib/module/sdk/AccountInfoSingleton/types.js +2 -0
  311. package/lib/module/sdk/AccountInfoSingleton/types.js.map +1 -0
  312. package/lib/module/sdk/AttributesEncoding/attributesEncoding.js +46 -0
  313. package/lib/module/sdk/AttributesEncoding/attributesEncoding.js.map +1 -0
  314. package/lib/module/sdk/AttributesEncoding/defaultEncoders.js +134 -0
  315. package/lib/module/sdk/AttributesEncoding/defaultEncoders.js.map +1 -0
  316. package/lib/module/{utils → sdk/AttributesEncoding}/errorUtils.js +37 -20
  317. package/lib/module/sdk/AttributesEncoding/errorUtils.js.map +1 -0
  318. package/lib/module/sdk/AttributesEncoding/helpers.js +115 -0
  319. package/lib/module/sdk/AttributesEncoding/helpers.js.map +1 -0
  320. package/lib/module/sdk/AttributesEncoding/types.js +2 -0
  321. package/lib/module/sdk/AttributesEncoding/types.js.map +1 -0
  322. package/lib/module/sdk/AttributesEncoding/utils.js +28 -0
  323. package/lib/module/sdk/AttributesEncoding/utils.js.map +1 -0
  324. package/lib/module/sdk/AttributesSingleton/AttributesSingleton.js +27 -1
  325. package/lib/module/sdk/AttributesSingleton/AttributesSingleton.js.map +1 -1
  326. package/lib/module/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.js +2 -2
  327. package/lib/module/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.js.map +1 -1
  328. package/lib/module/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.js +1 -1
  329. package/lib/module/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.js.map +1 -1
  330. package/lib/module/sdk/DatadogProvider/Buffer/BoundedBuffer.js +4 -4
  331. package/lib/module/sdk/DatadogProvider/Buffer/BoundedBuffer.js.map +1 -1
  332. package/lib/module/sdk/DatadogProvider/DatadogProvider.js +9 -8
  333. package/lib/module/sdk/DatadogProvider/DatadogProvider.js.map +1 -1
  334. package/lib/module/sdk/DatadogProvider/DatadogProviderState.js +21 -0
  335. package/lib/module/sdk/DatadogProvider/DatadogProviderState.js.map +1 -0
  336. package/lib/module/sdk/DdSdk.js +4 -4
  337. package/lib/module/sdk/DdSdk.js.map +1 -1
  338. package/lib/module/sdk/DdSdkInternal.js +80 -0
  339. package/lib/module/sdk/DdSdkInternal.js.map +1 -0
  340. package/lib/module/sdk/EventMappers/EventMapper.js +6 -3
  341. package/lib/module/sdk/EventMappers/EventMapper.js.map +1 -1
  342. package/lib/module/sdk/GlobalState/GlobalState.js +5 -10
  343. package/lib/module/sdk/GlobalState/GlobalState.js.map +1 -1
  344. package/lib/module/sdk/UserInfoSingleton/UserInfoSingleton.js +6 -1
  345. package/lib/module/sdk/UserInfoSingleton/UserInfoSingleton.js.map +1 -1
  346. package/lib/module/specs/NativeDdRum.js.map +1 -1
  347. package/lib/module/specs/NativeDdSdk.js.map +1 -1
  348. package/lib/module/trace/DdTrace.js +7 -6
  349. package/lib/module/trace/DdTrace.js.map +1 -1
  350. package/lib/module/types.js +22 -42
  351. package/lib/module/types.js.map +1 -1
  352. package/lib/module/utils/longTasksUtils.js.map +1 -1
  353. package/lib/module/utils/singletonUtils.js +14 -0
  354. package/lib/module/utils/singletonUtils.js.map +1 -0
  355. package/lib/module/version.js +1 -1
  356. package/lib/module/version.js.map +1 -1
  357. package/lib/typescript/DdAttributes.d.ts.map +1 -0
  358. package/lib/typescript/DdSdkReactNative.d.ts +49 -12
  359. package/lib/typescript/DdSdkReactNative.d.ts.map +1 -1
  360. package/lib/typescript/InternalLog.d.ts +1 -1
  361. package/lib/typescript/InternalLog.d.ts.map +1 -1
  362. package/lib/typescript/config/DatadogProviderConfiguration.d.ts +12 -0
  363. package/lib/typescript/config/DatadogProviderConfiguration.d.ts.map +1 -0
  364. package/lib/typescript/config/FileBasedConfiguration.d.ts +17 -0
  365. package/lib/typescript/config/FileBasedConfiguration.d.ts.map +1 -0
  366. package/lib/typescript/config/FileBasedConfiguration.type.d.ts +52 -0
  367. package/lib/typescript/config/FileBasedConfiguration.type.d.ts.map +1 -0
  368. package/lib/typescript/config/async/AutoInstrumentationConfiguration.d.ts +60 -0
  369. package/lib/typescript/config/async/AutoInstrumentationConfiguration.d.ts.map +1 -0
  370. package/lib/typescript/config/async/PartialInitializationConfiguration.d.ts +47 -0
  371. package/lib/typescript/config/async/PartialInitializationConfiguration.d.ts.map +1 -0
  372. package/lib/typescript/config/async/asyncInitializationHelper.d.ts +5 -0
  373. package/lib/typescript/config/async/asyncInitializationHelper.d.ts.map +1 -0
  374. package/lib/typescript/config/features/CoreConfiguration.d.ts +52 -0
  375. package/lib/typescript/config/features/CoreConfiguration.d.ts.map +1 -0
  376. package/lib/typescript/config/features/CoreConfiguration.type.d.ts +90 -0
  377. package/lib/typescript/config/features/CoreConfiguration.type.d.ts.map +1 -0
  378. package/lib/typescript/config/features/CoreConfigurationNative.d.ts +54 -0
  379. package/lib/typescript/config/features/CoreConfigurationNative.d.ts.map +1 -0
  380. package/lib/typescript/config/features/LogsConfiguration.d.ts +17 -0
  381. package/lib/typescript/config/features/LogsConfiguration.d.ts.map +1 -0
  382. package/lib/typescript/config/features/LogsConfiguration.type.d.ts +24 -0
  383. package/lib/typescript/config/features/LogsConfiguration.type.d.ts.map +1 -0
  384. package/lib/typescript/config/features/LogsConfigurationNative.d.ts +6 -0
  385. package/lib/typescript/config/features/LogsConfigurationNative.d.ts.map +1 -0
  386. package/lib/typescript/config/features/RumConfiguration.d.ts +66 -0
  387. package/lib/typescript/config/features/RumConfiguration.d.ts.map +1 -0
  388. package/lib/typescript/config/features/RumConfiguration.type.d.ts +131 -0
  389. package/lib/typescript/config/features/RumConfiguration.type.d.ts.map +1 -0
  390. package/lib/typescript/config/features/RumConfigurationNative.d.ts +25 -0
  391. package/lib/typescript/config/features/RumConfigurationNative.d.ts.map +1 -0
  392. package/lib/typescript/config/features/TraceConfiguration.d.ts +10 -0
  393. package/lib/typescript/config/features/TraceConfiguration.d.ts.map +1 -0
  394. package/lib/typescript/config/features/TraceConfiguration.type.d.ts +11 -0
  395. package/lib/typescript/config/features/TraceConfiguration.type.d.ts.map +1 -0
  396. package/lib/typescript/config/features/TraceConfigurationNative.d.ts +4 -0
  397. package/lib/typescript/config/features/TraceConfigurationNative.d.ts.map +1 -0
  398. package/lib/typescript/config/types/BatchProcessingLevel.d.ts +18 -0
  399. package/lib/typescript/config/types/BatchProcessingLevel.d.ts.map +1 -0
  400. package/lib/typescript/config/types/BatchSize.d.ts +19 -0
  401. package/lib/typescript/config/types/BatchSize.d.ts.map +1 -0
  402. package/lib/typescript/config/types/InitializationMode.d.ts +5 -0
  403. package/lib/typescript/config/types/InitializationMode.d.ts.map +1 -0
  404. package/lib/typescript/config/types/InitializationModeForTelemetry.d.ts +2 -0
  405. package/lib/typescript/config/types/InitializationModeForTelemetry.d.ts.map +1 -0
  406. package/lib/typescript/config/types/ProxyConfiguration.d.ts.map +1 -0
  407. package/lib/typescript/config/types/SdkVerbosity.d.ts.map +1 -0
  408. package/lib/typescript/config/types/TrackingConsent.d.ts.map +1 -0
  409. package/lib/typescript/config/types/UploadFrequency.d.ts +18 -0
  410. package/lib/typescript/config/types/UploadFrequency.d.ts.map +1 -0
  411. package/lib/typescript/config/types/VitalsUpdateFrequency.d.ts +7 -0
  412. package/lib/typescript/config/types/VitalsUpdateFrequency.d.ts.map +1 -0
  413. package/lib/typescript/config/types/index.d.ts +10 -0
  414. package/lib/typescript/config/types/index.d.ts.map +1 -0
  415. package/lib/typescript/index.d.ts +20 -9
  416. package/lib/typescript/index.d.ts.map +1 -1
  417. package/lib/typescript/logs/DdLogs.d.ts +2 -1
  418. package/lib/typescript/logs/DdLogs.d.ts.map +1 -1
  419. package/lib/typescript/logs/eventMapper.d.ts +3 -2
  420. package/lib/typescript/logs/eventMapper.d.ts.map +1 -1
  421. package/lib/typescript/logs/types.d.ts +1 -16
  422. package/lib/typescript/logs/types.d.ts.map +1 -1
  423. package/lib/typescript/nativeModulesTypes.d.ts +2 -15
  424. package/lib/typescript/nativeModulesTypes.d.ts.map +1 -1
  425. package/lib/typescript/rum/DdRum.d.ts +10 -1
  426. package/lib/typescript/rum/DdRum.d.ts.map +1 -1
  427. package/lib/typescript/rum/eventMappers/errorEventMapper.d.ts +1 -1
  428. package/lib/typescript/rum/eventMappers/errorEventMapper.d.ts.map +1 -1
  429. package/lib/typescript/rum/helper.d.ts +10 -0
  430. package/lib/typescript/rum/helper.d.ts.map +1 -0
  431. package/lib/typescript/rum/instrumentation/DdRumErrorTracking.d.ts.map +1 -1
  432. package/lib/typescript/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.d.ts +6 -6
  433. package/lib/typescript/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.d.ts.map +1 -1
  434. package/lib/typescript/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.d.ts +7 -0
  435. package/lib/typescript/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.d.ts.map +1 -1
  436. package/lib/typescript/rum/instrumentation/resourceTracking/DdRumResourceTracking.d.ts +12 -6
  437. package/lib/typescript/rum/instrumentation/resourceTracking/DdRumResourceTracking.d.ts.map +1 -1
  438. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.d.ts +1 -0
  439. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.d.ts.map +1 -1
  440. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.d.ts +8 -0
  441. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.d.ts.map +1 -1
  442. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.d.ts +5 -17
  443. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.d.ts.map +1 -1
  444. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.d.ts +20 -0
  445. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.d.ts.map +1 -0
  446. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.d.ts +3 -24
  447. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.d.ts.map +1 -1
  448. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.d.ts +12 -0
  449. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.d.ts.map +1 -0
  450. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/headers.d.ts +24 -0
  451. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/headers.d.ts.map +1 -0
  452. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.d.ts +2 -1
  453. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.d.ts.map +1 -1
  454. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.d.ts.map +1 -1
  455. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.d.ts +1 -1
  456. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.d.ts.map +1 -1
  457. package/lib/typescript/rum/types.d.ts +47 -7
  458. package/lib/typescript/rum/types.d.ts.map +1 -1
  459. package/lib/typescript/sdk/AccountInfoSingleton/AccountInfoSingleton.d.ts +15 -0
  460. package/lib/typescript/sdk/AccountInfoSingleton/AccountInfoSingleton.d.ts.map +1 -0
  461. package/lib/typescript/sdk/AccountInfoSingleton/types.d.ts +6 -0
  462. package/lib/typescript/sdk/AccountInfoSingleton/types.d.ts.map +1 -0
  463. package/lib/typescript/sdk/AttributesEncoding/attributesEncoding.d.ts +13 -0
  464. package/lib/typescript/sdk/AttributesEncoding/attributesEncoding.d.ts.map +1 -0
  465. package/lib/typescript/sdk/AttributesEncoding/defaultEncoders.d.ts +33 -0
  466. package/lib/typescript/sdk/AttributesEncoding/defaultEncoders.d.ts.map +1 -0
  467. package/lib/typescript/{utils → sdk/AttributesEncoding}/errorUtils.d.ts +4 -4
  468. package/lib/typescript/sdk/AttributesEncoding/errorUtils.d.ts.map +1 -0
  469. package/lib/typescript/sdk/AttributesEncoding/helpers.d.ts +17 -0
  470. package/lib/typescript/sdk/AttributesEncoding/helpers.d.ts.map +1 -0
  471. package/lib/typescript/sdk/AttributesEncoding/types.d.ts +21 -0
  472. package/lib/typescript/sdk/AttributesEncoding/types.d.ts.map +1 -0
  473. package/lib/typescript/sdk/AttributesEncoding/utils.d.ts +7 -0
  474. package/lib/typescript/sdk/AttributesEncoding/utils.d.ts.map +1 -0
  475. package/lib/typescript/sdk/AttributesSingleton/AttributesSingleton.d.ts +5 -1
  476. package/lib/typescript/sdk/AttributesSingleton/AttributesSingleton.d.ts.map +1 -1
  477. package/lib/typescript/sdk/DatadogProvider/DatadogProvider.d.ts +4 -3
  478. package/lib/typescript/sdk/DatadogProvider/DatadogProvider.d.ts.map +1 -1
  479. package/lib/typescript/sdk/DatadogProvider/DatadogProviderState.d.ts +9 -0
  480. package/lib/typescript/sdk/DatadogProvider/DatadogProviderState.d.ts.map +1 -0
  481. package/lib/typescript/sdk/DdSdk.d.ts +2 -3
  482. package/lib/typescript/sdk/DdSdk.d.ts.map +1 -1
  483. package/lib/typescript/sdk/DdSdkInternal.d.ts +39 -0
  484. package/lib/typescript/sdk/DdSdkInternal.d.ts.map +1 -0
  485. package/lib/typescript/sdk/EventMappers/EventMapper.d.ts +3 -1
  486. package/lib/typescript/sdk/EventMappers/EventMapper.d.ts.map +1 -1
  487. package/lib/typescript/sdk/GlobalState/GlobalState.d.ts +3 -3
  488. package/lib/typescript/sdk/GlobalState/GlobalState.d.ts.map +1 -1
  489. package/lib/typescript/sdk/UserInfoSingleton/UserInfoSingleton.d.ts +2 -1
  490. package/lib/typescript/sdk/UserInfoSingleton/UserInfoSingleton.d.ts.map +1 -1
  491. package/lib/typescript/sdk/UserInfoSingleton/types.d.ts +1 -2
  492. package/lib/typescript/sdk/UserInfoSingleton/types.d.ts.map +1 -1
  493. package/lib/typescript/specs/NativeDdRum.d.ts +45 -0
  494. package/lib/typescript/specs/NativeDdRum.d.ts.map +1 -1
  495. package/lib/typescript/specs/NativeDdSdk.d.ts +34 -6
  496. package/lib/typescript/specs/NativeDdSdk.d.ts.map +1 -1
  497. package/lib/typescript/trace/DdTrace.d.ts +1 -2
  498. package/lib/typescript/trace/DdTrace.d.ts.map +1 -1
  499. package/lib/typescript/types.d.ts +74 -92
  500. package/lib/typescript/types.d.ts.map +1 -1
  501. package/lib/typescript/utils/longTasksUtils.d.ts +1 -1
  502. package/lib/typescript/utils/longTasksUtils.d.ts.map +1 -1
  503. package/lib/typescript/utils/singletonUtils.d.ts +2 -0
  504. package/lib/typescript/utils/singletonUtils.d.ts.map +1 -0
  505. package/lib/typescript/version.d.ts +1 -1
  506. package/lib/typescript/version.d.ts.map +1 -1
  507. package/package.json +2 -2
  508. package/src/DdSdkReactNative.tsx +246 -104
  509. package/src/InternalLog.tsx +1 -1
  510. package/src/__tests__/DdSdkReactNative.test.tsx +415 -207
  511. package/src/__tests__/DdSdkReactNativeConfiguration.test.ts +237 -153
  512. package/src/__tests__/InternalLog.test.tsx +1 -1
  513. package/src/__tests__/rum/instrumentation/DdEventsInterceptor.test.tsx +2 -2
  514. package/src/__tests__/rum/instrumentation/DdRumErrorTracking.test.tsx +139 -216
  515. package/src/__tests__/rum/instrumentation/DdRumUserInteractionTracking.test.tsx +10 -7
  516. package/src/config/DatadogProviderConfiguration.ts +17 -0
  517. package/src/config/FileBasedConfiguration.ts +464 -0
  518. package/src/config/FileBasedConfiguration.type.ts +66 -0
  519. package/src/config/__tests__/FileBasedConfiguration.test.ts +334 -0
  520. package/src/config/__tests__/__fixtures__/configuration-all-fields.json +57 -0
  521. package/src/config/__tests__/__fixtures__/malformed-configuration.json +4 -0
  522. package/src/config/async/AutoInstrumentationConfiguration.ts +126 -0
  523. package/src/config/async/PartialInitializationConfiguration.ts +58 -0
  524. package/src/config/async/asyncInitializationHelper.tsx +51 -0
  525. package/src/config/features/CoreConfiguration.ts +130 -0
  526. package/src/config/features/CoreConfiguration.type.ts +119 -0
  527. package/src/config/features/CoreConfigurationNative.ts +50 -0
  528. package/src/config/features/LogsConfiguration.ts +38 -0
  529. package/src/config/features/LogsConfiguration.type.ts +33 -0
  530. package/src/config/features/LogsConfigurationNative.ts +10 -0
  531. package/src/config/features/RumConfiguration.ts +137 -0
  532. package/src/config/features/RumConfiguration.type.ts +164 -0
  533. package/src/config/features/RumConfigurationNative.ts +26 -0
  534. package/src/config/features/TraceConfiguration.ts +24 -0
  535. package/src/config/features/TraceConfiguration.type.ts +17 -0
  536. package/src/config/features/TraceConfigurationNative.ts +8 -0
  537. package/src/config/types/BatchProcessingLevel.ts +23 -0
  538. package/src/config/types/BatchSize.ts +24 -0
  539. package/src/config/types/InitializationMode.ts +9 -0
  540. package/src/config/types/InitializationModeForTelemetry.ts +11 -0
  541. package/src/{ProxyConfiguration.tsx → config/types/ProxyConfiguration.ts} +6 -0
  542. package/src/config/types/UploadFrequency.tsx +23 -0
  543. package/src/config/types/VitalsUpdateFrequency.ts +11 -0
  544. package/src/config/types/index.ts +15 -0
  545. package/src/index.tsx +33 -16
  546. package/src/logs/DdLogs.ts +14 -13
  547. package/src/logs/__tests__/DdLogs.test.ts +60 -107
  548. package/src/logs/__tests__/eventMapper.test.ts +1 -1
  549. package/src/logs/eventMapper.ts +5 -4
  550. package/src/logs/types.ts +1 -20
  551. package/src/metro/plugin/metroSerializer.ts +3 -3
  552. package/src/nativeModulesTypes.ts +2 -17
  553. package/src/rum/DdRum.ts +139 -42
  554. package/src/rum/__tests__/DdRum.test.ts +217 -47
  555. package/src/rum/eventMappers/errorEventMapper.ts +1 -1
  556. package/src/rum/helper.ts +62 -0
  557. package/src/rum/instrumentation/DdRumErrorTracking.tsx +20 -38
  558. package/src/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.ts +21 -35
  559. package/src/rum/instrumentation/interactionTracking/DdEventsInterceptor.tsx +1 -1
  560. package/src/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.tsx +18 -5
  561. package/src/rum/instrumentation/resourceTracking/DdRumResourceTracking.tsx +44 -23
  562. package/src/rum/instrumentation/resourceTracking/__tests__/DdRumResourceTracking.test.ts +2 -2
  563. package/src/rum/instrumentation/resourceTracking/__tests__/__utils__/XMLHttpRequestMock.ts +44 -23
  564. package/src/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.ts +24 -1
  565. package/src/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.tsx +17 -2
  566. package/src/rum/instrumentation/resourceTracking/distributedTracing/__tests__/distributedTracing.test.ts +327 -1
  567. package/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.tsx +22 -31
  568. package/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.ts +29 -0
  569. package/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.ts +54 -35
  570. package/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.ts +80 -0
  571. package/src/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.ts +1 -1
  572. package/src/rum/instrumentation/resourceTracking/distributedTracing/headers.ts +29 -0
  573. package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.ts +1 -1
  574. package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.ts +19 -7
  575. package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/__tests__/XHRProxy.test.ts +177 -119
  576. package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/__tests__/baggageHeaderUtils.test.ts +85 -13
  577. package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.ts +110 -52
  578. package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.ts +1 -1
  579. package/src/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.ts +1 -1
  580. package/src/rum/types.ts +68 -8
  581. package/src/sdk/AccountInfoSingleton/AccountInfoSingleton.ts +49 -0
  582. package/src/sdk/AccountInfoSingleton/__tests__/AccountInfoSingleton.test.ts +90 -0
  583. package/src/sdk/AccountInfoSingleton/types.ts +11 -0
  584. package/src/sdk/AttributesEncoding/__tests__/attributesEncoding.test.ts +518 -0
  585. package/src/sdk/AttributesEncoding/__tests__/defaultEncoders.test.ts +198 -0
  586. package/src/sdk/AttributesEncoding/attributesEncoding.ts +56 -0
  587. package/src/sdk/AttributesEncoding/defaultEncoders.ts +175 -0
  588. package/src/{utils → sdk/AttributesEncoding}/errorUtils.ts +50 -22
  589. package/src/sdk/AttributesEncoding/helpers.ts +176 -0
  590. package/src/sdk/AttributesEncoding/types.ts +33 -0
  591. package/src/sdk/AttributesEncoding/utils.ts +31 -0
  592. package/src/sdk/AttributesSingleton/AttributesSingleton.ts +25 -1
  593. package/src/sdk/AttributesSingleton/__tests__/AttributesSingleton.test.ts +52 -8
  594. package/src/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.tsx +2 -2
  595. package/src/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.tsx +1 -1
  596. package/src/sdk/DatadogInternalBridge/__tests__/DdSdkNativeBridge.test.tsx +1 -1
  597. package/src/sdk/DatadogProvider/Buffer/BoundedBuffer.ts +4 -4
  598. package/src/sdk/DatadogProvider/Buffer/__tests__/BoundedBuffer.test.ts +5 -5
  599. package/src/sdk/DatadogProvider/DatadogProvider.tsx +12 -16
  600. package/src/sdk/DatadogProvider/DatadogProviderState.ts +30 -0
  601. package/src/sdk/DatadogProvider/__tests__/__utils__/renderWithProvider.tsx +18 -7
  602. package/src/sdk/DatadogProvider/__tests__/initialization.test.tsx +59 -33
  603. package/src/sdk/DatadogProvider/__tests__/initializationModes.test.tsx +26 -10
  604. package/src/sdk/DdSdk.ts +8 -5
  605. package/src/sdk/DdSdkInternal.ts +121 -0
  606. package/src/sdk/EventMappers/EventMapper.ts +9 -4
  607. package/src/sdk/EventMappers/__tests__/EventMapper.test.ts +3 -3
  608. package/src/sdk/GlobalState/GlobalState.tsx +10 -11
  609. package/src/sdk/UserInfoSingleton/UserInfoSingleton.ts +9 -2
  610. package/src/sdk/UserInfoSingleton/__tests__/UserInfoSingleton.test.ts +46 -9
  611. package/src/sdk/UserInfoSingleton/types.ts +1 -4
  612. package/src/specs/NativeDdRum.ts +65 -0
  613. package/src/specs/NativeDdSdk.ts +40 -6
  614. package/src/trace/DdTrace.ts +11 -7
  615. package/src/trace/__tests__/DdTrace.test.ts +7 -8
  616. package/src/types.tsx +97 -76
  617. package/src/utils/__tests__/errorUtils.test.ts +1 -1
  618. package/src/utils/__tests__/singletonUtils.test.ts +75 -0
  619. package/src/utils/longTasksUtils.ts +1 -3
  620. package/src/utils/singletonUtils.ts +17 -0
  621. package/src/version.ts +1 -1
  622. package/lib/commonjs/DdSdkReactNativeConfiguration.js +0 -412
  623. package/lib/commonjs/DdSdkReactNativeConfiguration.js.map +0 -1
  624. package/lib/commonjs/ProxyConfiguration.js.map +0 -1
  625. package/lib/commonjs/SdkVerbosity.js.map +0 -1
  626. package/lib/commonjs/TrackingConsent.js.map +0 -1
  627. package/lib/commonjs/rum/DdAttributes.js.map +0 -1
  628. package/lib/commonjs/sdk/FileBasedConfiguration/FileBasedConfiguration.js +0 -185
  629. package/lib/commonjs/sdk/FileBasedConfiguration/FileBasedConfiguration.js.map +0 -1
  630. package/lib/commonjs/utils/argsUtils.js +0 -41
  631. package/lib/commonjs/utils/argsUtils.js.map +0 -1
  632. package/lib/commonjs/utils/errorUtils.js.map +0 -1
  633. package/lib/module/DdSdkReactNativeConfiguration.js +0 -403
  634. package/lib/module/DdSdkReactNativeConfiguration.js.map +0 -1
  635. package/lib/module/ProxyConfiguration.js.map +0 -1
  636. package/lib/module/SdkVerbosity.js.map +0 -1
  637. package/lib/module/TrackingConsent.js.map +0 -1
  638. package/lib/module/rum/DdAttributes.js.map +0 -1
  639. package/lib/module/sdk/FileBasedConfiguration/FileBasedConfiguration.js +0 -176
  640. package/lib/module/sdk/FileBasedConfiguration/FileBasedConfiguration.js.map +0 -1
  641. package/lib/module/utils/argsUtils.js +0 -35
  642. package/lib/module/utils/argsUtils.js.map +0 -1
  643. package/lib/module/utils/errorUtils.js.map +0 -1
  644. package/lib/typescript/DdSdkReactNativeConfiguration.d.ts +0 -376
  645. package/lib/typescript/DdSdkReactNativeConfiguration.d.ts.map +0 -1
  646. package/lib/typescript/ProxyConfiguration.d.ts.map +0 -1
  647. package/lib/typescript/SdkVerbosity.d.ts.map +0 -1
  648. package/lib/typescript/TrackingConsent.d.ts.map +0 -1
  649. package/lib/typescript/rum/DdAttributes.d.ts.map +0 -1
  650. package/lib/typescript/sdk/FileBasedConfiguration/FileBasedConfiguration.d.ts +0 -34
  651. package/lib/typescript/sdk/FileBasedConfiguration/FileBasedConfiguration.d.ts.map +0 -1
  652. package/lib/typescript/utils/argsUtils.d.ts +0 -8
  653. package/lib/typescript/utils/argsUtils.d.ts.map +0 -1
  654. package/lib/typescript/utils/errorUtils.d.ts.map +0 -1
  655. package/src/DdSdkReactNativeConfiguration.tsx +0 -582
  656. package/src/sdk/FileBasedConfiguration/FileBasedConfiguration.ts +0 -241
  657. package/src/sdk/FileBasedConfiguration/__tests__/FileBasedConfiguration.test.ts +0 -255
  658. package/src/sdk/FileBasedConfiguration/__tests__/__fixtures__/configuration-all-fields.json +0 -27
  659. package/src/sdk/FileBasedConfiguration/__tests__/__fixtures__/malformed-configuration.json +0 -5
  660. package/src/utils/__tests__/argsUtils.test.ts +0 -66
  661. package/src/utils/argsUtils.ts +0 -41
  662. /package/lib/commonjs/{rum/DdAttributes.js → DdAttributes.js} +0 -0
  663. /package/lib/commonjs/{SdkVerbosity.js → config/types/SdkVerbosity.js} +0 -0
  664. /package/lib/commonjs/{TrackingConsent.js → config/types/TrackingConsent.js} +0 -0
  665. /package/lib/module/{rum/DdAttributes.js → DdAttributes.js} +0 -0
  666. /package/lib/module/{SdkVerbosity.js → config/types/SdkVerbosity.js} +0 -0
  667. /package/lib/module/{TrackingConsent.js → config/types/TrackingConsent.js} +0 -0
  668. /package/lib/typescript/{rum/DdAttributes.d.ts → DdAttributes.d.ts} +0 -0
  669. /package/lib/typescript/{ProxyConfiguration.d.ts → config/types/ProxyConfiguration.d.ts} +0 -0
  670. /package/lib/typescript/{SdkVerbosity.d.ts → config/types/SdkVerbosity.d.ts} +0 -0
  671. /package/lib/typescript/{TrackingConsent.d.ts → config/types/TrackingConsent.d.ts} +0 -0
  672. /package/src/{rum/DdAttributes.ts → DdAttributes.ts} +0 -0
  673. /package/src/{SdkVerbosity.tsx → config/types/SdkVerbosity.ts} +0 -0
  674. /package/src/{TrackingConsent.tsx → config/types/TrackingConsent.ts} +0 -0
@@ -6,23 +6,28 @@
6
6
 
7
7
  import { version as reactNativeVersion } from 'react-native/package.json';
8
8
  import { InteractionManager } from 'react-native';
9
- import { DdSdkReactNativeConfiguration, InitializationMode, addDefaultValuesToAutoInstrumentationConfiguration, buildConfigurationFromPartialConfiguration, formatFirstPartyHosts } from './DdSdkReactNativeConfiguration';
10
9
  import { InternalLog } from './InternalLog';
11
- import { SdkVerbosity } from './SdkVerbosity';
10
+ import { FileBasedConfiguration } from './config/FileBasedConfiguration';
11
+ import { addDefaultValuesToAutoInstrumentationConfiguration } from './config/async/AutoInstrumentationConfiguration';
12
+ import { buildConfigurationFromPartialConfiguration } from './config/async/asyncInitializationHelper';
13
+ import { DdSdkNativeConfiguration } from './config/features/CoreConfigurationNative';
14
+ import { CoreConfiguration } from './config/features/CoreConfiguration';
15
+ import { RUM_DEFAULTS } from './config/features/RumConfiguration';
16
+ import { SdkVerbosity } from './config/types/SdkVerbosity';
17
+ import { InitializationMode } from './config/types';
12
18
  import { DdLogs } from './logs/DdLogs';
13
19
  import { DdRum } from './rum/DdRum';
14
20
  import { DdRumErrorTracking } from './rum/instrumentation/DdRumErrorTracking';
15
21
  import { DdBabelInteractionTracking } from './rum/instrumentation/interactionTracking/DdBabelInteractionTracking';
16
22
  import { DdRumUserInteractionTracking } from './rum/instrumentation/interactionTracking/DdRumUserInteractionTracking';
17
23
  import { DdRumResourceTracking } from './rum/instrumentation/resourceTracking/DdRumResourceTracking';
24
+ import { AccountInfoSingleton } from './sdk/AccountInfoSingleton/AccountInfoSingleton';
18
25
  import { AttributesSingleton } from './sdk/AttributesSingleton/AttributesSingleton';
19
26
  import { registerNativeBridge } from './sdk/DatadogInternalBridge/DdSdkInternalNativeBridge';
20
27
  import { BufferSingleton } from './sdk/DatadogProvider/Buffer/BufferSingleton';
21
- import { DdSdk } from './sdk/DdSdk';
22
- import { FileBasedConfiguration } from './sdk/FileBasedConfiguration/FileBasedConfiguration';
28
+ import { NativeDdSdk } from './sdk/DdSdkInternal';
23
29
  import { GlobalState } from './sdk/GlobalState/GlobalState';
24
30
  import { UserInfoSingleton } from './sdk/UserInfoSingleton/UserInfoSingleton';
25
- import { DdSdkConfiguration } from './types';
26
31
  import { adaptLongTaskThreshold } from './utils/longTasksUtils';
27
32
  import { version as sdkVersion } from './version';
28
33
 
@@ -48,18 +53,18 @@ export class DdSdkReactNative {
48
53
  DdSdkReactNative.enableFeatures(configuration);
49
54
  };
50
55
  static initializeNativeSDK = async (configuration, params) => {
51
- if (GlobalState.instance.isInitialized) {
56
+ if (GlobalState.isInitialized) {
52
57
  InternalLog.log("Can't initialize Datadog, SDK was already initialized", SdkVerbosity.WARN);
53
58
  if (!__DEV__) {
54
- DdSdk.telemetryDebug('RN SDK was already initialized in javascript');
59
+ NativeDdSdk.telemetryDebug('RN SDK was already initialized in javascript');
55
60
  }
56
61
  return new Promise(resolve => resolve());
57
62
  }
58
63
  InternalLog.verbosity = configuration.verbosity;
59
64
  registerNativeBridge();
60
- await DdSdk.initialize(DdSdkReactNative.buildConfiguration(configuration, params));
65
+ await NativeDdSdk.initialize(DdSdkReactNative.buildConfiguration(configuration, params));
61
66
  InternalLog.log('Datadog SDK was initialized', SdkVerbosity.INFO);
62
- GlobalState.instance.isInitialized = true;
67
+ GlobalState.isInitialized = true;
63
68
  BufferSingleton.onInitialization();
64
69
  };
65
70
 
@@ -86,7 +91,7 @@ export class DdSdkReactNative {
86
91
  });
87
92
  }
88
93
  // TODO: Remove when DdSdkReactNativeConfiguration is deprecated
89
- if (configuration instanceof DdSdkReactNativeConfiguration) {
94
+ if (configuration instanceof CoreConfiguration) {
90
95
  return DdSdkReactNative.initializeNativeSDK(configuration, {
91
96
  initializationModeForTelemetry: 'SYNC'
92
97
  });
@@ -116,30 +121,48 @@ export class DdSdkReactNative {
116
121
  });
117
122
  };
118
123
 
124
+ /**
125
+ * Adds a specific attribute to the global context attached with all future Logs, Spans and RUM.
126
+ * @param key: Key that identifies the attribute.
127
+ * @param value: Value linked to the attribute.
128
+ */
129
+ static addAttribute = async (key, value) => {
130
+ InternalLog.log(`Adding attribute ${JSON.stringify(value)} for key ${key}`, SdkVerbosity.DEBUG);
131
+ await NativeDdSdk.addAttribute(key, {
132
+ value
133
+ });
134
+ AttributesSingleton.getInstance().addAttribute(key, value);
135
+ };
136
+
137
+ /**
138
+ * Removes an attribute from the context attached with all future Logs, Spans and RUM events.
139
+ * @param key: They key associated with the attribute to be removed.
140
+ */
141
+ static removeAttribute = async key => {
142
+ InternalLog.log(`Removing attribute for key ${key}`, SdkVerbosity.DEBUG);
143
+ await NativeDdSdk.removeAttribute(key);
144
+ AttributesSingleton.getInstance().removeAttribute(key);
145
+ };
146
+
119
147
  /**
120
148
  * Adds a set of attributes to the global context attached with all future Logs, Spans and RUM events.
121
- * To remove an attribute, set it to `undefined` in a call to `setAttributes`.
122
149
  * @param attributes: The global context attributes.
123
150
  * @returns a Promise.
124
151
  */
125
- // eslint-disable-next-line @typescript-eslint/ban-types
126
- static setAttributes = async attributes => {
127
- InternalLog.log(`Setting attributes ${JSON.stringify(attributes)}`, SdkVerbosity.DEBUG);
128
- await DdSdk.setAttributes(attributes);
129
- AttributesSingleton.getInstance().setAttributes(attributes);
152
+ static addAttributes = async attributes => {
153
+ InternalLog.log(`Adding attributes ${JSON.stringify(attributes)}`, SdkVerbosity.DEBUG);
154
+ await NativeDdSdk.addAttributes(attributes);
155
+ AttributesSingleton.getInstance().addAttributes(attributes);
130
156
  };
131
157
 
132
158
  /**
133
- * Set the user information.
134
- * @deprecated UserInfo id property is now mandatory (please user setUserInfo instead)
135
- * @param user: The user object (use builtin attributes: 'id', 'email', 'name', and/or any custom attribute).
136
- * @returns a Promise.
159
+ * Removes a set of attributes from the context attached with all future Logs, Spans and RUM events.
160
+ * @param keys: They keys associated with the attributes to be removed.
137
161
  */
138
- // eslint-disable-next-line @typescript-eslint/ban-types
139
- static setUser = async user => {
140
- InternalLog.log(`Setting user ${JSON.stringify(user)}`, SdkVerbosity.DEBUG);
141
- await DdSdk.setUser(user);
142
- UserInfoSingleton.getInstance().setUserInfo(user);
162
+ static removeAttributes = async keys => {
163
+ InternalLog.log(`Removing attributes for keys ${JSON.stringify(keys)}`, SdkVerbosity.DEBUG);
164
+ await NativeDdSdk.removeAttributes(keys);
165
+ AttributesSingleton.getInstance().removeAttributes(keys);
143
166
  };
144
167
 
145
168
  /**
@@ -152,10 +175,20 @@ export class DdSdkReactNative {
152
175
  */
153
176
  static setUserInfo = async userInfo => {
154
177
  InternalLog.log(`Setting user ${JSON.stringify(userInfo)}`, SdkVerbosity.DEBUG);
155
- await DdSdk.setUserInfo(userInfo);
178
+ await NativeDdSdk.setUserInfo(userInfo);
156
179
  UserInfoSingleton.getInstance().setUserInfo(userInfo);
157
180
  };
158
181
 
182
+ /**
183
+ * Clears the user information.
184
+ * @returns a Promise.
185
+ */
186
+ static clearUserInfo = async () => {
187
+ InternalLog.log('Clearing user info', SdkVerbosity.DEBUG);
188
+ await NativeDdSdk.clearUserInfo();
189
+ UserInfoSingleton.getInstance().clearUserInfo();
190
+ };
191
+
159
192
  /**
160
193
  * Set the user information.
161
194
  * @param extraUserInfo: The additional information. (To set the id, name or email please user setUserInfo).
@@ -164,6 +197,10 @@ export class DdSdkReactNative {
164
197
  static addUserExtraInfo = async extraUserInfo => {
165
198
  InternalLog.log(`Adding extra user info ${JSON.stringify(extraUserInfo)}`, SdkVerbosity.DEBUG);
166
199
  const userInfo = UserInfoSingleton.getInstance().getUserInfo();
200
+ if (!userInfo) {
201
+ InternalLog.log('Skipped adding User Extra Info: User Info is currently undefined. A user ID must be set before adding extra info. Please call setUserInfo() first.', SdkVerbosity.WARN);
202
+ return;
203
+ }
167
204
  const updatedUserInfo = {
168
205
  ...userInfo,
169
206
  extraInfo: {
@@ -171,10 +208,53 @@ export class DdSdkReactNative {
171
208
  ...extraUserInfo
172
209
  }
173
210
  };
174
- await DdSdk.addUserExtraInfo(extraUserInfo);
211
+ await NativeDdSdk.addUserExtraInfo(extraUserInfo);
175
212
  UserInfoSingleton.getInstance().setUserInfo(updatedUserInfo);
176
213
  };
177
214
 
215
+ /**
216
+ * Sets the account information.
217
+ * @param id: A mandatory unique account identifier (relevant to your business domain).
218
+ * @param name: The account name.
219
+ * @param extraInfo: Additional information.
220
+ * @returns a Promise.
221
+ */
222
+ static setAccountInfo = async accountInfo => {
223
+ InternalLog.log(`Setting account ${JSON.stringify(accountInfo)}`, SdkVerbosity.DEBUG);
224
+ await NativeDdSdk.setAccountInfo(accountInfo);
225
+ AccountInfoSingleton.getInstance().setAccountInfo(accountInfo);
226
+ };
227
+
228
+ /**
229
+ * Clears the account information.
230
+ * @returns a Promise.
231
+ */
232
+ static clearAccountInfo = async () => {
233
+ InternalLog.log('Clearing account info', SdkVerbosity.DEBUG);
234
+ await NativeDdSdk.clearAccountInfo();
235
+ AccountInfoSingleton.getInstance().clearAccountInfo();
236
+ };
237
+
238
+ /**
239
+ * Set the account information.
240
+ * @param extraAccountInfo: The additional information. (To set the id or name please use setAccountInfo).
241
+ * @returns a Promise.
242
+ */
243
+ static addAccountExtraInfo = async extraAccountInfo => {
244
+ InternalLog.log(`Adding extra account info ${JSON.stringify(extraAccountInfo)}`, SdkVerbosity.DEBUG);
245
+ const accountInfo = AccountInfoSingleton.getInstance().getAccountInfo();
246
+ if (!accountInfo) {
247
+ InternalLog.log('Skipped adding Account Extra Info: Account Info is currently undefined. An account ID must be set before adding extra info. Please call setAccountInfo() first.', SdkVerbosity.WARN);
248
+ return;
249
+ }
250
+ const extraInfo = {
251
+ ...accountInfo.extraInfo,
252
+ ...extraAccountInfo
253
+ };
254
+ await NativeDdSdk.addAccountExtraInfo(extraInfo);
255
+ AccountInfoSingleton.getInstance().addAccountExtraInfo(extraAccountInfo);
256
+ };
257
+
178
258
  /**
179
259
  * Set the tracking consent regarding the data collection.
180
260
  * @param trackingConsent: One of TrackingConsent values.
@@ -182,7 +262,7 @@ export class DdSdkReactNative {
182
262
  */
183
263
  static setTrackingConsent = consent => {
184
264
  InternalLog.log(`Setting consent ${consent}`, SdkVerbosity.DEBUG);
185
- return DdSdk.setTrackingConsent(consent);
265
+ return NativeDdSdk.setTrackingConsent(consent);
186
266
  };
187
267
 
188
268
  /**
@@ -191,9 +271,12 @@ export class DdSdkReactNative {
191
271
  */
192
272
  static clearAllData = () => {
193
273
  InternalLog.log('Clearing all data', SdkVerbosity.DEBUG);
194
- return DdSdk.clearAllData();
274
+ return NativeDdSdk.clearAllData();
195
275
  };
196
276
  static buildConfiguration = (configuration, params) => {
277
+ if (configuration.additionalConfiguration === undefined) {
278
+ configuration.additionalConfiguration = {};
279
+ }
197
280
  configuration.additionalConfiguration[DdSdkReactNative.DD_SOURCE_KEY] = 'react-native';
198
281
  configuration.additionalConfiguration[DdSdkReactNative.DD_SDK_VERSION] = sdkVersion;
199
282
  if (configuration.version) {
@@ -207,55 +290,75 @@ export class DdSdkReactNative {
207
290
  if (reactNativeVersion) {
208
291
  configuration.additionalConfiguration[DdSdkReactNative.DD_REACT_NATIVE_VERSION] = `${reactNativeVersion}`;
209
292
  }
210
- return new DdSdkConfiguration(configuration.clientToken, configuration.env, configuration.applicationId, configuration.nativeCrashReportEnabled, adaptLongTaskThreshold(configuration.nativeLongTaskThresholdMs), 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, {
293
+ const rumConfiguration = configuration.rumConfiguration;
294
+ if (rumConfiguration) {
295
+ const longTaskThresholdMs = rumConfiguration.longTaskThresholdMs || RUM_DEFAULTS.longTaskThresholdMs;
296
+ rumConfiguration.longTaskThresholdMs = adaptLongTaskThreshold(longTaskThresholdMs);
297
+ const nativeLongTaskThresholdMs = configuration.rumConfiguration?.nativeLongTaskThresholdMs ?? RUM_DEFAULTS.nativeLongTaskThresholdMs;
298
+ rumConfiguration.nativeLongTaskThresholdMs = adaptLongTaskThreshold(nativeLongTaskThresholdMs);
299
+ }
300
+ const trackInteractions = configuration.rumConfiguration?.trackInteractions || RUM_DEFAULTS.trackInteractions;
301
+ const trackResources = configuration.rumConfiguration?.trackResources || RUM_DEFAULTS.trackResources;
302
+ const trackErrors = configuration.rumConfiguration?.trackErrors || RUM_DEFAULTS.trackErrors;
303
+ return new DdSdkNativeConfiguration(configuration.additionalConfiguration, configuration.clientToken, configuration.env, configuration.site, configuration.service, configuration.verbosity, configuration.trackingConsent, configuration.uploadFrequency, configuration.batchSize, configuration.batchProcessingLevel, configuration.proxyConfiguration, configuration.attributeEncoders, rumConfiguration, configuration.logsConfiguration, configuration.traceConfiguration, {
211
304
  initializationType: params.initializationModeForTelemetry,
212
- trackErrors: configuration.trackErrors,
213
- trackInteractions: configuration.trackInteractions,
214
- trackNetworkRequests: configuration.trackResources,
305
+ trackErrors,
306
+ trackInteractions,
307
+ trackNetworkRequests: trackResources,
215
308
  // eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
216
309
  reactNativeVersion: require('react-native/package.json').version,
217
310
  // eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
218
311
  reactVersion: require('react/package.json').version
219
- }, configuration.nativeViewTracking, configuration.nativeInteractionTracking, configuration.verbosity, configuration.proxyConfig, configuration.serviceName, formatFirstPartyHosts(configuration.firstPartyHosts), configuration.bundleLogsWithRum, configuration.bundleLogsWithTraces, configuration.trackNonFatalAnrs, configuration.appHangThreshold, configuration.resourceTracingSamplingRate, configuration.trackWatchdogTerminations, configuration.batchProcessingLevel, configuration.initialResourceThreshold);
312
+ });
220
313
  };
221
314
  static enableFeatures(configuration) {
315
+ const firstPartyHosts = configuration.rumConfiguration?.firstPartyHosts || RUM_DEFAULTS.getFirstPartyHosts();
316
+ const trackInteractions = configuration.rumConfiguration?.trackInteractions || RUM_DEFAULTS.trackInteractions;
317
+ const trackResources = configuration.rumConfiguration?.trackResources || RUM_DEFAULTS.trackResources;
318
+ const trackErrors = configuration.rumConfiguration?.trackErrors || RUM_DEFAULTS.trackErrors;
319
+ const actionNameAttribute = configuration.rumConfiguration?.actionNameAttribute;
320
+ const resourceTraceSampleRate = configuration.rumConfiguration?.resourceTraceSampleRate || RUM_DEFAULTS.resourceTraceSampleRate;
321
+ const logEventMapper = configuration.logsConfiguration?.logEventMapper;
322
+ const errorEventMapper = configuration.rumConfiguration?.errorEventMapper;
323
+ const resourceEventMapper = configuration.rumConfiguration?.resourceEventMapper;
324
+ const actionEventMapper = configuration.rumConfiguration?.actionEventMapper;
222
325
  if (globalThis.__DD_RN_BABEL_PLUGIN_ENABLED__) {
223
326
  DdBabelInteractionTracking.config = {
224
- trackInteractions: configuration.trackInteractions,
225
- useAccessibilityLabel: configuration.useAccessibilityLabel
327
+ trackInteractions,
328
+ useAccessibilityLabel: configuration.rumConfiguration?.useAccessibilityLabel || RUM_DEFAULTS.useAccessibilityLabel
226
329
  };
227
- DdBabelInteractionTracking.getInstance(DdRum);
330
+ DdBabelInteractionTracking.attachRumInstance(DdRum);
228
331
  }
229
332
  if (DdSdkReactNative.wasAutoInstrumented) {
230
333
  InternalLog.log("Can't auto instrument Datadog, SDK was already instrumented", SdkVerbosity.WARN);
231
334
  return;
232
335
  }
233
- if (configuration.trackInteractions && !globalThis.__DD_RN_BABEL_PLUGIN_ENABLED__) {
336
+ if (trackInteractions && !globalThis.__DD_RN_BABEL_PLUGIN_ENABLED__) {
234
337
  DdRumUserInteractionTracking.startTracking({
235
- actionNameAttribute: configuration.actionNameAttribute,
236
- useAccessibilityLabel: configuration.useAccessibilityLabel
338
+ actionNameAttribute,
339
+ useAccessibilityLabel: configuration.rumConfiguration?.useAccessibilityLabel
237
340
  });
238
341
  }
239
- if (configuration.trackResources) {
342
+ if (trackResources) {
240
343
  DdRumResourceTracking.startTracking({
241
- tracingSamplingRate: configuration.resourceTracingSamplingRate,
242
- firstPartyHosts: formatFirstPartyHosts(configuration.firstPartyHosts)
344
+ resourceTraceSampleRate,
345
+ firstPartyHosts
243
346
  });
244
347
  }
245
- if (configuration.trackErrors) {
348
+ if (trackErrors) {
246
349
  DdRumErrorTracking.startTracking();
247
350
  }
248
- if (configuration.logEventMapper) {
249
- DdLogs.registerLogEventMapper(configuration.logEventMapper);
351
+ if (logEventMapper) {
352
+ DdLogs.registerLogEventMapper(logEventMapper);
250
353
  }
251
- if (configuration.errorEventMapper) {
252
- DdRum.registerErrorEventMapper(configuration.errorEventMapper);
354
+ if (errorEventMapper) {
355
+ DdRum.registerErrorEventMapper(errorEventMapper);
253
356
  }
254
- if (configuration.resourceEventMapper) {
255
- DdRum.registerResourceEventMapper(configuration.resourceEventMapper);
357
+ if (resourceEventMapper) {
358
+ DdRum.registerResourceEventMapper(resourceEventMapper);
256
359
  }
257
- if (configuration.actionEventMapper) {
258
- DdRum.registerActionEventMapper(configuration.actionEventMapper);
360
+ if (actionEventMapper) {
361
+ DdRum.registerActionEventMapper(actionEventMapper);
259
362
  }
260
363
  DdSdkReactNative.wasAutoInstrumented = true;
261
364
  }
@@ -1 +1 @@
1
- {"version":3,"names":["version","reactNativeVersion","InteractionManager","DdSdkReactNativeConfiguration","InitializationMode","addDefaultValuesToAutoInstrumentationConfiguration","buildConfigurationFromPartialConfiguration","formatFirstPartyHosts","InternalLog","SdkVerbosity","DdLogs","DdRum","DdRumErrorTracking","DdBabelInteractionTracking","DdRumUserInteractionTracking","DdRumResourceTracking","AttributesSingleton","registerNativeBridge","BufferSingleton","DdSdk","FileBasedConfiguration","GlobalState","UserInfoSingleton","DdSdkConfiguration","adaptLongTaskThreshold","sdkVersion","DdSdkReactNative","DD_SOURCE_KEY","DD_SDK_VERSION","DD_VERSION","DD_VERSION_SUFFIX","DD_REACT_NATIVE_VERSION","wasAutoInstrumented","initialize","configuration","initializeNativeSDK","initializationModeForTelemetry","enableFeatures","params","instance","isInitialized","log","WARN","__DEV__","telemetryDebug","Promise","resolve","verbosity","buildConfiguration","INFO","onInitialization","_initializeFromDatadogProvider","initializationMode","SYNC","ASYNC","runAfterInteractions","_enableFeaturesFromDatadogProvider","features","_enableFeaturesFromDatadogProviderAsync","_initializeFromDatadogProviderWithConfigurationAsync","setAttributes","attributes","JSON","stringify","DEBUG","getInstance","setUser","user","setUserInfo","userInfo","addUserExtraInfo","extraUserInfo","getUserInfo","updatedUserInfo","extraInfo","setTrackingConsent","consent","clearAllData","additionalConfiguration","versionSuffix","clientToken","env","applicationId","nativeCrashReportEnabled","nativeLongTaskThresholdMs","longTaskThresholdMs","sampleRate","undefined","sessionSamplingRate","site","trackingConsent","telemetrySampleRate","vitalsUpdateFrequency","uploadFrequency","batchSize","trackFrustrations","trackBackgroundEvents","customEndpoints","initializationType","trackErrors","trackInteractions","trackNetworkRequests","trackResources","require","reactVersion","nativeViewTracking","nativeInteractionTracking","proxyConfig","serviceName","firstPartyHosts","bundleLogsWithRum","bundleLogsWithTraces","trackNonFatalAnrs","appHangThreshold","resourceTracingSamplingRate","trackWatchdogTerminations","batchProcessingLevel","initialResourceThreshold","globalThis","__DD_RN_BABEL_PLUGIN_ENABLED__","config","useAccessibilityLabel","startTracking","actionNameAttribute","tracingSamplingRate","logEventMapper","registerLogEventMapper","errorEventMapper","registerErrorEventMapper","resourceEventMapper","registerResourceEventMapper","actionEventMapper","registerActionEventMapper"],"sourceRoot":"../../src","sources":["DdSdkReactNative.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,IAAIC,kBAAkB,QAAQ,2BAA2B;AACzE,SAASC,kBAAkB,QAAQ,cAAc;AASjD,SACIC,6BAA6B,EAC7BC,kBAAkB,EAClBC,kDAAkD,EAClDC,0CAA0C,EAC1CC,qBAAqB,QAClB,iCAAiC;AACxC,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,YAAY,QAAQ,gBAAgB;AAE7C,SAASC,MAAM,QAAQ,eAAe;AACtC,SAASC,KAAK,QAAQ,aAAa;AACnC,SAASC,kBAAkB,QAAQ,0CAA0C;AAC7E,SAASC,0BAA0B,QAAQ,sEAAsE;AACjH,SAASC,4BAA4B,QAAQ,wEAAwE;AACrH,SAASC,qBAAqB,QAAQ,8DAA8D;AACpG,SAASC,mBAAmB,QAAQ,+CAA+C;AAEnF,SAASC,oBAAoB,QAAQ,uDAAuD;AAC5F,SAASC,eAAe,QAAQ,8CAA8C;AAC9E,SAASC,KAAK,QAAQ,aAAa;AACnC,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["version","reactNativeVersion","InteractionManager","InternalLog","FileBasedConfiguration","addDefaultValuesToAutoInstrumentationConfiguration","buildConfigurationFromPartialConfiguration","DdSdkNativeConfiguration","CoreConfiguration","RUM_DEFAULTS","SdkVerbosity","InitializationMode","DdLogs","DdRum","DdRumErrorTracking","DdBabelInteractionTracking","DdRumUserInteractionTracking","DdRumResourceTracking","AccountInfoSingleton","AttributesSingleton","registerNativeBridge","BufferSingleton","NativeDdSdk","GlobalState","UserInfoSingleton","adaptLongTaskThreshold","sdkVersion","DdSdkReactNative","DD_SOURCE_KEY","DD_SDK_VERSION","DD_VERSION","DD_VERSION_SUFFIX","DD_REACT_NATIVE_VERSION","wasAutoInstrumented","initialize","configuration","initializeNativeSDK","initializationModeForTelemetry","enableFeatures","params","isInitialized","log","WARN","__DEV__","telemetryDebug","Promise","resolve","verbosity","buildConfiguration","INFO","onInitialization","_initializeFromDatadogProvider","initializationMode","SYNC","ASYNC","runAfterInteractions","_enableFeaturesFromDatadogProvider","features","_enableFeaturesFromDatadogProviderAsync","_initializeFromDatadogProviderWithConfigurationAsync","addAttribute","key","value","JSON","stringify","DEBUG","getInstance","removeAttribute","addAttributes","attributes","removeAttributes","keys","setUserInfo","userInfo","clearUserInfo","addUserExtraInfo","extraUserInfo","getUserInfo","updatedUserInfo","extraInfo","setAccountInfo","accountInfo","clearAccountInfo","addAccountExtraInfo","extraAccountInfo","getAccountInfo","setTrackingConsent","consent","clearAllData","additionalConfiguration","undefined","versionSuffix","rumConfiguration","longTaskThresholdMs","nativeLongTaskThresholdMs","trackInteractions","trackResources","trackErrors","clientToken","env","site","service","trackingConsent","uploadFrequency","batchSize","batchProcessingLevel","proxyConfiguration","attributeEncoders","logsConfiguration","traceConfiguration","initializationType","trackNetworkRequests","require","reactVersion","firstPartyHosts","getFirstPartyHosts","actionNameAttribute","resourceTraceSampleRate","logEventMapper","errorEventMapper","resourceEventMapper","actionEventMapper","globalThis","__DD_RN_BABEL_PLUGIN_ENABLED__","config","useAccessibilityLabel","attachRumInstance","startTracking","registerLogEventMapper","registerErrorEventMapper","registerResourceEventMapper","registerActionEventMapper"],"sourceRoot":"../../src","sources":["DdSdkReactNative.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,IAAIC,kBAAkB,QAAQ,2BAA2B;AACzE,SAASC,kBAAkB,QAAQ,cAAc;AAEjD,SAASC,WAAW,QAAQ,eAAe;AAE3C,SAASC,sBAAsB,QAAQ,iCAAiC;AAKxE,SAASC,kDAAkD,QAAQ,iDAAiD;AAEpH,SAASC,0CAA0C,QAAQ,0CAA0C;AACrG,SAASC,wBAAwB,QAAQ,2CAA2C;AACpF,SAASC,iBAAiB,QAAQ,qCAAqC;AAGvE,SAASC,YAAY,QAAQ,oCAAoC;AAGjE,SAASC,YAAY,QAAQ,6BAA6B;AAE1D,SAASC,kBAAkB,QAAQ,gBAAgB;AACnD,SAASC,MAAM,QAAQ,eAAe;AACtC,SAASC,KAAK,QAAQ,aAAa;AACnC,SAASC,kBAAkB,QAAQ,0CAA0C;AAC7E,SAASC,0BAA0B,QAAQ,sEAAsE;AACjH,SAASC,4BAA4B,QAAQ,wEAAwE;AACrH,SAASC,qBAAqB,QAAQ,8DAA8D;AACpG,SAASC,oBAAoB,QAAQ,iDAAiD;AACtF,SAASC,mBAAmB,QAAQ,+CAA+C;AAEnF,SAASC,oBAAoB,QAAQ,uDAAuD;AAC5F,SAASC,eAAe,QAAQ,8CAA8C;AAC9E,SAASC,WAAW,QAAQ,qBAAqB;AACjD,SAASC,WAAW,QAAQ,+BAA+B;AAC3D,SAASC,iBAAiB,QAAQ,2CAA2C;AAC7E,SAASC,sBAAsB,QAAQ,wBAAwB;AAC/D,SAASzB,OAAO,IAAI0B,UAAU,QAAQ,WAAW;;AAEjD;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,CAAC;EAC1B,OAAwBC,aAAa,GAAG,YAAY;EACpD,OAAwBC,cAAc,GAAG,iBAAiB;EAC1D,OAAwBC,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,KAAK,CAACsH,yBAAyB,CAACV,iBAAiB,CAAC;IACtD;IAEA9F,gBAAgB,CAACM,mBAAmB,GAAG,IAAI;EAC/C;AACJ","ignoreList":[]}
@@ -4,7 +4,7 @@
4
4
  * Copyright 2016-Present Datadog, Inc.
5
5
  */
6
6
 
7
- import { SdkVerbosity } from './SdkVerbosity';
7
+ import { SdkVerbosity } from './config/types/SdkVerbosity';
8
8
  export const DATADOG_MESSAGE_PREFIX = 'DATADOG:';
9
9
 
10
10
  /**
@@ -1 +1 @@
1
- {"version":3,"names":["SdkVerbosity","DATADOG_MESSAGE_PREFIX","InternalLog","levelMap","Map","DEBUG","INFO","WARN","ERROR","verbosity","undefined","log","message","requiredLevel","get","allowedLevel","prefixedMessage","console","error","warn","info","debug"],"sourceRoot":"../../src","sources":["InternalLog.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,YAAY,QAAQ,gBAAgB;AAE7C,OAAO,MAAMC,sBAAsB,GAAG,UAAU;;AAEhD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,WAAW,CAAC;EACrB,OAAeC,QAAQ,GAAG,IAAIC,GAAG,CAAuB,CACpD,CAACJ,YAAY,CAACK,KAAK,EAAE,CAAC,CAAC,EACvB,CAACL,YAAY,CAACM,IAAI,EAAE,CAAC,CAAC,EACtB,CAACN,YAAY,CAACO,IAAI,EAAE,CAAC,CAAC,EACtB,CAACP,YAAY,CAACQ,KAAK,EAAE,CAAC,CAAC,CAC1B,CAAC;EAEF,OAAcC,SAAS,GAA6BC,SAAS;EAE7D,OAAcC,GAAGA,CAACC,OAAe,EAAEH,SAAuB,EAAQ;IAC9D,IAAIP,WAAW,CAACO,SAAS,KAAKC,SAAS,EAAE;MACrC;IACJ;IACA,MAAMG,aAAa,GAAGX,WAAW,CAACC,QAAQ,CAACW,GAAG,CAACL,SAAS,CAAC;IACzD,MAAMM,YAAY,GAAGb,WAAW,CAACC,QAAQ,CAACW,GAAG,CAACZ,WAAW,CAACO,SAAS,CAAC;IACpE,IAAIM,YAAY,KAAKL,SAAS,IAAIG,aAAa,KAAKH,SAAS,EAAE;MAC3D;IACJ;IACA,MAAMM,eAAe,GAAG,GAAGf,sBAAsB,IAAIW,OAAO,EAAE;IAC9D,IAAIH,SAAS,KAAKT,YAAY,CAACQ,KAAK,IAAIK,aAAa,IAAIE,YAAY,EAAE;MACnEE,OAAO,CAACC,KAAK,CAACF,eAAe,CAAC;IAClC;IAEA,IAAIP,SAAS,KAAKT,YAAY,CAACO,IAAI,IAAIM,aAAa,IAAIE,YAAY,EAAE;MAClEE,OAAO,CAACE,IAAI,CAACH,eAAe,CAAC;IACjC;IAEA,IAAIP,SAAS,KAAKT,YAAY,CAACM,IAAI,IAAIO,aAAa,IAAIE,YAAY,EAAE;MAClEE,OAAO,CAACG,IAAI,CAACJ,eAAe,CAAC;IACjC;IAEA,IAAIP,SAAS,KAAKT,YAAY,CAACK,KAAK,IAAIQ,aAAa,IAAIE,YAAY,EAAE;MACnEE,OAAO,CAACI,KAAK,CAACL,eAAe,CAAC;IAClC;EACJ;AACJ","ignoreList":[]}
1
+ {"version":3,"names":["SdkVerbosity","DATADOG_MESSAGE_PREFIX","InternalLog","levelMap","Map","DEBUG","INFO","WARN","ERROR","verbosity","undefined","log","message","requiredLevel","get","allowedLevel","prefixedMessage","console","error","warn","info","debug"],"sourceRoot":"../../src","sources":["InternalLog.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,YAAY,QAAQ,6BAA6B;AAE1D,OAAO,MAAMC,sBAAsB,GAAG,UAAU;;AAEhD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,WAAW,CAAC;EACrB,OAAeC,QAAQ,GAAG,IAAIC,GAAG,CAAuB,CACpD,CAACJ,YAAY,CAACK,KAAK,EAAE,CAAC,CAAC,EACvB,CAACL,YAAY,CAACM,IAAI,EAAE,CAAC,CAAC,EACtB,CAACN,YAAY,CAACO,IAAI,EAAE,CAAC,CAAC,EACtB,CAACP,YAAY,CAACQ,KAAK,EAAE,CAAC,CAAC,CAC1B,CAAC;EAEF,OAAcC,SAAS,GAA6BC,SAAS;EAE7D,OAAcC,GAAGA,CAACC,OAAe,EAAEH,SAAuB,EAAQ;IAC9D,IAAIP,WAAW,CAACO,SAAS,KAAKC,SAAS,EAAE;MACrC;IACJ;IACA,MAAMG,aAAa,GAAGX,WAAW,CAACC,QAAQ,CAACW,GAAG,CAACL,SAAS,CAAC;IACzD,MAAMM,YAAY,GAAGb,WAAW,CAACC,QAAQ,CAACW,GAAG,CAACZ,WAAW,CAACO,SAAS,CAAC;IACpE,IAAIM,YAAY,KAAKL,SAAS,IAAIG,aAAa,KAAKH,SAAS,EAAE;MAC3D;IACJ;IACA,MAAMM,eAAe,GAAG,GAAGf,sBAAsB,IAAIW,OAAO,EAAE;IAC9D,IAAIH,SAAS,KAAKT,YAAY,CAACQ,KAAK,IAAIK,aAAa,IAAIE,YAAY,EAAE;MACnEE,OAAO,CAACC,KAAK,CAACF,eAAe,CAAC;IAClC;IAEA,IAAIP,SAAS,KAAKT,YAAY,CAACO,IAAI,IAAIM,aAAa,IAAIE,YAAY,EAAE;MAClEE,OAAO,CAACE,IAAI,CAACH,eAAe,CAAC;IACjC;IAEA,IAAIP,SAAS,KAAKT,YAAY,CAACM,IAAI,IAAIO,aAAa,IAAIE,YAAY,EAAE;MAClEE,OAAO,CAACG,IAAI,CAACJ,eAAe,CAAC;IACjC;IAEA,IAAIP,SAAS,KAAKT,YAAY,CAACK,KAAK,IAAIQ,aAAa,IAAIE,YAAY,EAAE;MACnEE,OAAO,CAACI,KAAK,CAACL,eAAe,CAAC;IAClC;EACJ;AACJ","ignoreList":[]}
@@ -0,0 +1,18 @@
1
+ /*
2
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
3
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
4
+ * Copyright 2016-Present Datadog, Inc.
5
+ */
6
+ import { CoreConfiguration } from './features/CoreConfiguration';
7
+ import { InitializationMode } from './types';
8
+
9
+ /**
10
+ * SDK Initialization configuration for `DatadogProvider`.
11
+ */
12
+ export class DatadogProviderConfiguration extends CoreConfiguration {
13
+ /**
14
+ * If set to ASYNC, the initialization will be delayed until all animations are completed.
15
+ */
16
+ initializationMode = InitializationMode.SYNC;
17
+ }
18
+ //# sourceMappingURL=DatadogProviderConfiguration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["CoreConfiguration","InitializationMode","DatadogProviderConfiguration","initializationMode","SYNC"],"sourceRoot":"../../../src","sources":["config/DatadogProviderConfiguration.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,SAASA,iBAAiB,QAAQ,8BAA8B;AAChE,SAASC,kBAAkB,QAAQ,SAAS;;AAE5C;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,SAASF,iBAAiB,CAAC;EAChE;AACJ;AACA;EACWG,kBAAkB,GAAuBF,kBAAkB,CAACG,IAAI;AAC3E","ignoreList":[]}