@datadog/mobile-react-native 2.4.0 → 2.4.2

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 (447) hide show
  1. package/DatadogSDKReactNative.podspec +7 -7
  2. package/android/build.gradle +1 -0
  3. package/android/src/main/kotlin/com/datadog/reactnative/DdRumImplementation.kt +6 -0
  4. package/android/src/main/kotlin/com/datadog/reactnative/DdSdkImplementation.kt +31 -24
  5. package/android/src/main/kotlin/com/datadog/reactnative/FrameRateProvider.kt +63 -0
  6. package/android/src/main/kotlin/com/datadog/reactnative/SdkVersion.kt +1 -1
  7. package/android/src/main/kotlin/com/datadog/reactnative/UiThreadExecutor.kt +25 -0
  8. package/android/src/newarch/kotlin/com/datadog/reactnative/DdRum.kt +10 -1
  9. package/android/src/oldarch/kotlin/com/datadog/reactnative/DdRum.kt +10 -1
  10. package/android/src/test/kotlin/com/datadog/reactnative/DdRumTest.kt +29 -0
  11. package/android/src/test/kotlin/com/datadog/reactnative/DdSdkTest.kt +34 -14
  12. package/android/src/test/kotlin/com/datadog/tools/unit/TestUiThreadExecutor.kt +16 -0
  13. package/datadog-sourcemaps.gradle +3 -5
  14. package/ios/Sources/DdRum.mm +4 -3
  15. package/ios/Sources/DdRumImplementation.swift +15 -2
  16. package/ios/Sources/SdkVersion.swift +1 -1
  17. package/lib/commonjs/DdSdkReactNative.js +105 -150
  18. package/lib/commonjs/DdSdkReactNative.js.map +1 -1
  19. package/lib/commonjs/DdSdkReactNativeConfiguration.js +54 -119
  20. package/lib/commonjs/DdSdkReactNativeConfiguration.js.map +1 -1
  21. package/lib/commonjs/InternalLog.js +8 -19
  22. package/lib/commonjs/InternalLog.js.map +1 -1
  23. package/lib/commonjs/ProxyConfiguration.js +3 -15
  24. package/lib/commonjs/ProxyConfiguration.js.map +1 -1
  25. package/lib/commonjs/SdkVerbosity.js +3 -7
  26. package/lib/commonjs/SdkVerbosity.js.map +1 -1
  27. package/lib/commonjs/TrackingConsent.js +3 -7
  28. package/lib/commonjs/TrackingConsent.js.map +1 -1
  29. package/lib/commonjs/index.js +51 -65
  30. package/lib/commonjs/index.js.map +1 -1
  31. package/lib/commonjs/logs/DdLogs.js +103 -123
  32. package/lib/commonjs/logs/DdLogs.js.map +1 -1
  33. package/lib/commonjs/logs/eventMapper.js +4 -11
  34. package/lib/commonjs/logs/eventMapper.js.map +1 -1
  35. package/lib/commonjs/logs/types.js +4 -0
  36. package/lib/commonjs/logs/types.js.map +1 -1
  37. package/lib/commonjs/nativeModulesTypes.js +4 -3
  38. package/lib/commonjs/nativeModulesTypes.js.map +1 -1
  39. package/lib/commonjs/polyfills.js +28 -0
  40. package/lib/commonjs/polyfills.js.map +1 -0
  41. package/lib/commonjs/rum/DdAttributes.js +26 -0
  42. package/lib/commonjs/rum/DdAttributes.js.map +1 -0
  43. package/lib/commonjs/rum/DdRum.js +145 -210
  44. package/lib/commonjs/rum/DdRum.js.map +1 -1
  45. package/lib/commonjs/rum/eventMappers/actionEventMapper.js +5 -8
  46. package/lib/commonjs/rum/eventMappers/actionEventMapper.js.map +1 -1
  47. package/lib/commonjs/rum/eventMappers/errorEventMapper.js +3 -7
  48. package/lib/commonjs/rum/eventMappers/errorEventMapper.js.map +1 -1
  49. package/lib/commonjs/rum/eventMappers/resourceEventMapper.js +5 -8
  50. package/lib/commonjs/rum/eventMappers/resourceEventMapper.js.map +1 -1
  51. package/lib/commonjs/rum/instrumentation/DdRumErrorTracking.js +68 -89
  52. package/lib/commonjs/rum/instrumentation/DdRumErrorTracking.js.map +1 -1
  53. package/lib/commonjs/rum/instrumentation/interactionTracking/DdEventsInterceptor.js +13 -46
  54. package/lib/commonjs/rum/instrumentation/interactionTracking/DdEventsInterceptor.js.map +1 -1
  55. package/lib/commonjs/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js +52 -66
  56. package/lib/commonjs/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js.map +1 -1
  57. package/lib/commonjs/rum/instrumentation/interactionTracking/EventsInterceptor.js.map +1 -1
  58. package/lib/commonjs/rum/instrumentation/interactionTracking/NoOpEventsInterceptor.js +3 -4
  59. package/lib/commonjs/rum/instrumentation/interactionTracking/NoOpEventsInterceptor.js.map +1 -1
  60. package/lib/commonjs/rum/instrumentation/interactionTracking/ShallowObjectEqualityChecker.js +0 -6
  61. package/lib/commonjs/rum/instrumentation/interactionTracking/ShallowObjectEqualityChecker.js.map +1 -1
  62. package/lib/commonjs/rum/instrumentation/interactionTracking/getJsxRuntime.js +18 -19
  63. package/lib/commonjs/rum/instrumentation/interactionTracking/getJsxRuntime.js.map +1 -1
  64. package/lib/commonjs/rum/instrumentation/resourceTracking/DdRumResourceTracking.js +6 -21
  65. package/lib/commonjs/rum/instrumentation/resourceTracking/DdRumResourceTracking.js.map +1 -1
  66. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js +32 -55
  67. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js.map +1 -1
  68. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js +1 -9
  69. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js.map +1 -1
  70. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js +15 -41
  71. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js.map +1 -1
  72. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js +3 -13
  73. package/lib/commonjs/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js.map +1 -1
  74. package/lib/commonjs/rum/instrumentation/resourceTracking/graphql/graphqlHeaders.js +5 -10
  75. package/lib/commonjs/rum/instrumentation/resourceTracking/graphql/graphqlHeaders.js.map +1 -1
  76. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/ResourceReporter.js +16 -35
  77. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/ResourceReporter.js.map +1 -1
  78. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/internalDevResourceBlocklist.js +2 -5
  79. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/internalDevResourceBlocklist.js.map +1 -1
  80. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/resourceTiming.js +4 -7
  81. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/resourceTiming.js.map +1 -1
  82. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js +4 -10
  83. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js.map +1 -1
  84. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js +25 -58
  85. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js.map +1 -1
  86. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js +4 -26
  87. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js.map +1 -1
  88. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/interfaces/RequestProxy.js +1 -11
  89. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/interfaces/RequestProxy.js.map +1 -1
  90. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.js +4 -0
  91. package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.js.map +1 -1
  92. package/lib/commonjs/rum/types.js +15 -27
  93. package/lib/commonjs/rum/types.js.map +1 -1
  94. package/lib/commonjs/sdk/AttributesSingleton/AttributesSingleton.js +20 -30
  95. package/lib/commonjs/sdk/AttributesSingleton/AttributesSingleton.js.map +1 -1
  96. package/lib/commonjs/sdk/AttributesSingleton/types.js.map +1 -1
  97. package/lib/commonjs/sdk/DatadogProvider/Buffer/BoundedBuffer.js +112 -144
  98. package/lib/commonjs/sdk/DatadogProvider/Buffer/BoundedBuffer.js.map +1 -1
  99. package/lib/commonjs/sdk/DatadogProvider/Buffer/BufferSingleton.js +19 -22
  100. package/lib/commonjs/sdk/DatadogProvider/Buffer/BufferSingleton.js.map +1 -1
  101. package/lib/commonjs/sdk/DatadogProvider/Buffer/DatadogBuffer.js +1 -15
  102. package/lib/commonjs/sdk/DatadogProvider/Buffer/DatadogBuffer.js.map +1 -1
  103. package/lib/commonjs/sdk/DatadogProvider/Buffer/PassThroughBuffer.js +9 -16
  104. package/lib/commonjs/sdk/DatadogProvider/Buffer/PassThroughBuffer.js.map +1 -1
  105. package/lib/commonjs/sdk/DatadogProvider/Buffer/bufferNativeCall.js +2 -8
  106. package/lib/commonjs/sdk/DatadogProvider/Buffer/bufferNativeCall.js.map +1 -1
  107. package/lib/commonjs/sdk/DatadogProvider/DatadogProvider.js +8 -25
  108. package/lib/commonjs/sdk/DatadogProvider/DatadogProvider.js.map +1 -1
  109. package/lib/commonjs/sdk/DdSdk.js +2 -4
  110. package/lib/commonjs/sdk/DdSdk.js.map +1 -1
  111. package/lib/commonjs/sdk/EventMappers/EventMapper.js +31 -51
  112. package/lib/commonjs/sdk/EventMappers/EventMapper.js.map +1 -1
  113. package/lib/commonjs/sdk/EventMappers/utils/deepClone.js +9 -24
  114. package/lib/commonjs/sdk/EventMappers/utils/deepClone.js.map +1 -1
  115. package/lib/commonjs/sdk/FileBasedConfiguration/FileBasedConfiguration.js +6 -38
  116. package/lib/commonjs/sdk/FileBasedConfiguration/FileBasedConfiguration.js.map +1 -1
  117. package/lib/commonjs/sdk/GlobalState/GlobalState.js +33 -0
  118. package/lib/commonjs/sdk/GlobalState/GlobalState.js.map +1 -0
  119. package/lib/commonjs/sdk/UserInfoSingleton/UserInfoSingleton.js +17 -28
  120. package/lib/commonjs/sdk/UserInfoSingleton/UserInfoSingleton.js.map +1 -1
  121. package/lib/commonjs/sdk/UserInfoSingleton/types.js.map +1 -1
  122. package/lib/commonjs/specs/NativeDdLogs.js +5 -6
  123. package/lib/commonjs/specs/NativeDdLogs.js.map +1 -1
  124. package/lib/commonjs/specs/NativeDdRum.js +5 -6
  125. package/lib/commonjs/specs/NativeDdRum.js.map +1 -1
  126. package/lib/commonjs/specs/NativeDdSdk.js +5 -6
  127. package/lib/commonjs/specs/NativeDdSdk.js.map +1 -1
  128. package/lib/commonjs/specs/NativeDdTrace.js +5 -6
  129. package/lib/commonjs/specs/NativeDdTrace.js.map +1 -1
  130. package/lib/commonjs/trace/DdTrace.js +17 -29
  131. package/lib/commonjs/trace/DdTrace.js.map +1 -1
  132. package/lib/commonjs/types.js +4 -3
  133. package/lib/commonjs/types.js.map +1 -1
  134. package/lib/commonjs/utils/Timer.js +7 -22
  135. package/lib/commonjs/utils/Timer.js.map +1 -1
  136. package/lib/commonjs/utils/argsUtils.js +3 -11
  137. package/lib/commonjs/utils/argsUtils.js.map +1 -1
  138. package/lib/commonjs/utils/errorUtils.js +9 -22
  139. package/lib/commonjs/utils/errorUtils.js.map +1 -1
  140. package/lib/commonjs/utils/jsUtils.js +1 -2
  141. package/lib/commonjs/utils/jsUtils.js.map +1 -1
  142. package/lib/commonjs/utils/longTasksUtils.js +2 -7
  143. package/lib/commonjs/utils/longTasksUtils.js.map +1 -1
  144. package/lib/commonjs/utils/time-provider/DefaultTimeProvider.js +9 -15
  145. package/lib/commonjs/utils/time-provider/DefaultTimeProvider.js.map +1 -1
  146. package/lib/commonjs/utils/time-provider/TimeProvider.js +1 -11
  147. package/lib/commonjs/utils/time-provider/TimeProvider.js.map +1 -1
  148. package/lib/commonjs/version.js +1 -2
  149. package/lib/commonjs/version.js.map +1 -1
  150. package/lib/module/DdSdkReactNative.js +102 -122
  151. package/lib/module/DdSdkReactNative.js.map +1 -1
  152. package/lib/module/DdSdkReactNativeConfiguration.js +49 -101
  153. package/lib/module/DdSdkReactNativeConfiguration.js.map +1 -1
  154. package/lib/module/InternalLog.js +4 -15
  155. package/lib/module/InternalLog.js.map +1 -1
  156. package/lib/module/ProxyConfiguration.js +3 -14
  157. package/lib/module/ProxyConfiguration.js.map +1 -1
  158. package/lib/module/SdkVerbosity.js +3 -4
  159. package/lib/module/SdkVerbosity.js.map +1 -1
  160. package/lib/module/TrackingConsent.js +3 -4
  161. package/lib/module/TrackingConsent.js.map +1 -1
  162. package/lib/module/index.js +5 -0
  163. package/lib/module/index.js.map +1 -1
  164. package/lib/module/logs/DdLogs.js +98 -117
  165. package/lib/module/logs/DdLogs.js.map +1 -1
  166. package/lib/module/logs/eventMapper.js +3 -1
  167. package/lib/module/logs/eventMapper.js.map +1 -1
  168. package/lib/module/logs/types.js +1 -1
  169. package/lib/module/logs/types.js.map +1 -1
  170. package/lib/module/nativeModulesTypes.js +5 -1
  171. package/lib/module/nativeModulesTypes.js.map +1 -1
  172. package/lib/module/polyfills.js +26 -0
  173. package/lib/module/polyfills.js.map +1 -0
  174. package/lib/module/rum/DdAttributes.js +20 -0
  175. package/lib/module/rum/DdAttributes.js.map +1 -0
  176. package/lib/module/rum/DdRum.js +140 -187
  177. package/lib/module/rum/DdRum.js.map +1 -1
  178. package/lib/module/rum/eventMappers/actionEventMapper.js +5 -5
  179. package/lib/module/rum/eventMappers/actionEventMapper.js.map +1 -1
  180. package/lib/module/rum/eventMappers/errorEventMapper.js +3 -4
  181. package/lib/module/rum/eventMappers/errorEventMapper.js.map +1 -1
  182. package/lib/module/rum/eventMappers/resourceEventMapper.js +5 -5
  183. package/lib/module/rum/eventMappers/resourceEventMapper.js.map +1 -1
  184. package/lib/module/rum/instrumentation/DdRumErrorTracking.js +64 -79
  185. package/lib/module/rum/instrumentation/DdRumErrorTracking.js.map +1 -1
  186. package/lib/module/rum/instrumentation/interactionTracking/DdEventsInterceptor.js +7 -36
  187. package/lib/module/rum/instrumentation/interactionTracking/DdEventsInterceptor.js.map +1 -1
  188. package/lib/module/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js +49 -54
  189. package/lib/module/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js.map +1 -1
  190. package/lib/module/rum/instrumentation/interactionTracking/EventsInterceptor.js.map +1 -1
  191. package/lib/module/rum/instrumentation/interactionTracking/NoOpEventsInterceptor.js +3 -2
  192. package/lib/module/rum/instrumentation/interactionTracking/NoOpEventsInterceptor.js.map +1 -1
  193. package/lib/module/rum/instrumentation/interactionTracking/ShallowObjectEqualityChecker.js +0 -4
  194. package/lib/module/rum/instrumentation/interactionTracking/ShallowObjectEqualityChecker.js.map +1 -1
  195. package/lib/module/rum/instrumentation/interactionTracking/getJsxRuntime.js +16 -14
  196. package/lib/module/rum/instrumentation/interactionTracking/getJsxRuntime.js.map +1 -1
  197. package/lib/module/rum/instrumentation/resourceTracking/DdRumResourceTracking.js +2 -12
  198. package/lib/module/rum/instrumentation/resourceTracking/DdRumResourceTracking.js.map +1 -1
  199. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js +33 -45
  200. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.js.map +1 -1
  201. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js +1 -4
  202. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.js.map +1 -1
  203. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js +2 -10
  204. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.js.map +1 -1
  205. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js +3 -5
  206. package/lib/module/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.js.map +1 -1
  207. package/lib/module/rum/instrumentation/resourceTracking/graphql/graphqlHeaders.js +1 -0
  208. package/lib/module/rum/instrumentation/resourceTracking/graphql/graphqlHeaders.js.map +1 -1
  209. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/ResourceReporter.js +12 -30
  210. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/ResourceReporter.js.map +1 -1
  211. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/internalDevResourceBlocklist.js +2 -3
  212. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/internalDevResourceBlocklist.js.map +1 -1
  213. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/resourceTiming.js +4 -4
  214. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/resourceTiming.js.map +1 -1
  215. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js +4 -5
  216. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.js.map +1 -1
  217. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js +20 -48
  218. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.js.map +1 -1
  219. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js +2 -20
  220. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.js.map +1 -1
  221. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/interfaces/RequestProxy.js +1 -9
  222. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/interfaces/RequestProxy.js.map +1 -1
  223. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.js +1 -1
  224. package/lib/module/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.js.map +1 -1
  225. package/lib/module/rum/types.js +14 -18
  226. package/lib/module/rum/types.js.map +1 -1
  227. package/lib/module/sdk/AttributesSingleton/AttributesSingleton.js +20 -28
  228. package/lib/module/sdk/AttributesSingleton/AttributesSingleton.js.map +1 -1
  229. package/lib/module/sdk/AttributesSingleton/types.js.map +1 -1
  230. package/lib/module/sdk/DatadogProvider/Buffer/BoundedBuffer.js +108 -137
  231. package/lib/module/sdk/DatadogProvider/Buffer/BoundedBuffer.js.map +1 -1
  232. package/lib/module/sdk/DatadogProvider/Buffer/BufferSingleton.js +14 -18
  233. package/lib/module/sdk/DatadogProvider/Buffer/BufferSingleton.js.map +1 -1
  234. package/lib/module/sdk/DatadogProvider/Buffer/DatadogBuffer.js +1 -13
  235. package/lib/module/sdk/DatadogProvider/Buffer/DatadogBuffer.js.map +1 -1
  236. package/lib/module/sdk/DatadogProvider/Buffer/PassThroughBuffer.js +5 -14
  237. package/lib/module/sdk/DatadogProvider/Buffer/PassThroughBuffer.js.map +1 -1
  238. package/lib/module/sdk/DatadogProvider/Buffer/bufferNativeCall.js +1 -0
  239. package/lib/module/sdk/DatadogProvider/Buffer/bufferNativeCall.js.map +1 -1
  240. package/lib/module/sdk/DatadogProvider/DatadogProvider.js +6 -14
  241. package/lib/module/sdk/DatadogProvider/DatadogProvider.js.map +1 -1
  242. package/lib/module/sdk/DdSdk.js +1 -1
  243. package/lib/module/sdk/DdSdk.js.map +1 -1
  244. package/lib/module/sdk/EventMappers/EventMapper.js +27 -41
  245. package/lib/module/sdk/EventMappers/EventMapper.js.map +1 -1
  246. package/lib/module/sdk/EventMappers/utils/deepClone.js +9 -22
  247. package/lib/module/sdk/EventMappers/utils/deepClone.js.map +1 -1
  248. package/lib/module/sdk/FileBasedConfiguration/FileBasedConfiguration.js +5 -29
  249. package/lib/module/sdk/FileBasedConfiguration/FileBasedConfiguration.js.map +1 -1
  250. package/lib/module/sdk/GlobalState/GlobalState.js +26 -0
  251. package/lib/module/sdk/GlobalState/GlobalState.js.map +1 -0
  252. package/lib/module/sdk/UserInfoSingleton/UserInfoSingleton.js +17 -26
  253. package/lib/module/sdk/UserInfoSingleton/UserInfoSingleton.js.map +1 -1
  254. package/lib/module/sdk/UserInfoSingleton/types.js.map +1 -1
  255. package/lib/module/specs/NativeDdLogs.js +3 -0
  256. package/lib/module/specs/NativeDdLogs.js.map +1 -1
  257. package/lib/module/specs/NativeDdRum.js +3 -0
  258. package/lib/module/specs/NativeDdRum.js.map +1 -1
  259. package/lib/module/specs/NativeDdSdk.js +3 -0
  260. package/lib/module/specs/NativeDdSdk.js.map +1 -1
  261. package/lib/module/specs/NativeDdTrace.js +3 -0
  262. package/lib/module/specs/NativeDdTrace.js.map +1 -1
  263. package/lib/module/trace/DdTrace.js +12 -19
  264. package/lib/module/trace/DdTrace.js.map +1 -1
  265. package/lib/module/types.js +5 -1
  266. package/lib/module/types.js.map +1 -1
  267. package/lib/module/utils/Timer.js +3 -20
  268. package/lib/module/utils/Timer.js.map +1 -1
  269. package/lib/module/utils/argsUtils.js +3 -5
  270. package/lib/module/utils/argsUtils.js.map +1 -1
  271. package/lib/module/utils/errorUtils.js +6 -9
  272. package/lib/module/utils/errorUtils.js.map +1 -1
  273. package/lib/module/utils/jsUtils.js +1 -0
  274. package/lib/module/utils/jsUtils.js.map +1 -1
  275. package/lib/module/utils/longTasksUtils.js +2 -5
  276. package/lib/module/utils/longTasksUtils.js.map +1 -1
  277. package/lib/module/utils/time-provider/DefaultTimeProvider.js +5 -13
  278. package/lib/module/utils/time-provider/DefaultTimeProvider.js.map +1 -1
  279. package/lib/module/utils/time-provider/TimeProvider.js +1 -9
  280. package/lib/module/utils/time-provider/TimeProvider.js.map +1 -1
  281. package/lib/module/version.js +1 -1
  282. package/lib/module/version.js.map +1 -1
  283. package/lib/typescript/DdSdkReactNative.d.ts +1 -5
  284. package/lib/typescript/DdSdkReactNative.d.ts.map +1 -0
  285. package/lib/typescript/DdSdkReactNativeConfiguration.d.ts +1 -0
  286. package/lib/typescript/DdSdkReactNativeConfiguration.d.ts.map +1 -0
  287. package/lib/typescript/InternalLog.d.ts +1 -0
  288. package/lib/typescript/InternalLog.d.ts.map +1 -0
  289. package/lib/typescript/ProxyConfiguration.d.ts +1 -0
  290. package/lib/typescript/ProxyConfiguration.d.ts.map +1 -0
  291. package/lib/typescript/SdkVerbosity.d.ts +1 -0
  292. package/lib/typescript/SdkVerbosity.d.ts.map +1 -0
  293. package/lib/typescript/TrackingConsent.d.ts +1 -0
  294. package/lib/typescript/TrackingConsent.d.ts.map +1 -0
  295. package/lib/typescript/index.d.ts +2 -0
  296. package/lib/typescript/index.d.ts.map +1 -0
  297. package/lib/typescript/logs/DdLogs.d.ts +1 -0
  298. package/lib/typescript/logs/DdLogs.d.ts.map +1 -0
  299. package/lib/typescript/logs/eventMapper.d.ts +1 -0
  300. package/lib/typescript/logs/eventMapper.d.ts.map +1 -0
  301. package/lib/typescript/logs/types.d.ts +6 -1
  302. package/lib/typescript/logs/types.d.ts.map +1 -0
  303. package/lib/typescript/nativeModulesTypes.d.ts +3 -1
  304. package/lib/typescript/nativeModulesTypes.d.ts.map +1 -0
  305. package/lib/typescript/rum/DdAttributes.d.ts +14 -0
  306. package/lib/typescript/rum/DdAttributes.d.ts.map +1 -0
  307. package/lib/typescript/rum/DdRum.d.ts +3 -2
  308. package/lib/typescript/rum/DdRum.d.ts.map +1 -0
  309. package/lib/typescript/rum/eventMappers/actionEventMapper.d.ts +1 -0
  310. package/lib/typescript/rum/eventMappers/actionEventMapper.d.ts.map +1 -0
  311. package/lib/typescript/rum/eventMappers/errorEventMapper.d.ts +3 -0
  312. package/lib/typescript/rum/eventMappers/errorEventMapper.d.ts.map +1 -0
  313. package/lib/typescript/rum/eventMappers/resourceEventMapper.d.ts +1 -0
  314. package/lib/typescript/rum/eventMappers/resourceEventMapper.d.ts.map +1 -0
  315. package/lib/typescript/rum/instrumentation/DdRumErrorTracking.d.ts +1 -0
  316. package/lib/typescript/rum/instrumentation/DdRumErrorTracking.d.ts.map +1 -0
  317. package/lib/typescript/rum/instrumentation/interactionTracking/DdEventsInterceptor.d.ts +1 -0
  318. package/lib/typescript/rum/instrumentation/interactionTracking/DdEventsInterceptor.d.ts.map +1 -0
  319. package/lib/typescript/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.d.ts +2 -0
  320. package/lib/typescript/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.d.ts.map +1 -0
  321. package/lib/typescript/rum/instrumentation/interactionTracking/EventsInterceptor.d.ts +1 -0
  322. package/lib/typescript/rum/instrumentation/interactionTracking/EventsInterceptor.d.ts.map +1 -0
  323. package/lib/typescript/rum/instrumentation/interactionTracking/NoOpEventsInterceptor.d.ts +1 -0
  324. package/lib/typescript/rum/instrumentation/interactionTracking/NoOpEventsInterceptor.d.ts.map +1 -0
  325. package/lib/typescript/rum/instrumentation/interactionTracking/ShallowObjectEqualityChecker.d.ts +1 -0
  326. package/lib/typescript/rum/instrumentation/interactionTracking/ShallowObjectEqualityChecker.d.ts.map +1 -0
  327. package/lib/typescript/rum/instrumentation/interactionTracking/getJsxRuntime.d.ts +2 -1
  328. package/lib/typescript/rum/instrumentation/interactionTracking/getJsxRuntime.d.ts.map +1 -0
  329. package/lib/typescript/rum/instrumentation/resourceTracking/DdRumResourceTracking.d.ts +1 -0
  330. package/lib/typescript/rum/instrumentation/resourceTracking/DdRumResourceTracking.d.ts.map +1 -0
  331. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.d.ts +1 -0
  332. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.d.ts.map +1 -0
  333. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.d.ts +1 -0
  334. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.d.ts.map +1 -0
  335. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.d.ts +1 -0
  336. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.d.ts.map +1 -0
  337. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.d.ts +1 -0
  338. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.d.ts.map +1 -0
  339. package/lib/typescript/rum/instrumentation/resourceTracking/graphql/graphqlHeaders.d.ts +1 -0
  340. package/lib/typescript/rum/instrumentation/resourceTracking/graphql/graphqlHeaders.d.ts.map +1 -0
  341. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/ResourceReporter.d.ts +1 -0
  342. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/ResourceReporter.d.ts.map +1 -0
  343. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/internalDevResourceBlocklist.d.ts +1 -0
  344. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/internalDevResourceBlocklist.d.ts.map +1 -0
  345. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/resourceTiming.d.ts +1 -0
  346. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/resourceTiming.d.ts.map +1 -0
  347. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.d.ts +1 -0
  348. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.d.ts.map +1 -0
  349. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.d.ts +1 -0
  350. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.d.ts.map +1 -0
  351. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.d.ts +1 -0
  352. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.d.ts.map +1 -0
  353. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/interfaces/RequestProxy.d.ts +1 -0
  354. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/interfaces/RequestProxy.d.ts.map +1 -0
  355. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.d.ts +1 -0
  356. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.d.ts.map +1 -0
  357. package/lib/typescript/rum/types.d.ts +1 -0
  358. package/lib/typescript/rum/types.d.ts.map +1 -0
  359. package/lib/typescript/sdk/AttributesSingleton/AttributesSingleton.d.ts +1 -0
  360. package/lib/typescript/sdk/AttributesSingleton/AttributesSingleton.d.ts.map +1 -0
  361. package/lib/typescript/sdk/AttributesSingleton/types.d.ts +1 -0
  362. package/lib/typescript/sdk/AttributesSingleton/types.d.ts.map +1 -0
  363. package/lib/typescript/sdk/DatadogProvider/Buffer/BoundedBuffer.d.ts +1 -0
  364. package/lib/typescript/sdk/DatadogProvider/Buffer/BoundedBuffer.d.ts.map +1 -0
  365. package/lib/typescript/sdk/DatadogProvider/Buffer/BufferSingleton.d.ts +1 -0
  366. package/lib/typescript/sdk/DatadogProvider/Buffer/BufferSingleton.d.ts.map +1 -0
  367. package/lib/typescript/sdk/DatadogProvider/Buffer/DatadogBuffer.d.ts +1 -0
  368. package/lib/typescript/sdk/DatadogProvider/Buffer/DatadogBuffer.d.ts.map +1 -0
  369. package/lib/typescript/sdk/DatadogProvider/Buffer/PassThroughBuffer.d.ts +1 -0
  370. package/lib/typescript/sdk/DatadogProvider/Buffer/PassThroughBuffer.d.ts.map +1 -0
  371. package/lib/typescript/sdk/DatadogProvider/Buffer/bufferNativeCall.d.ts +1 -0
  372. package/lib/typescript/sdk/DatadogProvider/Buffer/bufferNativeCall.d.ts.map +1 -0
  373. package/lib/typescript/sdk/DatadogProvider/DatadogProvider.d.ts +1 -0
  374. package/lib/typescript/sdk/DatadogProvider/DatadogProvider.d.ts.map +1 -0
  375. package/lib/typescript/sdk/DdSdk.d.ts +1 -0
  376. package/lib/typescript/sdk/DdSdk.d.ts.map +1 -0
  377. package/lib/typescript/sdk/EventMappers/EventMapper.d.ts +1 -0
  378. package/lib/typescript/sdk/EventMappers/EventMapper.d.ts.map +1 -0
  379. package/lib/typescript/sdk/EventMappers/utils/deepClone.d.ts +1 -0
  380. package/lib/typescript/sdk/EventMappers/utils/deepClone.d.ts.map +1 -0
  381. package/lib/typescript/sdk/FileBasedConfiguration/FileBasedConfiguration.d.ts +1 -0
  382. package/lib/typescript/sdk/FileBasedConfiguration/FileBasedConfiguration.d.ts.map +1 -0
  383. package/lib/typescript/sdk/GlobalState/GlobalState.d.ts +13 -0
  384. package/lib/typescript/sdk/GlobalState/GlobalState.d.ts.map +1 -0
  385. package/lib/typescript/sdk/UserInfoSingleton/UserInfoSingleton.d.ts +1 -0
  386. package/lib/typescript/sdk/UserInfoSingleton/UserInfoSingleton.d.ts.map +1 -0
  387. package/lib/typescript/sdk/UserInfoSingleton/types.d.ts +1 -0
  388. package/lib/typescript/sdk/UserInfoSingleton/types.d.ts.map +1 -0
  389. package/lib/typescript/specs/NativeDdLogs.d.ts +1 -0
  390. package/lib/typescript/specs/NativeDdLogs.d.ts.map +1 -0
  391. package/lib/typescript/specs/NativeDdRum.d.ts +3 -1
  392. package/lib/typescript/specs/NativeDdRum.d.ts.map +1 -0
  393. package/lib/typescript/specs/NativeDdSdk.d.ts +1 -0
  394. package/lib/typescript/specs/NativeDdSdk.d.ts.map +1 -0
  395. package/lib/typescript/specs/NativeDdTrace.d.ts +1 -0
  396. package/lib/typescript/specs/NativeDdTrace.d.ts.map +1 -0
  397. package/lib/typescript/trace/DdTrace.d.ts +1 -0
  398. package/lib/typescript/trace/DdTrace.d.ts.map +1 -0
  399. package/lib/typescript/types.d.ts +1 -0
  400. package/lib/typescript/types.d.ts.map +1 -0
  401. package/lib/typescript/utils/Timer.d.ts +1 -0
  402. package/lib/typescript/utils/Timer.d.ts.map +1 -0
  403. package/lib/typescript/utils/argsUtils.d.ts +1 -0
  404. package/lib/typescript/utils/argsUtils.d.ts.map +1 -0
  405. package/lib/typescript/utils/errorUtils.d.ts +1 -0
  406. package/lib/typescript/utils/errorUtils.d.ts.map +1 -0
  407. package/lib/typescript/utils/jsUtils.d.ts +1 -0
  408. package/lib/typescript/utils/jsUtils.d.ts.map +1 -0
  409. package/lib/typescript/utils/longTasksUtils.d.ts +1 -0
  410. package/lib/typescript/utils/longTasksUtils.d.ts.map +1 -0
  411. package/lib/typescript/utils/time-provider/DefaultTimeProvider.d.ts +1 -0
  412. package/lib/typescript/utils/time-provider/DefaultTimeProvider.d.ts.map +1 -0
  413. package/lib/typescript/utils/time-provider/TimeProvider.d.ts +1 -0
  414. package/lib/typescript/utils/time-provider/TimeProvider.d.ts.map +1 -0
  415. package/lib/typescript/version.d.ts +2 -1
  416. package/lib/typescript/version.d.ts.map +1 -0
  417. package/package.json +3 -3
  418. package/src/DdSdkReactNative.tsx +3 -10
  419. package/src/__tests__/DdSdkReactNative.test.tsx +5 -3
  420. package/src/__tests__/mock.test.ts +0 -1
  421. package/src/__tests__/rum/instrumentation/DdRumErrorTracking.test.tsx +32 -16
  422. package/src/__tests__/rum/instrumentation/DdRumUserInteractionTracking.test.tsx +17 -15
  423. package/src/index.tsx +4 -0
  424. package/src/logs/DdLogs.ts +25 -8
  425. package/src/logs/__tests__/DdLogs.test.ts +122 -0
  426. package/src/logs/types.ts +5 -1
  427. package/src/nativeModulesTypes.ts +3 -1
  428. package/src/polyfills.js +37 -0
  429. package/src/rum/DdAttributes.ts +20 -0
  430. package/src/rum/DdRum.ts +13 -8
  431. package/src/rum/__tests__/DdRum.test.ts +43 -7
  432. package/src/rum/eventMappers/errorEventMapper.ts +2 -0
  433. package/src/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.tsx +33 -10
  434. package/src/rum/instrumentation/interactionTracking/getJsxRuntime.ts +10 -3
  435. package/src/rum/instrumentation/resourceTracking/__tests__/__utils__/XMLHttpRequestMock.ts +1 -0
  436. package/src/rum/instrumentation/resourceTracking/distributedTracing/__tests__/__utils__/TracingIdentifierUtils.ts +1 -1
  437. package/src/rum/instrumentation/resourceTracking/distributedTracing/__tests__/distributedTracing.test.ts +1 -1
  438. package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/__tests__/XHRProxy.test.ts +1 -1
  439. package/src/sdk/DatadogProvider/__tests__/initialization.test.tsx +3 -3
  440. package/src/sdk/DatadogProvider/__tests__/initializationModes.test.tsx +3 -2
  441. package/src/sdk/GlobalState/GlobalState.tsx +26 -0
  442. package/src/specs/NativeDdLogs.ts +1 -0
  443. package/src/specs/NativeDdRum.ts +4 -1
  444. package/src/specs/NativeDdSdk.ts +1 -0
  445. package/src/specs/NativeDdTrace.ts +1 -0
  446. package/src/version.ts +1 -1
  447. package/android/src/main/kotlin/com/datadog/reactnative/VitalFrameCallback.kt +0 -41
