@datadog/mobile-react-native 2.14.1 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (670) 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/ios/Sources/AnyEncodable.swift +14 -7
  34. package/ios/Sources/Attributes.swift +0 -7
  35. package/ios/Sources/DatadogSDKWrapper.swift +12 -128
  36. package/ios/Sources/DdLogsImplementation.swift +9 -39
  37. package/ios/Sources/DdRum.mm +89 -1
  38. package/ios/Sources/DdRumImplementation.swift +79 -0
  39. package/ios/Sources/DdSdk.mm +76 -11
  40. package/ios/Sources/DdSdkConfiguration.swift +159 -117
  41. package/ios/Sources/DdSdkImplementation.swift +235 -82
  42. package/ios/Sources/DdSdkNativeInitialization.swift +116 -80
  43. package/ios/Sources/DdTelemetry.swift +49 -0
  44. package/ios/Sources/GlobalState.swift +1 -1
  45. package/ios/Sources/RNDdSdkConfiguration.swift +334 -172
  46. package/ios/Sources/SdkVersion.swift +1 -1
  47. package/jest/mock.js +43 -4
  48. package/lib/commonjs/DdAttributes.js.map +1 -0
  49. package/lib/commonjs/DdSdkReactNative.js +159 -56
  50. package/lib/commonjs/DdSdkReactNative.js.map +1 -1
  51. package/lib/commonjs/InternalLog.js +1 -1
  52. package/lib/commonjs/config/DatadogProviderConfiguration.js +25 -0
  53. package/lib/commonjs/config/DatadogProviderConfiguration.js.map +1 -0
  54. package/lib/commonjs/config/FileBasedConfiguration.js +349 -0
  55. package/lib/commonjs/config/FileBasedConfiguration.js.map +1 -0
  56. package/lib/commonjs/config/FileBasedConfiguration.type.js +6 -0
  57. package/lib/commonjs/config/FileBasedConfiguration.type.js.map +1 -0
  58. package/lib/commonjs/config/async/AutoInstrumentationConfiguration.js +51 -0
  59. package/lib/commonjs/config/async/AutoInstrumentationConfiguration.js.map +1 -0
  60. package/lib/commonjs/config/async/PartialInitializationConfiguration.js +6 -0
  61. package/lib/commonjs/config/async/PartialInitializationConfiguration.js.map +1 -0
  62. package/lib/commonjs/config/async/asyncInitializationHelper.js +44 -0
  63. package/lib/commonjs/config/async/asyncInitializationHelper.js.map +1 -0
  64. package/lib/commonjs/config/features/CoreConfiguration.js +104 -0
  65. package/lib/commonjs/config/features/CoreConfiguration.js.map +1 -0
  66. package/lib/commonjs/config/features/CoreConfiguration.type.js +6 -0
  67. package/lib/commonjs/config/features/CoreConfiguration.type.js.map +1 -0
  68. package/lib/commonjs/config/features/CoreConfigurationNative.js +38 -0
  69. package/lib/commonjs/config/features/CoreConfigurationNative.js.map +1 -0
  70. package/lib/commonjs/config/features/LogsConfiguration.js +36 -0
  71. package/lib/commonjs/config/features/LogsConfiguration.js.map +1 -0
  72. package/lib/commonjs/config/features/LogsConfiguration.type.js +6 -0
  73. package/lib/commonjs/config/features/LogsConfiguration.type.js.map +1 -0
  74. package/lib/commonjs/config/features/LogsConfigurationNative.js +2 -0
  75. package/lib/commonjs/config/features/LogsConfigurationNative.js.map +1 -0
  76. package/lib/commonjs/config/features/RumConfiguration.js +120 -0
  77. package/lib/commonjs/config/features/RumConfiguration.js.map +1 -0
  78. package/lib/commonjs/config/features/RumConfiguration.type.js +6 -0
  79. package/lib/commonjs/config/features/RumConfiguration.type.js.map +1 -0
  80. package/lib/commonjs/config/features/RumConfigurationNative.js +2 -0
  81. package/lib/commonjs/config/features/RumConfigurationNative.js.map +1 -0
  82. package/lib/commonjs/config/features/TraceConfiguration.js +24 -0
  83. package/lib/commonjs/config/features/TraceConfiguration.js.map +1 -0
  84. package/lib/commonjs/config/features/TraceConfiguration.type.js +2 -0
  85. package/lib/commonjs/config/features/TraceConfiguration.type.js.map +1 -0
  86. package/lib/commonjs/config/features/TraceConfigurationNative.js +2 -0
  87. package/lib/commonjs/config/features/TraceConfigurationNative.js.map +1 -0
  88. package/lib/commonjs/config/types/BatchProcessingLevel.js +30 -0
  89. package/lib/commonjs/config/types/BatchProcessingLevel.js.map +1 -0
  90. package/lib/commonjs/config/types/BatchSize.js +31 -0
  91. package/lib/commonjs/config/types/BatchSize.js.map +1 -0
  92. package/lib/commonjs/config/types/InitializationMode.js +17 -0
  93. package/lib/commonjs/config/types/InitializationMode.js.map +1 -0
  94. package/lib/commonjs/config/types/InitializationModeForTelemetry.js +2 -0
  95. package/lib/commonjs/config/types/InitializationModeForTelemetry.js.map +1 -0
  96. package/lib/commonjs/{ProxyConfiguration.js → config/types/ProxyConfiguration.js} +6 -0
  97. package/lib/commonjs/config/types/ProxyConfiguration.js.map +1 -0
  98. package/lib/commonjs/config/types/SdkVerbosity.js.map +1 -0
  99. package/lib/commonjs/config/types/TrackingConsent.js.map +1 -0
  100. package/lib/commonjs/config/types/UploadFrequency.js +30 -0
  101. package/lib/commonjs/config/types/UploadFrequency.js.map +1 -0
  102. package/lib/commonjs/config/types/VitalsUpdateFrequency.js +19 -0
  103. package/lib/commonjs/config/types/VitalsUpdateFrequency.js.map +1 -0
  104. package/lib/commonjs/config/types/index.js +68 -0
  105. package/lib/commonjs/config/types/index.js.map +1 -0
  106. package/lib/commonjs/index.js +51 -21
  107. package/lib/commonjs/index.js.map +1 -1
  108. package/lib/commonjs/logs/DdLogs.js +13 -9
  109. package/lib/commonjs/logs/DdLogs.js.map +1 -1
  110. package/lib/commonjs/logs/eventMapper.js +4 -1
  111. package/lib/commonjs/logs/eventMapper.js.map +1 -1
  112. package/lib/commonjs/nativeModulesTypes.js +0 -45
  113. package/lib/commonjs/nativeModulesTypes.js.map +1 -1
  114. package/lib/commonjs/rum/DdRum.js +56 -28
  115. package/lib/commonjs/rum/DdRum.js.map +1 -1
  116. package/lib/commonjs/rum/helper.js +63 -0
  117. package/lib/commonjs/rum/helper.js.map +1 -0
  118. package/lib/commonjs/rum/instrumentation/DdRumErrorTracking.js +14 -18
  119. package/lib/commonjs/rum/instrumentation/DdRumErrorTracking.js.map +1 -1
  120. package/lib/commonjs/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js +15 -25
  121. package/lib/commonjs/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js.map +1 -1
  122. package/lib/commonjs/rum/instrumentation/interactionTracking/DdEventsInterceptor.js +1 -1
  123. package/lib/commonjs/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js +15 -5
  124. package/lib/commonjs/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js.map +1 -1
  125. package/lib/commonjs/rum/instrumentation/resourceTracking/DdRumResourceTracking.js +34 -22
  126. package/lib/commonjs/rum/instrumentation/resourceTracking/DdRumResourceTracking.js.map +1 -1
  127. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.js +21 -1
  128. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.js.map +1 -1
  129. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js +16 -3
  130. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js.map +1 -1
  131. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js +10 -12
  132. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js.map +1 -1
  133. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.js +6 -0
  134. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.js.map +1 -0
  135. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js +41 -47
  136. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js.map +1 -1
  137. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.js +62 -0
  138. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.js.map +1 -0
  139. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js +1 -1
  140. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/headers.js +36 -0
  141. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/headers.js.map +1 -0
  142. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js +1 -1
  143. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js +19 -8
  144. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js.map +1 -1
  145. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js +90 -48
  146. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js.map +1 -1
  147. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js +1 -1
  148. package/lib/commonjs/rum/types.js +1 -9
  149. package/lib/commonjs/rum/types.js.map +1 -1
  150. package/lib/commonjs/sdk/AccountInfoSingleton/AccountInfoSingleton.js +46 -0
  151. package/lib/commonjs/sdk/AccountInfoSingleton/AccountInfoSingleton.js.map +1 -0
  152. package/lib/commonjs/sdk/AccountInfoSingleton/types.js +2 -0
  153. package/lib/commonjs/sdk/AccountInfoSingleton/types.js.map +1 -0
  154. package/lib/commonjs/sdk/AttributesEncoding/attributesEncoding.js +51 -0
  155. package/lib/commonjs/sdk/AttributesEncoding/attributesEncoding.js.map +1 -0
  156. package/lib/commonjs/sdk/AttributesEncoding/defaultEncoders.js +140 -0
  157. package/lib/commonjs/sdk/AttributesEncoding/defaultEncoders.js.map +1 -0
  158. package/lib/commonjs/{utils → sdk/AttributesEncoding}/errorUtils.js +39 -22
  159. package/lib/commonjs/sdk/AttributesEncoding/errorUtils.js.map +1 -0
  160. package/lib/commonjs/sdk/AttributesEncoding/helpers.js +123 -0
  161. package/lib/commonjs/sdk/AttributesEncoding/helpers.js.map +1 -0
  162. package/lib/commonjs/sdk/AttributesEncoding/types.js +2 -0
  163. package/lib/commonjs/sdk/AttributesEncoding/types.js.map +1 -0
  164. package/lib/commonjs/sdk/AttributesEncoding/utils.js +36 -0
  165. package/lib/commonjs/sdk/AttributesEncoding/utils.js.map +1 -0
  166. package/lib/commonjs/sdk/AttributesSingleton/AttributesSingleton.js +27 -1
  167. package/lib/commonjs/sdk/AttributesSingleton/AttributesSingleton.js.map +1 -1
  168. package/lib/commonjs/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.js +3 -3
  169. package/lib/commonjs/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.js.map +1 -1
  170. package/lib/commonjs/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.js +1 -1
  171. package/lib/commonjs/sdk/DatadogProvider/Buffer/BoundedBuffer.js +4 -4
  172. package/lib/commonjs/sdk/DatadogProvider/Buffer/BoundedBuffer.js.map +1 -1
  173. package/lib/commonjs/sdk/DatadogProvider/DatadogProvider.js +10 -9
  174. package/lib/commonjs/sdk/DatadogProvider/DatadogProvider.js.map +1 -1
  175. package/lib/commonjs/sdk/DatadogProvider/DatadogProviderState.js +28 -0
  176. package/lib/commonjs/sdk/DatadogProvider/DatadogProviderState.js.map +1 -0
  177. package/lib/commonjs/sdk/DdSdk.js +4 -2
  178. package/lib/commonjs/sdk/DdSdk.js.map +1 -1
  179. package/lib/commonjs/sdk/DdSdkInternal.js +86 -0
  180. package/lib/commonjs/sdk/DdSdkInternal.js.map +1 -0
  181. package/lib/commonjs/sdk/EventMappers/EventMapper.js +6 -3
  182. package/lib/commonjs/sdk/EventMappers/EventMapper.js.map +1 -1
  183. package/lib/commonjs/sdk/GlobalState/GlobalState.js +5 -11
  184. package/lib/commonjs/sdk/GlobalState/GlobalState.js.map +1 -1
  185. package/lib/commonjs/sdk/UserInfoSingleton/UserInfoSingleton.js +6 -1
  186. package/lib/commonjs/sdk/UserInfoSingleton/UserInfoSingleton.js.map +1 -1
  187. package/lib/commonjs/specs/NativeDdRum.js.map +1 -1
  188. package/lib/commonjs/specs/NativeDdSdk.js.map +1 -1
  189. package/lib/commonjs/trace/DdTrace.js +7 -5
  190. package/lib/commonjs/trace/DdTrace.js.map +1 -1
  191. package/lib/commonjs/types.js +19 -46
  192. package/lib/commonjs/types.js.map +1 -1
  193. package/lib/commonjs/utils/longTasksUtils.js.map +1 -1
  194. package/lib/commonjs/utils/singletonUtils.js +21 -0
  195. package/lib/commonjs/utils/singletonUtils.js.map +1 -0
  196. package/lib/commonjs/version.js +1 -1
  197. package/lib/commonjs/version.js.map +1 -1
  198. package/lib/module/DdAttributes.js.map +1 -0
  199. package/lib/module/DdSdkReactNative.js +155 -52
  200. package/lib/module/DdSdkReactNative.js.map +1 -1
  201. package/lib/module/InternalLog.js +1 -1
  202. package/lib/module/InternalLog.js.map +1 -1
  203. package/lib/module/config/DatadogProviderConfiguration.js +18 -0
  204. package/lib/module/config/DatadogProviderConfiguration.js.map +1 -0
  205. package/lib/module/config/FileBasedConfiguration.js +341 -0
  206. package/lib/module/config/FileBasedConfiguration.js.map +1 -0
  207. package/lib/module/config/FileBasedConfiguration.type.js +2 -0
  208. package/lib/module/config/FileBasedConfiguration.type.js.map +1 -0
  209. package/lib/module/config/async/AutoInstrumentationConfiguration.js +45 -0
  210. package/lib/module/config/async/AutoInstrumentationConfiguration.js.map +1 -0
  211. package/lib/module/config/async/PartialInitializationConfiguration.js +2 -0
  212. package/lib/module/config/async/PartialInitializationConfiguration.js.map +1 -0
  213. package/lib/module/config/async/asyncInitializationHelper.js +36 -0
  214. package/lib/module/config/async/asyncInitializationHelper.js.map +1 -0
  215. package/lib/module/config/features/CoreConfiguration.js +98 -0
  216. package/lib/module/config/features/CoreConfiguration.js.map +1 -0
  217. package/lib/module/config/features/CoreConfiguration.type.js +2 -0
  218. package/lib/module/config/features/CoreConfiguration.type.js.map +1 -0
  219. package/lib/module/config/features/CoreConfigurationNative.js +31 -0
  220. package/lib/module/config/features/CoreConfigurationNative.js.map +1 -0
  221. package/lib/module/config/features/LogsConfiguration.js +30 -0
  222. package/lib/module/config/features/LogsConfiguration.js.map +1 -0
  223. package/lib/module/config/features/LogsConfiguration.type.js +2 -0
  224. package/lib/module/config/features/LogsConfiguration.type.js.map +1 -0
  225. package/lib/module/config/features/LogsConfigurationNative.js +2 -0
  226. package/lib/module/config/features/LogsConfigurationNative.js.map +1 -0
  227. package/lib/module/config/features/RumConfiguration.js +114 -0
  228. package/lib/module/config/features/RumConfiguration.js.map +1 -0
  229. package/lib/module/config/features/RumConfiguration.type.js +2 -0
  230. package/lib/module/config/features/RumConfiguration.type.js.map +1 -0
  231. package/lib/module/config/features/RumConfigurationNative.js +2 -0
  232. package/lib/module/config/features/RumConfigurationNative.js.map +1 -0
  233. package/lib/module/config/features/TraceConfiguration.js +18 -0
  234. package/lib/module/config/features/TraceConfiguration.js.map +1 -0
  235. package/lib/module/config/features/TraceConfiguration.type.js +2 -0
  236. package/lib/module/config/features/TraceConfiguration.type.js.map +1 -0
  237. package/lib/module/config/features/TraceConfigurationNative.js +2 -0
  238. package/lib/module/config/features/TraceConfigurationNative.js.map +1 -0
  239. package/lib/module/config/types/BatchProcessingLevel.js +25 -0
  240. package/lib/module/config/types/BatchProcessingLevel.js.map +1 -0
  241. package/lib/module/config/types/BatchSize.js +26 -0
  242. package/lib/module/config/types/BatchSize.js.map +1 -0
  243. package/lib/module/config/types/InitializationMode.js +11 -0
  244. package/lib/module/config/types/InitializationMode.js.map +1 -0
  245. package/lib/module/config/types/InitializationModeForTelemetry.js +2 -0
  246. package/lib/module/config/types/InitializationModeForTelemetry.js.map +1 -0
  247. package/lib/module/{ProxyConfiguration.js → config/types/ProxyConfiguration.js} +6 -0
  248. package/lib/module/config/types/ProxyConfiguration.js.map +1 -0
  249. package/lib/module/config/types/SdkVerbosity.js.map +1 -0
  250. package/lib/module/config/types/TrackingConsent.js.map +1 -0
  251. package/lib/module/config/types/UploadFrequency.js +25 -0
  252. package/lib/module/config/types/UploadFrequency.js.map +1 -0
  253. package/lib/module/config/types/VitalsUpdateFrequency.js +13 -0
  254. package/lib/module/config/types/VitalsUpdateFrequency.js.map +1 -0
  255. package/lib/module/config/types/index.js +15 -0
  256. package/lib/module/config/types/index.js.map +1 -0
  257. package/lib/module/index.js +13 -7
  258. package/lib/module/index.js.map +1 -1
  259. package/lib/module/logs/DdLogs.js +13 -9
  260. package/lib/module/logs/DdLogs.js.map +1 -1
  261. package/lib/module/logs/eventMapper.js +4 -1
  262. package/lib/module/logs/eventMapper.js.map +1 -1
  263. package/lib/module/nativeModulesTypes.js +1 -43
  264. package/lib/module/nativeModulesTypes.js.map +1 -1
  265. package/lib/module/rum/DdRum.js +54 -26
  266. package/lib/module/rum/DdRum.js.map +1 -1
  267. package/lib/module/rum/helper.js +49 -0
  268. package/lib/module/rum/helper.js.map +1 -0
  269. package/lib/module/rum/instrumentation/DdRumErrorTracking.js +14 -18
  270. package/lib/module/rum/instrumentation/DdRumErrorTracking.js.map +1 -1
  271. package/lib/module/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js +15 -24
  272. package/lib/module/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js.map +1 -1
  273. package/lib/module/rum/instrumentation/interactionTracking/DdEventsInterceptor.js +1 -1
  274. package/lib/module/rum/instrumentation/interactionTracking/DdEventsInterceptor.js.map +1 -1
  275. package/lib/module/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js +15 -5
  276. package/lib/module/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js.map +1 -1
  277. package/lib/module/rum/instrumentation/resourceTracking/DdRumResourceTracking.js +33 -21
  278. package/lib/module/rum/instrumentation/resourceTracking/DdRumResourceTracking.js.map +1 -1
  279. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.js +22 -1
  280. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.js.map +1 -1
  281. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js +13 -2
  282. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js.map +1 -1
  283. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js +10 -11
  284. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js.map +1 -1
  285. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.js +2 -0
  286. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.js.map +1 -0
  287. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js +27 -33
  288. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js.map +1 -1
  289. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.js +54 -0
  290. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.js.map +1 -0
  291. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js +1 -1
  292. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js.map +1 -1
  293. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/headers.js +30 -0
  294. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/headers.js.map +1 -0
  295. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js +1 -1
  296. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js.map +1 -1
  297. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js +14 -3
  298. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js.map +1 -1
  299. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js +90 -48
  300. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js.map +1 -1
  301. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js +1 -1
  302. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js.map +1 -1
  303. package/lib/module/rum/types.js +0 -9
  304. package/lib/module/rum/types.js.map +1 -1
  305. package/lib/module/sdk/AccountInfoSingleton/AccountInfoSingleton.js +39 -0
  306. package/lib/module/sdk/AccountInfoSingleton/AccountInfoSingleton.js.map +1 -0
  307. package/lib/module/sdk/AccountInfoSingleton/types.js +2 -0
  308. package/lib/module/sdk/AccountInfoSingleton/types.js.map +1 -0
  309. package/lib/module/sdk/AttributesEncoding/attributesEncoding.js +46 -0
  310. package/lib/module/sdk/AttributesEncoding/attributesEncoding.js.map +1 -0
  311. package/lib/module/sdk/AttributesEncoding/defaultEncoders.js +134 -0
  312. package/lib/module/sdk/AttributesEncoding/defaultEncoders.js.map +1 -0
  313. package/lib/module/{utils → sdk/AttributesEncoding}/errorUtils.js +37 -20
  314. package/lib/module/sdk/AttributesEncoding/errorUtils.js.map +1 -0
  315. package/lib/module/sdk/AttributesEncoding/helpers.js +115 -0
  316. package/lib/module/sdk/AttributesEncoding/helpers.js.map +1 -0
  317. package/lib/module/sdk/AttributesEncoding/types.js +2 -0
  318. package/lib/module/sdk/AttributesEncoding/types.js.map +1 -0
  319. package/lib/module/sdk/AttributesEncoding/utils.js +28 -0
  320. package/lib/module/sdk/AttributesEncoding/utils.js.map +1 -0
  321. package/lib/module/sdk/AttributesSingleton/AttributesSingleton.js +27 -1
  322. package/lib/module/sdk/AttributesSingleton/AttributesSingleton.js.map +1 -1
  323. package/lib/module/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.js +2 -2
  324. package/lib/module/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.js.map +1 -1
  325. package/lib/module/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.js +1 -1
  326. package/lib/module/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.js.map +1 -1
  327. package/lib/module/sdk/DatadogProvider/Buffer/BoundedBuffer.js +4 -4
  328. package/lib/module/sdk/DatadogProvider/Buffer/BoundedBuffer.js.map +1 -1
  329. package/lib/module/sdk/DatadogProvider/DatadogProvider.js +9 -8
  330. package/lib/module/sdk/DatadogProvider/DatadogProvider.js.map +1 -1
  331. package/lib/module/sdk/DatadogProvider/DatadogProviderState.js +21 -0
  332. package/lib/module/sdk/DatadogProvider/DatadogProviderState.js.map +1 -0
  333. package/lib/module/sdk/DdSdk.js +4 -4
  334. package/lib/module/sdk/DdSdk.js.map +1 -1
  335. package/lib/module/sdk/DdSdkInternal.js +80 -0
  336. package/lib/module/sdk/DdSdkInternal.js.map +1 -0
  337. package/lib/module/sdk/EventMappers/EventMapper.js +6 -3
  338. package/lib/module/sdk/EventMappers/EventMapper.js.map +1 -1
  339. package/lib/module/sdk/GlobalState/GlobalState.js +5 -10
  340. package/lib/module/sdk/GlobalState/GlobalState.js.map +1 -1
  341. package/lib/module/sdk/UserInfoSingleton/UserInfoSingleton.js +6 -1
  342. package/lib/module/sdk/UserInfoSingleton/UserInfoSingleton.js.map +1 -1
  343. package/lib/module/specs/NativeDdRum.js.map +1 -1
  344. package/lib/module/specs/NativeDdSdk.js.map +1 -1
  345. package/lib/module/trace/DdTrace.js +7 -6
  346. package/lib/module/trace/DdTrace.js.map +1 -1
  347. package/lib/module/types.js +22 -42
  348. package/lib/module/types.js.map +1 -1
  349. package/lib/module/utils/longTasksUtils.js.map +1 -1
  350. package/lib/module/utils/singletonUtils.js +14 -0
  351. package/lib/module/utils/singletonUtils.js.map +1 -0
  352. package/lib/module/version.js +1 -1
  353. package/lib/module/version.js.map +1 -1
  354. package/lib/typescript/DdAttributes.d.ts.map +1 -0
  355. package/lib/typescript/DdSdkReactNative.d.ts +49 -12
  356. package/lib/typescript/DdSdkReactNative.d.ts.map +1 -1
  357. package/lib/typescript/InternalLog.d.ts +1 -1
  358. package/lib/typescript/InternalLog.d.ts.map +1 -1
  359. package/lib/typescript/config/DatadogProviderConfiguration.d.ts +12 -0
  360. package/lib/typescript/config/DatadogProviderConfiguration.d.ts.map +1 -0
  361. package/lib/typescript/config/FileBasedConfiguration.d.ts +17 -0
  362. package/lib/typescript/config/FileBasedConfiguration.d.ts.map +1 -0
  363. package/lib/typescript/config/FileBasedConfiguration.type.d.ts +52 -0
  364. package/lib/typescript/config/FileBasedConfiguration.type.d.ts.map +1 -0
  365. package/lib/typescript/config/async/AutoInstrumentationConfiguration.d.ts +60 -0
  366. package/lib/typescript/config/async/AutoInstrumentationConfiguration.d.ts.map +1 -0
  367. package/lib/typescript/config/async/PartialInitializationConfiguration.d.ts +47 -0
  368. package/lib/typescript/config/async/PartialInitializationConfiguration.d.ts.map +1 -0
  369. package/lib/typescript/config/async/asyncInitializationHelper.d.ts +5 -0
  370. package/lib/typescript/config/async/asyncInitializationHelper.d.ts.map +1 -0
  371. package/lib/typescript/config/features/CoreConfiguration.d.ts +52 -0
  372. package/lib/typescript/config/features/CoreConfiguration.d.ts.map +1 -0
  373. package/lib/typescript/config/features/CoreConfiguration.type.d.ts +90 -0
  374. package/lib/typescript/config/features/CoreConfiguration.type.d.ts.map +1 -0
  375. package/lib/typescript/config/features/CoreConfigurationNative.d.ts +54 -0
  376. package/lib/typescript/config/features/CoreConfigurationNative.d.ts.map +1 -0
  377. package/lib/typescript/config/features/LogsConfiguration.d.ts +17 -0
  378. package/lib/typescript/config/features/LogsConfiguration.d.ts.map +1 -0
  379. package/lib/typescript/config/features/LogsConfiguration.type.d.ts +24 -0
  380. package/lib/typescript/config/features/LogsConfiguration.type.d.ts.map +1 -0
  381. package/lib/typescript/config/features/LogsConfigurationNative.d.ts +6 -0
  382. package/lib/typescript/config/features/LogsConfigurationNative.d.ts.map +1 -0
  383. package/lib/typescript/config/features/RumConfiguration.d.ts +66 -0
  384. package/lib/typescript/config/features/RumConfiguration.d.ts.map +1 -0
  385. package/lib/typescript/config/features/RumConfiguration.type.d.ts +131 -0
  386. package/lib/typescript/config/features/RumConfiguration.type.d.ts.map +1 -0
  387. package/lib/typescript/config/features/RumConfigurationNative.d.ts +25 -0
  388. package/lib/typescript/config/features/RumConfigurationNative.d.ts.map +1 -0
  389. package/lib/typescript/config/features/TraceConfiguration.d.ts +10 -0
  390. package/lib/typescript/config/features/TraceConfiguration.d.ts.map +1 -0
  391. package/lib/typescript/config/features/TraceConfiguration.type.d.ts +11 -0
  392. package/lib/typescript/config/features/TraceConfiguration.type.d.ts.map +1 -0
  393. package/lib/typescript/config/features/TraceConfigurationNative.d.ts +4 -0
  394. package/lib/typescript/config/features/TraceConfigurationNative.d.ts.map +1 -0
  395. package/lib/typescript/config/types/BatchProcessingLevel.d.ts +18 -0
  396. package/lib/typescript/config/types/BatchProcessingLevel.d.ts.map +1 -0
  397. package/lib/typescript/config/types/BatchSize.d.ts +19 -0
  398. package/lib/typescript/config/types/BatchSize.d.ts.map +1 -0
  399. package/lib/typescript/config/types/InitializationMode.d.ts +5 -0
  400. package/lib/typescript/config/types/InitializationMode.d.ts.map +1 -0
  401. package/lib/typescript/config/types/InitializationModeForTelemetry.d.ts +2 -0
  402. package/lib/typescript/config/types/InitializationModeForTelemetry.d.ts.map +1 -0
  403. package/lib/typescript/config/types/ProxyConfiguration.d.ts.map +1 -0
  404. package/lib/typescript/config/types/SdkVerbosity.d.ts.map +1 -0
  405. package/lib/typescript/config/types/TrackingConsent.d.ts.map +1 -0
  406. package/lib/typescript/config/types/UploadFrequency.d.ts +18 -0
  407. package/lib/typescript/config/types/UploadFrequency.d.ts.map +1 -0
  408. package/lib/typescript/config/types/VitalsUpdateFrequency.d.ts +7 -0
  409. package/lib/typescript/config/types/VitalsUpdateFrequency.d.ts.map +1 -0
  410. package/lib/typescript/config/types/index.d.ts +10 -0
  411. package/lib/typescript/config/types/index.d.ts.map +1 -0
  412. package/lib/typescript/index.d.ts +20 -9
  413. package/lib/typescript/index.d.ts.map +1 -1
  414. package/lib/typescript/logs/DdLogs.d.ts +2 -1
  415. package/lib/typescript/logs/DdLogs.d.ts.map +1 -1
  416. package/lib/typescript/logs/eventMapper.d.ts +3 -2
  417. package/lib/typescript/logs/eventMapper.d.ts.map +1 -1
  418. package/lib/typescript/logs/types.d.ts +1 -16
  419. package/lib/typescript/logs/types.d.ts.map +1 -1
  420. package/lib/typescript/nativeModulesTypes.d.ts +2 -15
  421. package/lib/typescript/nativeModulesTypes.d.ts.map +1 -1
  422. package/lib/typescript/rum/DdRum.d.ts +10 -1
  423. package/lib/typescript/rum/DdRum.d.ts.map +1 -1
  424. package/lib/typescript/rum/eventMappers/errorEventMapper.d.ts +1 -1
  425. package/lib/typescript/rum/eventMappers/errorEventMapper.d.ts.map +1 -1
  426. package/lib/typescript/rum/helper.d.ts +10 -0
  427. package/lib/typescript/rum/helper.d.ts.map +1 -0
  428. package/lib/typescript/rum/instrumentation/DdRumErrorTracking.d.ts.map +1 -1
  429. package/lib/typescript/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.d.ts +6 -6
  430. package/lib/typescript/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.d.ts.map +1 -1
  431. package/lib/typescript/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.d.ts +7 -0
  432. package/lib/typescript/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.d.ts.map +1 -1
  433. package/lib/typescript/rum/instrumentation/resourceTracking/DdRumResourceTracking.d.ts +12 -6
  434. package/lib/typescript/rum/instrumentation/resourceTracking/DdRumResourceTracking.d.ts.map +1 -1
  435. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.d.ts +1 -0
  436. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.d.ts.map +1 -1
  437. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.d.ts +8 -0
  438. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.d.ts.map +1 -1
  439. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.d.ts +5 -17
  440. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.d.ts.map +1 -1
  441. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.d.ts +20 -0
  442. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.d.ts.map +1 -0
  443. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.d.ts +3 -24
  444. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.d.ts.map +1 -1
  445. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.d.ts +12 -0
  446. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.d.ts.map +1 -0
  447. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/headers.d.ts +24 -0
  448. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/headers.d.ts.map +1 -0
  449. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.d.ts +2 -1
  450. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.d.ts.map +1 -1
  451. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.d.ts.map +1 -1
  452. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.d.ts +1 -1
  453. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.d.ts.map +1 -1
  454. package/lib/typescript/rum/types.d.ts +47 -7
  455. package/lib/typescript/rum/types.d.ts.map +1 -1
  456. package/lib/typescript/sdk/AccountInfoSingleton/AccountInfoSingleton.d.ts +15 -0
  457. package/lib/typescript/sdk/AccountInfoSingleton/AccountInfoSingleton.d.ts.map +1 -0
  458. package/lib/typescript/sdk/AccountInfoSingleton/types.d.ts +6 -0
  459. package/lib/typescript/sdk/AccountInfoSingleton/types.d.ts.map +1 -0
  460. package/lib/typescript/sdk/AttributesEncoding/attributesEncoding.d.ts +13 -0
  461. package/lib/typescript/sdk/AttributesEncoding/attributesEncoding.d.ts.map +1 -0
  462. package/lib/typescript/sdk/AttributesEncoding/defaultEncoders.d.ts +33 -0
  463. package/lib/typescript/sdk/AttributesEncoding/defaultEncoders.d.ts.map +1 -0
  464. package/lib/typescript/{utils → sdk/AttributesEncoding}/errorUtils.d.ts +4 -4
  465. package/lib/typescript/sdk/AttributesEncoding/errorUtils.d.ts.map +1 -0
  466. package/lib/typescript/sdk/AttributesEncoding/helpers.d.ts +17 -0
  467. package/lib/typescript/sdk/AttributesEncoding/helpers.d.ts.map +1 -0
  468. package/lib/typescript/sdk/AttributesEncoding/types.d.ts +21 -0
  469. package/lib/typescript/sdk/AttributesEncoding/types.d.ts.map +1 -0
  470. package/lib/typescript/sdk/AttributesEncoding/utils.d.ts +7 -0
  471. package/lib/typescript/sdk/AttributesEncoding/utils.d.ts.map +1 -0
  472. package/lib/typescript/sdk/AttributesSingleton/AttributesSingleton.d.ts +5 -1
  473. package/lib/typescript/sdk/AttributesSingleton/AttributesSingleton.d.ts.map +1 -1
  474. package/lib/typescript/sdk/DatadogProvider/DatadogProvider.d.ts +4 -3
  475. package/lib/typescript/sdk/DatadogProvider/DatadogProvider.d.ts.map +1 -1
  476. package/lib/typescript/sdk/DatadogProvider/DatadogProviderState.d.ts +9 -0
  477. package/lib/typescript/sdk/DatadogProvider/DatadogProviderState.d.ts.map +1 -0
  478. package/lib/typescript/sdk/DdSdk.d.ts +2 -3
  479. package/lib/typescript/sdk/DdSdk.d.ts.map +1 -1
  480. package/lib/typescript/sdk/DdSdkInternal.d.ts +39 -0
  481. package/lib/typescript/sdk/DdSdkInternal.d.ts.map +1 -0
  482. package/lib/typescript/sdk/EventMappers/EventMapper.d.ts +3 -1
  483. package/lib/typescript/sdk/EventMappers/EventMapper.d.ts.map +1 -1
  484. package/lib/typescript/sdk/GlobalState/GlobalState.d.ts +3 -3
  485. package/lib/typescript/sdk/GlobalState/GlobalState.d.ts.map +1 -1
  486. package/lib/typescript/sdk/UserInfoSingleton/UserInfoSingleton.d.ts +2 -1
  487. package/lib/typescript/sdk/UserInfoSingleton/UserInfoSingleton.d.ts.map +1 -1
  488. package/lib/typescript/sdk/UserInfoSingleton/types.d.ts +1 -2
  489. package/lib/typescript/sdk/UserInfoSingleton/types.d.ts.map +1 -1
  490. package/lib/typescript/specs/NativeDdRum.d.ts +45 -0
  491. package/lib/typescript/specs/NativeDdRum.d.ts.map +1 -1
  492. package/lib/typescript/specs/NativeDdSdk.d.ts +34 -6
  493. package/lib/typescript/specs/NativeDdSdk.d.ts.map +1 -1
  494. package/lib/typescript/trace/DdTrace.d.ts +1 -2
  495. package/lib/typescript/trace/DdTrace.d.ts.map +1 -1
  496. package/lib/typescript/types.d.ts +74 -92
  497. package/lib/typescript/types.d.ts.map +1 -1
  498. package/lib/typescript/utils/longTasksUtils.d.ts +1 -1
  499. package/lib/typescript/utils/longTasksUtils.d.ts.map +1 -1
  500. package/lib/typescript/utils/singletonUtils.d.ts +2 -0
  501. package/lib/typescript/utils/singletonUtils.d.ts.map +1 -0
  502. package/lib/typescript/version.d.ts +1 -1
  503. package/lib/typescript/version.d.ts.map +1 -1
  504. package/package.json +2 -2
  505. package/src/DdSdkReactNative.tsx +246 -104
  506. package/src/InternalLog.tsx +1 -1
  507. package/src/__tests__/DdSdkReactNative.test.tsx +415 -207
  508. package/src/__tests__/DdSdkReactNativeConfiguration.test.ts +237 -153
  509. package/src/__tests__/InternalLog.test.tsx +1 -1
  510. package/src/__tests__/rum/instrumentation/DdEventsInterceptor.test.tsx +2 -2
  511. package/src/__tests__/rum/instrumentation/DdRumErrorTracking.test.tsx +139 -216
  512. package/src/__tests__/rum/instrumentation/DdRumUserInteractionTracking.test.tsx +10 -7
  513. package/src/config/DatadogProviderConfiguration.ts +17 -0
  514. package/src/config/FileBasedConfiguration.ts +464 -0
  515. package/src/config/FileBasedConfiguration.type.ts +66 -0
  516. package/src/config/__tests__/FileBasedConfiguration.test.ts +334 -0
  517. package/src/config/__tests__/__fixtures__/configuration-all-fields.json +57 -0
  518. package/src/config/__tests__/__fixtures__/malformed-configuration.json +4 -0
  519. package/src/config/async/AutoInstrumentationConfiguration.ts +126 -0
  520. package/src/config/async/PartialInitializationConfiguration.ts +58 -0
  521. package/src/config/async/asyncInitializationHelper.tsx +51 -0
  522. package/src/config/features/CoreConfiguration.ts +130 -0
  523. package/src/config/features/CoreConfiguration.type.ts +119 -0
  524. package/src/config/features/CoreConfigurationNative.ts +50 -0
  525. package/src/config/features/LogsConfiguration.ts +38 -0
  526. package/src/config/features/LogsConfiguration.type.ts +33 -0
  527. package/src/config/features/LogsConfigurationNative.ts +10 -0
  528. package/src/config/features/RumConfiguration.ts +137 -0
  529. package/src/config/features/RumConfiguration.type.ts +164 -0
  530. package/src/config/features/RumConfigurationNative.ts +26 -0
  531. package/src/config/features/TraceConfiguration.ts +24 -0
  532. package/src/config/features/TraceConfiguration.type.ts +17 -0
  533. package/src/config/features/TraceConfigurationNative.ts +8 -0
  534. package/src/config/types/BatchProcessingLevel.ts +23 -0
  535. package/src/config/types/BatchSize.ts +24 -0
  536. package/src/config/types/InitializationMode.ts +9 -0
  537. package/src/config/types/InitializationModeForTelemetry.ts +11 -0
  538. package/src/{ProxyConfiguration.tsx → config/types/ProxyConfiguration.ts} +6 -0
  539. package/src/config/types/UploadFrequency.tsx +23 -0
  540. package/src/config/types/VitalsUpdateFrequency.ts +11 -0
  541. package/src/config/types/index.ts +15 -0
  542. package/src/index.tsx +33 -16
  543. package/src/logs/DdLogs.ts +14 -13
  544. package/src/logs/__tests__/DdLogs.test.ts +60 -107
  545. package/src/logs/__tests__/eventMapper.test.ts +1 -1
  546. package/src/logs/eventMapper.ts +5 -4
  547. package/src/logs/types.ts +1 -20
  548. package/src/nativeModulesTypes.ts +2 -17
  549. package/src/rum/DdRum.ts +139 -42
  550. package/src/rum/__tests__/DdRum.test.ts +217 -47
  551. package/src/rum/eventMappers/errorEventMapper.ts +1 -1
  552. package/src/rum/helper.ts +62 -0
  553. package/src/rum/instrumentation/DdRumErrorTracking.tsx +20 -38
  554. package/src/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.ts +20 -32
  555. package/src/rum/instrumentation/interactionTracking/DdEventsInterceptor.tsx +1 -1
  556. package/src/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.tsx +18 -5
  557. package/src/rum/instrumentation/resourceTracking/DdRumResourceTracking.tsx +44 -23
  558. package/src/rum/instrumentation/resourceTracking/__tests__/DdRumResourceTracking.test.ts +2 -2
  559. package/src/rum/instrumentation/resourceTracking/__tests__/__utils__/XMLHttpRequestMock.ts +44 -23
  560. package/src/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.ts +24 -1
  561. package/src/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.tsx +17 -2
  562. package/src/rum/instrumentation/resourceTracking/distributedTracing/__tests__/distributedTracing.test.ts +327 -1
  563. package/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.tsx +22 -31
  564. package/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.ts +29 -0
  565. package/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.ts +54 -35
  566. package/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.ts +80 -0
  567. package/src/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.ts +1 -1
  568. package/src/rum/instrumentation/resourceTracking/distributedTracing/headers.ts +29 -0
  569. package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.ts +1 -1
  570. package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.ts +19 -7
  571. package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/__tests__/XHRProxy.test.ts +177 -119
  572. package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/__tests__/baggageHeaderUtils.test.ts +85 -13
  573. package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.ts +110 -52
  574. package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.ts +1 -1
  575. package/src/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.ts +1 -1
  576. package/src/rum/types.ts +68 -8
  577. package/src/sdk/AccountInfoSingleton/AccountInfoSingleton.ts +49 -0
  578. package/src/sdk/AccountInfoSingleton/__tests__/AccountInfoSingleton.test.ts +90 -0
  579. package/src/sdk/AccountInfoSingleton/types.ts +11 -0
  580. package/src/sdk/AttributesEncoding/__tests__/attributesEncoding.test.ts +518 -0
  581. package/src/sdk/AttributesEncoding/__tests__/defaultEncoders.test.ts +198 -0
  582. package/src/sdk/AttributesEncoding/attributesEncoding.ts +56 -0
  583. package/src/sdk/AttributesEncoding/defaultEncoders.ts +175 -0
  584. package/src/{utils → sdk/AttributesEncoding}/errorUtils.ts +50 -22
  585. package/src/sdk/AttributesEncoding/helpers.ts +176 -0
  586. package/src/sdk/AttributesEncoding/types.ts +33 -0
  587. package/src/sdk/AttributesEncoding/utils.ts +31 -0
  588. package/src/sdk/AttributesSingleton/AttributesSingleton.ts +25 -1
  589. package/src/sdk/AttributesSingleton/__tests__/AttributesSingleton.test.ts +52 -8
  590. package/src/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.tsx +2 -2
  591. package/src/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.tsx +1 -1
  592. package/src/sdk/DatadogInternalBridge/__tests__/DdSdkNativeBridge.test.tsx +1 -1
  593. package/src/sdk/DatadogProvider/Buffer/BoundedBuffer.ts +4 -4
  594. package/src/sdk/DatadogProvider/Buffer/__tests__/BoundedBuffer.test.ts +5 -5
  595. package/src/sdk/DatadogProvider/DatadogProvider.tsx +12 -16
  596. package/src/sdk/DatadogProvider/DatadogProviderState.ts +30 -0
  597. package/src/sdk/DatadogProvider/__tests__/__utils__/renderWithProvider.tsx +18 -7
  598. package/src/sdk/DatadogProvider/__tests__/initialization.test.tsx +59 -33
  599. package/src/sdk/DatadogProvider/__tests__/initializationModes.test.tsx +26 -10
  600. package/src/sdk/DdSdk.ts +8 -5
  601. package/src/sdk/DdSdkInternal.ts +121 -0
  602. package/src/sdk/EventMappers/EventMapper.ts +9 -4
  603. package/src/sdk/EventMappers/__tests__/EventMapper.test.ts +3 -3
  604. package/src/sdk/GlobalState/GlobalState.tsx +10 -11
  605. package/src/sdk/UserInfoSingleton/UserInfoSingleton.ts +9 -2
  606. package/src/sdk/UserInfoSingleton/__tests__/UserInfoSingleton.test.ts +46 -9
  607. package/src/sdk/UserInfoSingleton/types.ts +1 -4
  608. package/src/specs/NativeDdRum.ts +65 -0
  609. package/src/specs/NativeDdSdk.ts +40 -6
  610. package/src/trace/DdTrace.ts +11 -7
  611. package/src/trace/__tests__/DdTrace.test.ts +7 -8
  612. package/src/types.tsx +97 -76
  613. package/src/utils/__tests__/errorUtils.test.ts +1 -1
  614. package/src/utils/__tests__/singletonUtils.test.ts +75 -0
  615. package/src/utils/longTasksUtils.ts +1 -3
  616. package/src/utils/singletonUtils.ts +17 -0
  617. package/src/version.ts +1 -1
  618. package/lib/commonjs/DdSdkReactNativeConfiguration.js +0 -412
  619. package/lib/commonjs/DdSdkReactNativeConfiguration.js.map +0 -1
  620. package/lib/commonjs/ProxyConfiguration.js.map +0 -1
  621. package/lib/commonjs/SdkVerbosity.js.map +0 -1
  622. package/lib/commonjs/TrackingConsent.js.map +0 -1
  623. package/lib/commonjs/rum/DdAttributes.js.map +0 -1
  624. package/lib/commonjs/sdk/FileBasedConfiguration/FileBasedConfiguration.js +0 -185
  625. package/lib/commonjs/sdk/FileBasedConfiguration/FileBasedConfiguration.js.map +0 -1
  626. package/lib/commonjs/utils/argsUtils.js +0 -41
  627. package/lib/commonjs/utils/argsUtils.js.map +0 -1
  628. package/lib/commonjs/utils/errorUtils.js.map +0 -1
  629. package/lib/module/DdSdkReactNativeConfiguration.js +0 -403
  630. package/lib/module/DdSdkReactNativeConfiguration.js.map +0 -1
  631. package/lib/module/ProxyConfiguration.js.map +0 -1
  632. package/lib/module/SdkVerbosity.js.map +0 -1
  633. package/lib/module/TrackingConsent.js.map +0 -1
  634. package/lib/module/rum/DdAttributes.js.map +0 -1
  635. package/lib/module/sdk/FileBasedConfiguration/FileBasedConfiguration.js +0 -176
  636. package/lib/module/sdk/FileBasedConfiguration/FileBasedConfiguration.js.map +0 -1
  637. package/lib/module/utils/argsUtils.js +0 -35
  638. package/lib/module/utils/argsUtils.js.map +0 -1
  639. package/lib/module/utils/errorUtils.js.map +0 -1
  640. package/lib/typescript/DdSdkReactNativeConfiguration.d.ts +0 -376
  641. package/lib/typescript/DdSdkReactNativeConfiguration.d.ts.map +0 -1
  642. package/lib/typescript/ProxyConfiguration.d.ts.map +0 -1
  643. package/lib/typescript/SdkVerbosity.d.ts.map +0 -1
  644. package/lib/typescript/TrackingConsent.d.ts.map +0 -1
  645. package/lib/typescript/rum/DdAttributes.d.ts.map +0 -1
  646. package/lib/typescript/sdk/FileBasedConfiguration/FileBasedConfiguration.d.ts +0 -34
  647. package/lib/typescript/sdk/FileBasedConfiguration/FileBasedConfiguration.d.ts.map +0 -1
  648. package/lib/typescript/utils/argsUtils.d.ts +0 -8
  649. package/lib/typescript/utils/argsUtils.d.ts.map +0 -1
  650. package/lib/typescript/utils/errorUtils.d.ts.map +0 -1
  651. package/src/DdSdkReactNativeConfiguration.tsx +0 -582
  652. package/src/sdk/FileBasedConfiguration/FileBasedConfiguration.ts +0 -241
  653. package/src/sdk/FileBasedConfiguration/__tests__/FileBasedConfiguration.test.ts +0 -255
  654. package/src/sdk/FileBasedConfiguration/__tests__/__fixtures__/configuration-all-fields.json +0 -27
  655. package/src/sdk/FileBasedConfiguration/__tests__/__fixtures__/malformed-configuration.json +0 -5
  656. package/src/utils/__tests__/argsUtils.test.ts +0 -66
  657. package/src/utils/argsUtils.ts +0 -41
  658. /package/lib/commonjs/{rum/DdAttributes.js → DdAttributes.js} +0 -0
  659. /package/lib/commonjs/{SdkVerbosity.js → config/types/SdkVerbosity.js} +0 -0
  660. /package/lib/commonjs/{TrackingConsent.js → config/types/TrackingConsent.js} +0 -0
  661. /package/lib/module/{rum/DdAttributes.js → DdAttributes.js} +0 -0
  662. /package/lib/module/{SdkVerbosity.js → config/types/SdkVerbosity.js} +0 -0
  663. /package/lib/module/{TrackingConsent.js → config/types/TrackingConsent.js} +0 -0
  664. /package/lib/typescript/{rum/DdAttributes.d.ts → DdAttributes.d.ts} +0 -0
  665. /package/lib/typescript/{ProxyConfiguration.d.ts → config/types/ProxyConfiguration.d.ts} +0 -0
  666. /package/lib/typescript/{SdkVerbosity.d.ts → config/types/SdkVerbosity.d.ts} +0 -0
  667. /package/lib/typescript/{TrackingConsent.d.ts → config/types/TrackingConsent.d.ts} +0 -0
  668. /package/src/{rum/DdAttributes.ts → DdAttributes.ts} +0 -0
  669. /package/src/{SdkVerbosity.tsx → config/types/SdkVerbosity.ts} +0 -0
  670. /package/src/{TrackingConsent.tsx → config/types/TrackingConsent.ts} +0 -0
