@datadog/mobile-react-native 2.4.1 → 2.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (434) hide show
  1. package/DatadogSDKReactNative.podspec +6 -6
  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 +12 -4
  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 +107 -145
  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 +50 -66
  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 +1 -4
  40. package/lib/commonjs/polyfills.js.map +1 -1
  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 +143 -208
  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 +6 -11
  118. package/lib/commonjs/sdk/GlobalState/GlobalState.js.map +1 -1
  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 +4 -6
  123. package/lib/commonjs/specs/NativeDdLogs.js.map +1 -1
  124. package/lib/commonjs/specs/NativeDdRum.js +4 -6
  125. package/lib/commonjs/specs/NativeDdRum.js.map +1 -1
  126. package/lib/commonjs/specs/NativeDdSdk.js +4 -6
  127. package/lib/commonjs/specs/NativeDdSdk.js.map +1 -1
  128. package/lib/commonjs/specs/NativeDdTrace.js +4 -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 +104 -116
  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 +2 -2
  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 +1 -3
  173. package/lib/module/polyfills.js.map +1 -1
  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 +138 -185
  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 +6 -9
  251. package/lib/module/sdk/GlobalState/GlobalState.js.map +1 -1
  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 +2 -0
  256. package/lib/module/specs/NativeDdLogs.js.map +1 -1
  257. package/lib/module/specs/NativeDdRum.js +2 -0
  258. package/lib/module/specs/NativeDdRum.js.map +1 -1
  259. package/lib/module/specs/NativeDdSdk.js +2 -0
  260. package/lib/module/specs/NativeDdSdk.js.map +1 -1
  261. package/lib/module/specs/NativeDdTrace.js +2 -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 -0
  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 +1 -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 +1 -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/__tests__/DdSdkReactNative.test.tsx +2 -1
  419. package/src/__tests__/rum/instrumentation/DdRumErrorTracking.test.tsx +32 -16
  420. package/src/__tests__/rum/instrumentation/DdRumUserInteractionTracking.test.tsx +17 -15
  421. package/src/logs/DdLogs.ts +25 -8
  422. package/src/logs/__tests__/DdLogs.test.ts +122 -0
  423. package/src/logs/types.ts +5 -1
  424. package/src/nativeModulesTypes.ts +3 -1
  425. package/src/rum/DdAttributes.ts +20 -0
  426. package/src/rum/DdRum.ts +11 -6
  427. package/src/rum/__tests__/DdRum.test.ts +40 -4
  428. package/src/rum/eventMappers/errorEventMapper.ts +2 -0
  429. package/src/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.tsx +33 -10
  430. package/src/rum/instrumentation/interactionTracking/getJsxRuntime.ts +10 -3
  431. package/src/sdk/DatadogProvider/__tests__/initialization.test.tsx +1 -1
  432. package/src/specs/NativeDdRum.ts +3 -1
  433. package/src/version.ts +1 -1
  434. package/android/src/main/kotlin/com/datadog/reactnative/VitalFrameCallback.kt +0 -41
@@ -3,46 +3,36 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.InitializationMode = exports.DatadogProviderConfiguration = exports.buildConfigurationFromPartialConfiguration = exports.addDefaultValuesToAutoInstrumentationConfiguration = exports.DdSdkReactNativeConfiguration = exports.DEFAULTS = exports.formatFirstPartyHosts = exports.BatchSize = exports.UploadFrequency = exports.VitalsUpdateFrequency = void 0;
7
-
6
+ exports.formatFirstPartyHosts = exports.buildConfigurationFromPartialConfiguration = exports.addDefaultValuesToAutoInstrumentationConfiguration = exports.VitalsUpdateFrequency = exports.UploadFrequency = exports.InitializationMode = exports.DdSdkReactNativeConfiguration = exports.DatadogProviderConfiguration = exports.DEFAULTS = exports.BatchSize = void 0;
8
7
  var _TrackingConsent = require("./TrackingConsent");
9
-
10
8
  var _types = require("./rum/types");