@@ -1,41 +1,33 @@
1
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
-
3
1
  /*
4
2
  * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
5
3
  * This product includes software developed at Datadog (https://www.datadoghq.com/).
6
4
  * Copyright 2016-Present Datadog, Inc.
7
5
  */
6
+
8
7
  import { TrackingConsent } from './TrackingConsent';
9
8
  import { PropagatorType } from './rum/types';
10
- export let VitalsUpdateFrequency;
11
-
12
- (function (VitalsUpdateFrequency) {
9
+ export let VitalsUpdateFrequency = /*#__PURE__*/function (VitalsUpdateFrequency) {
13
10
  VitalsUpdateFrequency["FREQUENT"] = "FREQUENT";
14
11
  VitalsUpdateFrequency["AVERAGE"] = "AVERAGE";
15
12
  VitalsUpdateFrequency["RARE"] = "RARE";
16
13
  VitalsUpdateFrequency["NEVER"] = "NEVER";
17
- })(VitalsUpdateFrequency || (VitalsUpdateFrequency = {}));
18
-
19
- export let UploadFrequency;
20
-
21
- (function (UploadFrequency) {
14
+ return VitalsUpdateFrequency;
15
+ }({});
16
+ export let UploadFrequency = /*#__PURE__*/function (UploadFrequency) {
22
17
  UploadFrequency["FREQUENT"] = "FREQUENT";
23
18
  UploadFrequency["AVERAGE"] = "AVERAGE";
24
19
  UploadFrequency["RARE"] = "RARE";
25
- })(UploadFrequency || (UploadFrequency = {}));
26
-
27
- export let BatchSize;
28
-
29
- (function (BatchSize) {
20
+ return UploadFrequency;
21
+ }({});
22
+ export let BatchSize = /*#__PURE__*/function (BatchSize) {
30
23
  BatchSize["LARGE"] = "LARGE";
31
24
  BatchSize["MEDIUM"] = "MEDIUM";
32
25
  BatchSize["SMALL"] = "SMALL";
33
- })(BatchSize || (BatchSize = {}));
34
-
26
+ return BatchSize;
27
+ }({});
35
28
  const isLegacyFirstPartyHost = firstPartyHost => {
36
29
  return typeof firstPartyHost === 'string';
37
30
  };