package/jest/mock.js CHANGED
@@ -27,16 +27,34 @@ module.exports = {
27
27
  .fn()
28
28
  .mockImplementation(() => new Promise(resolve => resolve())),
29
29
  isInitialized: jest.fn().mockImplementation(() => true),
30
- setUser: jest
31
- .fn()
32
- .mockImplementation(() => new Promise(resolve => resolve())),
33
30
  setUserInfo: jest
34
31
  .fn()
35
32
  .mockImplementation(() => new Promise(resolve => resolve())),
36
33
  addUserExtraInfo: jest
37
34
  .fn()
38
35
  .mockImplementation(() => new Promise(resolve => resolve())),
39
- setAttributes: jest
36
+ clearUserInfo: jest
37
+ .fn()
38
+ .mockImplementation(() => new Promise(resolve => resolve())),
39
+ setAccountInfo: jest
40
+ .fn()
41
+ .mockImplementation(() => new Promise(resolve => resolve())),
42
+ addAccountExtraInfo: jest
43
+ .fn()
44
+ .mockImplementation(() => new Promise(resolve => resolve())),
45
+ clearAccountInfo: jest
46
+ .fn()
47
+ .mockImplementation(() => new Promise(resolve => resolve())),
48
+ addAttribute: jest
49
+ .fn()
50
+ .mockImplementation(() => new Promise(resolve => resolve())),
51
+ removeAttribute: jest
52
+ .fn()
53
+ .mockImplementation(() => new Promise(resolve => resolve())),
54
+ addAttributes: jest
55
+ .fn()
56
+ .mockImplementation(() => new Promise(resolve => resolve())),
57
+ removeAttributes: jest
40
58
  .fn()
41
59
  .mockImplementation(() => new Promise(resolve => resolve())),
42
60
  setTrackingConsent: jest
@@ -110,6 +128,18 @@ module.exports = {
110
128
  addTiming: jest
111
129
  .fn()
112
130
  .mockImplementation(() => new Promise(resolve => resolve())),
131
+ addViewAttribute: jest
132
+ .fn()
133
+ .mockImplementation(() => new Promise(resolve => resolve())),
134
+ removeViewAttribute: jest
135
+ .fn()
136
+ .mockImplementation(() => new Promise(resolve => resolve())),
137
+ addViewAttributes: jest
138
+ .fn()
139
+ .mockImplementation(() => new Promise(resolve => resolve())),
140
+ removeViewAttributes: jest
141
+ .fn()
142
+ .mockImplementation(() => new Promise(resolve => resolve())),
113
143
  addViewLoadingTime: jest
114
144
  .fn()
115
145
  .mockImplementation(() => new Promise(resolve => resolve())),
@@ -124,6 +154,15 @@ module.exports = {
124
154
  .mockImplementation(
125
155
  () => new Promise(resolve => resolve('test-session-id'))
126
156
  ),
157
+ startFeatureOperation: jest
158
+ .fn()
159
+ .mockImplementation(() => new Promise(resolve => resolve())),
160
+ succeedFeatureOperation: jest
161
+ .fn()
162
+ .mockImplementation(() => new Promise(resolve => resolve())),
163
+ failFeatureOperation: jest
164
+ .fn()
165
+ .mockImplementation(() => new Promise() < (resolve => resolve())),
127
166
  setTimeProvider: jest.fn().mockImplementation(() => {}),
128
167
  timeProvider: jest.fn().mockReturnValue(undefined),
129
168
  getTracingContext: jest.fn().mockReturnValue(undefined),
@@ -0,0 +1 @@
1
+ {"version":3,"names":["DdAttributes","exports","errorSourceType","errorFingerprint","debugId"],"sourceRoot":"../../src","sources":["DdAttributes.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;;AAEO,MAAMA,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG;EACxB;AACJ;AACA;AACA;AACA;EACIE,eAAe,EAAE,uBAAuB;EAExC;AACJ;AACA;AACA;EACIC,gBAAgB,EAAE,uBAAuB;EAEzC;AACJ;AACA;AACA;AACA;EACIC,OAAO,EAAE;AACb,CAAC","ignoreList":[]}
@@ -6,23 +6,28 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.DdSdkReactNative = void 0;
7
7
  var _package = require("react-native/package.json");
8
8
  var _reactNative = require("react-native");
9
- var _DdSdkReactNativeConfiguration = require("./DdSdkReactNativeConfiguration");
10
9
  var _InternalLog = require("./InternalLog");
11
- var _SdkVerbosity = require("./SdkVerbosity");
10
+ var _FileBasedConfiguration = require("./config/FileBasedConfiguration");
11
+ var _AutoInstrumentationConfiguration = require("./config/async/AutoInstrumentationConfiguration");
12
+ var _asyncInitializationHelper = require("./config/async/asyncInitializationHelper");
13
+ var _CoreConfigurationNative = require("./config/features/CoreConfigurationNative");
14
+ var _CoreConfiguration = require("./config/features/CoreConfiguration");
15
+ var _RumConfiguration = require("./config/features/RumConfiguration");
16
+ var _SdkVerbosity = require("./config/types/SdkVerbosity");
17
+ var _types = require("./config/types");
12
18
  var _DdLogs = require("./logs/DdLogs");
13
19
  var _DdRum = require("./rum/DdRum");
14
20
  var _DdRumErrorTracking = require("./rum/instrumentation/DdRumErrorTracking");
15
21
  var _DdBabelInteractionTracking = require("./rum/instrumentation/interactionTracking/DdBabelInteractionTracking");
16
22
  var _DdRumUserInteractionTracking = require("./rum/instrumentation/interactionTracking/DdRumUserInteractionTracking");
17
23
  var _DdRumResourceTracking = require("./rum/instrumentation/resourceTracking/DdRumResourceTracking");
24
+ var _AccountInfoSingleton = require("./sdk/AccountInfoSingleton/AccountInfoSingleton");
18
25
  var _AttributesSingleton = require("./sdk/AttributesSingleton/AttributesSingleton");
19
26
  var _DdSdkInternalNativeBridge = require("./sdk/DatadogInternalBridge/DdSdkInternalNativeBridge");
20
27
  var _BufferSingleton = require("./sdk/DatadogProvider/Buffer/BufferSingleton");
21
- var _DdSdk = require("./sdk/DdSdk");
22
- var _FileBasedConfiguration = require("./sdk/FileBasedConfiguration/FileBasedConfiguration");
28
+ var _DdSdkInternal = require("./sdk/DdSdkInternal");
23
29
  var _GlobalState = require("./sdk/GlobalState/GlobalState");
24
30
  var _UserInfoSingleton = require("./sdk/UserInfoSingleton/UserInfoSingleton");
25
- var _types = require("./types");
26
31
  var _longTasksUtils = require("./utils/longTasksUtils");
27
32
  var _version = require("./version");
28
33
  /*
@@ -53,18 +58,18 @@ class DdSdkReactNative {
53
58
  DdSdkReactNative.enableFeatures(configuration);
54
59
  };
55
60
  static initializeNativeSDK = async (configuration, params) => {
56
- if (_GlobalState.GlobalState.instance.isInitialized) {
61
+ if (_GlobalState.GlobalState.isInitialized) {
57
62
  _InternalLog.InternalLog.log("Can't initialize Datadog, SDK was already initialized", _SdkVerbosity.SdkVerbosity.WARN);
58
63
  if (!__DEV__) {
59
- _DdSdk.DdSdk.telemetryDebug('RN SDK was already initialized in javascript');
64
+ _DdSdkInternal.NativeDdSdk.telemetryDebug('RN SDK was already initialized in javascript');
60
65
  }
61
66
  return new Promise(resolve => resolve());
62
67
  }
63
68
  _InternalLog.InternalLog.verbosity = configuration.verbosity;
64
69
  (0, _DdSdkInternalNativeBridge.registerNativeBridge)();
65
- await _DdSdk.DdSdk.initialize(DdSdkReactNative.buildConfiguration(configuration, params));
70
+ await _DdSdkInternal.NativeDdSdk.initialize(DdSdkReactNative.buildConfiguration(configuration, params));
66
71
  _InternalLog.InternalLog.log('Datadog SDK was initialized', _SdkVerbosity.SdkVerbosity.INFO);
67
- _GlobalState.GlobalState.instance.isInitialized = true;
72
+ _GlobalState.GlobalState.isInitialized = true;
68
73
  _BufferSingleton.BufferSingleton.onInitialization();
69
74
  };
70
75
 
@@ -78,12 +83,12 @@ class DdSdkReactNative {
78
83
  initializationModeForTelemetry: 'FILE'
79
84
  });
80
85
  }
81
- if (configuration.initializationMode === _DdSdkReactNativeConfiguration.InitializationMode.SYNC) {
86
+ if (configuration.initializationMode === _types.InitializationMode.SYNC) {
82
87
  return DdSdkReactNative.initializeNativeSDK(configuration, {
83
88
  initializationModeForTelemetry: 'SYNC'
84
89
  });
85
90
  }
86
- if (configuration.initializationMode === _DdSdkReactNativeConfiguration.InitializationMode.ASYNC) {
91
+ if (configuration.initializationMode === _types.InitializationMode.ASYNC) {
87
92
  return _reactNative.InteractionManager.runAfterInteractions(() => {
88
93
  return DdSdkReactNative.initializeNativeSDK(configuration, {
89
94
  initializationModeForTelemetry: 'ASYNC'
@@ -91,7 +96,7 @@ class DdSdkReactNative {
91
96
  });
92
97
  }
93
98
  // TODO: Remove when DdSdkReactNativeConfiguration is deprecated
94
- if (configuration instanceof _DdSdkReactNativeConfiguration.DdSdkReactNativeConfiguration) {
99
+ if (configuration instanceof _CoreConfiguration.CoreConfiguration) {
95
100
  return DdSdkReactNative.initializeNativeSDK(configuration, {
96
101
  initializationModeForTelemetry: 'SYNC'
97
102
  });
@@ -106,7 +111,7 @@ class DdSdkReactNative {
106
111
  };
107
112
  static _enableFeaturesFromDatadogProviderAsync = async features => {
108
113
  DdSdkReactNative.features = features;
109
- DdSdkReactNative.enableFeatures((0, _DdSdkReactNativeConfiguration.addDefaultValuesToAutoInstrumentationConfiguration)(features));
114
+ DdSdkReactNative.enableFeatures((0, _AutoInstrumentationConfiguration.addDefaultValuesToAutoInstrumentationConfiguration)(features));
110
115
  };
111
116
  /**
112
117
  * FOR INTERNAL USE ONLY.
@@ -116,35 +121,53 @@ class DdSdkReactNative {
116
121
  _InternalLog.InternalLog.log("Can't initialize Datadog, make sure the DatadogProvider component is mounted before calling this function", _SdkVerbosity.SdkVerbosity.WARN);
117
122
  return new Promise(resolve => resolve());
118
123
  }
119
- return DdSdkReactNative.initializeNativeSDK((0, _DdSdkReactNativeConfiguration.buildConfigurationFromPartialConfiguration)(DdSdkReactNative.features, configuration), {
124
+ return DdSdkReactNative.initializeNativeSDK((0, _asyncInitializationHelper.buildConfigurationFromPartialConfiguration)(DdSdkReactNative.features, configuration), {
120
125
  initializationModeForTelemetry: 'PARTIAL'
121
126
  });
122
127
  };
123
128
 
129
+ /**
130
+ * Adds a specific attribute to the global context attached with all future Logs, Spans and RUM.
131
+ * @param key: Key that identifies the attribute.
132
+ * @param value: Value linked to the attribute.
133
+ */
134
+ static addAttribute = async (key, value) => {
135
+ _InternalLog.InternalLog.log(`Adding attribute ${JSON.stringify(value)} for key ${key}`, _SdkVerbosity.SdkVerbosity.DEBUG);
136
+ await _DdSdkInternal.NativeDdSdk.addAttribute(key, {
137
+ value
138
+ });
139
+ _AttributesSingleton.AttributesSingleton.getInstance().addAttribute(key, value);
140
+ };
141
+
142
+ /**
143
+ * Removes an attribute from the context attached with all future Logs, Spans and RUM events.
144
+ * @param key: They key associated with the attribute to be removed.
145
+ */
146
+ static removeAttribute = async key => {
147
+ _InternalLog.InternalLog.log(`Removing attribute for key ${key}`, _SdkVerbosity.SdkVerbosity.DEBUG);
148
+ await _DdSdkInternal.NativeDdSdk.removeAttribute(key);
149
+ _AttributesSingleton.AttributesSingleton.getInstance().removeAttribute(key);
150
+ };
151
+
124
152
  /**
125
153
  * Adds a set of attributes to the global context attached with all future Logs, Spans and RUM events.
126
- * To remove an attribute, set it to `undefined` in a call to `setAttributes`.
127
154
  * @param attributes: The global context attributes.
128
155
  * @returns a Promise.
129
156
  */
130
- // eslint-disable-next-line @typescript-eslint/ban-types
131
- static setAttributes = async attributes => {
132
- _InternalLog.InternalLog.log(`Setting attributes ${JSON.stringify(attributes)}`, _SdkVerbosity.SdkVerbosity.DEBUG);
133
- await _DdSdk.DdSdk.setAttributes(attributes);
134
- _AttributesSingleton.AttributesSingleton.getInstance().setAttributes(attributes);
157
+ static addAttributes = async attributes => {
158
+ _InternalLog.InternalLog.log(`Adding attributes ${JSON.stringify(attributes)}`, _SdkVerbosity.SdkVerbosity.DEBUG);
159
+ await _DdSdkInternal.NativeDdSdk.addAttributes(attributes);
160
+ _AttributesSingleton.AttributesSingleton.getInstance().addAttributes(attributes);
135
161
  };
136
162
 
137
163
  /**
138
- * Set the user information.
139
- * @deprecated UserInfo id property is now mandatory (please user setUserInfo instead)
140
- * @param user: The user object (use builtin attributes: 'id', 'email', 'name', and/or any custom attribute).
141
- * @returns a Promise.
164
+ * Removes a set of attributes from the context attached with all future Logs, Spans and RUM events.
165
+ * @param keys: They keys associated with the attributes to be removed.
142
166
  */
143
- // eslint-disable-next-line @typescript-eslint/ban-types
144
- static setUser = async user => {
145
- _InternalLog.InternalLog.log(`Setting user ${JSON.stringify(user)}`, _SdkVerbosity.SdkVerbosity.DEBUG);
146
- await _DdSdk.DdSdk.setUser(user);
147
- _UserInfoSingleton.UserInfoSingleton.getInstance().setUserInfo(user);
167
+ static removeAttributes = async keys => {
168
+ _InternalLog.InternalLog.log(`Removing attributes for keys ${JSON.stringify(keys)}`, _SdkVerbosity.SdkVerbosity.DEBUG);
169
+ await _DdSdkInternal.NativeDdSdk.removeAttributes(keys);
170
+ _AttributesSingleton.AttributesSingleton.getInstance().removeAttributes(keys);
148
171
  };
149
172
 
150
173
  /**
@@ -157,10 +180,20 @@ class DdSdkReactNative {
157
180
  */
158
181
  static setUserInfo = async userInfo => {
159
182
  _InternalLog.InternalLog.log(`Setting user ${JSON.stringify(userInfo)}`, _SdkVerbosity.SdkVerbosity.DEBUG);
160
- await _DdSdk.DdSdk.setUserInfo(userInfo);
183
+ await _DdSdkInternal.NativeDdSdk.setUserInfo(userInfo);
161
184
  _UserInfoSingleton.UserInfoSingleton.getInstance().setUserInfo(userInfo);
162
185
  };
163
186
 
187
+ /**
188
+ * Clears the user information.
189
+ * @returns a Promise.
190
+ */
191
+ static clearUserInfo = async () => {
192
+ _InternalLog.InternalLog.log('Clearing user info', _SdkVerbosity.SdkVerbosity.DEBUG);
193
+ await _DdSdkInternal.NativeDdSdk.clearUserInfo();
194
+ _UserInfoSingleton.UserInfoSingleton.getInstance().clearUserInfo();
195
+ };
196
+
164
197
  /**
165
198
  * Set the user information.
166
199
  * @param extraUserInfo: The additional information. (To set the id, name or email please user setUserInfo).
@@ -169,6 +202,10 @@ class DdSdkReactNative {
169
202
  static addUserExtraInfo = async extraUserInfo => {
170
203
  _InternalLog.InternalLog.log(`Adding extra user info ${JSON.stringify(extraUserInfo)}`, _SdkVerbosity.SdkVerbosity.DEBUG);
171
204
  const userInfo = _UserInfoSingleton.UserInfoSingleton.getInstance().getUserInfo();
205
+ if (!userInfo) {
206
+ _InternalLog.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.SdkVerbosity.WARN);
207
+ return;
208
+ }
172
209
  const updatedUserInfo = {
173
210
  ...userInfo,
174
211
  extraInfo: {
@@ -176,10 +213,53 @@ class DdSdkReactNative {
176
213
  ...extraUserInfo
177
214
  }
178
215
  };
179
- await _DdSdk.DdSdk.addUserExtraInfo(extraUserInfo);
216
+ await _DdSdkInternal.NativeDdSdk.addUserExtraInfo(extraUserInfo);
180
217
  _UserInfoSingleton.UserInfoSingleton.getInstance().setUserInfo(updatedUserInfo);
181
218
  };
182
219
 
220
+ /**
221
+ * Sets the account information.
222
+ * @param id: A mandatory unique account identifier (relevant to your business domain).
223
+ * @param name: The account name.
224
+ * @param extraInfo: Additional information.
225
+ * @returns a Promise.
226
+ */
227
+ static setAccountInfo = async accountInfo => {
228
+ _InternalLog.InternalLog.log(`Setting account ${JSON.stringify(accountInfo)}`, _SdkVerbosity.SdkVerbosity.DEBUG);
229
+ await _DdSdkInternal.NativeDdSdk.setAccountInfo(accountInfo);
230
+ _AccountInfoSingleton.AccountInfoSingleton.getInstance().setAccountInfo(accountInfo);
231
+ };
232
+
233
+ /**
234
+ * Clears the account information.
235
+ * @returns a Promise.
236
+ */
237
+ static clearAccountInfo = async () => {
238
+ _InternalLog.InternalLog.log('Clearing account info', _SdkVerbosity.SdkVerbosity.DEBUG);
239
+ await _DdSdkInternal.NativeDdSdk.clearAccountInfo();
240
+ _AccountInfoSingleton.AccountInfoSingleton.getInstance().clearAccountInfo();
241
+ };
242
+
243
+ /**
244
+ * Set the account information.
245
+ * @param extraAccountInfo: The additional information. (To set the id or name please use setAccountInfo).
246
+ * @returns a Promise.
247
+ */
248
+ static addAccountExtraInfo = async extraAccountInfo => {
249
+ _InternalLog.InternalLog.log(`Adding extra account info ${JSON.stringify(extraAccountInfo)}`, _SdkVerbosity.SdkVerbosity.DEBUG);
250
+ const accountInfo = _AccountInfoSingleton.AccountInfoSingleton.getInstance().getAccountInfo();
251
+ if (!accountInfo) {
252
+ _InternalLog.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.SdkVerbosity.WARN);
253
+ return;
254
+ }
255
+ const extraInfo = {
256
+ ...accountInfo.extraInfo,
257
+ ...extraAccountInfo
258
+ };
259
+ await _DdSdkInternal.NativeDdSdk.addAccountExtraInfo(extraInfo);
260
+ _AccountInfoSingleton.AccountInfoSingleton.getInstance().addAccountExtraInfo(extraAccountInfo);
261
+ };
262
+
183
263
  /**
184
264
  * Set the tracking consent regarding the data collection.
185
265
  * @param trackingConsent: One of TrackingConsent values.
@@ -187,7 +267,7 @@ class DdSdkReactNative {
187
267
  */
188
268
  static setTrackingConsent = consent => {
189
269
  _InternalLog.InternalLog.log(`Setting consent ${consent}`, _SdkVerbosity.SdkVerbosity.DEBUG);
190
- return _DdSdk.DdSdk.setTrackingConsent(consent);
270
+ return _DdSdkInternal.NativeDdSdk.setTrackingConsent(consent);
191
271
  };
192
272
 
193
273
  /**
@@ -196,9 +276,12 @@ class DdSdkReactNative {
196
276
  */
197
277
  static clearAllData = () => {
198
278
  _InternalLog.InternalLog.log('Clearing all data', _SdkVerbosity.SdkVerbosity.DEBUG);
199
- return _DdSdk.DdSdk.clearAllData();
279
+ return _DdSdkInternal.NativeDdSdk.clearAllData();
200
280
  };
201
281
  static buildConfiguration = (configuration, params) => {
282
+ if (configuration.additionalConfiguration === undefined) {
283
+ configuration.additionalConfiguration = {};
284
+ }
202
285
  configuration.additionalConfiguration[DdSdkReactNative.DD_SOURCE_KEY] = 'react-native';
203
286
  configuration.additionalConfiguration[DdSdkReactNative.DD_SDK_VERSION] = _version.version;
204
287
  if (configuration.version) {
@@ -212,55 +295,75 @@ class DdSdkReactNative {
212
295
  if (_package.version) {
213
296
  configuration.additionalConfiguration[DdSdkReactNative.DD_REACT_NATIVE_VERSION] = `${_package.version}`;
214
297
  }
215
- 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, {
298
+ const rumConfiguration = configuration.rumConfiguration;
299
+ if (rumConfiguration) {
300
+ const longTaskThresholdMs = rumConfiguration.longTaskThresholdMs || _RumConfiguration.RUM_DEFAULTS.longTaskThresholdMs;
301
+ rumConfiguration.longTaskThresholdMs = (0, _longTasksUtils.adaptLongTaskThreshold)(longTaskThresholdMs);
302
+ const nativeLongTaskThresholdMs = configuration.rumConfiguration?.nativeLongTaskThresholdMs ?? _RumConfiguration.RUM_DEFAULTS.nativeLongTaskThresholdMs;
303
+ rumConfiguration.nativeLongTaskThresholdMs = (0, _longTasksUtils.adaptLongTaskThreshold)(nativeLongTaskThresholdMs);
304
+ }
305
+ const trackInteractions = configuration.rumConfiguration?.trackInteractions || _RumConfiguration.RUM_DEFAULTS.trackInteractions;
306
+ const trackResources = configuration.rumConfiguration?.trackResources || _RumConfiguration.RUM_DEFAULTS.trackResources;
307
+ const trackErrors = configuration.rumConfiguration?.trackErrors || _RumConfiguration.RUM_DEFAULTS.trackErrors;
308
+ return new _CoreConfigurationNative.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, {
216
309
  initializationType: params.initializationModeForTelemetry,
217
- trackErrors: configuration.trackErrors,
218
- trackInteractions: configuration.trackInteractions,
219
- trackNetworkRequests: configuration.trackResources,
310
+ trackErrors,
311
+ trackInteractions,
312
+ trackNetworkRequests: trackResources,
220
313
  // eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
221
314
  reactNativeVersion: require('react-native/package.json').version,
222
315
  // eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
223
316
  reactVersion: require('react/package.json').version
224
- }, configuration.nativeViewTracking, configuration.nativeInteractionTracking, configuration.verbosity, configuration.proxyConfig, configuration.serviceName, (0, _DdSdkReactNativeConfiguration.formatFirstPartyHosts)(configuration.firstPartyHosts), configuration.bundleLogsWithRum, configuration.bundleLogsWithTraces, configuration.trackNonFatalAnrs, configuration.appHangThreshold, configuration.resourceTracingSamplingRate, configuration.trackWatchdogTerminations, configuration.batchProcessingLevel, configuration.initialResourceThreshold);
317
+ });
225
318
  };
226
319
  static enableFeatures(configuration) {
320
+ const firstPartyHosts = configuration.rumConfiguration?.firstPartyHosts || _RumConfiguration.RUM_DEFAULTS.getFirstPartyHosts();
321
+ const trackInteractions = configuration.rumConfiguration?.trackInteractions || _RumConfiguration.RUM_DEFAULTS.trackInteractions;
322
+ const trackResources = configuration.rumConfiguration?.trackResources || _RumConfiguration.RUM_DEFAULTS.trackResources;
323
+ const trackErrors = configuration.rumConfiguration?.trackErrors || _RumConfiguration.RUM_DEFAULTS.trackErrors;
324
+ const actionNameAttribute = configuration.rumConfiguration?.actionNameAttribute;
325
+ const resourceTraceSampleRate = configuration.rumConfiguration?.resourceTraceSampleRate || _RumConfiguration.RUM_DEFAULTS.resourceTraceSampleRate;
326
+ const logEventMapper = configuration.logsConfiguration?.logEventMapper;
327
+ const errorEventMapper = configuration.rumConfiguration?.errorEventMapper;
328
+ const resourceEventMapper = configuration.rumConfiguration?.resourceEventMapper;
329
+ const actionEventMapper = configuration.rumConfiguration?.actionEventMapper;
227
330
  if (globalThis.__DD_RN_BABEL_PLUGIN_ENABLED__) {
228
331
  _DdBabelInteractionTracking.DdBabelInteractionTracking.config = {
229
- trackInteractions: configuration.trackInteractions,
230
- useAccessibilityLabel: configuration.useAccessibilityLabel
332
+ trackInteractions,
333
+ useAccessibilityLabel: configuration.rumConfiguration?.useAccessibilityLabel || _RumConfiguration.RUM_DEFAULTS.useAccessibilityLabel
231
334
  };
232
- _DdBabelInteractionTracking.DdBabelInteractionTracking.getInstance(_DdRum.DdRum);
335
+ _DdBabelInteractionTracking.DdBabelInteractionTracking.attachRumInstance(_DdRum.DdRum);
233
336
  }
234
337
  if (DdSdkReactNative.wasAutoInstrumented) {
235
338
  _InternalLog.InternalLog.log("Can't auto instrument Datadog, SDK was already instrumented", _SdkVerbosity.SdkVerbosity.WARN);
236
339
  return;
237
340
  }
238
- if (configuration.trackInteractions && !globalThis.__DD_RN_BABEL_PLUGIN_ENABLED__) {
341
+ if (trackInteractions && !globalThis.__DD_RN_BABEL_PLUGIN_ENABLED__) {
239
342
  _DdRumUserInteractionTracking.DdRumUserInteractionTracking.startTracking({
240
- actionNameAttribute: configuration.actionNameAttribute,
241
- useAccessibilityLabel: configuration.useAccessibilityLabel
343
+ actionNameAttribute,
344
+ useAccessibilityLabel: configuration.rumConfiguration?.useAccessibilityLabel
242
345
  });
243
346
  }
244
- if (configuration.trackResources) {
347
+ if (trackResources) {
245
348
  _DdRumResourceTracking.DdRumResourceTracking.startTracking({
246
- tracingSamplingRate: configuration.resourceTracingSamplingRate,
247
- firstPartyHosts: (0, _DdSdkReactNativeConfiguration.formatFirstPartyHosts)(configuration.firstPartyHosts)
349
+ resourceTraceSampleRate,
350
+ firstPartyHosts
248
351
  });
249
352
  }
250
- if (configuration.trackErrors) {
353
+ if (trackErrors) {
251
354
  _DdRumErrorTracking.DdRumErrorTracking.startTracking();
252
355
  }
253
- if (configuration.logEventMapper) {
254
- _DdLogs.DdLogs.registerLogEventMapper(configuration.logEventMapper);
356
+ if (logEventMapper) {
357
+ _DdLogs.DdLogs.registerLogEventMapper(logEventMapper);
255
358
  }
256
- if (configuration.errorEventMapper) {
257
- _DdRum.DdRum.registerErrorEventMapper(configuration.errorEventMapper);
359
+ if (errorEventMapper) {
360
+ _DdRum.DdRum.registerErrorEventMapper(errorEventMapper);
258
361
  }
259
- if (configuration.resourceEventMapper) {
260
- _DdRum.DdRum.registerResourceEventMapper(configuration.resourceEventMapper);
362
+ if (resourceEventMapper) {
363
+ _DdRum.DdRum.registerResourceEventMapper(resourceEventMapper);
261
364
  }
262
- if (configuration.actionEventMapper) {
263
- _DdRum.DdRum.registerActionEventMapper(configuration.actionEventMapper);
365
+ if (actionEventMapper) {
366
+ _DdRum.DdRum.registerActionEventMapper(actionEventMapper);
264
367
  }
265
368
  DdSdkReactNative.wasAutoInstrumented = true;
266
369
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_package","require","_reactNative","_DdSdkReactNativeConfiguration","_InternalLog","_SdkVerbosity","_DdLogs","_DdRum","_DdRumErrorTracking","_DdBabelInteractionTracking","_DdRumUserInteractionTracking","_DdRumResourceTracking","_AttributesSingleton","_DdSdkInternalNativeBridge","_BufferSingleton","_DdSdk","_FileBasedConfiguration","_GlobalState","_UserInfoSingleton","_types","_longTasksUtils","_version","DdSdkReactNative","DD_SOURCE_KEY","DD_SDK_VERSION","DD_VERSION","DD_VERSION_SUFFIX","DD_REACT_NATIVE_VERSION","wasAutoInstrumented","initialize","configuration","initializeNativeSDK","initializationModeForTelemetry","enableFeatures","params","GlobalState","instance","isInitialized","InternalLog","log","SdkVerbosity","WARN","__DEV__","DdSdk","telemetryDebug","Promise","resolve","verbosity","registerNativeBridge","buildConfiguration","INFO","BufferSingleton","onInitialization","_initializeFromDatadogProvider","FileBasedConfiguration","initializationMode","InitializationMode","SYNC","ASYNC","InteractionManager","runAfterInteractions","DdSdkReactNativeConfiguration","_enableFeaturesFromDatadogProvider","features","_enableFeaturesFromDatadogProviderAsync","addDefaultValuesToAutoInstrumentationConfiguration","_initializeFromDatadogProviderWithConfigurationAsync","buildConfigurationFromPartialConfiguration","setAttributes","attributes","JSON","stringify","DEBUG","AttributesSingleton","getInstance","setUser","user","UserInfoSingleton","setUserInfo","userInfo","addUserExtraInfo","extraUserInfo","getUserInfo","updatedUserInfo","extraInfo","setTrackingConsent","consent","clearAllData","additionalConfiguration","sdkVersion","version","versionSuffix","reactNativeVersion","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","reactVersion","nativeViewTracking","nativeInteractionTracking","proxyConfig","serviceName","formatFirstPartyHosts","firstPartyHosts","bundleLogsWithRum","bundleLogsWithTraces","trackNonFatalAnrs","appHangThreshold","resourceTracingSamplingRate","trackWatchdogTerminations","batchProcessingLevel","initialResourceThreshold","globalThis","__DD_RN_BABEL_PLUGIN_ENABLED__","DdBabelInteractionTracking","config","useAccessibilityLabel","DdRum","DdRumUserInteractionTracking","startTracking","actionNameAttribute","DdRumResourceTracking","tracingSamplingRate","DdRumErrorTracking","logEventMapper","DdLogs","registerLogEventMapper","errorEventMapper","registerErrorEventMapper","resourceEventMapper","registerResourceEventMapper","actionEventMapper","registerActionEventMapper","exports"],"sourceRoot":"../../src","sources":["DdSdkReactNative.tsx"],"mappings":";;;;;;AAMA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AASA,IAAAE,8BAAA,GAAAF,OAAA;AAOA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAEA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AACA,IAAAQ,2BAAA,GAAAR,OAAA;AACA,IAAAS,6BAAA,GAAAT,OAAA;AACA,IAAAU,sBAAA,GAAAV,OAAA;AACA,IAAAW,oBAAA,GAAAX,OAAA;AAEA,IAAAY,0BAAA,GAAAZ,OAAA;AACA,IAAAa,gBAAA,GAAAb,OAAA;AACA,IAAAc,MAAA,GAAAd,OAAA;AACA,IAAAe,uBAAA,GAAAf,OAAA;AACA,IAAAgB,YAAA,GAAAhB,OAAA;AACA,IAAAiB,kBAAA,GAAAjB,OAAA;AAEA,IAAAkB,MAAA,GAAAlB,OAAA;AACA,IAAAmB,eAAA,GAAAnB,OAAA;AACA,IAAAoB,QAAA,GAAApB,OAAA;AA3CA;AACA;AACA;AACA;AACA;;AAyCA;AACA;AACA;AACO,MAAMqB,gBAAgB,CAAC;EAC1B,OAAwBC,aAAa,GAAG,YAAY;EACpD,OAAwBC,cAAc,GAAG,iBAAiB;EAC1D,OAAwBC,UAAU,GAAG,aAAa;EAClD,OAAwBC,iBAAiB,GAAG,oBAAoB;EAChE,OAAwBC,uBAAuB,GAC3C,0BAA0B;EAE9B,OAAeC,mBAAmB,GAAG,KAAK;EAG1C;AACJ;AACA;AACA;AACA;EACI,OAAOC,UAAU,GAAG,MAChB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E,IAAAD,oDAAqB,EAClC7F,aAAa,CAAC8F,eAClB;MACJ,CAAC,CAAC;IACN;IAEA,IAAI9F,aAAa,CAACoF,WAAW,EAAE;MAC3B8B,sCAAkB,CAACJ,aAAa,CAAC,CAAC;IACtC;IAEA,IAAI9G,aAAa,CAACmH,cAAc,EAAE;MAC9BC,cAAM,CAACC,sBAAsB,CAACrH,aAAa,CAACmH,cAAc,CAAC;IAC/D;IAEA,IAAInH,aAAa,CAACsH,gBAAgB,EAAE;MAChCV,YAAK,CAACW,wBAAwB,CAACvH,aAAa,CAACsH,gBAAgB,CAAC;IAClE;IAEA,IAAItH,aAAa,CAACwH,mBAAmB,EAAE;MACnCZ,YAAK,CAACa,2BAA2B,CAC7BzH,aAAa,CAACwH,mBAClB,CAAC;IACL;IAEA,IAAIxH,aAAa,CAAC0H,iBAAiB,EAAE;MACjCd,YAAK,CAACe,yBAAyB,CAAC3H,aAAa,CAAC0H,iBAAiB,CAAC;IACpE;IAEAlI,gBAAgB,CAACM,mBAAmB,GAAG,IAAI;EAC/C;AACJ;AAAC8H,OAAA,CAAApI,gBAAA,GAAAA,gBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_package","require","_reactNative","_InternalLog","_FileBasedConfiguration","_AutoInstrumentationConfiguration","_asyncInitializationHelper","_CoreConfigurationNative","_CoreConfiguration","_RumConfiguration","_SdkVerbosity","_types","_DdLogs","_DdRum","_DdRumErrorTracking","_DdBabelInteractionTracking","_DdRumUserInteractionTracking","_DdRumResourceTracking","_AccountInfoSingleton","_AttributesSingleton","_DdSdkInternalNativeBridge","_BufferSingleton","_DdSdkInternal","_GlobalState","_UserInfoSingleton","_longTasksUtils","_version","DdSdkReactNative","DD_SOURCE_KEY","DD_SDK_VERSION","DD_VERSION","DD_VERSION_SUFFIX","DD_REACT_NATIVE_VERSION","wasAutoInstrumented","initialize","configuration","initializeNativeSDK","initializationModeForTelemetry","enableFeatures","params","GlobalState","isInitialized","InternalLog","log","SdkVerbosity","WARN","__DEV__","NativeDdSdk","telemetryDebug","Promise","resolve","verbosity","registerNativeBridge","buildConfiguration","INFO","BufferSingleton","onInitialization","_initializeFromDatadogProvider","FileBasedConfiguration","initializationMode","InitializationMode","SYNC","ASYNC","InteractionManager","runAfterInteractions","CoreConfiguration","_enableFeaturesFromDatadogProvider","features","_enableFeaturesFromDatadogProviderAsync","addDefaultValuesToAutoInstrumentationConfiguration","_initializeFromDatadogProviderWithConfigurationAsync","buildConfigurationFromPartialConfiguration","addAttribute","key","value","JSON","stringify","DEBUG","AttributesSingleton","getInstance","removeAttribute","addAttributes","attributes","removeAttributes","keys","setUserInfo","userInfo","UserInfoSingleton","clearUserInfo","addUserExtraInfo","extraUserInfo","getUserInfo","updatedUserInfo","extraInfo","setAccountInfo","accountInfo","AccountInfoSingleton","clearAccountInfo","addAccountExtraInfo","extraAccountInfo","getAccountInfo","setTrackingConsent","consent","clearAllData","additionalConfiguration","undefined","sdkVersion","version","versionSuffix","reactNativeVersion","rumConfiguration","longTaskThresholdMs","RUM_DEFAULTS","adaptLongTaskThreshold","nativeLongTaskThresholdMs","trackInteractions","trackResources","trackErrors","DdSdkNativeConfiguration","clientToken","env","site","service","trackingConsent","uploadFrequency","batchSize","batchProcessingLevel","proxyConfiguration","attributeEncoders","logsConfiguration","traceConfiguration","initializationType","trackNetworkRequests","reactVersion","firstPartyHosts","getFirstPartyHosts","actionNameAttribute","resourceTraceSampleRate","logEventMapper","errorEventMapper","resourceEventMapper","actionEventMapper","globalThis","__DD_RN_BABEL_PLUGIN_ENABLED__","DdBabelInteractionTracking","config","useAccessibilityLabel","attachRumInstance","DdRum","DdRumUserInteractionTracking","startTracking","DdRumResourceTracking","DdRumErrorTracking","DdLogs","registerLogEventMapper","registerErrorEventMapper","registerResourceEventMapper","registerActionEventMapper","exports"],"sourceRoot":"../../src","sources":["DdSdkReactNative.tsx"],"mappings":";;;;;;AAMA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA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iBAAiB;QACjB+B,qBAAqB,EACjB/G,aAAa,CAAC2E,gBAAgB,EAAEoC,qBAAqB,IACrDlC,8BAAY,CAACkC;MACrB,CAAC;MAEDF,sDAA0B,CAACG,iBAAiB,CAACC,YAAK,CAAC;IACvD;IAEA,IAAIzH,gBAAgB,CAACM,mBAAmB,EAAE;MACtCS,wBAAW,CAACC,GAAG,CACX,6DAA6D,EAC7DC,0BAAY,CAACC,IACjB,CAAC;MACD;IACJ;IAEA,IAAIsE,iBAAiB,IAAI,CAAC2B,UAAU,CAACC,8BAA8B,EAAE;MACjEM,0DAA4B,CAACC,aAAa,CAAC;QACvCd,mBAAmB;QACnBU,qBAAqB,EACjB/G,aAAa,CAAC2E,gBAAgB,EAAEoC;MACxC,CAAC,CAAC;IACN;IAEA,IAAI9B,cAAc,EAAE;MAChBmC,4CAAqB,CAACD,aAAa,CAAC;QAChCb,uBAAuB;QACvBH;MACJ,CAAC,CAAC;IACN;IAEA,IAAIjB,WAAW,EAAE;MACbmC,sCAAkB,CAACF,aAAa,CAAC,CAAC;IACtC;IAEA,IAAIZ,cAAc,EAAE;MAChBe,cAAM,CAACC,sBAAsB,CAAChB,cAAc,CAAC;IACjD;IAEA,IAAIC,gBAAgB,EAAE;MAClBS,YAAK,CAACO,wBAAwB,CAAChB,gBAAgB,CAAC;IACpD;IAEA,IAAIC,mBAAmB,EAAE;MACrBQ,YAAK,CAACQ,2BAA2B,CAAChB,mBAAmB,CAAC;IAC1D;IAEA,IAAIC,iBAAiB,EAAE;MACnBO,YAAK,CAACS,yBAAyB,CAAChB,iBAAiB,CAAC;IACtD;IAEAlH,gBAAgB,CAACM,mBAAmB,GAAG,IAAI;EAC/C;AACJ;AAAC6H,OAAA,CAAAnI,gBAAA,GAAAA,gBAAA","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.InternalLog = exports.DATADOG_MESSAGE_PREFIX = void 0;
7
- var _SdkVerbosity = require("./SdkVerbosity");
7
+ var _SdkVerbosity = require("./config/types/SdkVerbosity");
8
8
  /*
9
9
  * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
10
10
  * This product includes software developed at Datadog (https://www.datadoghq.com/).
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DatadogProviderConfiguration = void 0;
7
+ var _CoreConfiguration = require("./features/CoreConfiguration");
8
+ var _types = require("./types");
9
+ /*
10
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
11
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ * Copyright 2016-Present Datadog, Inc.
13
+ */
14
+
15
+ /**
16
+ * SDK Initialization configuration for `DatadogProvider`.
17
+ */
18
+ class DatadogProviderConfiguration extends _CoreConfiguration.CoreConfiguration {
19
+ /**
20
+ * If set to ASYNC, the initialization will be delayed until all animations are completed.
21
+ */
22
+ initializationMode = _types.InitializationMode.SYNC;
23
+ }
24
+ exports.DatadogProviderConfiguration = DatadogProviderConfiguration;
25
+ //# sourceMappingURL=DatadogProviderConfiguration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_CoreConfiguration","require","_types","DatadogProviderConfiguration","CoreConfiguration","initializationMode","InitializationMode","SYNC","exports"],"sourceRoot":"../../../src","sources":["config/DatadogProviderConfiguration.ts"],"mappings":";;;;;;AAKA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AANA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACO,MAAME,4BAA4B,SAASC,oCAAiB,CAAC;EAChE;AACJ;AACA;EACWC,kBAAkB,GAAuBC,yBAAkB,CAACC,IAAI;AAC3E;AAACC,OAAA,CAAAL,4BAAA,GAAAA,4BAAA","ignoreList":[]}