11
-
12
- 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; }
13
-
14
- let VitalsUpdateFrequency;
15
- exports.VitalsUpdateFrequency = VitalsUpdateFrequency;
16
-
17
- (function (VitalsUpdateFrequency) {
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
+ let VitalsUpdateFrequency = exports.VitalsUpdateFrequency = /*#__PURE__*/function (VitalsUpdateFrequency) {
18
15
  VitalsUpdateFrequency["FREQUENT"] = "FREQUENT";
19
16
  VitalsUpdateFrequency["AVERAGE"] = "AVERAGE";
20
17
  VitalsUpdateFrequency["RARE"] = "RARE";
21
18
  VitalsUpdateFrequency["NEVER"] = "NEVER";
22
- })(VitalsUpdateFrequency || (exports.VitalsUpdateFrequency = VitalsUpdateFrequency = {}));
23
-
24
- let UploadFrequency;
25
- exports.UploadFrequency = UploadFrequency;
26
-
27
- (function (UploadFrequency) {
19
+ return VitalsUpdateFrequency;
20
+ }({});
21
+ let UploadFrequency = exports.UploadFrequency = /*#__PURE__*/function (UploadFrequency) {
28
22
  UploadFrequency["FREQUENT"] = "FREQUENT";
29
23
  UploadFrequency["AVERAGE"] = "AVERAGE";
30
24
  UploadFrequency["RARE"] = "RARE";
31
- })(UploadFrequency || (exports.UploadFrequency = UploadFrequency = {}));
32
-
33
- let BatchSize;
34
- exports.BatchSize = BatchSize;
35
-
36
- (function (BatchSize) {
25
+ return UploadFrequency;
26
+ }({});
27
+ let BatchSize = exports.BatchSize = /*#__PURE__*/function (BatchSize) {
37
28
  BatchSize["LARGE"] = "LARGE";
38
29
  BatchSize["MEDIUM"] = "MEDIUM";
39
30
  BatchSize["SMALL"] = "SMALL";
40
- })(BatchSize || (exports.BatchSize = BatchSize = {}));
41
-
31
+ return BatchSize;
32
+ }({});
42
33
  const isLegacyFirstPartyHost = firstPartyHost => {
43
34
  return typeof firstPartyHost === 'string';
44
35
  };
45
-
46
36
  /**
47
37
  * Defaults legacy first party hosts format to Datadog first party hosts to keep
48
38
  * retro-compatibility before OTel support was introduced.
@@ -55,13 +45,11 @@ const formatFirstPartyHosts = firstPartyHosts => {
55
45
  propagatorTypes: [_types.PropagatorType.DATADOG, _types.PropagatorType.TRACECONTEXT]
56
46
  };
57
47
  }
58
-
59
48
  return host;
60
49
  });
61
50
  };
62
-
63
51
  exports.formatFirstPartyHosts = formatFirstPartyHosts;
64
- const DEFAULTS = {
52
+ const DEFAULTS = exports.DEFAULTS = {
65
53
  nativeCrashReportEnabled: false,
66
54
  sessionSamplingRate: 100.0,
67
55
  resourceTracingSamplingRate: 20.0,
@@ -88,18 +76,16 @@ const DEFAULTS = {
88
76
  bundleLogsWithTraces: true,
89
77
  useAccessibilityLabel: true
90
78
  };
79
+
91
80
  /**
92
81
  * The SDK configuration class.
93
82
  * It will be used to configure the SDK functionality at initialization.
94
83
  */