38
-
39
31
  /**
40
32
  * Defaults legacy first party hosts format to Datadog first party hosts to keep
41
33
  * retro-compatibility before OTel support was introduced.
@@ -48,7 +40,6 @@ export const formatFirstPartyHosts = firstPartyHosts => {
48
40
  propagatorTypes: [PropagatorType.DATADOG, PropagatorType.TRACECONTEXT]
49
41
  };
50
42
  }
51
-
52
43
  return host;
53
44
  });
54
45
  };
@@ -79,16 +70,16 @@ export const DEFAULTS = {
79
70
  bundleLogsWithTraces: true,
80
71
  useAccessibilityLabel: true
81
72
  };
73
+
82
74
  /**
83
75
  * The SDK configuration class.
84
76
  * It will be used to configure the SDK functionality at initialization.
85
77
  */
86
-
87
78
  export class DdSdkReactNativeConfiguration {
88
79
  /**
89
80
  * Enables crash reporting for native platforms (iOS, Android). Default `false`.
90
81
  */
91
-
82
+ nativeCrashReportEnabled = DEFAULTS.nativeCrashReportEnabled;
92
83
  /**
93
84
  * @deprecated `sampleRate` has been replaced by `sessionSamplingRate` to avoid confusion with `resourceTracingSamplingRate` and will be removed in a future release.
94
85
  */
@@ -96,33 +87,36 @@ export class DdSdkReactNativeConfiguration {
96
87
  /**
97
88
  * Percentage of sampled RUM sessions. Range `0`-`100`.
98
89
  */
99
-
90
+ sessionSamplingRate = DEFAULTS.sessionSamplingRate;
100
91
  /**
101
92
  * Percentage of tracing integrations for network calls between your app and your backend. Range `0`-`100`.
102
93
  */
103
-
94
+ resourceTracingSamplingRate = DEFAULTS.resourceTracingSamplingRate;
95
+ site = DEFAULTS.site;
104
96
  /**
105
97
  * Verbosity for internal SDK logging.
106
98
  * Set to `SdkVerbosity.DEBUG` to debug your SDK implementation.
107
99
  */
108
-
100
+ verbosity = undefined;
109
101
  /**
110
102
  * Enables native views tracking.
111
103
  * Set to `true` if you use a custom navigation system relying on native views.
112
104
  */
113
-
105
+ nativeViewTracking = DEFAULTS.nativeViewTracking;
114
106
  /**
115
107
  * Enables native interaction tracking.
116
108
  * Set to `true` if you want to track interactions on native screens.
117
109
  */
118
-
110
+ nativeInteractionTracking = DEFAULTS.nativeInteractionTracking;
111
+ proxyConfig = undefined;
112
+ serviceName = undefined;
119
113
  /**
120
114
  * List of your backends hosts to enable tracing with.
121
115
  * Regular expressions are NOT supported.
122
116
  *
123
117
  * Matches domains and subdomains, e.g. `['example.com']` matches `example.com` and `api.example.com`.
124
118
  */
125
-
119
+ firstPartyHosts = DEFAULTS.getFirstPartyHosts();
126
120
  /**
127
121
  * Overrides the reported version of the app.
128
122
  * Accepted characters are alphanumerics and `_`, `-`, `:`, `.`, `/`.
@@ -152,6 +146,7 @@ export class DdSdkReactNativeConfiguration {
152
146
  * `telemetrySampleRate` is not set, the default value from the iOS and
153
147
  * Android SDK is used, which is 20.
154
148
  */
149
+ telemetrySampleRate = DEFAULTS.telemetrySampleRate;
155
150
 
156
151
  /**
157
152
  * The threshold for native long tasks reporting in milliseconds.
@@ -162,6 +157,7 @@ export class DdSdkReactNativeConfiguration {
162
157
  *
163
158
  * Default value is `200`.
164
159
  */
160
+ nativeLongTaskThresholdMs = DEFAULTS.nativeLongTaskThresholdMs;
165
161
 
166
162
  /**
167
163
  * The threshold for javascript long tasks reporting in milliseconds.
@@ -172,23 +168,28 @@ export class DdSdkReactNativeConfiguration {
172
168
  *
173
169
  * Default value is `0`
174
170
  */
171
+ longTaskThresholdMs = DEFAULTS.longTaskThresholdMs;
175
172
 
176
173
  /**
177
174
  * Sets the preferred frequency for collecting mobile vitals.
178
175
  */
176
+ vitalsUpdateFrequency = DEFAULTS.vitalsUpdateFrequency;
179
177
 
180
178
  /**
181
179
  * Enables tracking of frustration signals (error taps). Defaults to `true`.
182
180
  */
181
+ trackFrustrations = DEFAULTS.trackFrustrations;
183
182
 
184
183
  /**
185
184
  * Sets the preferred frequency for uploading batches of data.
186
185
  */
186
+ uploadFrequency = DEFAULTS.uploadFrequency;
187
187
 
188
188
  /**
189
189
  * Defines the Datadog SDK policy when batching data together before uploading it to Datadog servers.
190
190
  * Smaller batches mean smaller but more network requests, whereas larger batches mean fewer but larger network requests.
191
191
  */
192
+ batchSize = DEFAULTS.batchSize;
192
193
 
193
194
  /**
194
195
  * Enables tracking of RUM event when no RUM View is active.
@@ -196,18 +197,21 @@ export class DdSdkReactNativeConfiguration {
196
197
  * By default, background events are not tracked. Enabling this feature might increase the
197
198
  * number of sessions tracked and impact your billing.
198
199
  */
200
+ trackBackgroundEvents = DEFAULTS.trackBackgroundEvents;
199
201
 
200
202
  /**
201
203
  * Enables RUM correlation with logs.
202
204
  *
203
205
  * By default, RUM is enabled for logs.
204
206
  */
207
+ bundleLogsWithRum = DEFAULTS.bundleLogsWithRum;
205
208
 
206
209
  /**
207
210
  * Enables Traces correlation with logs.
208
211
  *
209
212
  * By default, Traces is enabled for logs.
210
213
  */
214
+ bundleLogsWithTraces = DEFAULTS.bundleLogsWithTraces;
211
215
 
212
216
  /**
213
217
  * Specifies a custom prop to name RUM actions on elements having an `onPress` prop.
@@ -220,6 +224,13 @@ export class DdSdkReactNativeConfiguration {
220
224
  *
221
225
  * `dd-action-name` is favored when both attributes are present on an element.
222
226
  */
227
+
228
+ logEventMapper = DEFAULTS.logEventMapper;
229
+ errorEventMapper = DEFAULTS.errorEventMapper;
230
+ resourceEventMapper = DEFAULTS.resourceEventMapper;
231
+ actionEventMapper = DEFAULTS.actionEventMapper;
232
+ additionalConfiguration = DEFAULTS.getAdditionalConfiguration();
233
+ customEndpoints = DEFAULTS.getCustomEndpoints();
223
234
  constructor(clientToken, env, applicationId, trackInteractions = false, trackResources = false, trackErrors = false, trackingConsent = DEFAULTS.trackingConsent, useAccessibilityLabel = DEFAULTS.useAccessibilityLabel) {
224
235
  this.clientToken = clientToken;
225
236
  this.env = env;
@@ -229,80 +240,25 @@ export class DdSdkReactNativeConfiguration {
229
240
  this.trackErrors = trackErrors;
230
241
  this.trackingConsent = trackingConsent;
231
242
  this.useAccessibilityLabel = useAccessibilityLabel;
232
-
233
- _defineProperty(this, "nativeCrashReportEnabled", DEFAULTS.nativeCrashReportEnabled);
234
-
235
- _defineProperty(this, "sampleRate", void 0);
236
-
237
- _defineProperty(this, "sessionSamplingRate", DEFAULTS.sessionSamplingRate);
238
-
239
- _defineProperty(this, "resourceTracingSamplingRate", DEFAULTS.resourceTracingSamplingRate);
240
-
241
- _defineProperty(this, "site", DEFAULTS.site);
242
-
243
- _defineProperty(this, "verbosity", undefined);
244
-
245
- _defineProperty(this, "nativeViewTracking", DEFAULTS.nativeViewTracking);
246
-
247
- _defineProperty(this, "nativeInteractionTracking", DEFAULTS.nativeInteractionTracking);
248
-
249
- _defineProperty(this, "proxyConfig", undefined);
250
-
251
- _defineProperty(this, "serviceName", undefined);
252
-
253
- _defineProperty(this, "firstPartyHosts", DEFAULTS.getFirstPartyHosts());
254
-
255
- _defineProperty(this, "version", void 0);
256
-
257
- _defineProperty(this, "versionSuffix", void 0);
258
-
259
- _defineProperty(this, "telemetrySampleRate", DEFAULTS.telemetrySampleRate);
260
-
261
- _defineProperty(this, "nativeLongTaskThresholdMs", DEFAULTS.nativeLongTaskThresholdMs);
262
-
263
- _defineProperty(this, "longTaskThresholdMs", DEFAULTS.longTaskThresholdMs);
264
-
265
- _defineProperty(this, "vitalsUpdateFrequency", DEFAULTS.vitalsUpdateFrequency);
266
-
267
- _defineProperty(this, "trackFrustrations", DEFAULTS.trackFrustrations);
268
-
269
- _defineProperty(this, "uploadFrequency", DEFAULTS.uploadFrequency);
270
-
271
- _defineProperty(this, "batchSize", DEFAULTS.batchSize);
272
-
273
- _defineProperty(this, "trackBackgroundEvents", DEFAULTS.trackBackgroundEvents);
274
-
275
- _defineProperty(this, "bundleLogsWithRum", DEFAULTS.bundleLogsWithRum);
276
-
277
- _defineProperty(this, "bundleLogsWithTraces", DEFAULTS.bundleLogsWithTraces);
278
-
279
- _defineProperty(this, "actionNameAttribute", void 0);
280
-
281
- _defineProperty(this, "logEventMapper", DEFAULTS.logEventMapper);
282
-
283
- _defineProperty(this, "errorEventMapper", DEFAULTS.errorEventMapper);
284
-
285
- _defineProperty(this, "resourceEventMapper", DEFAULTS.resourceEventMapper);
286
-
287
- _defineProperty(this, "actionEventMapper", DEFAULTS.actionEventMapper);
288
-
289
- _defineProperty(this, "additionalConfiguration", DEFAULTS.getAdditionalConfiguration());
290
-
291
- _defineProperty(this, "customEndpoints", DEFAULTS.getCustomEndpoints());
292
243
  }
293
-
294
244
  }
245
+
295
246
  /**
296
247
  * Auto Instrumentation configuration passed to DatadogProvider.
297
248
  * Does not include default values.
298
249
  */
299
250
 
251
+ /**
252
+ * Parameters needed to start auto instrumentation. Includes default values.
253
+ */
254
+
300
255
  /**
301
256
  * We could use `Proxy` instead of this function, but `Proxy` is not available on
302
257
  * the older android jsc that can still be used.
303
258
  */
304
259
  export const addDefaultValuesToAutoInstrumentationConfiguration = features => {
305
- return { ...features,
260
+ return {
261
+ ...features,
306
262
  firstPartyHosts: features.firstPartyHosts || DEFAULTS.getFirstPartyHosts(),
307
263
  resourceTracingSamplingRate: features.resourceTracingSamplingRate === undefined ? DEFAULTS.resourceTracingSamplingRate : features.resourceTracingSamplingRate,
308
264
  logEventMapper: features.logEventMapper === undefined ? DEFAULTS.logEventMapper : features.logEventMapper,
@@ -312,13 +268,11 @@ export const addDefaultValuesToAutoInstrumentationConfiguration = features => {
312
268
  useAccessibilityLabel: DEFAULTS.useAccessibilityLabel
313
269
  };
314
270
  };
315
-
316
271
  const setConfigurationAttribute = (attribute, configuration) => {
317
272
  if (attribute.value !== undefined) {
318
273
  configuration[attribute.name] = attribute.value;
319
274
  }
320
275
  };
321
-
322
276
  export const buildConfigurationFromPartialConfiguration = (features, configuration) => {
323
277
  const {
324
278
  clientToken,
@@ -364,17 +318,11 @@ export const buildConfigurationFromPartialConfiguration = (features, configurati
364
318
  return SdkConfiguration;
365
319
  };
366
320
  export class DatadogProviderConfiguration extends DdSdkReactNativeConfiguration {
367
- constructor(...args) {
368
- super(...args);
369
-
370
- _defineProperty(this, "initializationMode", InitializationMode.SYNC);
371
- }
372
-
321
+ initializationMode = InitializationMode.SYNC;
373
322
  }
374
- export let InitializationMode;
375
-
376
- (function (InitializationMode) {
323
+ export let InitializationMode = /*#__PURE__*/function (InitializationMode) {
377
324
  InitializationMode["SYNC"] = "SYNC";
378
325
  InitializationMode["ASYNC"] = "ASYNC";
379
- })(InitializationMode || (InitializationMode = {}));
326
+ return InitializationMode;
327
+ }({});
380
328
  //# sourceMappingURL=DdSdkReactNativeConfiguration.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["DdSdkReactNativeConfiguration.tsx"],"names":["TrackingConsent","PropagatorType","VitalsUpdateFrequency","UploadFrequency","BatchSize","isLegacyFirstPartyHost","firstPartyHost","formatFirstPartyHosts","firstPartyHosts","map","host","match","propagatorTypes","DATADOG","TRACECONTEXT","DEFAULTS","nativeCrashReportEnabled","sessionSamplingRate","resourceTracingSamplingRate","site","longTaskThresholdMs","nativeLongTaskThresholdMs","nativeViewTracking","nativeInteractionTracking","getFirstPartyHosts","getAdditionalConfiguration","trackingConsent","GRANTED","telemetrySampleRate","vitalsUpdateFrequency","AVERAGE","logEventMapper","errorEventMapper","resourceEventMapper","actionEventMapper","trackFrustrations","uploadFrequency","batchSize","MEDIUM","trackBackgroundEvents","getCustomEndpoints","bundleLogsWithRum","bundleLogsWithTraces","useAccessibilityLabel","DdSdkReactNativeConfiguration","constructor","clientToken","env","applicationId","trackInteractions","trackResources","trackErrors","undefined","addDefaultValuesToAutoInstrumentationConfiguration","features","setConfigurationAttribute","attribute","configuration","value","name","buildConfigurationFromPartialConfiguration","remainingConfiguration","SdkConfiguration","Object","keys","forEach","actionNameAttribute","DatadogProviderConfiguration","InitializationMode","SYNC"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AAIA,SAASA,eAAT,QAAgC,mBAAhC;AAMA,SAASC,cAAT,QAA+B,aAA/B;AAEA,WAAYC,qBAAZ;;WAAYA,qB;AAAAA,EAAAA,qB;AAAAA,EAAAA,qB;AAAAA,EAAAA,qB;AAAAA,EAAAA,qB;GAAAA,qB,KAAAA,qB;;AAOZ,WAAYC,eAAZ;;WAAYA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;GAAAA,e,KAAAA,e;;AAeZ,WAAYC,SAAZ;;WAAYA,S;AAAAA,EAAAA,S;AAAAA,EAAAA,S;AAAAA,EAAAA,S;GAAAA,S,KAAAA,S;;AAsBZ,MAAMC,sBAAsB,GACxBC,cAD2B,IAEc;AACzC,SAAO,OAAOA,cAAP,KAA0B,QAAjC;AACH,CAJD;;AAYA;AACA;AACA;AACA;AACA,OAAO,MAAMC,qBAAqB,GAC9BC,eADiC,IAEd;AACnB,SAAOA,eAAe,CAACC,GAAhB,CAAoBC,IAAI,IAAI;AAC/B,QAAIL,sBAAsB,CAACK,IAAD,CAA1B,EAAkC;AAC9B,aAAO;AACHC,QAAAA,KAAK,EAAED,IADJ;AAEHE,QAAAA,eAAe,EAAE,CACbX,cAAc,CAACY,OADF,EAEbZ,cAAc,CAACa,YAFF;AAFd,OAAP;AAOH;;AACD,WAAOJ,IAAP;AACH,GAXM,CAAP;AAYH,CAfM;AAiBP,OAAO,MAAMK,QAAQ,GAAG;AACpBC,EAAAA,wBAAwB,EAAE,KADN;AAEpBC,EAAAA,mBAAmB,EAAE,KAFD;AAGpBC,EAAAA,2BAA2B,EAAE,IAHT;AAIpBC,EAAAA,IAAI,EAAE,KAJc;AAKpBC,EAAAA,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II,IAAAA,IAAI,EAAE,6BADV;AAEID,IAAAA,KAAK,EAAEJ,QAAQ,CAACpC;AAFpB,GADqB,EAKrB4C,gBALqB,CAAzB;AAOAP,EAAAA,yBAAyB,CACrB;AAAEI,IAAAA,IAAI,EAAE,iBAAR;AAA2BD,IAAAA,KAAK,EAAEJ,QAAQ,CAAC9C;AAA3C,GADqB,EAErBsD,gBAFqB,CAAzB;AAIAP,EAAAA,yBAAyB,CACrB;AACII,IAAAA,IAAI,EAAE,gBADV;AAEID,IAAAA,KAAK,EAAEJ,QAAQ,CAACvB;AAFpB,GADqB,EAKrB+B,gBALqB,CAAzB;AAOAP,EAAAA,yBAAyB,CACrB;AACII,IAAAA,IAAI,EAAE,kBADV;AAEID,IAAAA,KAAK,EAAEJ,QAAQ,CAACtB;AAFpB,GADqB,EAKrB8B,gBALqB,CAAzB;AAOAP,EAAAA,yBAAyB,CACrB;AACII,IAAAA,IAAI,EAAE,qBADV;AAEID,IAAAA,KAAK,EAAEJ,QAAQ,CAACrB;AAFpB,GADqB,EAKrB6B,gBALqB,CAAzB;AAOAP,EAAAA,yBAAyB,CACrB;AACII,IAAAA,IAAI,EAAE,mBADV;AAEID,IAAAA,KAAK,EAAEJ,QAAQ,CAACpB;AAFpB,GADqB,EAKrB4B,gBALqB,CAAzB;AAOAP,EAAAA,yBAAyB,CACrB;AACII,IAAAA,IAAI,EAAE,qBADV;AAEID,IAAAA,KAAK,EAAEJ,QAAQ,CAACY;AAFpB,GADqB,EAKrBJ,gBALqB,CAAzB;AAQA,SAAOA,gBAAP;AACH,CA9EM;AAgFP,OAAO,MAAMK,4BAAN,SAA2CvB,6BAA3C,CAAyE;AAAA;AAAA;;AAAA,gDAC5BwB,kBAAkB,CAACC,IADS;AAAA;;AAAA;AAIhF,WAAYD,kBAAZ;;WAAYA,kB;AAAAA,EAAAA,kB;AAAAA,EAAAA,kB;GAAAA,kB,KAAAA,kB","sourcesContent":["/*\n * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.\n * This product includes software developed at Datadog (https://www.datadoghq.com/).\n * Copyright 2016-Present Datadog, Inc.\n */\n\nimport type { ProxyConfiguration } from './ProxyConfiguration';\nimport type { SdkVerbosity } from './SdkVerbosity';\nimport { TrackingConsent } from './TrackingConsent';\nimport type { LogEventMapper } from './logs/types';\nimport type { ActionEventMapper } from './rum/eventMappers/actionEventMapper';\nimport type { ErrorEventMapper } from './rum/eventMappers/errorEventMapper';\nimport type { ResourceEventMapper } from './rum/eventMappers/resourceEventMapper';\nimport type { FirstPartyHost } from './rum/types';\nimport { PropagatorType } from './rum/types';\n\nexport enum VitalsUpdateFrequency {\n FREQUENT = 'FREQUENT',\n AVERAGE = 'AVERAGE',\n RARE = 'RARE',\n NEVER = 'NEVER'\n}\n\nexport enum UploadFrequency {\n /**\n * Upload data every 1000ms.\n */\n FREQUENT = 'FREQUENT',\n /**\n * Upload data every 5000ms.\n */\n AVERAGE = 'AVERAGE',\n /**\n * Upload data every 10000ms.\n */\n RARE = 'RARE'\n}\n\nexport enum BatchSize {\n /**\n * Upload less frequent, larger batches of data\n */\n LARGE = 'LARGE',\n /**\n * Use default size for batches of data\n */\n MEDIUM = 'MEDIUM',\n /**\n * Upload more frequent, smaller batches of data\n */\n SMALL = 'SMALL'\n}\n\nexport type FirstPartyHostsConfiguration = (\n | FirstPartyHost\n | LegacyFirstPartyHost\n)[];\n\nexport type LegacyFirstPartyHost = string;\n\nconst isLegacyFirstPartyHost = (\n firstPartyHost: FirstPartyHost | LegacyFirstPartyHost\n): firstPartyHost is LegacyFirstPartyHost => {\n return typeof firstPartyHost === 'string';\n};\n\nexport type CustomEndpoints = {\n rum?: string;\n logs?: string;\n trace?: string;\n};\n\n/**\n * Defaults legacy first party hosts format to Datadog first party hosts to keep\n * retro-compatibility before OTel support was introduced.\n */\nexport const formatFirstPartyHosts = (\n firstPartyHosts: FirstPartyHostsConfiguration\n): FirstPartyHost[] => {\n return firstPartyHosts.map(host => {\n if (isLegacyFirstPartyHost(host)) {\n return {\n match: host,\n propagatorTypes: [\n PropagatorType.DATADOG,\n PropagatorType.TRACECONTEXT\n ]\n };\n }\n return host;\n });\n};\n\nexport const DEFAULTS = {\n nativeCrashReportEnabled: false,\n sessionSamplingRate: 100.0,\n resourceTracingSamplingRate: 20.0,\n site: 'US1',\n longTaskThresholdMs: 0,\n nativeLongTaskThresholdMs: 200,\n nativeViewTracking: false,\n nativeInteractionTracking: false,\n getFirstPartyHosts: () => [],\n getAdditionalConfiguration: () => ({}),\n trackingConsent: TrackingConsent.GRANTED,\n telemetrySampleRate: 20.0,\n vitalsUpdateFrequency: VitalsUpdateFrequency.AVERAGE,\n logEventMapper: null,\n errorEventMapper: null,\n resourceEventMapper: null,\n actionEventMapper: null,\n trackFrustrations: true,\n uploadFrequency: UploadFrequency.AVERAGE,\n batchSize: BatchSize.MEDIUM,\n trackBackgroundEvents: false,\n getCustomEndpoints: () => ({}),\n bundleLogsWithRum: true,\n bundleLogsWithTraces: true,\n useAccessibilityLabel: true\n};\n\n/**\n * The SDK configuration class.\n * It will be used to configure the SDK functionality at initialization.\n */\nexport class DdSdkReactNativeConfiguration {\n /**\n * Enables crash reporting for native platforms (iOS, Android). Default `false`.\n */\n public nativeCrashReportEnabled: boolean =\n DEFAULTS.nativeCrashReportEnabled;\n /**\n * @deprecated `sampleRate` has been replaced by `sessionSamplingRate` to avoid confusion with `resourceTracingSamplingRate` and will be removed in a future release.\n */\n public sampleRate?: number;\n /**\n * Percentage of sampled RUM sessions. Range `0`-`100`.\n */\n public sessionSamplingRate: number = DEFAULTS.sessionSamplingRate;\n /**\n * Percentage of tracing integrations for network calls between your app and your backend. Range `0`-`100`.\n */\n public resourceTracingSamplingRate: number =\n DEFAULTS.resourceTracingSamplingRate;\n public site: string = DEFAULTS.site;\n /**\n * Verbosity for internal SDK logging.\n * Set to `SdkVerbosity.DEBUG` to debug your SDK implementation.\n */\n public verbosity: SdkVerbosity | undefined = undefined;\n /**\n * Enables native views tracking.\n * Set to `true` if you use a custom navigation system relying on native views.\n */\n public nativeViewTracking: boolean = DEFAULTS.nativeViewTracking;\n /**\n * Enables native interaction tracking.\n * Set to `true` if you want to track interactions on native screens.\n */\n public nativeInteractionTracking: boolean =\n DEFAULTS.nativeInteractionTracking;\n public proxyConfig?: ProxyConfiguration = undefined;\n public serviceName?: string = undefined;\n /**\n * List of your backends hosts to enable tracing with.\n * Regular expressions are NOT supported.\n *\n * Matches domains and subdomains, e.g. `['example.com']` matches `example.com` and `api.example.com`.\n */\n public firstPartyHosts: FirstPartyHostsConfiguration = DEFAULTS.getFirstPartyHosts();\n /**\n * Overrides the reported version of the app.\n * Accepted characters are alphanumerics and `_`, `-`, `:`, `.`, `/`.\n * Other special characters are converted to underscores.\n *\n * See https://docs.datadoghq.com/getting_started/tagging/#define-tags for more information on the format.\n *\n * Make sure you set it correctly, as it will have to match the one specified during the upload of your source maps and other mapping files.\n */\n public version?: string;\n /**\n * Add a suffix to the reported version of the app.\n * Accepted characters are alphanumerics and `_`, `-`, `:`, `.`, `/`.\n * Other special characters are converted to underscores.\n *\n * See https://docs.datadoghq.com/getting_started/tagging/#define-tags for more information on the format.\n *\n * A dash (`-`) will be automatically added between the version and the suffix\n */\n public versionSuffix?: string;\n\n /**\n * The sampling rate for Internal Telemetry (info related to the work of the\n * SDK internals).\n *\n * The sampling rate must be a value between 0 and 100. A value of 0 means no\n * telemetry will be sent, 100 means all telemetry will be sent. When\n * `telemetrySampleRate` is not set, the default value from the iOS and\n * Android SDK is used, which is 20.\n */\n public telemetrySampleRate: number = DEFAULTS.telemetrySampleRate;\n\n /**\n * The threshold for native long tasks reporting in milliseconds.\n *\n * - Setting it to `0` or `false` disables native long task reporting.\n * - Values below `100` will be raised to `100`.\n * - Values above `5000` will be lowered to `5000`.\n *\n * Default value is `200`.\n */\n public nativeLongTaskThresholdMs: number | false =\n DEFAULTS.nativeLongTaskThresholdMs;\n\n /**\n * The threshold for javascript long tasks reporting in milliseconds.\n *\n * - Setting it to `0` or `false` disables javascript long task reporting.\n * - Values below `100` will be raised to `100`.\n * - Values above `5000` will be lowered to `5000`.\n *\n * Default value is `0`\n */\n public longTaskThresholdMs: number | false = DEFAULTS.longTaskThresholdMs;\n\n /**\n * Sets the preferred frequency for collecting mobile vitals.\n */\n public vitalsUpdateFrequency: VitalsUpdateFrequency =\n DEFAULTS.vitalsUpdateFrequency;\n\n /**\n * Enables tracking of frustration signals (error taps). Defaults to `true`.\n */\n public trackFrustrations: boolean = DEFAULTS.trackFrustrations;\n\n /**\n * Sets the preferred frequency for uploading batches of data.\n */\n public uploadFrequency: UploadFrequency = DEFAULTS.uploadFrequency;\n\n /**\n * Defines the Datadog SDK policy when batching data together before uploading it to Datadog servers.\n * Smaller batches mean smaller but more network requests, whereas larger batches mean fewer but larger network requests.\n */\n public batchSize: BatchSize = DEFAULTS.batchSize;\n\n /**\n * Enables tracking of RUM event when no RUM View is active.\n *\n * By default, background events are not tracked. Enabling this feature might increase the\n * number of sessions tracked and impact your billing.\n */\n public trackBackgroundEvents: boolean = DEFAULTS.trackBackgroundEvents;\n\n /**\n * Enables RUM correlation with logs.\n *\n * By default, RUM is enabled for logs.\n */\n public bundleLogsWithRum: boolean = DEFAULTS.bundleLogsWithRum;\n\n /**\n * Enables Traces correlation with logs.\n *\n * By default, Traces is enabled for logs.\n */\n public bundleLogsWithTraces: boolean = DEFAULTS.bundleLogsWithTraces;\n\n /**\n * Specifies a custom prop to name RUM actions on elements having an `onPress` prop.\n *\n * For example if you set it to `testID`, the value of the `testID` prop is used as a custom action name:\n *\n * ```js\n * <TouchableOpacity testID=\"Dismiss notification\" onPress={() => dismiss()}>\n * ```\n *\n * `dd-action-name` is favored when both attributes are present on an element.\n */\n public actionNameAttribute?: string;\n\n public logEventMapper: LogEventMapper | null = DEFAULTS.logEventMapper;\n\n public errorEventMapper: ErrorEventMapper | null =\n DEFAULTS.errorEventMapper;\n\n public resourceEventMapper: ResourceEventMapper | null =\n DEFAULTS.resourceEventMapper;\n\n public actionEventMapper: ActionEventMapper | null =\n DEFAULTS.actionEventMapper;\n\n public additionalConfiguration: {\n [k: string]: any;\n } = DEFAULTS.getAdditionalConfiguration();\n\n public customEndpoints: CustomEndpoints = DEFAULTS.getCustomEndpoints();\n\n constructor(\n readonly clientToken: string,\n readonly env: string,\n readonly applicationId: string,\n readonly trackInteractions: boolean = false,\n readonly trackResources: boolean = false,\n readonly trackErrors: boolean = false,\n readonly trackingConsent: TrackingConsent = DEFAULTS.trackingConsent,\n readonly useAccessibilityLabel: boolean = DEFAULTS.useAccessibilityLabel\n ) {}\n}\n\n/**\n * Auto Instrumentation configuration passed to DatadogProvider.\n * Does not include default values.\n */\nexport type AutoInstrumentationConfiguration = {\n readonly trackInteractions: boolean;\n readonly trackResources: boolean;\n readonly firstPartyHosts?: FirstPartyHostsConfiguration;\n readonly resourceTracingSamplingRate?: number;\n readonly trackErrors: boolean;\n readonly logEventMapper?: LogEventMapper | null;\n readonly errorEventMapper?: ErrorEventMapper | null;\n readonly resourceEventMapper?: ResourceEventMapper | null;\n readonly actionEventMapper?: ActionEventMapper | null;\n readonly useAccessibilityLabel?: boolean;\n readonly actionNameAttribute?: string;\n};\n\n/**\n * Parameters needed to start auto instrumentation. Includes default values.\n */\nexport type AutoInstrumentationParameters = {\n readonly trackInteractions: boolean;\n readonly trackResources: boolean;\n readonly firstPartyHosts: FirstPartyHostsConfiguration;\n readonly resourceTracingSamplingRate: number;\n readonly trackErrors: boolean;\n readonly logEventMapper: LogEventMapper | null;\n readonly errorEventMapper: ErrorEventMapper | null;\n readonly resourceEventMapper: ResourceEventMapper | null;\n readonly actionEventMapper: ActionEventMapper | null;\n readonly useAccessibilityLabel: boolean;\n readonly actionNameAttribute?: string;\n};\n\n/**\n * We could use `Proxy` instead of this function, but `Proxy` is not available on\n * the older android jsc that can still be used.\n */\nexport const addDefaultValuesToAutoInstrumentationConfiguration = (\n features: AutoInstrumentationConfiguration\n): AutoInstrumentationParameters => {\n return {\n ...features,\n firstPartyHosts:\n features.firstPartyHosts || DEFAULTS.getFirstPartyHosts(),\n resourceTracingSamplingRate:\n features.resourceTracingSamplingRate === undefined\n ? DEFAULTS.resourceTracingSamplingRate\n : features.resourceTracingSamplingRate,\n logEventMapper:\n features.logEventMapper === undefined\n ? DEFAULTS.logEventMapper\n : features.logEventMapper,\n errorEventMapper:\n features.errorEventMapper === undefined\n ? DEFAULTS.errorEventMapper\n : features.errorEventMapper,\n resourceEventMapper:\n features.resourceEventMapper === undefined\n ? DEFAULTS.resourceEventMapper\n : features.resourceEventMapper,\n actionEventMapper:\n features.actionEventMapper === undefined\n ? DEFAULTS.actionEventMapper\n : features.actionEventMapper,\n useAccessibilityLabel: DEFAULTS.useAccessibilityLabel\n };\n};\n\nexport type PartialInitializationConfiguration = {\n readonly clientToken: string;\n readonly env: string;\n readonly applicationId: string;\n readonly sessionSamplingRate?: number;\n readonly site?: string;\n readonly verbosity?: SdkVerbosity | undefined;\n readonly nativeViewTracking?: boolean;\n readonly nativeInteractionTracking?: boolean;\n readonly proxyConfig?: ProxyConfiguration;\n readonly serviceName?: string;\n readonly version?: string;\n versionSuffix?: string;\n readonly additionalConfiguration?: { [k: string]: any };\n readonly trackingConsent?: TrackingConsent;\n readonly longTaskThresholdMs?: number | false;\n readonly nativeLongTaskThresholdMs?: number | false;\n readonly nativeCrashReportEnabled?: boolean;\n readonly telemetrySampleRate?: number;\n readonly vitalsUpdateFrequency?: VitalsUpdateFrequency;\n readonly trackFrustrations?: boolean;\n readonly uploadFrequency?: UploadFrequency;\n readonly batchSize?: BatchSize;\n readonly trackBackgroundEvents?: boolean;\n readonly customEndpoints?: CustomEndpoints;\n readonly bundleLogsWithRum?: boolean;\n readonly bundleLogsWithTraces?: boolean;\n};\n\nconst setConfigurationAttribute = <\n AttributeName extends keyof DdSdkReactNativeConfiguration\n>(\n attribute: {\n value?: DdSdkReactNativeConfiguration[AttributeName];\n name: AttributeName;\n },\n configuration: DdSdkReactNativeConfiguration\n) => {\n if (attribute.value !== undefined) {\n configuration[attribute.name] = attribute.value;\n }\n};\n\nexport const buildConfigurationFromPartialConfiguration = (\n features: AutoInstrumentationConfiguration,\n configuration: PartialInitializationConfiguration\n): DdSdkReactNativeConfiguration => {\n const {\n clientToken,\n env,\n applicationId,\n ...remainingConfiguration\n } = configuration;\n const SdkConfiguration = new DdSdkReactNativeConfiguration(\n clientToken,\n env,\n applicationId,\n features.trackInteractions,\n features.trackResources,\n features.trackErrors,\n configuration.trackingConsent,\n features.useAccessibilityLabel\n );\n\n (Object.keys(\n remainingConfiguration\n ) as (keyof typeof remainingConfiguration)[]).forEach(name => {\n setConfigurationAttribute(\n { value: remainingConfiguration[name], name },\n SdkConfiguration\n );\n });\n\n setConfigurationAttribute(\n {\n name: 'resourceTracingSamplingRate',\n value: features.resourceTracingSamplingRate\n },\n SdkConfiguration\n );\n setConfigurationAttribute(\n { name: 'firstPartyHosts', value: features.firstPartyHosts },\n SdkConfiguration\n );\n setConfigurationAttribute(\n {\n name: 'logEventMapper',\n value: features.logEventMapper\n },\n SdkConfiguration\n );\n setConfigurationAttribute(\n {\n name: 'errorEventMapper',\n value: features.errorEventMapper\n },\n SdkConfiguration\n );\n setConfigurationAttribute(\n {\n name: 'resourceEventMapper',\n value: features.resourceEventMapper\n },\n SdkConfiguration\n );\n setConfigurationAttribute(\n {\n name: 'actionEventMapper',\n value: features.actionEventMapper\n },\n SdkConfiguration\n );\n setConfigurationAttribute(\n {\n name: 'actionNameAttribute',\n value: features.actionNameAttribute\n },\n SdkConfiguration\n );\n\n return SdkConfiguration;\n};\n\nexport class DatadogProviderConfiguration extends DdSdkReactNativeConfiguration {\n public initializationMode: InitializationMode = InitializationMode.SYNC;\n}\n\nexport enum InitializationMode {\n SYNC = 'SYNC',\n ASYNC = 'ASYNC'\n}\n\nexport type InitializationModeForTelemetry =\n | 'LEGACY'\n | 'SYNC'\n | 'ASYNC'\n | 'PARTIAL'\n | 'FILE';\n"]}
1
+ {"version":3,"names":["TrackingConsent","PropagatorType","VitalsUpdateFrequency","UploadFrequency","BatchSize","isLegacyFirstPartyHost","firstPartyHost","formatFirstPartyHosts","firstPartyHosts","map","host","match","propagatorTypes","DATADOG","TRACECONTEXT","DEFAULTS","nativeCrashReportEnabled","sessionSamplingRate","resourceTracingSamplingRate","site","longTaskThresholdMs","nativeLongTaskThresholdMs","nativeViewTracking","nativeInteractionTracking","getFirstPartyHosts","getAdditionalConfiguration","trackingConsent","GRANTED","telemetrySampleRate","vitalsUpdateFrequency","AVERAGE","logEventMapper","errorEventMapper","resourceEventMapper","actionEventMapper","trackFrustrations","uploadFrequency","batchSize","MEDIUM","trackBackgroundEvents","getCustomEndpoints","bundleLogsWithRum","bundleLogsWithTraces","useAccessibilityLabel","DdSdkReactNativeConfiguration","verbosity","undefined","proxyConfig","serviceName","additionalConfiguration","customEndpoints","constructor","clientToken","env","applicationId","trackInteractions","trackResources","trackErrors","addDefaultValuesToAutoInstrumentationConfiguration","features","setConfigurationAttribute","attribute","configuration","value","name","buildConfigurationFromPartialConfiguration","remainingConfiguration","SdkConfiguration","Object","keys","forEach","actionNameAttribute","DatadogProviderConfiguration","initializationMode","InitializationMode","SYNC"],"sourceRoot":"../../src","sources":["DdSdkReactNativeConfiguration.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAIA,SAASA,eAAe,QAAQ,mBAAmB;AAMnD,SAASC,cAAc,QAAQ,aAAa;AAE5C,WAAYC,qBAAqB,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;AAOjC,WAAYC,eAAe,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;AAe3B,WAAYC,SAAS,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA;AAsBrB,MAAMC,sBAAsB,GACxBC,cAAqD,IACZ;EACzC,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AO,MAAMK,4BAA4B,SAAS5B,6BAA6B,CAAC;EACrE6B,kBAAkB,GAAuBC,kBAAkB,CAACC,IAAI;AAC3E;AAEA,WAAYD,kBAAkB,0BAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA","ignoreList":[]}
@@ -1,53 +1,42 @@
1
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
-
3
1
  /*
4
2
  * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
5
3
  * This product includes software developed at Datadog (https://www.datadoghq.com/).
6
4
  * Copyright 2016-Present Datadog, Inc.
7
5
  */
6
+
8
7
  import { SdkVerbosity } from './SdkVerbosity';
9
8
  export const DATADOG_MESSAGE_PREFIX = 'DATADOG:';
9
+
10
10
  /**
11
11
  * /!\ DO NOT USE THIS IN YOUR APP /!\\
12
12
  *
13
13
  * This logger is only for debugging the Datadog SDK.
14
14
  */
15
-
16
15
  export class InternalLog {
16
+ static levelMap = new Map([[SdkVerbosity.DEBUG, 1], [SdkVerbosity.INFO, 2], [SdkVerbosity.WARN, 3], [SdkVerbosity.ERROR, 4]]);
17
+ static verbosity = undefined;
17
18
  static log(message, verbosity) {
18
19
  if (InternalLog.verbosity === undefined) {
19
20
  return;
20
21
  }
21
-
22
22
  const requiredLevel = InternalLog.levelMap.get(verbosity);
23
23
  const allowedLevel = InternalLog.levelMap.get(InternalLog.verbosity);
24
-
25
24
  if (allowedLevel === undefined || requiredLevel === undefined) {
26
25
  return;
27
26
  }
28
-
29
27
  const prefixedMessage = `${DATADOG_MESSAGE_PREFIX} ${message}`;
30
-
31
28
  if (verbosity === SdkVerbosity.ERROR && requiredLevel >= allowedLevel) {
32
29
  console.error(prefixedMessage);
33
30
  }
34
-
35
31
  if (verbosity === SdkVerbosity.WARN && requiredLevel >= allowedLevel) {
36
32
  console.warn(prefixedMessage);
37
33
  }
38
-
39
34
  if (verbosity === SdkVerbosity.INFO && requiredLevel >= allowedLevel) {
40
35
  console.info(prefixedMessage);
41
36
  }
42
-
43
37
  if (verbosity === SdkVerbosity.DEBUG && requiredLevel >= allowedLevel) {
44
38
  console.debug(prefixedMessage);
45
39
  }
46
40
  }
47
-
48
41
  }
49
-
50
- _defineProperty(InternalLog, "levelMap", new Map([[SdkVerbosity.DEBUG, 1], [SdkVerbosity.INFO, 2], [SdkVerbosity.WARN, 3], [SdkVerbosity.ERROR, 4]]));
51
-
52
- _defineProperty(InternalLog, "verbosity", undefined);
53
42
  //# sourceMappingURL=InternalLog.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["InternalLog.tsx"],"names":["SdkVerbosity","DATADOG_MESSAGE_PREFIX","InternalLog","log","message","verbosity","undefined","requiredLevel","levelMap","get","allowedLevel","prefixedMessage","ERROR","console","error","WARN","warn","INFO","info","DEBUG","debug","Map"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AAEA,SAASA,YAAT,QAA6B,gBAA7B;AAEA,OAAO,MAAMC,sBAAsB,GAAG,UAA/B;AAEP;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,WAAN,CAAkB;AAUJ,SAAHC,GAAG,CAACC,OAAD,EAAkBC,SAAlB,EAAiD;AAC9D,QAAIH,WAAW,CAACG,SAAZ,KAA0BC,SAA9B,EAAyC;AACrC;AACH;;AACD,UAAMC,aAAa,GAAGL,WAAW,CAACM,QAAZ,CAAqBC,GAArB,CAAyBJ,SAAzB,CAAtB;AACA,UAAMK,YAAY,GAAGR,WAAW,CAACM,QAAZ,CAAqBC,GAArB,CAAyBP,WAAW,CAACG,SAArC,CAArB;;AACA,QAAIK,YAAY,KAAKJ,SAAjB,IAA8BC,aAAa,KAAKD,SAApD,EAA+D;AAC3D;AACH;;AACD,UAAMK,eAAe,GAAI,GAAEV,sBAAuB,IAAGG,OAAQ,EAA7D;;AACA,QAAIC,SAAS,KAAKL,YAAY,CAACY,KAA3B,IAAoCL,aAAa,IAAIG,YAAzD,EAAuE;AACnEG,MAAAA,OAAO,CAACC,KAAR,CAAcH,eAAd;AACH;;AAED,QAAIN,SAAS,KAAKL,YAAY,CAACe,IAA3B,IAAmCR,aAAa,IAAIG,YAAxD,EAAsE;AAClEG,MAAAA,OAAO,CAACG,IAAR,CAAaL,eAAb;AACH;;AAED,QAAIN,SAAS,KAAKL,YAAY,CAACiB,IAA3B,IAAmCV,aAAa,IAAIG,YAAxD,EAAsE;AAClEG,MAAAA,OAAO,CAACK,IAAR,CAAaP,eAAb;AACH;;AAED,QAAIN,SAAS,KAAKL,YAAY,CAACmB,KAA3B,IAAoCZ,aAAa,IAAIG,YAAzD,EAAuE;AACnEG,MAAAA,OAAO,CAACO,KAAR,CAAcT,eAAd;AACH;AACJ;;AAnCoB;;gBAAZT,W,cACiB,IAAImB,GAAJ,CAA8B,CACpD,CAACrB,YAAY,CAACmB,KAAd,EAAqB,CAArB,CADoD,EAEpD,CAACnB,YAAY,CAACiB,IAAd,EAAoB,CAApB,CAFoD,EAGpD,CAACjB,YAAY,CAACe,IAAd,EAAoB,CAApB,CAHoD,EAIpD,CAACf,YAAY,CAACY,KAAd,EAAqB,CAArB,CAJoD,CAA9B,C;;gBADjBV,W,eAQ2CI,S","sourcesContent":["/*\n * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.\n * This product includes software developed at Datadog (https://www.datadoghq.com/).\n * Copyright 2016-Present Datadog, Inc.\n */\n\nimport { SdkVerbosity } from './SdkVerbosity';\n\nexport const DATADOG_MESSAGE_PREFIX = 'DATADOG:';\n\n/**\n * /!\\ DO NOT USE THIS IN YOUR APP /!\\\\\n *\n * This logger is only for debugging the Datadog SDK.\n */\nexport class InternalLog {\n private static levelMap = new Map<SdkVerbosity, number>([\n [SdkVerbosity.DEBUG, 1],\n [SdkVerbosity.INFO, 2],\n [SdkVerbosity.WARN, 3],\n [SdkVerbosity.ERROR, 4]\n ]);\n\n public static verbosity: SdkVerbosity | undefined = undefined;\n\n public static log(message: string, verbosity: SdkVerbosity): void {\n if (InternalLog.verbosity === undefined) {\n return;\n }\n const requiredLevel = InternalLog.levelMap.get(verbosity);\n const allowedLevel = InternalLog.levelMap.get(InternalLog.verbosity);\n if (allowedLevel === undefined || requiredLevel === undefined) {\n return;\n }\n const prefixedMessage = `${DATADOG_MESSAGE_PREFIX} ${message}`;\n if (verbosity === SdkVerbosity.ERROR && requiredLevel >= allowedLevel) {\n console.error(prefixedMessage);\n }\n\n if (verbosity === SdkVerbosity.WARN && requiredLevel >= allowedLevel) {\n console.warn(prefixedMessage);\n }\n\n if (verbosity === SdkVerbosity.INFO && requiredLevel >= allowedLevel) {\n console.info(prefixedMessage);\n }\n\n if (verbosity === SdkVerbosity.DEBUG && requiredLevel >= allowedLevel) {\n console.debug(prefixedMessage);\n }\n }\n}\n"]}
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,5 +1,3 @@
1
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
-
3
1
  /**
4
2
  * Proxy server configuration.
5
3
  */
@@ -30,11 +28,6 @@ class ProxyConfiguration {
30
28
  this.type = type;
31
29
  this.address = address;
32
30
  this.port = port;
33
-
34
- _defineProperty(this, "username", void 0);
35
-
36
- _defineProperty(this, "password", void 0);
37
-
38
31
  if (username && password) {
39
32
  if (type === ProxyType.SOCKS) {
40
33
  console.warn("SOCKS proxy configuration doesn't support Basic authentication.");
@@ -44,16 +37,12 @@ class ProxyConfiguration {
44
37
  }
45
38
  }
46
39
  }
47
-
48
40
  }
49
-
50
- var ProxyType;
51
-
52
- (function (ProxyType) {
41
+ var ProxyType = /*#__PURE__*/function (ProxyType) {
53
42
  ProxyType["HTTP"] = "http";
54
43
  ProxyType["HTTPS"] = "https";
55
44
  ProxyType["SOCKS"] = "socks";
56
- })(ProxyType || (ProxyType = {}));
57
-
45
+ return ProxyType;
46
+ }(ProxyType || {});
58
47
  export { ProxyConfiguration, ProxyType };
59
48
  //# sourceMappingURL=ProxyConfiguration.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["ProxyConfiguration.tsx"],"names":["ProxyConfiguration","constructor","type","address","port","username","password","ProxyType","SOCKS","console","warn"],"mappings":";;AAAA;AACA;AACA;AACA,MAAMA,kBAAN,CAAyB;AAIrBC,EAAAA,WAAW;AACP;AACR;AACA;AACiBC,EAAAA,IAJF;AAKP;AACR;AACA;AACiBC,EAAAA,OARF;AASP;AACR;AACA;AACiBC,EAAAA,IAZF;AAaP;AACR;AACA;AACA;AACA;AACQC,EAAAA,QAlBO;AAmBP;AACR;AACA;AACQC,EAAAA,QAtBO,EAuBT;AAAA,SAnBWJ,IAmBX,GAnBWA,IAmBX;AAAA,SAfWC,OAeX,GAfWA,OAeX;AAAA,SAXWC,IAWX,GAXWA,IAWX;;AAAA;;AAAA;;AACE,QAAIC,QAAQ,IAAIC,QAAhB,EAA0B;AACtB,UAAIJ,IAAI,KAAKK,SAAS,CAACC,KAAvB,EAA8B;AAC1BC,QAAAA,OAAO,CAACC,IAAR,CACI,iEADJ;AAGH,OAJD,MAIO;AACH,aAAKL,QAAL,GAAgBA,QAAhB;AACA,aAAKC,QAAL,GAAgBA,QAAhB;AACH;AACJ;AACJ;;AAtCoB;;IAyCpBC,S;;WAAAA,S;AAAAA,EAAAA,S;AAAAA,EAAAA,S;AAAAA,EAAAA,S;GAAAA,S,KAAAA,S;;AAML,SAASP,kBAAT,EAA6BO,SAA7B","sourcesContent":["/**\n * Proxy server configuration.\n */\nclass ProxyConfiguration {\n username?: string;\n password?: string;\n\n constructor(\n /**\n * Proxy type.\n */\n readonly type: ProxyType,\n /**\n * Proxy address. Can be either in the IP address format, ex. \"1.1.1.1\", or hostname, ex. \"example.com\".\n */\n readonly address: string,\n /**\n * Proxy port.\n */\n readonly port: number,\n /**\n * Username for Basic authentication scheme.\n *\n * Note: \"SOCKS + authentication\" scheme is not supported.\n */\n username?: string,\n /**\n * Password for Basic authentication scheme.\n */\n password?: string\n ) {\n if (username && password) {\n if (type === ProxyType.SOCKS) {\n console.warn(\n \"SOCKS proxy configuration doesn't support Basic authentication.\"\n );\n } else {\n this.username = username;\n this.password = password;\n }\n }\n }\n}\n\nenum ProxyType {\n HTTP = 'http',\n HTTPS = 'https',\n SOCKS = 'socks'\n}\n\nexport { ProxyConfiguration, ProxyType };\n"]}
1
+ {"version":3,"names":["ProxyConfiguration","constructor","type","address","port","username","password","ProxyType","SOCKS","console","warn"],"sourceRoot":"../../src","sources":["ProxyConfiguration.tsx"],"mappings":"AAAA;AACA;AACA;AACA,MAAMA,kBAAkB,CAAC;EAIrBC,WAAWA;EACP;AACR;AACA;EACiBC,IAAe;EACxB;AACR;AACA;EACiBC,OAAe;EACxB;AACR;AACA;EACiBC,IAAY;EACrB;AACR;AACA;AACA;AACA;EACQC,QAAiB;EACjB;AACR;AACA;EACQC,QAAiB,EACnB;IAAA,KAnBWJ,IAAe,GAAfA,IAAe;IAAA,KAIfC,OAAe,GAAfA,OAAe;IAAA,KAIfC,IAAY,GAAZA,IAAY;IAYrB,IAAIC,QAAQ,IAAIC,QAAQ,EAAE;MACtB,IAAIJ,IAAI,KAAKK,SAAS,CAACC,KAAK,EAAE;QAC1BC,OAAO,CAACC,IAAI,CACR,iEACJ,CAAC;MACL,CAAC,MAAM;QACH,IAAI,CAACL,QAAQ,GAAGA,QAAQ;QACxB,IAAI,CAACC,QAAQ,GAAGA,QAAQ;MAC5B;IACJ;EACJ;AACJ;AAAC,IAEIC,SAAS,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA,EAATA,SAAS;AAMd,SAASP,kBAAkB,EAAEO,SAAS","ignoreList":[]}
@@ -7,12 +7,11 @@
7
7
  /**
8
8
  * Enum specifying possible log levels for DD SDK.
9
9
  */
10
- export let SdkVerbosity;
11
-
12
- (function (SdkVerbosity) {
10
+ export let SdkVerbosity = /*#__PURE__*/function (SdkVerbosity) {
13
11
  SdkVerbosity["DEBUG"] = "debug";
14
12
  SdkVerbosity["INFO"] = "info";
15
13
  SdkVerbosity["WARN"] = "warn";
16
14
  SdkVerbosity["ERROR"] = "error";
17
- })(SdkVerbosity || (SdkVerbosity = {}));
15
+ return SdkVerbosity;
16
+ }({});
18
17
  //# sourceMappingURL=SdkVerbosity.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["SdkVerbosity.tsx"],"names":["SdkVerbosity"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAYA,YAAZ;;WAAYA,Y;AAAAA,EAAAA,Y;AAAAA,EAAAA,Y;AAAAA,EAAAA,Y;AAAAA,EAAAA,Y;GAAAA,Y,KAAAA,Y","sourcesContent":["/*\n * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.\n * This product includes software developed at Datadog (https://www.datadoghq.com/).\n * Copyright 2016-Present Datadog, Inc.\n */\n\n/**\n * Enum specifying possible log levels for DD SDK.\n */\nexport enum SdkVerbosity {\n DEBUG = 'debug',\n INFO = 'info',\n WARN = 'warn',\n ERROR = 'error'\n}\n"]}
1
+ {"version":3,"names":["SdkVerbosity"],"sourceRoot":"../../src","sources":["SdkVerbosity.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAYA,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA","ignoreList":[]}
@@ -7,11 +7,10 @@
7
7
  /**
8
8
  * Enum specifying possible consent options for DD SDK.
9
9
  */
10
- export let TrackingConsent;
11
-
12
- (function (TrackingConsent) {
10
+ export let TrackingConsent = /*#__PURE__*/function (TrackingConsent) {
13
11
  TrackingConsent["PENDING"] = "pending";
14
12
  TrackingConsent["GRANTED"] = "granted";
15
13
  TrackingConsent["NOT_GRANTED"] = "not_granted";
16
- })(TrackingConsent || (TrackingConsent = {}));
14
+ return TrackingConsent;
15
+ }({});
17
16
  //# sourceMappingURL=TrackingConsent.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["TrackingConsent.tsx"],"names":["TrackingConsent"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAYA,eAAZ;;WAAYA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;GAAAA,e,KAAAA,e","sourcesContent":["/*\n * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.\n * This product includes software developed at Datadog (https://www.datadoghq.com/).\n * Copyright 2016-Present Datadog, Inc.\n */\n\n/**\n * Enum specifying possible consent options for DD SDK.\n */\nexport enum TrackingConsent {\n PENDING = 'pending',\n GRANTED = 'granted',\n NOT_GRANTED = 'not_granted'\n}\n"]}
1
+ {"version":3,"names":["TrackingConsent"],"sourceRoot":"../../src","sources":["TrackingConsent.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAYA,eAAe,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA","ignoreList":[]}
@@ -3,6 +3,9 @@
3
3
  * This product includes software developed at Datadog (https://www.datadoghq.com/).
4
4
  * Copyright 2016-Present Datadog, Inc.
5
5
  */
6
+ /* eslint-disable arca/import-ordering */
7
+
8
+ import './polyfills';
6
9
  import { DatadogProviderConfiguration, DdSdkReactNativeConfiguration, InitializationMode, VitalsUpdateFrequency, UploadFrequency, BatchSize } from './DdSdkReactNativeConfiguration';
7
10
  import { DdSdkReactNative } from './DdSdkReactNative';
8
11
  import { InternalLog } from './InternalLog';
@@ -18,5 +21,7 @@ import { FileBasedConfiguration } from './sdk/FileBasedConfiguration/FileBasedCo
18
21
  import { DdTrace } from './trace/DdTrace';
19
22
  import { DefaultTimeProvider } from './utils/time-provider/DefaultTimeProvider';
20
23
  import { TimeProvider } from './utils/time-provider/TimeProvider';
24
+ /* eslint-enable arca/import-ordering */
25
+
21
26
  export { DatadogProvider, DatadogProviderConfiguration, FileBasedConfiguration, InitializationMode, DdLogs, DdTrace, DdRum, RumActionType, ErrorSource, DdSdkReactNativeConfiguration, DdSdkReactNative, InternalLog, ProxyConfiguration, ProxyType, TrackingConsent, SdkVerbosity, VitalsUpdateFrequency, PropagatorType, UploadFrequency, BatchSize, TimeProvider, DefaultTimeProvider, DATADOG_GRAPH_QL_OPERATION_TYPE_HEADER, DATADOG_GRAPH_QL_OPERATION_NAME_HEADER, DATADOG_GRAPH_QL_VARIABLES_HEADER };
22
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.tsx"],"names":["DatadogProviderConfiguration","DdSdkReactNativeConfiguration","InitializationMode","VitalsUpdateFrequency","UploadFrequency","BatchSize","DdSdkReactNative","InternalLog","ProxyConfiguration","ProxyType","SdkVerbosity","TrackingConsent","DdLogs","DdRum","DATADOG_GRAPH_QL_OPERATION_TYPE_HEADER","DATADOG_GRAPH_QL_OPERATION_NAME_HEADER","DATADOG_GRAPH_QL_VARIABLES_HEADER","RumActionType","ErrorSource","PropagatorType","DatadogProvider","FileBasedConfiguration","DdTrace","DefaultTimeProvider","TimeProvider"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AAEA,SACIA,4BADJ,EAEIC,6BAFJ,EAGIC,kBAHJ,EAIIC,qBAJJ,EAKIC,eALJ,EAMIC,SANJ,QAOO,iCAPP;AAQA,SAASC,gBAAT,QAAiC,oBAAjC;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,kBAAT,EAA6BC,SAA7B,QAA8C,sBAA9C;AACA,SAASC,YAAT,QAA6B,gBAA7B;AACA,SAASC,eAAT,QAAgC,mBAAhC;AACA,SAASC,MAAT,QAAuB,eAAvB;AACA,SAASC,KAAT,QAAsB,aAAtB;AACA,SACIC,sCADJ,EAEIC,sCAFJ,EAGIC,iCAHJ,QAIO,+DAJP;AAKA,SAASC,aAAT,EAAwBC,WAAxB,EAAqCC,cAArC,QAA2D,aAA3D;AACA,SAASC,eAAT,QAAgC,uCAAhC;AACA,SAASC,sBAAT,QAAuC,qDAAvC;AACA,SAASC,OAAT,QAAwB,iBAAxB;AACA,SAASC,mBAAT,QAAoC,2CAApC;AACA,SAASC,YAAT,QAA6B,oCAA7B;AAGA,SACIJ,eADJ,EAEIpB,4BAFJ,EAGIqB,sBAHJ,EAIInB,kBAJJ,EAKIU,MALJ,EAMIU,OANJ,EAOIT,KAPJ,EAQII,aARJ,EASIC,WATJ,EAUIjB,6BAVJ,EAWIK,gBAXJ,EAYIC,WAZJ,EAaIC,kBAbJ,EAcIC,SAdJ,EAeIE,eAfJ,EAgBID,YAhBJ,EAiBIP,qBAjBJ,EAkBIgB,cAlBJ,EAmBIf,eAnBJ,EAoBIC,SApBJ,EAqBImB,YArBJ,EAsBID,mBAtBJ,EAuBIT,sCAvBJ,EAwBIC,sCAxBJ,EAyBIC,iCAzBJ","sourcesContent":["/*\n * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.\n * This product includes software developed at Datadog (https://www.datadoghq.com/).\n * Copyright 2016-Present Datadog, Inc.\n */\n\nimport {\n DatadogProviderConfiguration,\n DdSdkReactNativeConfiguration,\n InitializationMode,\n VitalsUpdateFrequency,\n UploadFrequency,\n BatchSize\n} from './DdSdkReactNativeConfiguration';\nimport { DdSdkReactNative } from './DdSdkReactNative';\nimport { InternalLog } from './InternalLog';\nimport { ProxyConfiguration, ProxyType } from './ProxyConfiguration';\nimport { SdkVerbosity } from './SdkVerbosity';\nimport { TrackingConsent } from './TrackingConsent';\nimport { DdLogs } from './logs/DdLogs';\nimport { DdRum } from './rum/DdRum';\nimport {\n DATADOG_GRAPH_QL_OPERATION_TYPE_HEADER,\n DATADOG_GRAPH_QL_OPERATION_NAME_HEADER,\n DATADOG_GRAPH_QL_VARIABLES_HEADER\n} from './rum/instrumentation/resourceTracking/graphql/graphqlHeaders';\nimport { RumActionType, ErrorSource, PropagatorType } from './rum/types';\nimport { DatadogProvider } from './sdk/DatadogProvider/DatadogProvider';\nimport { FileBasedConfiguration } from './sdk/FileBasedConfiguration/FileBasedConfiguration';\nimport { DdTrace } from './trace/DdTrace';\nimport { DefaultTimeProvider } from './utils/time-provider/DefaultTimeProvider';\nimport { TimeProvider } from './utils/time-provider/TimeProvider';\nimport type { Timestamp } from './utils/time-provider/TimeProvider';\n\nexport {\n DatadogProvider,\n DatadogProviderConfiguration,\n FileBasedConfiguration,\n InitializationMode,\n DdLogs,\n DdTrace,\n DdRum,\n RumActionType,\n ErrorSource,\n DdSdkReactNativeConfiguration,\n DdSdkReactNative,\n InternalLog,\n ProxyConfiguration,\n ProxyType,\n TrackingConsent,\n SdkVerbosity,\n VitalsUpdateFrequency,\n PropagatorType,\n UploadFrequency,\n BatchSize,\n TimeProvider,\n DefaultTimeProvider,\n DATADOG_GRAPH_QL_OPERATION_TYPE_HEADER,\n DATADOG_GRAPH_QL_OPERATION_NAME_HEADER,\n DATADOG_GRAPH_QL_VARIABLES_HEADER\n};\n\nexport type { Timestamp };\n"]}
1
+ {"version":3,"names":["DatadogProviderConfiguration","DdSdkReactNativeConfiguration","InitializationMode","VitalsUpdateFrequency","UploadFrequency","BatchSize","DdSdkReactNative","InternalLog","ProxyConfiguration","ProxyType","SdkVerbosity","TrackingConsent","DdLogs","DdRum","DATADOG_GRAPH_QL_OPERATION_TYPE_HEADER","DATADOG_GRAPH_QL_OPERATION_NAME_HEADER","DATADOG_GRAPH_QL_VARIABLES_HEADER","RumActionType","ErrorSource","PropagatorType","DatadogProvider","FileBasedConfiguration","DdTrace","DefaultTimeProvider","TimeProvider"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,aAAa;AACpB,SACIA,4BAA4B,EAC5BC,6BAA6B,EAC7BC,kBAAkB,EAClBC,qBAAqB,EACrBC,eAAe,EACfC,SAAS,QACN,iCAAiC;AACxC,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,kBAAkB,EAAEC,SAAS,QAAQ,sBAAsB;AACpE,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAASC,MAAM,QAAQ,eAAe;AACtC,SAASC,KAAK,QAAQ,aAAa;AACnC,SACIC,sCAAsC,EACtCC,sCAAsC,EACtCC,iCAAiC,QAC9B,+DAA+D;AACtE,SAASC,aAAa,EAAEC,WAAW,EAAEC,cAAc,QAAQ,aAAa;AACxE,SAASC,eAAe,QAAQ,uCAAuC;AACvE,SAASC,sBAAsB,QAAQ,qDAAqD;AAC5F,SAASC,OAAO,QAAQ,iBAAiB;AACzC,SAASC,mBAAmB,QAAQ,2CAA2C;AAC/E,SAASC,YAAY,QAAQ,oCAAoC;AAGjE;;AAEA,SACIJ,eAAe,EACfpB,4BAA4B,EAC5BqB,sBAAsB,EACtBnB,kBAAkB,EAClBU,MAAM,EACNU,OAAO,EACPT,KAAK,EACLI,aAAa,EACbC,WAAW,EACXjB,6BAA6B,EAC7BK,gBAAgB,EAChBC,WAAW,EACXC,kBAAkB,EAClBC,SAAS,EACTE,eAAe,EACfD,YAAY,EACZP,qBAAqB,EACrBgB,cAAc,EACdf,eAAe,EACfC,SAAS,EACTmB,YAAY,EACZD,mBAAmB,EACnBT,sCAAsC,EACtCC,sCAAsC,EACtCC,iCAAiC","ignoreList":[]}