95
-
96
- exports.DEFAULTS = DEFAULTS;
97
-
98
84
  class DdSdkReactNativeConfiguration {
99
85
  /**
100
86
  * Enables crash reporting for native platforms (iOS, Android). Default `false`.
101
87
  */
102
-
88
+ nativeCrashReportEnabled = DEFAULTS.nativeCrashReportEnabled;
103
89
  /**
104
90
  * @deprecated `sampleRate` has been replaced by `sessionSamplingRate` to avoid confusion with `resourceTracingSamplingRate` and will be removed in a future release.
105
91
  */
@@ -107,33 +93,36 @@ class DdSdkReactNativeConfiguration {
107
93
  /**
108
94
  * Percentage of sampled RUM sessions. Range `0`-`100`.
109
95
  */
110
-
96
+ sessionSamplingRate = DEFAULTS.sessionSamplingRate;
111
97
  /**
112
98
  * Percentage of tracing integrations for network calls between your app and your backend. Range `0`-`100`.
113
99
  */
114
-
100
+ resourceTracingSamplingRate = DEFAULTS.resourceTracingSamplingRate;
101
+ site = DEFAULTS.site;
115
102
  /**
116
103
  * Verbosity for internal SDK logging.
117
104
  * Set to `SdkVerbosity.DEBUG` to debug your SDK implementation.
118
105
  */
119
-
106
+ verbosity = undefined;
120
107
  /**
121
108
  * Enables native views tracking.
122
109
  * Set to `true` if you use a custom navigation system relying on native views.
123
110
  */
124
-
111
+ nativeViewTracking = DEFAULTS.nativeViewTracking;
125
112
  /**
126
113
  * Enables native interaction tracking.
127
114
  * Set to `true` if you want to track interactions on native screens.
128
115
  */
129
-
116
+ nativeInteractionTracking = DEFAULTS.nativeInteractionTracking;
117
+ proxyConfig = undefined;
118
+ serviceName = undefined;
130
119
  /**
131
120
  * List of your backends hosts to enable tracing with.
132
121
  * Regular expressions are NOT supported.
133
122
  *
134
123
  * Matches domains and subdomains, e.g. `['example.com']` matches `example.com` and `api.example.com`.
135
124
  */
136
-
125
+ firstPartyHosts = DEFAULTS.getFirstPartyHosts();
137
126
  /**
138
127
  * Overrides the reported version of the app.
139
128
  * Accepted characters are alphanumerics and `_`, `-`, `:`, `.`, `/`.
@@ -163,6 +152,7 @@ class DdSdkReactNativeConfiguration {
163
152
  * `telemetrySampleRate` is not set, the default value from the iOS and
164
153
  * Android SDK is used, which is 20.
165
154
  */
155
+ telemetrySampleRate = DEFAULTS.telemetrySampleRate;
166
156
 
167
157
  /**
168
158
  * The threshold for native long tasks reporting in milliseconds.
@@ -173,6 +163,7 @@ class DdSdkReactNativeConfiguration {
173
163
  *
174
164
  * Default value is `200`.
175
165
  */
166
+ nativeLongTaskThresholdMs = DEFAULTS.nativeLongTaskThresholdMs;
176
167
 
177
168
  /**
178
169
  * The threshold for javascript long tasks reporting in milliseconds.
@@ -183,23 +174,28 @@ class DdSdkReactNativeConfiguration {
183
174
  *
184
175
  * Default value is `0`
185
176
  */
177
+ longTaskThresholdMs = DEFAULTS.longTaskThresholdMs;
186
178
 
187
179
  /**
188
180
  * Sets the preferred frequency for collecting mobile vitals.
189
181
  */
182
+ vitalsUpdateFrequency = DEFAULTS.vitalsUpdateFrequency;
190
183
 
191
184
  /**
192
185
  * Enables tracking of frustration signals (error taps). Defaults to `true`.
193
186
  */
187
+ trackFrustrations = DEFAULTS.trackFrustrations;
194
188
 
195
189
  /**
196
190
  * Sets the preferred frequency for uploading batches of data.
197
191
  */
192
+ uploadFrequency = DEFAULTS.uploadFrequency;
198
193
 
199
194
  /**
200
195
  * Defines the Datadog SDK policy when batching data together before uploading it to Datadog servers.
201
196
  * Smaller batches mean smaller but more network requests, whereas larger batches mean fewer but larger network requests.
202
197
  */
198
+ batchSize = DEFAULTS.batchSize;
203
199
 
204
200
  /**
205
201
  * Enables tracking of RUM event when no RUM View is active.
@@ -207,18 +203,21 @@ class DdSdkReactNativeConfiguration {
207
203
  * By default, background events are not tracked. Enabling this feature might increase the
208
204
  * number of sessions tracked and impact your billing.
209
205
  */
206
+ trackBackgroundEvents = DEFAULTS.trackBackgroundEvents;
210
207
 
211
208
  /**
212
209
  * Enables RUM correlation with logs.
213
210
  *
214
211
  * By default, RUM is enabled for logs.
215
212
  */
213
+ bundleLogsWithRum = DEFAULTS.bundleLogsWithRum;
216
214
 
217
215
  /**
218
216
  * Enables Traces correlation with logs.
219
217
  *
220
218
  * By default, Traces is enabled for logs.
221
219
  */
220
+ bundleLogsWithTraces = DEFAULTS.bundleLogsWithTraces;
222
221
 
223
222
  /**
224
223
  * Specifies a custom prop to name RUM actions on elements having an `onPress` prop.
@@ -231,6 +230,13 @@ class DdSdkReactNativeConfiguration {
231
230
  *
232
231
  * `dd-action-name` is favored when both attributes are present on an element.
233
232
  */
233
+
234
+ logEventMapper = DEFAULTS.logEventMapper;
235
+ errorEventMapper = DEFAULTS.errorEventMapper;
236
+ resourceEventMapper = DEFAULTS.resourceEventMapper;
237
+ actionEventMapper = DEFAULTS.actionEventMapper;
238
+ additionalConfiguration = DEFAULTS.getAdditionalConfiguration();
239
+ customEndpoints = DEFAULTS.getCustomEndpoints();
234
240
  constructor(clientToken, env, applicationId, trackInteractions = false, trackResources = false, trackErrors = false, trackingConsent = DEFAULTS.trackingConsent, useAccessibilityLabel = DEFAULTS.useAccessibilityLabel) {
235
241
  this.clientToken = clientToken;
236
242
  this.env = env;
@@ -240,83 +246,25 @@ class DdSdkReactNativeConfiguration {
240
246
  this.trackErrors = trackErrors;
241
247
  this.trackingConsent = trackingConsent;
242
248
  this.useAccessibilityLabel = useAccessibilityLabel;
243
-
244
- _defineProperty(this, "nativeCrashReportEnabled", DEFAULTS.nativeCrashReportEnabled);
245
-
246
- _defineProperty(this, "sampleRate", void 0);
247
-
248
- _defineProperty(this, "sessionSamplingRate", DEFAULTS.sessionSamplingRate);
249
-
250
- _defineProperty(this, "resourceTracingSamplingRate", DEFAULTS.resourceTracingSamplingRate);
251
-
252
- _defineProperty(this, "site", DEFAULTS.site);
253
-
254
- _defineProperty(this, "verbosity", undefined);
255
-
256
- _defineProperty(this, "nativeViewTracking", DEFAULTS.nativeViewTracking);
257
-
258
- _defineProperty(this, "nativeInteractionTracking", DEFAULTS.nativeInteractionTracking);
259
-
260
- _defineProperty(this, "proxyConfig", undefined);
261
-
262
- _defineProperty(this, "serviceName", undefined);
263
-
264
- _defineProperty(this, "firstPartyHosts", DEFAULTS.getFirstPartyHosts());
265
-
266
- _defineProperty(this, "version", void 0);
267
-
268
- _defineProperty(this, "versionSuffix", void 0);
269
-
270
- _defineProperty(this, "telemetrySampleRate", DEFAULTS.telemetrySampleRate);
271
-
272
- _defineProperty(this, "nativeLongTaskThresholdMs", DEFAULTS.nativeLongTaskThresholdMs);
273
-
274
- _defineProperty(this, "longTaskThresholdMs", DEFAULTS.longTaskThresholdMs);
275
-
276
- _defineProperty(this, "vitalsUpdateFrequency", DEFAULTS.vitalsUpdateFrequency);
277
-
278
- _defineProperty(this, "trackFrustrations", DEFAULTS.trackFrustrations);
279
-
280
- _defineProperty(this, "uploadFrequency", DEFAULTS.uploadFrequency);
281
-
282
- _defineProperty(this, "batchSize", DEFAULTS.batchSize);
283
-
284
- _defineProperty(this, "trackBackgroundEvents", DEFAULTS.trackBackgroundEvents);
285
-
286
- _defineProperty(this, "bundleLogsWithRum", DEFAULTS.bundleLogsWithRum);
287
-
288
- _defineProperty(this, "bundleLogsWithTraces", DEFAULTS.bundleLogsWithTraces);
289
-
290
- _defineProperty(this, "actionNameAttribute", void 0);
291
-
292
- _defineProperty(this, "logEventMapper", DEFAULTS.logEventMapper);
293
-
294
- _defineProperty(this, "errorEventMapper", DEFAULTS.errorEventMapper);
295
-
296
- _defineProperty(this, "resourceEventMapper", DEFAULTS.resourceEventMapper);
297
-
298
- _defineProperty(this, "actionEventMapper", DEFAULTS.actionEventMapper);
299
-
300
- _defineProperty(this, "additionalConfiguration", DEFAULTS.getAdditionalConfiguration());
301
-
302
- _defineProperty(this, "customEndpoints", DEFAULTS.getCustomEndpoints());
303
249
  }
304
-
305
250
  }
251
+
306
252
  /**
307
253
  * Auto Instrumentation configuration passed to DatadogProvider.
308
254
  * Does not include default values.
309
255
  */
310
256
 
311
-
257
+ /**
258
+ * Parameters needed to start auto instrumentation. Includes default values.
259
+ */
312
260
  exports.DdSdkReactNativeConfiguration = DdSdkReactNativeConfiguration;
313
-
314
261
  /**
315
262
  * We could use `Proxy` instead of this function, but `Proxy` is not available on
316
263
  * the older android jsc that can still be used.
317
264
  */
318
265
  const addDefaultValuesToAutoInstrumentationConfiguration = features => {
319
- return { ...features,
266
+ return {
267
+ ...features,
320
268
  firstPartyHosts: features.firstPartyHosts || DEFAULTS.getFirstPartyHosts(),
321
269
  resourceTracingSamplingRate: features.resourceTracingSamplingRate === undefined ? DEFAULTS.resourceTracingSamplingRate : features.resourceTracingSamplingRate,
322
270
  logEventMapper: features.logEventMapper === undefined ? DEFAULTS.logEventMapper : features.logEventMapper,
@@ -326,15 +274,12 @@ const addDefaultValuesToAutoInstrumentationConfiguration = features => {
326
274
  useAccessibilityLabel: DEFAULTS.useAccessibilityLabel
327
275
  };
328
276
  };
329
-
330
277
  exports.addDefaultValuesToAutoInstrumentationConfiguration = addDefaultValuesToAutoInstrumentationConfiguration;
331
-
332
278
  const setConfigurationAttribute = (attribute, configuration) => {
333
279
  if (attribute.value !== undefined) {
334
280
  configuration[attribute.name] = attribute.value;
335
281
  }
336
282
  };
337
-
338
283
  const buildConfigurationFromPartialConfiguration = (features, configuration) => {
339
284
  const {
340
285
  clientToken,
@@ -379,24 +324,14 @@ const buildConfigurationFromPartialConfiguration = (features, configuration) =>
379
324
  }, SdkConfiguration);
380
325
  return SdkConfiguration;
381
326
  };
382
-
383
327
  exports.buildConfigurationFromPartialConfiguration = buildConfigurationFromPartialConfiguration;
384
-
385
328
  class DatadogProviderConfiguration extends DdSdkReactNativeConfiguration {
386
- constructor(...args) {
387
- super(...args);
388
-
389
- _defineProperty(this, "initializationMode", InitializationMode.SYNC);
390
- }
391
-
329
+ initializationMode = InitializationMode.SYNC;
392
330
  }
393
-
394
331
  exports.DatadogProviderConfiguration = DatadogProviderConfiguration;
395
- let InitializationMode;
396
- exports.InitializationMode = InitializationMode;
397
-
398
- (function (InitializationMode) {
332
+ let InitializationMode = exports.InitializationMode = /*#__PURE__*/function (InitializationMode) {
399
333
  InitializationMode["SYNC"] = "SYNC";
400
334
  InitializationMode["ASYNC"] = "ASYNC";
401
- })(InitializationMode || (exports.InitializationMode = InitializationMode = {}));
335
+ return InitializationMode;
336
+ }({});
402
337
  //# sourceMappingURL=DdSdkReactNativeConfiguration.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["DdSdkReactNativeConfiguration.tsx"],"names":["VitalsUpdateFrequency","UploadFrequency","BatchSize","isLegacyFirstPartyHost","firstPartyHost","formatFirstPartyHosts","firstPartyHosts","map","host","match","propagatorTypes","PropagatorType","DATADOG","TRACECONTEXT","DEFAULTS","nativeCrashReportEnabled","sessionSamplingRate","resourceTracingSamplingRate","site","longTaskThresholdMs","nativeLongTaskThresholdMs","nativeViewTracking","nativeInteractionTracking","getFirstPartyHosts","getAdditionalConfiguration","trackingConsent","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":";;;;;;;AAQA;;AAMA;;;;IAEYA,qB;;;WAAAA,qB;AAAAA,EAAAA,qB;AAAAA,EAAAA,qB;AAAAA,EAAAA,qB;AAAAA,EAAAA,qB;GAAAA,qB,qCAAAA,qB;;IAOAC,e;;;WAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;GAAAA,e,+BAAAA,e;;IAeAC,S;;;WAAAA,S;AAAAA,EAAAA,S;AAAAA,EAAAA,S;AAAAA,EAAAA,S;GAAAA,S,yBAAAA,S;;AAsBZ,MAAMC,sBAAsB,GACxBC,cAD2B,IAEc;AACzC,SAAO,OAAOA,cAAP,KAA0B,QAAjC;AACH,CAJD;;AAYA;AACA;AACA;AACA;AACO,MAAMC,qBAAqB,GAC9BC,eADiC,IAEd;AACnB,SAAOA,eAAe,CAACC,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OAP,EAAAA,yBAAyB,CACrB;AACII,IAAAA,IAAI,EAAE,qBADV;AAEID,IAAAA,KAAK,EAAEJ,QAAQ,CAACY;AAFpB,GADqB,EAKrBJ,gBALqB,CAAzB;AAQA,SAAOA,gBAAP;AACH,CA9EM;;;;AAgFA,MAAMK,4BAAN,SAA2CvB,6BAA3C,CAAyE;AAAA;AAAA;;AAAA,gDAC5BwB,kBAAkB,CAACC,IADS;AAAA;;AAAA;;;IAIpED,kB;;;WAAAA,kB;AAAAA,EAAAA,kB;AAAAA,EAAAA,kB;GAAAA,kB,kCAAAA,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","require","_types","VitalsUpdateFrequency","exports","UploadFrequency","BatchSize","isLegacyFirstPartyHost","firstPartyHost","formatFirstPartyHosts","firstPartyHosts","map","host","match","propagatorTypes","PropagatorType","DATADOG","TRACECONTEXT","DEFAULTS","nativeCrashReportEnabled","sessionSamplingRate","resourceTracingSamplingRate","site","longTaskThresholdMs","nativeLongTaskThresholdMs","nativeViewTracking","nativeInteractionTracking","getFirstPartyHosts","getAdditionalConfiguration","trackingConsent","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":";;;;;;AAQA,IAAAA,gBAAA,GAAAC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B,CAAC,EAC5D6D,gBACJ,CAAC;EACDP,yBAAyB,CACrB;IACII,IAAI,EAAE,gBAAgB;IACtBD,KAAK,EAAEJ,QAAQ,CAAC5B;EACpB,CAAC,EACDoC,gBACJ,CAAC;EACDP,yBAAyB,CACrB;IACII,IAAI,EAAE,kBAAkB;IACxBD,KAAK,EAAEJ,QAAQ,CAAC3B;EACpB,CAAC,EACDmC,gBACJ,CAAC;EACDP,yBAAyB,CACrB;IACII,IAAI,EAAE,qBAAqB;IAC3BD,KAAK,EAAEJ,QAAQ,CAAC1B;EACpB,CAAC,EACDkC,gBACJ,CAAC;EACDP,yBAAyB,CACrB;IACII,IAAI,EAAE,mBAAmB;IACzBD,KAAK,EAAEJ,QAAQ,CAACzB;EACpB,CAAC,EACDiC,gBACJ,CAAC;EACDP,yBAAyB,CACrB;IACII,IAAI,EAAE,qBAAqB;IAC3BD,KAAK,EAAEJ,QAAQ,CAACY;EACpB,CAAC,EACDJ,gBACJ,CAAC;EAED,OAAOA,gBAAgB;AAC3B,CAAC;AAACnE,OAAA,CAAAiE,0CAAA,GAAAA,0CAAA;AAEK,MAAMO,4BAA4B,SAAS5B,6BAA6B,CAAC;EACrE6B,kBAAkB,GAAuBC,kBAAkB,CAACC,IAAI;AAC3E;AAAC3E,OAAA,CAAAwE,4BAAA,GAAAA,4BAAA;AAAA,IAEWE,kBAAkB,GAAA1E,OAAA,CAAA0E,kBAAA,0BAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA","ignoreList":[]}
@@ -4,57 +4,46 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.InternalLog = exports.DATADOG_MESSAGE_PREFIX = void 0;
7
-
8
7
  var _SdkVerbosity = require("./SdkVerbosity");
8
+ /*
9
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
10
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
11
+ * Copyright 2016-Present Datadog, Inc.
12
+ */
9
13
 
10
- 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; }
14
+ const DATADOG_MESSAGE_PREFIX = exports.DATADOG_MESSAGE_PREFIX = 'DATADOG:';
11
15
 
12
- const DATADOG_MESSAGE_PREFIX = 'DATADOG:';
13
16
  /**
14
17
  * /!\ DO NOT USE THIS IN YOUR APP /!\\
15
18
  *
16
19
  * This logger is only for debugging the Datadog SDK.
17
20
  */
18
-
19
- exports.DATADOG_MESSAGE_PREFIX = DATADOG_MESSAGE_PREFIX;
20
-
21
21
  class InternalLog {
22
+ static levelMap = new Map([[_SdkVerbosity.SdkVerbosity.DEBUG, 1], [_SdkVerbosity.SdkVerbosity.INFO, 2], [_SdkVerbosity.SdkVerbosity.WARN, 3], [_SdkVerbosity.SdkVerbosity.ERROR, 4]]);
23
+ static verbosity = undefined;
22
24
  static log(message, verbosity) {
23
25
  if (InternalLog.verbosity === undefined) {
24
26
  return;
25
27
  }
26
-
27
28
  const requiredLevel = InternalLog.levelMap.get(verbosity);
28
29
  const allowedLevel = InternalLog.levelMap.get(InternalLog.verbosity);
29
-
30
30
  if (allowedLevel === undefined || requiredLevel === undefined) {
31
31
  return;
32
32
  }
33
-
34
33
  const prefixedMessage = `${DATADOG_MESSAGE_PREFIX} ${message}`;
35
-
36
34
  if (verbosity === _SdkVerbosity.SdkVerbosity.ERROR && requiredLevel >= allowedLevel) {
37
35
  console.error(prefixedMessage);
38
36
  }
39
-
40
37
  if (verbosity === _SdkVerbosity.SdkVerbosity.WARN && requiredLevel >= allowedLevel) {
41
38
  console.warn(prefixedMessage);
42
39
  }
43
-
44
40
  if (verbosity === _SdkVerbosity.SdkVerbosity.INFO && requiredLevel >= allowedLevel) {
45
41
  console.info(prefixedMessage);
46
42
  }
47
-
48
43
  if (verbosity === _SdkVerbosity.SdkVerbosity.DEBUG && requiredLevel >= allowedLevel) {
49
44
  console.debug(prefixedMessage);
50
45
  }
51
46
  }
52
-
53
47
  }
54
-
55
48
  exports.InternalLog = InternalLog;
56
-
57
- _defineProperty(InternalLog, "levelMap", new Map([[_SdkVerbosity.SdkVerbosity.DEBUG, 1], [_SdkVerbosity.SdkVerbosity.INFO, 2], [_SdkVerbosity.SdkVerbosity.WARN, 3], [_SdkVerbosity.SdkVerbosity.ERROR, 4]]));
58
-
59
- _defineProperty(InternalLog, "verbosity", undefined);
60
49
  //# sourceMappingURL=InternalLog.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["InternalLog.tsx"],"names":["DATADOG_MESSAGE_PREFIX","InternalLog","log","message","verbosity","undefined","requiredLevel","levelMap","get","allowedLevel","prefixedMessage","SdkVerbosity","ERROR","console","error","WARN","warn","INFO","info","DEBUG","debug","Map"],"mappings":";;;;;;;AAMA;;;;AAEO,MAAMA,sBAAsB,GAAG,UAA/B;AAEP;AACA;AACA;AACA;AACA;;;;AACO,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,KAAKO,2BAAaC,KAA3B,IAAoCN,aAAa,IAAIG,YAAzD,EAAuE;AACnEI,MAAAA,OAAO,CAACC,KAAR,CAAcJ,eAAd;AACH;;AAED,QAAIN,SAAS,KAAKO,2BAAaI,IAA3B,IAAmCT,aAAa,IAAIG,YAAxD,EAAsE;AAClEI,MAAAA,OAAO,CAACG,IAAR,CAAaN,eAAb;AACH;;AAED,QAAIN,SAAS,KAAKO,2BAAaM,IAA3B,IAAmCX,aAAa,IAAIG,YAAxD,EAAsE;AAClEI,MAAAA,OAAO,CAACK,IAAR,CAAaR,eAAb;AACH;;AAED,QAAIN,SAAS,KAAKO,2BAAaQ,KAA3B,IAAoCb,aAAa,IAAIG,YAAzD,EAAuE;AACnEI,MAAAA,OAAO,CAACO,KAAR,CAAcV,eAAd;AACH;AACJ;;AAnCoB;;;;gBAAZT,W,cACiB,IAAIoB,GAAJ,CAA8B,CACpD,CAACV,2BAAaQ,KAAd,EAAqB,CAArB,CADoD,EAEpD,CAACR,2BAAaM,IAAd,EAAoB,CAApB,CAFoD,EAGpD,CAACN,2BAAaI,IAAd,EAAoB,CAApB,CAHoD,EAIpD,CAACJ,2BAAaC,KAAd,EAAqB,CAArB,CAJoD,CAA9B,C;;gBADjBX,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","require","DATADOG_MESSAGE_PREFIX","exports","InternalLog","levelMap","Map","SdkVerbosity","DEBUG","INFO","WARN","ERROR","verbosity","undefined","log","message","requiredLevel","get","allowedLevel","prefixedMessage","console","error","warn","info","debug"],"sourceRoot":"../../src","sources":["InternalLog.tsx"],"mappings":";;;;;;AAMA,IAAAA,aAAA,GAAAC,OAAA;AANA;AACA;AACA;AACA;AACA;;AAIO,MAAMC,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG,UAAU;;AAEhD;AACA;AACA;AACA;AACA;AACO,MAAME,WAAW,CAAC;EACrB,OAAeC,QAAQ,GAAG,IAAIC,GAAG,CAAuB,CACpD,CAACC,0BAAY,CAACC,KAAK,EAAE,CAAC,CAAC,EACvB,CAACD,0BAAY,CAACE,IAAI,EAAE,CAAC,CAAC,EACtB,CAACF,0BAAY,CAACG,IAAI,EAAE,CAAC,CAAC,EACtB,CAACH,0BAAY,CAACI,KAAK,EAAE,CAAC,CAAC,CAC1B,CAAC;EAEF,OAAcC,SAAS,GAA6BC,SAAS;EAE7D,OAAcC,GAAGA,CAACC,OAAe,EAAEH,SAAuB,EAAQ;IAC9D,IAAIR,WAAW,CAACQ,SAAS,KAAKC,SAAS,EAAE;MACrC;IACJ;IACA,MAAMG,aAAa,GAAGZ,WAAW,CAACC,QAAQ,CAACY,GAAG,CAACL,SAAS,CAAC;IACzD,MAAMM,YAAY,GAAGd,WAAW,CAACC,QAAQ,CAACY,GAAG,CAACb,WAAW,CAACQ,SAAS,CAAC;IACpE,IAAIM,YAAY,KAAKL,SAAS,IAAIG,aAAa,KAAKH,SAAS,EAAE;MAC3D;IACJ;IACA,MAAMM,eAAe,GAAG,GAAGjB,sBAAsB,IAAIa,OAAO,EAAE;IAC9D,IAAIH,SAAS,KAAKL,0BAAY,CAACI,KAAK,IAAIK,aAAa,IAAIE,YAAY,EAAE;MACnEE,OAAO,CAACC,KAAK,CAACF,eAAe,CAAC;IAClC;IAEA,IAAIP,SAAS,KAAKL,0BAAY,CAACG,IAAI,IAAIM,aAAa,IAAIE,YAAY,EAAE;MAClEE,OAAO,CAACE,IAAI,CAACH,eAAe,CAAC;IACjC;IAEA,IAAIP,SAAS,KAAKL,0BAAY,CAACE,IAAI,IAAIO,aAAa,IAAIE,YAAY,EAAE;MAClEE,OAAO,CAACG,IAAI,CAACJ,eAAe,CAAC;IACjC;IAEA,IAAIP,SAAS,KAAKL,0BAAY,CAACC,KAAK,IAAIQ,aAAa,IAAIE,YAAY,EAAE;MACnEE,OAAO,CAACI,KAAK,CAACL,eAAe,CAAC;IAClC;EACJ;AACJ;AAAChB,OAAA,CAAAC,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -4,9 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.ProxyType = exports.ProxyConfiguration = void 0;
7
-
8
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
-
10
7
  /**
11
8
  * Proxy server configuration.
12
9
  */
@@ -37,11 +34,6 @@ class ProxyConfiguration {
37
34
  this.type = type;
38
35
  this.address = address;
39
36
  this.port = port;
40
-
41
- _defineProperty(this, "username", void 0);
42
-
43
- _defineProperty(this, "password", void 0);
44
-
45
37
  if (username && password) {
46
38
  if (type === ProxyType.SOCKS) {
47
39
  console.warn("SOCKS proxy configuration doesn't support Basic authentication.");
@@ -51,16 +43,12 @@ class ProxyConfiguration {
51
43
  }
52
44
  }
53
45
  }
54
-
55
46
  }
56
-
57
47
  exports.ProxyConfiguration = ProxyConfiguration;
58
- var ProxyType;
59
- exports.ProxyType = ProxyType;
60
-
61
- (function (ProxyType) {
48
+ var ProxyType = exports.ProxyType = /*#__PURE__*/function (ProxyType) {
62
49
  ProxyType["HTTP"] = "http";
63
50
  ProxyType["HTTPS"] = "https";
64
51
  ProxyType["SOCKS"] = "socks";
65
- })(ProxyType || (exports.ProxyType = ProxyType = {}));
52
+ return ProxyType;
53
+ }(ProxyType || {});
66
54
  //# 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,yBAAAA,S","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","exports"],"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;AAACK,OAAA,CAAAX,kBAAA,GAAAA,kBAAA;AAAA,IAEIO,SAAS,GAAAI,OAAA,CAAAJ,SAAA,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA,EAATA,SAAS","ignoreList":[]}
@@ -4,23 +4,19 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.SdkVerbosity = void 0;
7
-
8
7
  /*
9
8
  * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
10
9
  * This product includes software developed at Datadog (https://www.datadoghq.com/).
11
10
  * Copyright 2016-Present Datadog, Inc.
12
11
  */
13
-
14
12
  /**
15
13
  * Enum specifying possible log levels for DD SDK.
16
14
  */
17
- let SdkVerbosity;
18
- exports.SdkVerbosity = SdkVerbosity;
19
-
20
- (function (SdkVerbosity) {
15
+ let SdkVerbosity = exports.SdkVerbosity = /*#__PURE__*/function (SdkVerbosity) {
21
16
  SdkVerbosity["DEBUG"] = "debug";
22
17
  SdkVerbosity["INFO"] = "info";
23
18
  SdkVerbosity["WARN"] = "warn";
24
19
  SdkVerbosity["ERROR"] = "error";
25
- })(SdkVerbosity || (exports.SdkVerbosity = SdkVerbosity = {}));
20
+ return SdkVerbosity;
21
+ }({});
26
22
  //# sourceMappingURL=SdkVerbosity.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["SdkVerbosity.tsx"],"names":["SdkVerbosity"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;IACYA,Y;;;WAAAA,Y;AAAAA,EAAAA,Y;AAAAA,EAAAA,Y;AAAAA,EAAAA,Y;AAAAA,EAAAA,Y;GAAAA,Y,4BAAAA,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","exports"],"sourceRoot":"../../src","sources":["SdkVerbosity.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAGYA,YAAY,GAAAC,OAAA,CAAAD,YAAA,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA","ignoreList":[]}
@@ -4,22 +4,18 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.TrackingConsent = void 0;
7
-
8
7
  /*
9
8
  * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
10
9
  * This product includes software developed at Datadog (https://www.datadoghq.com/).
11
10
  * Copyright 2016-Present Datadog, Inc.
12
11
  */
13
-
14
12
  /**
15
13
  * Enum specifying possible consent options for DD SDK.
16
14
  */
17
- let TrackingConsent;
18
- exports.TrackingConsent = TrackingConsent;
19
-
20
- (function (TrackingConsent) {
15
+ let TrackingConsent = exports.TrackingConsent = /*#__PURE__*/function (TrackingConsent) {
21
16
  TrackingConsent["PENDING"] = "pending";
22
17
  TrackingConsent["GRANTED"] = "granted";
23
18
  TrackingConsent["NOT_GRANTED"] = "not_granted";
24
- })(TrackingConsent || (exports.TrackingConsent = TrackingConsent = {}));
19
+ return TrackingConsent;
20
+ }({});
25
21
  //# sourceMappingURL=TrackingConsent.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["TrackingConsent.tsx"],"names":["TrackingConsent"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;IACYA,e;;;WAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;GAAAA,e,+BAAAA,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","exports"],"sourceRoot":"../../src","sources":["TrackingConsent.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAGYA,eAAe,GAAAC,OAAA,CAAAD,eAAA,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA","ignoreList":[]}