@microsoft/applicationinsights-common 3.0.0-beta.2303-11 → 3.0.0-nightly3.2304-28

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 (371) hide show
  1. package/browser/es5/applicationinsights-common.cjs.js +3965 -0
  2. package/browser/es5/applicationinsights-common.cjs.js.map +1 -0
  3. package/browser/es5/applicationinsights-common.cjs.min.js +6 -0
  4. package/browser/es5/applicationinsights-common.cjs.min.js.map +1 -0
  5. package/browser/es5/applicationinsights-common.gbl.js +3969 -0
  6. package/browser/es5/applicationinsights-common.gbl.js.map +1 -0
  7. package/browser/es5/applicationinsights-common.gbl.min.js +6 -0
  8. package/browser/es5/applicationinsights-common.gbl.min.js.map +1 -0
  9. package/browser/es5/applicationinsights-common.integrity.json +66 -0
  10. package/browser/{applicationinsights-common.js → es5/applicationinsights-common.js} +194 -167
  11. package/browser/es5/applicationinsights-common.js.map +1 -0
  12. package/browser/es5/applicationinsights-common.min.js +6 -0
  13. package/browser/es5/applicationinsights-common.min.js.map +1 -0
  14. package/dist/{applicationinsights-common.js → es5/applicationinsights-common.js} +194 -167
  15. package/dist/es5/applicationinsights-common.js.map +1 -0
  16. package/dist/es5/applicationinsights-common.min.js +6 -0
  17. package/dist/es5/applicationinsights-common.min.js.map +1 -0
  18. package/{dist-esm → dist-es5}/ConnectionStringParser.js +1 -1
  19. package/{dist-esm → dist-es5}/Constants.js +1 -1
  20. package/{dist-esm → dist-es5}/DomHelperFuncs.js +1 -1
  21. package/{dist-esm → dist-es5}/Enums.js +1 -1
  22. package/{dist-esm → dist-es5}/HelperFuncs.js +1 -1
  23. package/dist-es5/Interfaces/ConnectionString.js +6 -0
  24. package/dist-es5/Interfaces/Context/IApplication.js +8 -0
  25. package/dist-es5/Interfaces/Context/IDevice.js +8 -0
  26. package/dist-es5/Interfaces/Context/IInternal.js +8 -0
  27. package/dist-es5/Interfaces/Context/ILocation.js +8 -0
  28. package/dist-es5/Interfaces/Context/IOperatingSystem.js +8 -0
  29. package/dist-es5/Interfaces/Context/ISample.js +8 -0
  30. package/dist-es5/Interfaces/Context/ISession.js +8 -0
  31. package/dist-es5/Interfaces/Context/ITelemetryTrace.js +8 -0
  32. package/dist-es5/Interfaces/Context/IUser.js +8 -0
  33. package/dist-es5/Interfaces/Context/IWeb.js +8 -0
  34. package/{dist-esm → dist-es5}/Interfaces/Contracts/AvailabilityData.js +1 -1
  35. package/{dist-esm → dist-es5}/Interfaces/Contracts/ContextTagKeys.js +1 -1
  36. package/dist-es5/Interfaces/Contracts/DataPointType.js +8 -0
  37. package/dist-es5/Interfaces/Contracts/DependencyKind.js +8 -0
  38. package/dist-es5/Interfaces/Contracts/DependencySourceType.js +8 -0
  39. package/dist-es5/Interfaces/Contracts/IBase.js +8 -0
  40. package/dist-es5/Interfaces/Contracts/IData.js +8 -0
  41. package/dist-es5/Interfaces/Contracts/IDataPoint.js +6 -0
  42. package/dist-es5/Interfaces/Contracts/IDomain.js +8 -0
  43. package/{dist-esm → dist-es5}/Interfaces/Contracts/IEnvelope.js +1 -1
  44. package/dist-es5/Interfaces/Contracts/IEventData.js +8 -0
  45. package/dist-es5/Interfaces/Contracts/IExceptionData.js +8 -0
  46. package/dist-es5/Interfaces/Contracts/IExceptionDetails.js +8 -0
  47. package/dist-es5/Interfaces/Contracts/IMessageData.js +8 -0
  48. package/dist-es5/Interfaces/Contracts/IMetricData.js +8 -0
  49. package/dist-es5/Interfaces/Contracts/IPageViewData.js +8 -0
  50. package/dist-es5/Interfaces/Contracts/IPageViewPerfData.js +8 -0
  51. package/dist-es5/Interfaces/Contracts/IRemoteDependencyData.js +8 -0
  52. package/dist-es5/Interfaces/Contracts/IStackFrame.js +8 -0
  53. package/{dist-esm → dist-es5}/Interfaces/Contracts/RequestData.js +1 -1
  54. package/{dist-esm → dist-es5}/Interfaces/Contracts/SeverityLevel.js +1 -1
  55. package/dist-es5/Interfaces/IAppInsights.js +8 -0
  56. package/{dist-esm → dist-es5}/Interfaces/IConfig.js +1 -1
  57. package/dist-es5/Interfaces/ICorrelationConfig.js +8 -0
  58. package/dist-es5/Interfaces/IDependencyTelemetry.js +8 -0
  59. package/dist-es5/Interfaces/IEventTelemetry.js +6 -0
  60. package/dist-es5/Interfaces/IExceptionTelemetry.js +8 -0
  61. package/dist-es5/Interfaces/IMetricTelemetry.js +6 -0
  62. package/dist-es5/Interfaces/IPageViewPerformanceTelemetry.js +6 -0
  63. package/dist-es5/Interfaces/IPageViewTelemetry.js +6 -0
  64. package/dist-es5/Interfaces/IPartC.js +8 -0
  65. package/dist-es5/Interfaces/IPropertiesPlugin.js +8 -0
  66. package/dist-es5/Interfaces/IRequestContext.js +6 -0
  67. package/dist-es5/Interfaces/ITelemetryContext.js +8 -0
  68. package/dist-es5/Interfaces/IThrottleMgr.js +6 -0
  69. package/dist-es5/Interfaces/ITraceTelemetry.js +8 -0
  70. package/{dist-esm → dist-es5}/Interfaces/PartAExtensions.js +1 -1
  71. package/dist-es5/Interfaces/Telemetry/IEnvelope.js +8 -0
  72. package/dist-es5/Interfaces/Telemetry/ISerializable.js +8 -0
  73. package/{dist-esm → dist-es5}/RequestResponseHeaders.js +1 -1
  74. package/{dist-esm → dist-es5}/StorageHelperFuncs.js +1 -1
  75. package/{dist-esm → dist-es5}/Telemetry/Common/Data.js +1 -1
  76. package/{dist-esm → dist-es5}/Telemetry/Common/DataPoint.js +1 -1
  77. package/{dist-esm → dist-es5}/Telemetry/Common/DataSanitizer.js +3 -2
  78. package/dist-es5/Telemetry/Common/DataSanitizer.js.map +1 -0
  79. package/{dist-esm → dist-es5}/Telemetry/Common/Envelope.js +1 -1
  80. package/{dist-esm → dist-es5}/Telemetry/Event.js +1 -1
  81. package/{dist-esm → dist-es5}/Telemetry/Exception.js +1 -1
  82. package/{dist-esm → dist-es5}/Telemetry/Metric.js +1 -1
  83. package/{dist-esm → dist-es5}/Telemetry/PageView.js +1 -1
  84. package/{dist-esm → dist-es5}/Telemetry/PageViewPerformance.js +1 -1
  85. package/{dist-esm → dist-es5}/Telemetry/RemoteDependencyData.js +1 -1
  86. package/{dist-esm → dist-es5}/Telemetry/Trace.js +1 -1
  87. package/{dist-esm → dist-es5}/TelemetryItemCreator.js +1 -1
  88. package/{dist-esm → dist-es5}/ThrottleMgr.js +1 -1
  89. package/{dist-esm → dist-es5}/UrlHelperFuncs.js +1 -1
  90. package/{dist-esm → dist-es5}/Util.js +1 -1
  91. package/{dist-esm → dist-es5}/__DynamicConstants.js +1 -1
  92. package/{dist-esm → dist-es5}/applicationinsights-common.js +1 -1
  93. package/package.json +18 -17
  94. package/tsconfig.json +4 -3
  95. package/types/applicationinsights-common.d.ts +2561 -58
  96. package/{dist/applicationinsights-common.d.ts → types/applicationinsights-common.namespaced.d.ts} +1 -1
  97. package/browser/applicationinsights-common.integrity.json +0 -26
  98. package/browser/applicationinsights-common.js.map +0 -1
  99. package/browser/applicationinsights-common.min.js +0 -6
  100. package/browser/applicationinsights-common.min.js.map +0 -1
  101. package/dist/applicationinsights-common.api.json +0 -19540
  102. package/dist/applicationinsights-common.api.md +0 -1224
  103. package/dist/applicationinsights-common.js.map +0 -1
  104. package/dist/applicationinsights-common.min.js +0 -6
  105. package/dist/applicationinsights-common.min.js.map +0 -1
  106. package/dist/applicationinsights-common.rollup.d.ts +0 -2562
  107. package/dist-esm/Interfaces/ConnectionString.js +0 -6
  108. package/dist-esm/Interfaces/Context/IApplication.js +0 -8
  109. package/dist-esm/Interfaces/Context/IDevice.js +0 -8
  110. package/dist-esm/Interfaces/Context/IInternal.js +0 -8
  111. package/dist-esm/Interfaces/Context/ILocation.js +0 -8
  112. package/dist-esm/Interfaces/Context/IOperatingSystem.js +0 -8
  113. package/dist-esm/Interfaces/Context/ISample.js +0 -8
  114. package/dist-esm/Interfaces/Context/ISession.js +0 -8
  115. package/dist-esm/Interfaces/Context/ITelemetryTrace.js +0 -8
  116. package/dist-esm/Interfaces/Context/IUser.js +0 -8
  117. package/dist-esm/Interfaces/Context/IWeb.js +0 -8
  118. package/dist-esm/Interfaces/Contracts/DataPointType.js +0 -8
  119. package/dist-esm/Interfaces/Contracts/DependencyKind.js +0 -8
  120. package/dist-esm/Interfaces/Contracts/DependencySourceType.js +0 -8
  121. package/dist-esm/Interfaces/Contracts/IBase.js +0 -8
  122. package/dist-esm/Interfaces/Contracts/IData.js +0 -8
  123. package/dist-esm/Interfaces/Contracts/IDataPoint.js +0 -6
  124. package/dist-esm/Interfaces/Contracts/IDomain.js +0 -8
  125. package/dist-esm/Interfaces/Contracts/IEventData.js +0 -8
  126. package/dist-esm/Interfaces/Contracts/IExceptionData.js +0 -8
  127. package/dist-esm/Interfaces/Contracts/IExceptionDetails.js +0 -8
  128. package/dist-esm/Interfaces/Contracts/IMessageData.js +0 -8
  129. package/dist-esm/Interfaces/Contracts/IMetricData.js +0 -8
  130. package/dist-esm/Interfaces/Contracts/IPageViewData.js +0 -8
  131. package/dist-esm/Interfaces/Contracts/IPageViewPerfData.js +0 -8
  132. package/dist-esm/Interfaces/Contracts/IRemoteDependencyData.js +0 -8
  133. package/dist-esm/Interfaces/Contracts/IStackFrame.js +0 -8
  134. package/dist-esm/Interfaces/IAppInsights.js +0 -8
  135. package/dist-esm/Interfaces/ICorrelationConfig.js +0 -8
  136. package/dist-esm/Interfaces/IDependencyTelemetry.js +0 -8
  137. package/dist-esm/Interfaces/IEventTelemetry.js +0 -6
  138. package/dist-esm/Interfaces/IExceptionTelemetry.js +0 -8
  139. package/dist-esm/Interfaces/IMetricTelemetry.js +0 -6
  140. package/dist-esm/Interfaces/IPageViewPerformanceTelemetry.js +0 -6
  141. package/dist-esm/Interfaces/IPageViewTelemetry.js +0 -6
  142. package/dist-esm/Interfaces/IPartC.js +0 -8
  143. package/dist-esm/Interfaces/IPropertiesPlugin.js +0 -8
  144. package/dist-esm/Interfaces/IRequestContext.js +0 -6
  145. package/dist-esm/Interfaces/ITelemetryContext.js +0 -8
  146. package/dist-esm/Interfaces/IThrottleMgr.js +0 -6
  147. package/dist-esm/Interfaces/ITraceTelemetry.js +0 -8
  148. package/dist-esm/Interfaces/Telemetry/IEnvelope.js +0 -8
  149. package/dist-esm/Interfaces/Telemetry/ISerializable.js +0 -8
  150. package/dist-esm/Telemetry/Common/DataSanitizer.js.map +0 -1
  151. package/src/ConnectionStringParser.ts +0 -47
  152. package/src/Constants.ts +0 -18
  153. package/src/DomHelperFuncs.ts +0 -19
  154. package/src/Enums.ts +0 -65
  155. package/src/HelperFuncs.ts +0 -54
  156. package/src/Interfaces/ConnectionString.ts +0 -3
  157. package/src/Interfaces/Context/IApplication.ts +0 -14
  158. package/src/Interfaces/Context/IDevice.ts +0 -28
  159. package/src/Interfaces/Context/IInternal.ts +0 -29
  160. package/src/Interfaces/Context/ILocation.ts +0 -9
  161. package/src/Interfaces/Context/IOperatingSystem.ts +0 -7
  162. package/src/Interfaces/Context/ISample.ts +0 -13
  163. package/src/Interfaces/Context/ISession.ts +0 -22
  164. package/src/Interfaces/Context/ITelemetryTrace.ts +0 -33
  165. package/src/Interfaces/Context/IUser.ts +0 -50
  166. package/src/Interfaces/Context/IWeb.ts +0 -39
  167. package/src/Interfaces/Contracts/AvailabilityData.ts +0 -57
  168. package/src/Interfaces/Contracts/ContextTagKeys.ts +0 -299
  169. package/src/Interfaces/Contracts/DataPointType.ts +0 -10
  170. package/src/Interfaces/Contracts/DependencyKind.ts +0 -11
  171. package/src/Interfaces/Contracts/DependencySourceType.ts +0 -11
  172. package/src/Interfaces/Contracts/IBase.ts +0 -13
  173. package/src/Interfaces/Contracts/IData.ts +0 -19
  174. package/src/Interfaces/Contracts/IDataPoint.ts +0 -44
  175. package/src/Interfaces/Contracts/IDomain.ts +0 -8
  176. package/src/Interfaces/Contracts/IEnvelope.ts +0 -50
  177. package/src/Interfaces/Contracts/IEventData.ts +0 -30
  178. package/src/Interfaces/Contracts/IExceptionData.ts +0 -37
  179. package/src/Interfaces/Contracts/IExceptionDetails.ts +0 -45
  180. package/src/Interfaces/Contracts/IMessageData.ts +0 -36
  181. package/src/Interfaces/Contracts/IMetricData.ts +0 -31
  182. package/src/Interfaces/Contracts/IPageViewData.ts +0 -26
  183. package/src/Interfaces/Contracts/IPageViewPerfData.ts +0 -35
  184. package/src/Interfaces/Contracts/IRemoteDependencyData.ts +0 -65
  185. package/src/Interfaces/Contracts/IStackFrame.ts +0 -33
  186. package/src/Interfaces/Contracts/RequestData.ts +0 -50
  187. package/src/Interfaces/Contracts/SeverityLevel.ts +0 -28
  188. package/src/Interfaces/IAppInsights.ts +0 -31
  189. package/src/Interfaces/IConfig.ts +0 -396
  190. package/src/Interfaces/ICorrelationConfig.ts +0 -71
  191. package/src/Interfaces/IDependencyTelemetry.ts +0 -22
  192. package/src/Interfaces/IEventTelemetry.ts +0 -20
  193. package/src/Interfaces/IExceptionTelemetry.ts +0 -143
  194. package/src/Interfaces/IMetricTelemetry.ts +0 -56
  195. package/src/Interfaces/IPageViewPerformanceTelemetry.ts +0 -61
  196. package/src/Interfaces/IPageViewTelemetry.ts +0 -65
  197. package/src/Interfaces/IPartC.ts +0 -18
  198. package/src/Interfaces/IPropertiesPlugin.ts +0 -8
  199. package/src/Interfaces/IRequestContext.ts +0 -6
  200. package/src/Interfaces/ITelemetryContext.ts +0 -69
  201. package/src/Interfaces/IThrottleMgr.ts +0 -111
  202. package/src/Interfaces/ITraceTelemetry.ts +0 -28
  203. package/src/Interfaces/PartAExtensions.ts +0 -14
  204. package/src/Interfaces/Telemetry/IEnvelope.ts +0 -47
  205. package/src/Interfaces/Telemetry/ISerializable.ts +0 -11
  206. package/src/RequestResponseHeaders.ts +0 -96
  207. package/src/StorageHelperFuncs.ts +0 -223
  208. package/src/Telemetry/Common/Data.ts +0 -35
  209. package/src/Telemetry/Common/DataPoint.ts +0 -58
  210. package/src/Telemetry/Common/DataSanitizer.ts +0 -197
  211. package/src/Telemetry/Common/Envelope.ts +0 -81
  212. package/src/Telemetry/Event.ts +0 -52
  213. package/src/Telemetry/Exception.ts +0 -681
  214. package/src/Telemetry/Metric.ts +0 -61
  215. package/src/Telemetry/PageView.ts +0 -79
  216. package/src/Telemetry/PageViewPerformance.ts +0 -113
  217. package/src/Telemetry/RemoteDependencyData.ts +0 -122
  218. package/src/Telemetry/Trace.ts +0 -64
  219. package/src/TelemetryItemCreator.ts +0 -75
  220. package/src/ThrottleMgr.ts +0 -345
  221. package/src/UrlHelperFuncs.ts +0 -101
  222. package/src/Util.ts +0 -221
  223. package/src/__DynamicConstants.ts +0 -50
  224. package/src/applicationinsights-common.ts +0 -76
  225. package/types/ConnectionStringParser.d.ts +0 -5
  226. package/types/Constants.d.ts +0 -15
  227. package/types/DomHelperFuncs.d.ts +0 -1
  228. package/types/Enums.d.ts +0 -49
  229. package/types/HelperFuncs.d.ts +0 -8
  230. package/types/Interfaces/ConnectionString.d.ts +0 -4
  231. package/types/Interfaces/Context/IApplication.d.ts +0 -10
  232. package/types/Interfaces/Context/IDevice.d.ts +0 -22
  233. package/types/Interfaces/Context/IInternal.d.ts +0 -23
  234. package/types/Interfaces/Context/ILocation.d.ts +0 -6
  235. package/types/Interfaces/Context/IOperatingSystem.d.ts +0 -3
  236. package/types/Interfaces/Context/ISample.d.ts +0 -8
  237. package/types/Interfaces/Context/ISession.d.ts +0 -17
  238. package/types/Interfaces/Context/ITelemetryTrace.d.ts +0 -25
  239. package/types/Interfaces/Context/IUser.d.ts +0 -39
  240. package/types/Interfaces/Context/IWeb.d.ts +0 -30
  241. package/types/Interfaces/Contracts/AvailabilityData.d.ts +0 -0
  242. package/types/Interfaces/Contracts/ContextTagKeys.d.ts +0 -175
  243. package/types/Interfaces/Contracts/DataPointType.d.ts +0 -7
  244. package/types/Interfaces/Contracts/DependencyKind.d.ts +0 -8
  245. package/types/Interfaces/Contracts/DependencySourceType.d.ts +0 -8
  246. package/types/Interfaces/Contracts/IBase.d.ts +0 -9
  247. package/types/Interfaces/Contracts/IData.d.ts +0 -14
  248. package/types/Interfaces/Contracts/IDataPoint.d.ts +0 -34
  249. package/types/Interfaces/Contracts/IDomain.d.ts +0 -5
  250. package/types/Interfaces/Contracts/IEnvelope.d.ts +0 -0
  251. package/types/Interfaces/Contracts/IEventData.d.ts +0 -22
  252. package/types/Interfaces/Contracts/IExceptionData.d.ts +0 -28
  253. package/types/Interfaces/Contracts/IExceptionDetails.d.ts +0 -34
  254. package/types/Interfaces/Contracts/IMessageData.d.ts +0 -27
  255. package/types/Interfaces/Contracts/IMetricData.d.ts +0 -23
  256. package/types/Interfaces/Contracts/IPageViewData.d.ts +0 -18
  257. package/types/Interfaces/Contracts/IPageViewPerfData.d.ts +0 -26
  258. package/types/Interfaces/Contracts/IRemoteDependencyData.d.ts +0 -50
  259. package/types/Interfaces/Contracts/IStackFrame.d.ts +0 -25
  260. package/types/Interfaces/Contracts/RequestData.d.ts +0 -0
  261. package/types/Interfaces/Contracts/SeverityLevel.d.ts +0 -15
  262. package/types/Interfaces/IAppInsights.d.ts +0 -37
  263. package/types/Interfaces/IConfig.d.ts +0 -323
  264. package/types/Interfaces/ICorrelationConfig.d.ts +0 -59
  265. package/types/Interfaces/IDependencyTelemetry.d.ts +0 -17
  266. package/types/Interfaces/IEventTelemetry.d.ts +0 -15
  267. package/types/Interfaces/IExceptionTelemetry.d.ts +0 -123
  268. package/types/Interfaces/IMetricTelemetry.d.ts +0 -46
  269. package/types/Interfaces/IPageViewPerformanceTelemetry.d.ts +0 -55
  270. package/types/Interfaces/IPageViewTelemetry.d.ts +0 -52
  271. package/types/Interfaces/IPartC.d.ts +0 -18
  272. package/types/Interfaces/IPropertiesPlugin.d.ts +0 -4
  273. package/types/Interfaces/IRequestContext.d.ts +0 -6
  274. package/types/Interfaces/ITelemetryContext.d.ts +0 -55
  275. package/types/Interfaces/IThrottleMgr.d.ts +0 -96
  276. package/types/Interfaces/ITraceTelemetry.d.ts +0 -22
  277. package/types/Interfaces/PartAExtensions.d.ts +0 -12
  278. package/types/Interfaces/Telemetry/IEnvelope.d.ts +0 -37
  279. package/types/Interfaces/Telemetry/ISerializable.d.ts +0 -8
  280. package/types/RequestResponseHeaders.d.ts +0 -68
  281. package/types/StorageHelperFuncs.d.ts +0 -23
  282. package/types/Telemetry/Common/Data.d.ts +0 -24
  283. package/types/Telemetry/Common/DataPoint.d.ts +0 -46
  284. package/types/Telemetry/Common/DataSanitizer.d.ts +0 -42
  285. package/types/Telemetry/Common/Envelope.d.ts +0 -45
  286. package/types/Telemetry/Event.d.ts +0 -34
  287. package/types/Telemetry/Exception.d.ts +0 -150
  288. package/types/Telemetry/Metric.d.ts +0 -36
  289. package/types/Telemetry/PageView.d.ts +0 -53
  290. package/types/Telemetry/PageViewPerformance.d.ts +0 -78
  291. package/types/Telemetry/RemoteDependencyData.d.ts +0 -79
  292. package/types/Telemetry/Trace.d.ts +0 -41
  293. package/types/TelemetryItemCreator.d.ts +0 -27
  294. package/types/ThrottleMgr.d.ts +0 -13
  295. package/types/UrlHelperFuncs.d.ts +0 -6
  296. package/types/Util.d.ts +0 -36
  297. package/types/__DynamicConstants.d.ts +0 -38
  298. package/types/tsdoc-metadata.json +0 -11
  299. /package/{dist-esm → dist-es5}/ConnectionStringParser.js.map +0 -0
  300. /package/{dist-esm → dist-es5}/Constants.js.map +0 -0
  301. /package/{dist-esm → dist-es5}/DomHelperFuncs.js.map +0 -0
  302. /package/{dist-esm → dist-es5}/Enums.js.map +0 -0
  303. /package/{dist-esm → dist-es5}/HelperFuncs.js.map +0 -0
  304. /package/{dist-esm → dist-es5}/Interfaces/ConnectionString.js.map +0 -0
  305. /package/{dist-esm → dist-es5}/Interfaces/Context/IApplication.js.map +0 -0
  306. /package/{dist-esm → dist-es5}/Interfaces/Context/IDevice.js.map +0 -0
  307. /package/{dist-esm → dist-es5}/Interfaces/Context/IInternal.js.map +0 -0
  308. /package/{dist-esm → dist-es5}/Interfaces/Context/ILocation.js.map +0 -0
  309. /package/{dist-esm → dist-es5}/Interfaces/Context/IOperatingSystem.js.map +0 -0
  310. /package/{dist-esm → dist-es5}/Interfaces/Context/ISample.js.map +0 -0
  311. /package/{dist-esm → dist-es5}/Interfaces/Context/ISession.js.map +0 -0
  312. /package/{dist-esm → dist-es5}/Interfaces/Context/ITelemetryTrace.js.map +0 -0
  313. /package/{dist-esm → dist-es5}/Interfaces/Context/IUser.js.map +0 -0
  314. /package/{dist-esm → dist-es5}/Interfaces/Context/IWeb.js.map +0 -0
  315. /package/{dist-esm → dist-es5}/Interfaces/Contracts/AvailabilityData.js.map +0 -0
  316. /package/{dist-esm → dist-es5}/Interfaces/Contracts/ContextTagKeys.js.map +0 -0
  317. /package/{dist-esm → dist-es5}/Interfaces/Contracts/DataPointType.js.map +0 -0
  318. /package/{dist-esm → dist-es5}/Interfaces/Contracts/DependencyKind.js.map +0 -0
  319. /package/{dist-esm → dist-es5}/Interfaces/Contracts/DependencySourceType.js.map +0 -0
  320. /package/{dist-esm → dist-es5}/Interfaces/Contracts/IBase.js.map +0 -0
  321. /package/{dist-esm → dist-es5}/Interfaces/Contracts/IData.js.map +0 -0
  322. /package/{dist-esm → dist-es5}/Interfaces/Contracts/IDataPoint.js.map +0 -0
  323. /package/{dist-esm → dist-es5}/Interfaces/Contracts/IDomain.js.map +0 -0
  324. /package/{dist-esm → dist-es5}/Interfaces/Contracts/IEnvelope.js.map +0 -0
  325. /package/{dist-esm → dist-es5}/Interfaces/Contracts/IEventData.js.map +0 -0
  326. /package/{dist-esm → dist-es5}/Interfaces/Contracts/IExceptionData.js.map +0 -0
  327. /package/{dist-esm → dist-es5}/Interfaces/Contracts/IExceptionDetails.js.map +0 -0
  328. /package/{dist-esm → dist-es5}/Interfaces/Contracts/IMessageData.js.map +0 -0
  329. /package/{dist-esm → dist-es5}/Interfaces/Contracts/IMetricData.js.map +0 -0
  330. /package/{dist-esm → dist-es5}/Interfaces/Contracts/IPageViewData.js.map +0 -0
  331. /package/{dist-esm → dist-es5}/Interfaces/Contracts/IPageViewPerfData.js.map +0 -0
  332. /package/{dist-esm → dist-es5}/Interfaces/Contracts/IRemoteDependencyData.js.map +0 -0
  333. /package/{dist-esm → dist-es5}/Interfaces/Contracts/IStackFrame.js.map +0 -0
  334. /package/{dist-esm → dist-es5}/Interfaces/Contracts/RequestData.js.map +0 -0
  335. /package/{dist-esm → dist-es5}/Interfaces/Contracts/SeverityLevel.js.map +0 -0
  336. /package/{dist-esm → dist-es5}/Interfaces/IAppInsights.js.map +0 -0
  337. /package/{dist-esm → dist-es5}/Interfaces/IConfig.js.map +0 -0
  338. /package/{dist-esm → dist-es5}/Interfaces/ICorrelationConfig.js.map +0 -0
  339. /package/{dist-esm → dist-es5}/Interfaces/IDependencyTelemetry.js.map +0 -0
  340. /package/{dist-esm → dist-es5}/Interfaces/IEventTelemetry.js.map +0 -0
  341. /package/{dist-esm → dist-es5}/Interfaces/IExceptionTelemetry.js.map +0 -0
  342. /package/{dist-esm → dist-es5}/Interfaces/IMetricTelemetry.js.map +0 -0
  343. /package/{dist-esm → dist-es5}/Interfaces/IPageViewPerformanceTelemetry.js.map +0 -0
  344. /package/{dist-esm → dist-es5}/Interfaces/IPageViewTelemetry.js.map +0 -0
  345. /package/{dist-esm → dist-es5}/Interfaces/IPartC.js.map +0 -0
  346. /package/{dist-esm → dist-es5}/Interfaces/IPropertiesPlugin.js.map +0 -0
  347. /package/{dist-esm → dist-es5}/Interfaces/IRequestContext.js.map +0 -0
  348. /package/{dist-esm → dist-es5}/Interfaces/ITelemetryContext.js.map +0 -0
  349. /package/{dist-esm → dist-es5}/Interfaces/IThrottleMgr.js.map +0 -0
  350. /package/{dist-esm → dist-es5}/Interfaces/ITraceTelemetry.js.map +0 -0
  351. /package/{dist-esm → dist-es5}/Interfaces/PartAExtensions.js.map +0 -0
  352. /package/{dist-esm → dist-es5}/Interfaces/Telemetry/IEnvelope.js.map +0 -0
  353. /package/{dist-esm → dist-es5}/Interfaces/Telemetry/ISerializable.js.map +0 -0
  354. /package/{dist-esm → dist-es5}/RequestResponseHeaders.js.map +0 -0
  355. /package/{dist-esm → dist-es5}/StorageHelperFuncs.js.map +0 -0
  356. /package/{dist-esm → dist-es5}/Telemetry/Common/Data.js.map +0 -0
  357. /package/{dist-esm → dist-es5}/Telemetry/Common/DataPoint.js.map +0 -0
  358. /package/{dist-esm → dist-es5}/Telemetry/Common/Envelope.js.map +0 -0
  359. /package/{dist-esm → dist-es5}/Telemetry/Event.js.map +0 -0
  360. /package/{dist-esm → dist-es5}/Telemetry/Exception.js.map +0 -0
  361. /package/{dist-esm → dist-es5}/Telemetry/Metric.js.map +0 -0
  362. /package/{dist-esm → dist-es5}/Telemetry/PageView.js.map +0 -0
  363. /package/{dist-esm → dist-es5}/Telemetry/PageViewPerformance.js.map +0 -0
  364. /package/{dist-esm → dist-es5}/Telemetry/RemoteDependencyData.js.map +0 -0
  365. /package/{dist-esm → dist-es5}/Telemetry/Trace.js.map +0 -0
  366. /package/{dist-esm → dist-es5}/TelemetryItemCreator.js.map +0 -0
  367. /package/{dist-esm → dist-es5}/ThrottleMgr.js.map +0 -0
  368. /package/{dist-esm → dist-es5}/UrlHelperFuncs.js.map +0 -0
  369. /package/{dist-esm → dist-es5}/Util.js.map +0 -0
  370. /package/{dist-esm → dist-es5}/__DynamicConstants.js.map +0 -0
  371. /package/{dist-esm → dist-es5}/applicationinsights-common.js.map +0 -0
@@ -1,58 +1,2561 @@
1
- export { correlationIdSetPrefix, correlationIdGetPrefix, correlationIdCanIncludeCorrelationHeader, correlationIdGetCorrelationContext, correlationIdGetCorrelationContextValue, dateTimeUtilsNow, dateTimeUtilsDuration, isInternalApplicationInsightsEndpoint, createDistributedTraceContextFromTrace } from "./Util";
2
- export { ThrottleMgr } from "./ThrottleMgr";
3
- export { parseConnectionString, ConnectionStringParser } from "./ConnectionStringParser";
4
- export { FieldType } from "./Enums";
5
- export { IRequestHeaders, RequestHeaders, eRequestHeaders } from "./RequestResponseHeaders";
6
- export { DisabledPropertyName, ProcessLegacy, SampleRate, HttpMethod, DEFAULT_BREEZE_ENDPOINT, DEFAULT_BREEZE_PATH, strNotSpecified } from "./Constants";
7
- export { IData as AIData } from "./Interfaces/Contracts/IData";
8
- export { IBase as AIBase } from "./Interfaces/Contracts/IBase";
9
- export { ISerializable } from "./Interfaces/Telemetry/ISerializable";
10
- export { IEnvelope } from "./Interfaces/Telemetry/IEnvelope";
11
- export { Envelope } from "./Telemetry/Common/Envelope";
12
- export { Event } from "./Telemetry/Event";
13
- export { Exception } from "./Telemetry/Exception";
14
- export { Metric } from "./Telemetry/Metric";
15
- export { PageView } from "./Telemetry/PageView";
16
- export { IPageViewData } from "./Interfaces/Contracts/IPageViewData";
17
- export { RemoteDependencyData } from "./Telemetry/RemoteDependencyData";
18
- export { IEventTelemetry } from "./Interfaces/IEventTelemetry";
19
- export { ITraceTelemetry } from "./Interfaces/ITraceTelemetry";
20
- export { IMetricTelemetry } from "./Interfaces/IMetricTelemetry";
21
- export { IDependencyTelemetry } from "./Interfaces/IDependencyTelemetry";
22
- export { IExceptionTelemetry, IAutoExceptionTelemetry, IExceptionInternal } from "./Interfaces/IExceptionTelemetry";
23
- export { IPageViewTelemetry, IPageViewTelemetryInternal } from "./Interfaces/IPageViewTelemetry";
24
- export { IPageViewPerformanceTelemetry, IPageViewPerformanceTelemetryInternal } from "./Interfaces/IPageViewPerformanceTelemetry";
25
- export { Trace } from "./Telemetry/Trace";
26
- export { PageViewPerformance } from "./Telemetry/PageViewPerformance";
27
- export { Data } from "./Telemetry/Common/Data";
28
- export { eSeverityLevel, SeverityLevel } from "./Interfaces/Contracts/SeverityLevel";
29
- export { IConfig, ConfigurationManager } from "./Interfaces/IConfig";
30
- export { IContextTagKeys, ContextTagKeys } from "./Interfaces/Contracts/ContextTagKeys";
31
- export { DataSanitizerValues, dataSanitizeKeyAndAddUniqueness, dataSanitizeKey, dataSanitizeString, dataSanitizeUrl, dataSanitizeMessage, dataSanitizeException, dataSanitizeProperties, dataSanitizeMeasurements, dataSanitizeId, dataSanitizeInput, dsPadNumber } from "./Telemetry/Common/DataSanitizer";
32
- export { TelemetryItemCreator, createTelemetryItem } from "./TelemetryItemCreator";
33
- export { ICorrelationConfig } from "./Interfaces/ICorrelationConfig";
34
- export { IAppInsights } from "./Interfaces/IAppInsights";
35
- export { IWeb } from "./Interfaces/Context/IWeb";
36
- export { CtxTagKeys, Extensions } from "./Interfaces/PartAExtensions";
37
- export { ISession } from "./Interfaces/Context/ISession";
38
- export { ITelemetryContext } from "./Interfaces/ITelemetryContext";
39
- export { IApplication } from "./Interfaces/Context/IApplication";
40
- export { IDevice } from "./Interfaces/Context/IDevice";
41
- export { IInternal } from "./Interfaces/Context/IInternal";
42
- export { ILocation } from "./Interfaces/Context/ILocation";
43
- export { ISample } from "./Interfaces/Context/ISample";
44
- export { IOperatingSystem } from "./Interfaces/Context/IOperatingSystem";
45
- export { IPropertiesPlugin } from "./Interfaces/IPropertiesPlugin";
46
- export { IUser, IUserContext } from "./Interfaces/Context/IUser";
47
- export { ITelemetryTrace, ITraceState } from "./Interfaces/Context/ITelemetryTrace";
48
- export { IRequestContext } from "./Interfaces/IRequestContext";
49
- export { eDistributedTracingModes, DistributedTracingModes, IThrottleMsgKey } from "./Enums";
50
- export { stringToBoolOrDefault, msToTimeSpan, getExtensionByName, isCrossOriginError } from "./HelperFuncs";
51
- export { isBeaconsSupported as isBeaconApiSupported, ITraceParent, createTraceParent, parseTraceParent, isValidTraceId, isValidSpanId, isValidTraceParent, isSampledFlag, formatTraceParent, findW3cTraceParent } from "@microsoft/applicationinsights-core-js";
52
- export { createDomEvent } from "./DomHelperFuncs";
53
- export { utlDisableStorage, utlEnableStorage, utlCanUseLocalStorage, utlGetLocalStorage, utlSetLocalStorage, utlRemoveStorage, utlCanUseSessionStorage, utlGetSessionStorageKeys, utlGetSessionStorage, utlSetSessionStorage, utlRemoveSessionStorage } from "./StorageHelperFuncs";
54
- export { urlParseUrl, urlGetAbsoluteUrl, urlGetPathName, urlGetCompleteUrl, urlParseHost, urlParseFullHost } from "./UrlHelperFuncs";
55
- export { IThrottleLimit, IThrottleInterval, IThrottleMgrConfig, IThrottleLocalStorageObj, IThrottleResult } from "./Interfaces/IThrottleMgr";
56
- export declare const PropertiesPluginIdentifier = "AppInsightsPropertiesPlugin";
57
- export declare const BreezeChannelIdentifier = "AppInsightsChannelPlugin";
58
- export declare const AnalyticsPluginIdentifier = "ApplicationInsightsAnalytics";
1
+ /*
2
+ * Microsoft Application Insights Common JavaScript Library, 3.0.0-nightly3.2304-28
3
+ * Copyright (c) Microsoft and contributors. All rights reserved.
4
+ *
5
+ * Microsoft Application Insights Team
6
+ * https://github.com/microsoft/ApplicationInsights-JS#readme
7
+ *
8
+ * ---------------------------------------------------------------------------
9
+ * This is a single combined (rollup) declaration file for the package,
10
+ * if you require a namespace wrapped version it is also available.
11
+ * - Namespaced version: types/applicationinsights-common.namespaced.d.ts
12
+ * ---------------------------------------------------------------------------
13
+ */
14
+
15
+ import { createTraceParent } from '@microsoft/applicationinsights-core-js';
16
+ import { _eInternalMessageId } from '@microsoft/applicationinsights-core-js';
17
+ import { eLoggingSeverity } from '@microsoft/applicationinsights-core-js';
18
+ import { EnumValue } from '@microsoft/applicationinsights-core-js';
19
+ import { findW3cTraceParent } from '@microsoft/applicationinsights-core-js';
20
+ import { formatTraceParent } from '@microsoft/applicationinsights-core-js';
21
+ import { IAppInsightsCore } from '@microsoft/applicationinsights-core-js';
22
+ import { IConfiguration } from '@microsoft/applicationinsights-core-js';
23
+ import { ICookieMgr } from '@microsoft/applicationinsights-core-js';
24
+ import { ICustomProperties } from '@microsoft/applicationinsights-core-js';
25
+ import { IDiagnosticLogger } from '@microsoft/applicationinsights-core-js';
26
+ import { IDistributedTraceContext } from '@microsoft/applicationinsights-core-js';
27
+ import { IPlugin } from '@microsoft/applicationinsights-core-js';
28
+ import { isBeaconsSupported as isBeaconApiSupported } from '@microsoft/applicationinsights-core-js';
29
+ import { isSampledFlag } from '@microsoft/applicationinsights-core-js';
30
+ import { isValidSpanId } from '@microsoft/applicationinsights-core-js';
31
+ import { isValidTraceId } from '@microsoft/applicationinsights-core-js';
32
+ import { isValidTraceParent } from '@microsoft/applicationinsights-core-js';
33
+ import { ITelemetryItem } from '@microsoft/applicationinsights-core-js';
34
+ import { ITraceParent } from '@microsoft/applicationinsights-core-js';
35
+ import { IUnloadHookContainer } from '@microsoft/applicationinsights-core-js';
36
+ import { parseTraceParent } from '@microsoft/applicationinsights-core-js';
37
+
38
+ /**
39
+ * Data struct to contain only C section with custom fields.
40
+ */
41
+ export declare interface AIBase {
42
+ /**
43
+ * Name of item (B section) if any. If telemetry data is derived straight from this, this should be null.
44
+ */
45
+ baseType: string;
46
+ }
47
+
48
+ /**
49
+ * Data struct to contain both B and C sections.
50
+ */
51
+ export declare interface AIData<TDomain> extends AIBase {
52
+ /**
53
+ * Name of item (B section) if any. If telemetry data is derived straight from this, this should be null.
54
+ */
55
+ baseType: string;
56
+ /**
57
+ * Container for data item (B section).
58
+ */
59
+ baseData: TDomain;
60
+ }
61
+
62
+ export declare const AnalyticsPluginIdentifier = "ApplicationInsightsAnalytics";
63
+
64
+ export declare const BreezeChannelIdentifier = "AppInsightsChannelPlugin";
65
+
66
+ export declare class ConfigurationManager {
67
+ static getConfig(config: IConfiguration & IConfig, field: string, identifier?: string, defaultValue?: number | string | boolean): number | string | boolean;
68
+ }
69
+
70
+ declare type ConnectionString = {
71
+ [key in ConnectionStringKey]?: string;
72
+ };
73
+
74
+ declare type ConnectionStringKey = "authorization" | "instrumentationkey" | "ingestionendpoint" | "location" | "endpointsuffix";
75
+
76
+ export declare const ConnectionStringParser: {
77
+ parse: typeof parseConnectionString;
78
+ };
79
+
80
+ export declare class ContextTagKeys extends ContextTagKeys_base {
81
+ constructor();
82
+ }
83
+
84
+ declare const ContextTagKeys_base: new () => IContextTagKeys;
85
+
86
+ /**
87
+ * Checks if a request url is not on a excluded domain list and if it is safe to add correlation headers.
88
+ * Headers are always included if the current domain matches the request domain. If they do not match (CORS),
89
+ * they are regex-ed across correlationHeaderDomains and correlationHeaderExcludedDomains to determine if headers are included.
90
+ * Some environments don't give information on currentHost via window.location.host (e.g. Cordova). In these cases, the user must
91
+ * manually supply domains to include correlation headers on. Else, no headers will be included at all.
92
+ */
93
+ export declare function correlationIdCanIncludeCorrelationHeader(config: ICorrelationConfig, requestUrl: string, currentHost?: string): boolean;
94
+
95
+ /**
96
+ * Combines target appId and target role name from response header.
97
+ */
98
+ export declare function correlationIdGetCorrelationContext(responseHeader: string): string;
99
+
100
+ /**
101
+ * Gets key from correlation response header
102
+ */
103
+ export declare function correlationIdGetCorrelationContextValue(responseHeader: string, key: string): string;
104
+
105
+ export declare function correlationIdGetPrefix(): string;
106
+
107
+ export declare function correlationIdSetPrefix(prefix: string): void;
108
+
109
+ /**
110
+ * Creates a IDistributedTraceContext from an optional telemetryTrace
111
+ * @param telemetryTrace - The telemetryTrace instance that is being wrapped
112
+ * @param parentCtx - An optional parent distributed trace instance, almost always undefined as this scenario is only used in the case of multiple property handlers.
113
+ * @returns A new IDistributedTraceContext instance that is backed by the telemetryTrace or temporary object
114
+ */
115
+ export declare function createDistributedTraceContextFromTrace(telemetryTrace?: ITelemetryTrace, parentCtx?: IDistributedTraceContext): IDistributedTraceContext;
116
+
117
+ export declare function createDomEvent(eventName: string): Event;
118
+
119
+ /**
120
+ * Create a telemetry item that the 1DS channel understands
121
+ * @param item - domain specific properties; part B
122
+ * @param baseType - telemetry item type. ie PageViewData
123
+ * @param envelopeName - name of the envelope. ie Microsoft.ApplicationInsights.<instrumentation key>.PageView
124
+ * @param customProperties - user defined custom properties; part C
125
+ * @param systemProperties - system properties that are added to the context; part A
126
+ * @returns ITelemetryItem that is sent to channel
127
+ */
128
+ export declare function createTelemetryItem<T>(item: T, baseType: string, envelopeName: string, logger: IDiagnosticLogger, customProperties?: {
129
+ [key: string]: any;
130
+ }, systemProperties?: {
131
+ [key: string]: any;
132
+ }): ITelemetryItem;
133
+
134
+ export { createTraceParent }
135
+
136
+ export declare let CtxTagKeys: ContextTagKeys;
137
+
138
+ export declare class Data<TDomain> implements AIData<TDomain>, ISerializable {
139
+ /**
140
+ * The data contract for serializing this object.
141
+ */
142
+ aiDataContract: {
143
+ baseType: FieldType;
144
+ baseData: FieldType;
145
+ };
146
+ /**
147
+ * Name of item (B section) if any. If telemetry data is derived straight from this, this should be null.
148
+ */
149
+ baseType: string;
150
+ /**
151
+ * Container for data item (B section).
152
+ */
153
+ baseData: TDomain;
154
+ /**
155
+ * Constructs a new instance of telemetry data.
156
+ */
157
+ constructor(baseType: string, data: TDomain);
158
+ }
159
+
160
+ declare class DataPoint implements IDataPoint, ISerializable {
161
+ /**
162
+ * The data contract for serializing this object.
163
+ */
164
+ aiDataContract: {
165
+ name: FieldType;
166
+ kind: FieldType;
167
+ value: FieldType;
168
+ count: FieldType;
169
+ min: FieldType;
170
+ max: FieldType;
171
+ stdDev: FieldType;
172
+ };
173
+ /**
174
+ * Name of the metric.
175
+ */
176
+ name: string;
177
+ /**
178
+ * Metric type. Single measurement or the aggregated value.
179
+ */
180
+ kind: DataPointType;
181
+ /**
182
+ * Single value for measurement. Sum of individual measurements for the aggregation.
183
+ */
184
+ value: number;
185
+ /**
186
+ * Metric weight of the aggregated metric. Should not be set for a measurement.
187
+ */
188
+ count: number;
189
+ /**
190
+ * Minimum value of the aggregated metric. Should not be set for a measurement.
191
+ */
192
+ min: number;
193
+ /**
194
+ * Maximum value of the aggregated metric. Should not be set for a measurement.
195
+ */
196
+ max: number;
197
+ /**
198
+ * Standard deviation of the aggregated metric. Should not be set for a measurement.
199
+ */
200
+ stdDev: number;
201
+ }
202
+
203
+ /**
204
+ * Type of the metric data measurement.
205
+ */
206
+ declare const enum DataPointType {
207
+ Measurement = 0,
208
+ Aggregation = 1
209
+ }
210
+
211
+ export declare function dataSanitizeException(logger: IDiagnosticLogger, exception: any): any;
212
+
213
+ export declare function dataSanitizeId(logger: IDiagnosticLogger, id: string): string;
214
+
215
+ export declare function dataSanitizeInput(logger: IDiagnosticLogger, input: any, maxLength: number, _msgId: _eInternalMessageId): any;
216
+
217
+ export declare function dataSanitizeKey(logger: IDiagnosticLogger, name: any): any;
218
+
219
+ export declare function dataSanitizeKeyAndAddUniqueness(logger: IDiagnosticLogger, key: any, map: any): any;
220
+
221
+ export declare function dataSanitizeMeasurements(logger: IDiagnosticLogger, measurements: any): any;
222
+
223
+ export declare function dataSanitizeMessage(logger: IDiagnosticLogger, message: any): any;
224
+
225
+ export declare function dataSanitizeProperties(logger: IDiagnosticLogger, properties: any): any;
226
+
227
+ export declare const enum DataSanitizerValues {
228
+ /**
229
+ * Max length allowed for custom names.
230
+ */
231
+ MAX_NAME_LENGTH = 150,
232
+ /**
233
+ * Max length allowed for Id field in page views.
234
+ */
235
+ MAX_ID_LENGTH = 128,
236
+ /**
237
+ * Max length allowed for custom values.
238
+ */
239
+ MAX_PROPERTY_LENGTH = 8192,
240
+ /**
241
+ * Max length allowed for names
242
+ */
243
+ MAX_STRING_LENGTH = 1024,
244
+ /**
245
+ * Max length allowed for url.
246
+ */
247
+ MAX_URL_LENGTH = 2048,
248
+ /**
249
+ * Max length allowed for messages.
250
+ */
251
+ MAX_MESSAGE_LENGTH = 32768,
252
+ /**
253
+ * Max length allowed for exceptions.
254
+ */
255
+ MAX_EXCEPTION_LENGTH = 32768
256
+ }
257
+
258
+ export declare function dataSanitizeString(logger: IDiagnosticLogger, value: any, maxLength?: number): any;
259
+
260
+ export declare function dataSanitizeUrl(logger: IDiagnosticLogger, url: any): any;
261
+
262
+ export declare function dateTimeUtilsDuration(start: number, end: number): number;
263
+
264
+ export declare function dateTimeUtilsNow(): number;
265
+
266
+ export declare const DEFAULT_BREEZE_ENDPOINT = "https://dc.services.visualstudio.com";
267
+
268
+ export declare const DEFAULT_BREEZE_PATH = "/v2/track";
269
+
270
+ /**
271
+ * This is an internal property used to cause internal (reporting) requests to be ignored from reporting
272
+ * additional telemetry, to handle polyfil implementations ALL urls used with a disabled request will
273
+ * also be ignored for future requests even when this property is not provided.
274
+ * Tagging as Ignore as this is an internal value and is not expected to be used outside of the SDK
275
+ * @ignore
276
+ */
277
+ export declare const DisabledPropertyName: string;
278
+
279
+ export declare const DistributedTracingModes: EnumValue<typeof eDistributedTracingModes>;
280
+
281
+ export declare type DistributedTracingModes = number | eDistributedTracingModes;
282
+
283
+ export declare function dsPadNumber(num: number): string;
284
+
285
+ export declare const enum eDistributedTracingModes {
286
+ /**
287
+ * (Default) Send Application Insights correlation headers
288
+ */
289
+ AI = 0,
290
+ /**
291
+ * Send both W3C Trace Context headers and back-compatibility Application Insights headers
292
+ */
293
+ AI_AND_W3C = 1,
294
+ /**
295
+ * Send W3C Trace Context headers
296
+ */
297
+ W3C = 2
298
+ }
299
+
300
+ export declare class Envelope implements IEnvelope {
301
+ /**
302
+ * The data contract for serializing this object.
303
+ */
304
+ aiDataContract: any;
305
+ /**
306
+ * Envelope version. For internal use only. By assigning this the default, it will not be serialized within the payload unless changed to a value other than #1.
307
+ */
308
+ ver: number;
309
+ /**
310
+ * Type name of telemetry data item.
311
+ */
312
+ name: string;
313
+ /**
314
+ * Event date time when telemetry item was created. This is the wall clock time on the client when the event was generated. There is no guarantee that the client's time is accurate. This field must be formatted in UTC ISO 8601 format, with a trailing 'Z' character, as described publicly on https://en.wikipedia.org/wiki/ISO_8601#UTC. Note: the number of decimal seconds digits provided are variable (and unspecified). Consumers should handle this, i.e. managed code consumers should not use format 'O' for parsing as it specifies a fixed length. Example: 2009-06-15T13:45:30.0000000Z.
315
+ */
316
+ time: string;
317
+ /**
318
+ * Sampling rate used in application. This telemetry item represents 1 / sampleRate actual telemetry items.
319
+ */
320
+ sampleRate: number;
321
+ /**
322
+ * Sequence field used to track absolute order of uploaded events.
323
+ */
324
+ seq: string;
325
+ /**
326
+ * The application's instrumentation key. The key is typically represented as a GUID, but there are cases when it is not a guid. No code should rely on iKey being a GUID. Instrumentation key is case insensitive.
327
+ */
328
+ iKey: string;
329
+ /**
330
+ * Key/value collection of context properties. See ContextTagKeys for information on available properties.
331
+ */
332
+ tags: any;
333
+ /**
334
+ * Telemetry data item.
335
+ */
336
+ data: AIBase;
337
+ /**
338
+ * Constructs a new instance of telemetry data.
339
+ */
340
+ constructor(logger: IDiagnosticLogger, data: AIBase, name: string);
341
+ }
342
+
343
+ export declare const enum eRequestHeaders {
344
+ requestContextHeader = 0,
345
+ requestContextTargetKey = 1,
346
+ requestContextAppIdFormat = 2,
347
+ requestIdHeader = 3,
348
+ traceParentHeader = 4,
349
+ traceStateHeader = 5,
350
+ sdkContextHeader = 6,
351
+ sdkContextHeaderAppIdRequest = 7,
352
+ requestContextHeaderLowerCase = 8
353
+ }
354
+
355
+ /**
356
+ * Defines the level of severity for the event.
357
+ */
358
+ export declare const enum eSeverityLevel {
359
+ Verbose = 0,
360
+ Information = 1,
361
+ Warning = 2,
362
+ Error = 3,
363
+ Critical = 4
364
+ }
365
+
366
+ declare class Event_2 implements IEventData, ISerializable {
367
+ static envelopeType: string;
368
+ static dataType: string;
369
+ aiDataContract: {
370
+ ver: FieldType;
371
+ name: FieldType;
372
+ properties: FieldType;
373
+ measurements: FieldType;
374
+ };
375
+ /**
376
+ * Schema version
377
+ */
378
+ ver: number;
379
+ /**
380
+ * Event name. Keep it low cardinality to allow proper grouping and useful metrics.
381
+ */
382
+ name: string;
383
+ /**
384
+ * Collection of custom properties.
385
+ */
386
+ properties: any;
387
+ /**
388
+ * Collection of custom measurements.
389
+ */
390
+ measurements: any;
391
+ /**
392
+ * Constructs a new instance of the EventTelemetry object
393
+ */
394
+ constructor(logger: IDiagnosticLogger, name: string, properties?: any, measurements?: any);
395
+ }
396
+ export { Event_2 as Event }
397
+
398
+ export declare class Exception implements IExceptionData, ISerializable {
399
+ static envelopeType: string;
400
+ static dataType: string;
401
+ id?: string;
402
+ problemGroup?: string;
403
+ isManual?: boolean;
404
+ aiDataContract: {
405
+ ver: FieldType;
406
+ exceptions: FieldType;
407
+ severityLevel: FieldType;
408
+ properties: FieldType;
409
+ measurements: FieldType;
410
+ };
411
+ /**
412
+ * Schema version
413
+ */
414
+ ver: number;
415
+ /**
416
+ * Exception chain - list of inner exceptions.
417
+ */
418
+ exceptions: IExceptionDetails[];
419
+ /**
420
+ * Severity level. Mostly used to indicate exception severity level when it is reported by logging library.
421
+ */
422
+ severityLevel: SeverityLevel;
423
+ /**
424
+ * Collection of custom properties.
425
+ */
426
+ properties: any;
427
+ /**
428
+ * Collection of custom measurements.
429
+ */
430
+ measurements: any;
431
+ /**
432
+ * Constructs a new instance of the ExceptionTelemetry object
433
+ */
434
+ constructor(logger: IDiagnosticLogger, exception: Error | IExceptionInternal | IAutoExceptionTelemetry, properties?: {
435
+ [key: string]: any;
436
+ }, measurements?: {
437
+ [key: string]: number;
438
+ }, severityLevel?: SeverityLevel, id?: string);
439
+ static CreateAutoException(message: string | Event, url: string, lineNumber: number, columnNumber: number, error: any, evt?: Event | string, stack?: string, errorSrc?: string): IAutoExceptionTelemetry;
440
+ static CreateFromInterface(logger: IDiagnosticLogger, exception: IExceptionInternal, properties?: any, measurements?: {
441
+ [key: string]: number;
442
+ }): Exception;
443
+ toInterface(): IExceptionInternal;
444
+ /**
445
+ * Creates a simple exception with 1 stack frame. Useful for manual constracting of exception.
446
+ */
447
+ static CreateSimpleException(message: string, typeName: string, assembly: string, fileName: string, details: string, line: number): Exception;
448
+ static formatError: typeof _formatErrorCode;
449
+ }
450
+
451
+ export declare const Extensions: {
452
+ UserExt: string;
453
+ DeviceExt: string;
454
+ TraceExt: string;
455
+ WebExt: string;
456
+ AppExt: string;
457
+ OSExt: string;
458
+ SessionExt: string;
459
+ SDKExt: string;
460
+ };
461
+
462
+ /**
463
+ * Enum is used in aiDataContract to describe how fields are serialized.
464
+ * For instance: (Fieldtype.Required | FieldType.Array) will mark the field as required and indicate it's an array
465
+ */
466
+ export declare const enum FieldType {
467
+ Default = 0,
468
+ Required = 1,
469
+ Array = 2,
470
+ Hidden = 4
471
+ }
472
+
473
+ export { findW3cTraceParent }
474
+
475
+ /**
476
+ * Formats the provided errorObj for display and reporting, it may be a String, Object, integer or undefined depending on the browser.
477
+ * @param errorObj - The supplied errorObj
478
+ */
479
+ declare function _formatErrorCode(errorObj: any): any;
480
+
481
+ export { formatTraceParent }
482
+
483
+ export declare function getExtensionByName(extensions: IPlugin[], identifier: string): IPlugin | null;
484
+
485
+ export declare const HttpMethod = "http.method";
486
+
487
+ export declare interface IAppInsights {
488
+ /**
489
+ * Get the current cookie manager for this instance
490
+ */
491
+ getCookieMgr(): ICookieMgr;
492
+ trackEvent(event: IEventTelemetry, customProperties?: {
493
+ [key: string]: any;
494
+ }): void;
495
+ trackPageView(pageView: IPageViewTelemetry, customProperties?: {
496
+ [key: string]: any;
497
+ }): void;
498
+ trackException(exception: IExceptionTelemetry, customProperties?: {
499
+ [key: string]: any;
500
+ }): void;
501
+ _onerror(exception: IAutoExceptionTelemetry): void;
502
+ trackTrace(trace: ITraceTelemetry, customProperties?: {
503
+ [key: string]: any;
504
+ }): void;
505
+ trackMetric(metric: IMetricTelemetry, customProperties?: {
506
+ [key: string]: any;
507
+ }): void;
508
+ startTrackPage(name?: string): void;
509
+ stopTrackPage(name?: string, url?: string, customProperties?: Object): void;
510
+ startTrackEvent(name: string): void;
511
+ stopTrackEvent(name: string, properties?: Object, measurements?: Object): void;
512
+ addTelemetryInitializer(telemetryInitializer: (item: ITelemetryItem) => boolean | void): void;
513
+ trackPageViewPerformance(pageViewPerformance: IPageViewPerformanceTelemetry, customProperties?: {
514
+ [key: string]: any;
515
+ }): void;
516
+ }
517
+
518
+ export declare interface IApplication {
519
+ /**
520
+ * The application version.
521
+ */
522
+ ver: string;
523
+ /**
524
+ * The application build version.
525
+ */
526
+ build: string;
527
+ }
528
+
529
+ /**
530
+ * @description window.onerror function parameters
531
+ * @export
532
+ * @interface IAutoExceptionTelemetry
533
+ */
534
+ export declare interface IAutoExceptionTelemetry {
535
+ /**
536
+ * @description error message. Available as event in HTML onerror="" handler
537
+ * @type {string}
538
+ * @memberof IAutoExceptionTelemetry
539
+ */
540
+ message: string;
541
+ /**
542
+ * @description URL of the script where the error was raised
543
+ * @type {string}
544
+ * @memberof IAutoExceptionTelemetry
545
+ */
546
+ url: string;
547
+ /**
548
+ * @description Line number where error was raised
549
+ * @type {number}
550
+ * @memberof IAutoExceptionTelemetry
551
+ */
552
+ lineNumber: number;
553
+ /**
554
+ * @description Column number for the line where the error occurred
555
+ * @type {number}
556
+ * @memberof IAutoExceptionTelemetry
557
+ */
558
+ columnNumber: number;
559
+ /**
560
+ * @description Error Object (object)
561
+ * @type {any}
562
+ * @memberof IAutoExceptionTelemetry
563
+ */
564
+ error: any;
565
+ /**
566
+ * @description The event at the time of the exception (object)
567
+ * @type {Event|string}
568
+ * @memberof IAutoExceptionTelemetry
569
+ */
570
+ evt?: Event | string;
571
+ /**
572
+ * @description The provided stack for the error
573
+ * @type {IStackDetails}
574
+ * @memberof IAutoExceptionTelemetry
575
+ */
576
+ stackDetails?: IStackDetails;
577
+ /**
578
+ * @description The calculated type of the error
579
+ * @type {string}
580
+ * @memberof IAutoExceptionTelemetry
581
+ */
582
+ typeName?: string;
583
+ /**
584
+ * @description The descriptive source of the error
585
+ * @type {string}
586
+ * @memberof IAutoExceptionTelemetry
587
+ */
588
+ errorSrc?: string;
589
+ }
590
+
591
+ /**
592
+ * Configuration settings for how telemetry is sent
593
+ * @export
594
+ * @interface IConfig
595
+ */
596
+ export declare interface IConfig {
597
+ /**
598
+ * The JSON format (normal vs line delimited). True means line delimited JSON.
599
+ */
600
+ emitLineDelimitedJson?: boolean;
601
+ /**
602
+ * An optional account id, if your app groups users into accounts. No spaces, commas, semicolons, equals, or vertical bars.
603
+ */
604
+ accountId?: string;
605
+ /**
606
+ * A session is logged if the user is inactive for this amount of time in milliseconds. Default 30 mins.
607
+ * @default 30*60*1000
608
+ */
609
+ sessionRenewalMs?: number;
610
+ /**
611
+ * A session is logged if it has continued for this amount of time in milliseconds. Default 24h.
612
+ * @default 24*60*60*1000
613
+ */
614
+ sessionExpirationMs?: number;
615
+ /**
616
+ * Max size of telemetry batch. If batch exceeds limit, it is sent and a new batch is started
617
+ * @default 100000
618
+ */
619
+ maxBatchSizeInBytes?: number;
620
+ /**
621
+ * How long to batch telemetry for before sending (milliseconds)
622
+ * @default 15 seconds
623
+ */
624
+ maxBatchInterval?: number;
625
+ /**
626
+ * If true, debugging data is thrown as an exception by the logger. Default false
627
+ * @defaultValue false
628
+ */
629
+ enableDebug?: boolean;
630
+ /**
631
+ * If true, exceptions are not autocollected. Default is false
632
+ * @defaultValue false
633
+ */
634
+ disableExceptionTracking?: boolean;
635
+ /**
636
+ * If true, telemetry is not collected or sent. Default is false
637
+ * @defaultValue false
638
+ */
639
+ disableTelemetry?: boolean;
640
+ /**
641
+ * Percentage of events that will be sent. Default is 100, meaning all events are sent.
642
+ * @defaultValue 100
643
+ */
644
+ samplingPercentage?: number;
645
+ /**
646
+ * If true, on a pageview, the previous instrumented page's view time is tracked and sent as telemetry and a new timer is started for the current pageview. It is sent as a custom metric named PageVisitTime in milliseconds and is calculated via the Date now() function (if available) and falls back to (new Date()).getTime() if now() is unavailable (IE8 or less). Default is false.
647
+ */
648
+ autoTrackPageVisitTime?: boolean;
649
+ /**
650
+ * Automatically track route changes in Single Page Applications (SPA). If true, each route change will send a new Pageview to Application Insights.
651
+ */
652
+ enableAutoRouteTracking?: boolean;
653
+ /**
654
+ * If true, Ajax calls are not autocollected. Default is false
655
+ * @defaultValue false
656
+ */
657
+ disableAjaxTracking?: boolean;
658
+ /**
659
+ * If true, Fetch requests are not autocollected. Default is false (Since 2.8.0, previously true).
660
+ * @defaultValue false
661
+ */
662
+ disableFetchTracking?: boolean;
663
+ /**
664
+ * Provide a way to exclude specific route from automatic tracking for XMLHttpRequest or Fetch request. For an ajax / fetch request that the request url matches with the regex patterns, auto tracking is turned off.
665
+ * @defaultValue undefined.
666
+ */
667
+ excludeRequestFromAutoTrackingPatterns?: string[] | RegExp[];
668
+ /**
669
+ * Provide a way to enrich dependencies logs with context at the beginning of api call.
670
+ * Default is undefined.
671
+ */
672
+ addRequestContext?: (requestContext?: IRequestContext) => ICustomProperties;
673
+ /**
674
+ * If true, default behavior of trackPageView is changed to record end of page view duration interval when trackPageView is called. If false and no custom duration is provided to trackPageView, the page view performance is calculated using the navigation timing API. Default is false
675
+ * @defaultValue false
676
+ */
677
+ overridePageViewDuration?: boolean;
678
+ /**
679
+ * Default 500 - controls how many ajax calls will be monitored per page view. Set to -1 to monitor all (unlimited) ajax calls on the page.
680
+ */
681
+ maxAjaxCallsPerView?: number;
682
+ /**
683
+ * @ignore
684
+ * If false, internal telemetry sender buffers will be checked at startup for items not yet sent. Default is true
685
+ * @defaultValue true
686
+ */
687
+ disableDataLossAnalysis?: boolean;
688
+ /**
689
+ * If false, the SDK will add two headers ('Request-Id' and 'Request-Context') to all dependency requests to correlate them with corresponding requests on the server side. Default is false.
690
+ * @defaultValue false
691
+ */
692
+ disableCorrelationHeaders?: boolean;
693
+ /**
694
+ * Sets the distributed tracing mode. If AI_AND_W3C mode or W3C mode is set, W3C trace context headers (traceparent/tracestate) will be generated and included in all outgoing requests.
695
+ * AI_AND_W3C is provided for back-compatibility with any legacy Application Insights instrumented services
696
+ * @defaultValue AI_AND_W3C
697
+ */
698
+ distributedTracingMode?: DistributedTracingModes;
699
+ /**
700
+ * Disable correlation headers for specific domain
701
+ */
702
+ correlationHeaderExcludedDomains?: string[];
703
+ /**
704
+ * Default false. If true, flush method will not be called when onBeforeUnload, onUnload, onPageHide or onVisibilityChange (hidden state) event(s) trigger.
705
+ */
706
+ disableFlushOnBeforeUnload?: boolean;
707
+ /**
708
+ * Default value of {@link #disableFlushOnBeforeUnload}. If true, flush method will not be called when onPageHide or onVisibilityChange (hidden state) event(s) trigger.
709
+ */
710
+ disableFlushOnUnload?: boolean;
711
+ /**
712
+ * [Optional] An array of the page unload events that you would like to be ignored, special note there must be at least one valid unload
713
+ * event hooked, if you list all or the runtime environment only supports a listed "disabled" event it will still be hooked if required by the SDK.
714
+ * (Some page unload functionality may be disabled via disableFlushOnBeforeUnload or disableFlushOnUnload config entries)
715
+ * Unload events include "beforeunload", "unload", "visibilitychange" (with 'hidden' state) and "pagehide"
716
+ */
717
+ disablePageUnloadEvents?: string[];
718
+ /**
719
+ * [Optional] An array of page show events that you would like to be ignored, special note there must be at lease one valid show event
720
+ * hooked, if you list all or the runtime environment only supports a listed (disabled) event it will STILL be hooked if required by the SDK.
721
+ * Page Show events include "pageshow" and "visibilitychange" (with 'visible' state)
722
+ */
723
+ disablePageShowEvents?: string[];
724
+ /**
725
+ * If true, the buffer with all unsent telemetry is stored in session storage. The buffer is restored on page load. Default is true.
726
+ * @defaultValue true
727
+ */
728
+ enableSessionStorageBuffer?: boolean;
729
+ /**
730
+ * @deprecated Use either disableCookiesUsage or specify a cookieCfg with the enabled value set.
731
+ * If true, the SDK will not store or read any data from cookies. Default is false. As this field is being deprecated, when both
732
+ * isCookieUseDisabled and disableCookiesUsage are used disableCookiesUsage will take precedent.
733
+ * @defaultValue false
734
+ */
735
+ isCookieUseDisabled?: boolean;
736
+ /**
737
+ * If true, the SDK will not store or read any data from cookies. Default is false.
738
+ * If you have also specified a cookieCfg then enabled property (if specified) will take precedent over this value.
739
+ * @defaultValue false
740
+ */
741
+ disableCookiesUsage?: boolean;
742
+ /**
743
+ * Custom cookie domain. This is helpful if you want to share Application Insights cookies across subdomains.
744
+ * @defaultValue ""
745
+ */
746
+ cookieDomain?: string;
747
+ /**
748
+ * Custom cookie path. This is helpful if you want to share Application Insights cookies behind an application gateway.
749
+ * @defaultValue ""
750
+ */
751
+ cookiePath?: string;
752
+ /**
753
+ * Default false. If false, retry on 206 (partial success), 408 (timeout), 429 (too many requests), 500 (internal server error), 503 (service unavailable), and 0 (offline, only if detected)
754
+ * @description
755
+ * @defaultValue false
756
+ */
757
+ isRetryDisabled?: boolean;
758
+ /**
759
+ * @deprecated Used when initizialing from snippet only.
760
+ * The url from where the JS SDK will be downloaded.
761
+ */
762
+ url?: string;
763
+ /**
764
+ * If true, the SDK will not store or read any data from local and session storage. Default is false.
765
+ * @defaultValue false
766
+ */
767
+ isStorageUseDisabled?: boolean;
768
+ /**
769
+ * If false, the SDK will send all telemetry using the [Beacon API](https://www.w3.org/TR/beacon)
770
+ * @defaultValue true
771
+ */
772
+ isBeaconApiDisabled?: boolean;
773
+ /**
774
+ * Don't use XMLHttpRequest or XDomainRequest (for IE < 9) by default instead attempt to use fetch() or sendBeacon.
775
+ * If no other transport is available it will still use XMLHttpRequest
776
+ */
777
+ disableXhr?: boolean;
778
+ /**
779
+ * If fetch keepalive is supported do not use it for sending events during unload, it may still fallback to fetch() without keepalive
780
+ */
781
+ onunloadDisableFetch?: boolean;
782
+ /**
783
+ * Sets the sdk extension name. Only alphabetic characters are allowed. The extension name is added as a prefix to the 'ai.internal.sdkVersion' tag (e.g. 'ext_javascript:2.0.0'). Default is null.
784
+ * @defaultValue null
785
+ */
786
+ sdkExtension?: string;
787
+ /**
788
+ * Default is false. If true, the SDK will track all [Browser Link](https://docs.microsoft.com/en-us/aspnet/core/client-side/using-browserlink) requests.
789
+ * @defaultValue false
790
+ */
791
+ isBrowserLinkTrackingEnabled?: boolean;
792
+ /**
793
+ * AppId is used for the correlation between AJAX dependencies happening on the client-side with the server-side requets. When Beacon API is enabled, it cannot be used automatically, but can be set manually in the configuration. Default is null
794
+ * @defaultValue null
795
+ */
796
+ appId?: string;
797
+ /**
798
+ * If true, the SDK will add two headers ('Request-Id' and 'Request-Context') to all CORS requests to correlate outgoing AJAX dependencies with corresponding requests on the server side. Default is false
799
+ * @defaultValue false
800
+ */
801
+ enableCorsCorrelation?: boolean;
802
+ /**
803
+ * An optional value that will be used as name postfix for localStorage and session cookie name.
804
+ * @defaultValue null
805
+ */
806
+ namePrefix?: string;
807
+ /**
808
+ * An optional value that will be used as name postfix for session cookie name. If undefined, namePrefix is used as name postfix for session cookie name.
809
+ * @defaultValue null
810
+ */
811
+ sessionCookiePostfix?: string;
812
+ /**
813
+ * An optional value that will be used as name postfix for user cookie name. If undefined, no postfix is added on user cookie name.
814
+ * @defaultValue null
815
+ */
816
+ userCookiePostfix?: string;
817
+ /**
818
+ * An optional value that will track Request Header through trackDependency function.
819
+ * @defaultValue false
820
+ */
821
+ enableRequestHeaderTracking?: boolean;
822
+ /**
823
+ * An optional value that will track Response Header through trackDependency function.
824
+ * @defaultValue false
825
+ */
826
+ enableResponseHeaderTracking?: boolean;
827
+ /**
828
+ * An optional value that will track Response Error data through trackDependency function.
829
+ * @defaultValue false
830
+ */
831
+ enableAjaxErrorStatusText?: boolean;
832
+ /**
833
+ * Flag to enable looking up and including additional browser window.performance timings
834
+ * in the reported ajax (XHR and fetch) reported metrics.
835
+ * Defaults to false.
836
+ */
837
+ enableAjaxPerfTracking?: boolean;
838
+ /**
839
+ * The maximum number of times to look for the window.performance timings (if available), this
840
+ * is required as not all browsers populate the window.performance before reporting the
841
+ * end of the XHR request and for fetch requests this is added after its complete
842
+ * Defaults to 3
843
+ */
844
+ maxAjaxPerfLookupAttempts?: number;
845
+ /**
846
+ * The amount of time to wait before re-attempting to find the windows.performance timings
847
+ * for an ajax request, time is in milliseconds and is passed directly to setTimeout()
848
+ * Defaults to 25.
849
+ */
850
+ ajaxPerfLookupDelay?: number;
851
+ /**
852
+ * Default false. when tab is closed, the SDK will send all remaining telemetry using the [Beacon API](https://www.w3.org/TR/beacon)
853
+ * @defaultValue false
854
+ */
855
+ onunloadDisableBeacon?: boolean;
856
+ /**
857
+ * @ignore
858
+ * Internal only
859
+ */
860
+ autoExceptionInstrumented?: boolean;
861
+ /**
862
+ *
863
+ */
864
+ correlationHeaderDomains?: string[];
865
+ /**
866
+ * @ignore
867
+ * Internal only
868
+ */
869
+ autoUnhandledPromiseInstrumented?: boolean;
870
+ /**
871
+ * Default false. Define whether to track unhandled promise rejections and report as JS errors.
872
+ * When disableExceptionTracking is enabled (dont track exceptions) this value will be false.
873
+ * @defaultValue false
874
+ */
875
+ enableUnhandledPromiseRejectionTracking?: boolean;
876
+ /**
877
+ * Disable correlation headers using regular expressions
878
+ */
879
+ correlationHeaderExcludePatterns?: RegExp[];
880
+ /**
881
+ * The ability for the user to provide extra headers
882
+ */
883
+ customHeaders?: [{
884
+ header: string;
885
+ value: string;
886
+ }];
887
+ /**
888
+ * Provide user an option to convert undefined field to user defined value.
889
+ */
890
+ convertUndefined?: any;
891
+ /**
892
+ * [Optional] The number of events that can be kept in memory before the SDK starts to drop events. By default, this is 10,000.
893
+ */
894
+ eventsLimitInMem?: number;
895
+ /**
896
+ * [Optional] Disable iKey deprecation error message.
897
+ * @defaultValue true
898
+ */
899
+ disableIkeyDeprecationMessage?: boolean;
900
+ /**
901
+ * [Optional] Flag to indicate whether the internal looking endpoints should be automatically
902
+ * added to the `excludeRequestFromAutoTrackingPatterns` collection. (defaults to true).
903
+ * This flag exists as the provided regex is generic and may unexpectedly match a domain that
904
+ * should not be excluded.
905
+ */
906
+ addIntEndpoints?: boolean;
907
+ }
908
+
909
+ export declare interface IContextTagKeys {
910
+ /**
911
+ * Application version. Information in the application context fields is always about the application that is sending the telemetry.
912
+ */
913
+ readonly applicationVersion: string;
914
+ /**
915
+ * Application build.
916
+ */
917
+ readonly applicationBuild: string;
918
+ /**
919
+ * Application type id.
920
+ */
921
+ readonly applicationTypeId: string;
922
+ /**
923
+ * Application id.
924
+ */
925
+ readonly applicationId: string;
926
+ /**
927
+ * Application layer.
928
+ */
929
+ readonly applicationLayer: string;
930
+ /**
931
+ * Unique client device id. Computer name in most cases.
932
+ */
933
+ readonly deviceId: string;
934
+ readonly deviceIp: string;
935
+ readonly deviceLanguage: string;
936
+ /**
937
+ * Device locale using <language>-<REGION> pattern, following RFC 5646. Example 'en-US'.
938
+ */
939
+ readonly deviceLocale: string;
940
+ /**
941
+ * Model of the device the end user of the application is using. Used for client scenarios. If this field is empty then it is derived from the user agent.
942
+ */
943
+ readonly deviceModel: string;
944
+ readonly deviceFriendlyName: string;
945
+ readonly deviceNetwork: string;
946
+ readonly deviceNetworkName: string;
947
+ /**
948
+ * Client device OEM name taken from the browser.
949
+ */
950
+ readonly deviceOEMName: string;
951
+ readonly deviceOS: string;
952
+ /**
953
+ * Operating system name and version of the device the end user of the application is using. If this field is empty then it is derived from the user agent. Example 'Windows 10 Pro 10.0.10586.0'
954
+ */
955
+ readonly deviceOSVersion: string;
956
+ /**
957
+ * Name of the instance where application is running. Computer name for on-premisis, instance name for Azure.
958
+ */
959
+ readonly deviceRoleInstance: string;
960
+ /**
961
+ * Name of the role application is part of. Maps directly to the role name in azure.
962
+ */
963
+ readonly deviceRoleName: string;
964
+ readonly deviceScreenResolution: string;
965
+ /**
966
+ * The type of the device the end user of the application is using. Used primarily to distinguish JavaScript telemetry from server side telemetry. Examples: 'PC', 'Phone', 'Browser'. 'PC' is the default value.
967
+ */
968
+ readonly deviceType: string;
969
+ readonly deviceMachineName: string;
970
+ readonly deviceVMName: string;
971
+ readonly deviceBrowser: string;
972
+ /**
973
+ * The browser name and version as reported by the browser.
974
+ */
975
+ readonly deviceBrowserVersion: string;
976
+ /**
977
+ * The IP address of the client device. IPv4 and IPv6 are supported. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.
978
+ */
979
+ readonly locationIp: string;
980
+ /**
981
+ * The country of the client device. If any of Country, Province, or City is specified, those values will be preferred over geolocation of the IP address field. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.
982
+ */
983
+ readonly locationCountry: string;
984
+ /**
985
+ * The province/state of the client device. If any of Country, Province, or City is specified, those values will be preferred over geolocation of the IP address field. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.
986
+ */
987
+ readonly locationProvince: string;
988
+ /**
989
+ * The city of the client device. If any of Country, Province, or City is specified, those values will be preferred over geolocation of the IP address field. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.
990
+ */
991
+ readonly locationCity: string;
992
+ /**
993
+ * A unique identifier for the operation instance. The operation.id is created by either a request or a page view. All other telemetry sets this to the value for the containing request or page view. Operation.id is used for finding all the telemetry items for a specific operation instance.
994
+ */
995
+ readonly operationId: string;
996
+ /**
997
+ * The name (group) of the operation. The operation.name is created by either a request or a page view. All other telemetry items set this to the value for the containing request or page view. Operation.name is used for finding all the telemetry items for a group of operations (i.e. 'GET Home/Index').
998
+ */
999
+ readonly operationName: string;
1000
+ /**
1001
+ * The unique identifier of the telemetry item's immediate parent.
1002
+ */
1003
+ readonly operationParentId: string;
1004
+ readonly operationRootId: string;
1005
+ /**
1006
+ * Name of synthetic source. Some telemetry from the application may represent a synthetic traffic. It may be web crawler indexing the web site, site availability tests or traces from diagnostic libraries like Application Insights SDK itself.
1007
+ */
1008
+ readonly operationSyntheticSource: string;
1009
+ /**
1010
+ * The correlation vector is a light weight vector clock which can be used to identify and order related events across clients and services.
1011
+ */
1012
+ readonly operationCorrelationVector: string;
1013
+ /**
1014
+ * Session ID - the instance of the user's interaction with the app. Information in the session context fields is always about the end user. When telemetry is sent from a service, the session context is about the user that initiated the operation in the service.
1015
+ */
1016
+ readonly sessionId: string;
1017
+ /**
1018
+ * Boolean value indicating whether the session identified by ai.session.id is first for the user or not.
1019
+ */
1020
+ readonly sessionIsFirst: string;
1021
+ readonly sessionIsNew: string;
1022
+ readonly userAccountAcquisitionDate: string;
1023
+ /**
1024
+ * In multi-tenant applications this is the account ID or name which the user is acting with. Examples may be subscription ID for Azure portal or blog name blogging platform.
1025
+ */
1026
+ readonly userAccountId: string;
1027
+ /**
1028
+ * The browser's user agent string as reported by the browser. This property will be used to extract informaiton regarding the customer's browser but will not be stored. Use custom properties to store the original user agent.
1029
+ */
1030
+ readonly userAgent: string;
1031
+ /**
1032
+ * Anonymous user id. Represents the end user of the application. When telemetry is sent from a service, the user context is about the user that initiated the operation in the service.
1033
+ */
1034
+ readonly userId: string;
1035
+ /**
1036
+ * Store region for UWP applications.
1037
+ */
1038
+ readonly userStoreRegion: string;
1039
+ /**
1040
+ * Authenticated user id. The opposite of ai.user.id, this represents the user with a friendly name. Since it's PII information it is not collected by default by most SDKs.
1041
+ */
1042
+ readonly userAuthUserId: string;
1043
+ readonly userAnonymousUserAcquisitionDate: string;
1044
+ readonly userAuthenticatedUserAcquisitionDate: string;
1045
+ readonly cloudName: string;
1046
+ /**
1047
+ * Name of the role the application is a part of. Maps directly to the role name in azure.
1048
+ */
1049
+ readonly cloudRole: string;
1050
+ readonly cloudRoleVer: string;
1051
+ /**
1052
+ * Name of the instance where the application is running. Computer name for on-premisis, instance name for Azure.
1053
+ */
1054
+ readonly cloudRoleInstance: string;
1055
+ readonly cloudEnvironment: string;
1056
+ readonly cloudLocation: string;
1057
+ readonly cloudDeploymentUnit: string;
1058
+ /**
1059
+ * SDK version. See https://github.com/microsoft/ApplicationInsights-Home/blob/master/SDK-AUTHORING.md#sdk-version-specification for information.
1060
+ */
1061
+ readonly internalSdkVersion: string;
1062
+ /**
1063
+ * Agent version. Used to indicate the version of StatusMonitor installed on the computer if it is used for data collection.
1064
+ */
1065
+ readonly internalAgentVersion: string;
1066
+ /**
1067
+ * This is the node name used for billing purposes. Use it to override the standard detection of nodes.
1068
+ */
1069
+ readonly internalNodeName: string;
1070
+ /**
1071
+ * This identifies the version of the snippet that was used to initialize the SDK
1072
+ */
1073
+ readonly internalSnippet: string;
1074
+ /**
1075
+ * This identifies the source of the Sdk script (used to identify whether the SDK was loaded via the CDN)
1076
+ */
1077
+ readonly internalSdkSrc: string;
1078
+ }
1079
+
1080
+ export declare interface ICorrelationConfig {
1081
+ enableCorsCorrelation: boolean;
1082
+ correlationHeaderExcludedDomains: string[];
1083
+ correlationHeaderExcludePatterns?: RegExp[];
1084
+ disableCorrelationHeaders: boolean;
1085
+ distributedTracingMode: DistributedTracingModes;
1086
+ maxAjaxCallsPerView: number;
1087
+ disableAjaxTracking: boolean;
1088
+ disableFetchTracking: boolean;
1089
+ appId?: string;
1090
+ enableRequestHeaderTracking?: boolean;
1091
+ enableResponseHeaderTracking?: boolean;
1092
+ enableAjaxErrorStatusText?: boolean;
1093
+ /**
1094
+ * Flag to enable looking up and including additional browser window.performance timings
1095
+ * in the reported ajax (XHR and fetch) reported metrics.
1096
+ * Defaults to false.
1097
+ */
1098
+ enableAjaxPerfTracking?: boolean;
1099
+ /**
1100
+ * The maximum number of times to look for the window.performance timings (if available), this
1101
+ * is required as not all browsers populate the window.performance before reporting the
1102
+ * end of the XHR request and for fetch requests this is added after its complete
1103
+ * Defaults to 3
1104
+ */
1105
+ maxAjaxPerfLookupAttempts?: number;
1106
+ /**
1107
+ * The amount of time to wait before re-attempting to find the windows.performance timings
1108
+ * for an ajax request, time is in milliseconds and is passed directly to setTimeout()
1109
+ * Defaults to 25.
1110
+ */
1111
+ ajaxPerfLookupDelay?: number;
1112
+ correlationHeaderDomains?: string[];
1113
+ /**
1114
+ * Response and request headers to be excluded from ajax tracking data.
1115
+ */
1116
+ ignoreHeaders?: string[];
1117
+ /**
1118
+ * Provide a way to exclude specific route from automatic tracking for XMLHttpRequest or Fetch request.
1119
+ * For an ajax / fetch request that the request url matches with the regex patterns, auto tracking is turned off.
1120
+ * Default is undefined.
1121
+ */
1122
+ excludeRequestFromAutoTrackingPatterns?: string[] | RegExp[];
1123
+ /**
1124
+ * Provide a way to enrich dependencies logs with context at the beginning of api call.
1125
+ * Default is undefined.
1126
+ */
1127
+ addRequestContext?: (requestContext?: IRequestContext) => ICustomProperties;
1128
+ /**
1129
+ * [Optional] Flag to indicate whether the internal looking endpoints should be automatically
1130
+ * added to the `excludeRequestFromAutoTrackingPatterns` collection. (defaults to true).
1131
+ * This flag exists as the provided regex is generic and may unexpectedly match a domain that
1132
+ * should not be excluded.
1133
+ */
1134
+ addIntEndpoints?: boolean;
1135
+ }
1136
+
1137
+ /**
1138
+ * Metric data single measurement.
1139
+ */
1140
+ declare interface IDataPoint {
1141
+ /**
1142
+ * Name of the metric.
1143
+ */
1144
+ name: string;
1145
+ /**
1146
+ * Metric type. Single measurement or the aggregated value.
1147
+ */
1148
+ kind: DataPointType;
1149
+ /**
1150
+ * Single value for measurement. Sum of individual measurements for the aggregation.
1151
+ */
1152
+ value: number;
1153
+ /**
1154
+ * Metric weight of the aggregated metric. Should not be set for a measurement.
1155
+ */
1156
+ count: number;
1157
+ /**
1158
+ * Minimum value of the aggregated metric. Should not be set for a measurement.
1159
+ */
1160
+ min: number;
1161
+ /**
1162
+ * Maximum value of the aggregated metric. Should not be set for a measurement.
1163
+ */
1164
+ max: number;
1165
+ /**
1166
+ * Standard deviation of the aggregated metric. Should not be set for a measurement.
1167
+ */
1168
+ stdDev: number;
1169
+ }
1170
+
1171
+ /**
1172
+ * DependencyTelemetry telemetry interface
1173
+ */
1174
+ export declare interface IDependencyTelemetry extends IPartC {
1175
+ id: string;
1176
+ name?: string;
1177
+ duration?: number;
1178
+ success?: boolean;
1179
+ startTime?: Date;
1180
+ responseCode: number;
1181
+ correlationContext?: string;
1182
+ type?: string;
1183
+ data?: string;
1184
+ target?: string;
1185
+ iKey?: string;
1186
+ }
1187
+
1188
+ export declare interface IDevice {
1189
+ /**
1190
+ * The type for the current device.
1191
+ */
1192
+ deviceClass: string;
1193
+ /**
1194
+ * A device unique ID.
1195
+ */
1196
+ id: string;
1197
+ /**
1198
+ * The device model for the current device.
1199
+ */
1200
+ model: string;
1201
+ /**
1202
+ * The application screen resolution.
1203
+ */
1204
+ resolution: string;
1205
+ /**
1206
+ * The IP address.
1207
+ */
1208
+ ip: string;
1209
+ }
1210
+
1211
+ /**
1212
+ * The abstract common base of all domains.
1213
+ */
1214
+ declare interface IDomain {
1215
+ }
1216
+
1217
+ export declare interface IEnvelope extends ISerializable {
1218
+ /**
1219
+ * Envelope version. For internal use only. By assigning this the default, it will not be serialized within the payload unless changed to a value other than #1.
1220
+ */
1221
+ ver: number;
1222
+ /**
1223
+ * Type name of telemetry data item.
1224
+ */
1225
+ name: string;
1226
+ /**
1227
+ * Event date time when telemetry item was created. This is the wall clock time on the client when the event was generated. There is no guarantee that the client's time is accurate. This field must be formatted in UTC ISO 8601 format, with a trailing 'Z' character, as described publicly on https://en.wikipedia.org/wiki/ISO_8601#UTC. Note: the number of decimal seconds digits provided are variable (and unspecified). Consumers should handle this, i.e. managed code consumers should not use format 'O' for parsing as it specifies a fixed length. Example: 2009-06-15T13:45:30.0000000Z.
1228
+ */
1229
+ time: string;
1230
+ /**
1231
+ * Sampling rate used in application. This telemetry item represents 1 / sampleRate actual telemetry items.
1232
+ */
1233
+ sampleRate: number;
1234
+ /**
1235
+ * Sequence field used to track absolute order of uploaded events.
1236
+ */
1237
+ seq: string;
1238
+ /**
1239
+ * The application's instrumentation key. The key is typically represented as a GUID, but there are cases when it is not a guid. No code should rely on iKey being a GUID. Instrumentation key is case insensitive.
1240
+ */
1241
+ iKey: string;
1242
+ /**
1243
+ * Key/value collection of context properties. See ContextTagKeys for information on available properties.
1244
+ */
1245
+ tags: {
1246
+ [name: string]: any;
1247
+ };
1248
+ /**
1249
+ * Telemetry data item.
1250
+ */
1251
+ data: any;
1252
+ }
1253
+
1254
+ /**
1255
+ * Instances of Event represent structured event records that can be grouped and searched by their properties. Event data item also creates a metric of event count by name.
1256
+ */
1257
+ declare interface IEventData extends IDomain {
1258
+ /**
1259
+ * Schema version
1260
+ */
1261
+ ver: number;
1262
+ /**
1263
+ * Event name. Keep it low cardinality to allow proper grouping and useful metrics.
1264
+ */
1265
+ name: string;
1266
+ /**
1267
+ * Collection of custom properties.
1268
+ */
1269
+ properties: any;
1270
+ /**
1271
+ * Collection of custom measurements.
1272
+ */
1273
+ measurements: any;
1274
+ }
1275
+
1276
+ export declare interface IEventTelemetry extends IPartC {
1277
+ /**
1278
+ * @description An event name string
1279
+ * @type {string}
1280
+ * @memberof IEventTelemetry
1281
+ */
1282
+ name: string;
1283
+ /**
1284
+ * @description custom defined iKey
1285
+ * @type {string}
1286
+ * @memberof IEventTelemetry
1287
+ */
1288
+ iKey?: string;
1289
+ }
1290
+
1291
+ /**
1292
+ * An instance of Exception represents a handled or unhandled exception that occurred during execution of the monitored application.
1293
+ */
1294
+ declare interface IExceptionData extends IDomain {
1295
+ /**
1296
+ * Schema version
1297
+ */
1298
+ ver: number;
1299
+ /**
1300
+ * Exception chain - list of inner exceptions.
1301
+ */
1302
+ exceptions: IExceptionDetails[];
1303
+ /**
1304
+ * Severity level. Mostly used to indicate exception severity level when it is reported by logging library.
1305
+ */
1306
+ severityLevel: SeverityLevel;
1307
+ /**
1308
+ * Collection of custom properties.
1309
+ */
1310
+ properties: any;
1311
+ /**
1312
+ * Collection of custom measurements.
1313
+ */
1314
+ measurements: any;
1315
+ }
1316
+
1317
+ /**
1318
+ * Exception details of the exception in a chain.
1319
+ */
1320
+ declare interface IExceptionDetails {
1321
+ /**
1322
+ * In case exception is nested (outer exception contains inner one), the id and outerId properties are used to represent the nesting.
1323
+ */
1324
+ id: number;
1325
+ /**
1326
+ * The value of outerId is a reference to an element in ExceptionDetails that represents the outer exception
1327
+ */
1328
+ outerId: number;
1329
+ /**
1330
+ * Exception type name.
1331
+ */
1332
+ typeName: string;
1333
+ /**
1334
+ * Exception message.
1335
+ */
1336
+ message: string;
1337
+ /**
1338
+ * Indicates if full exception stack is provided in the exception. The stack may be trimmed, such as in the case of a StackOverflow exception.
1339
+ */
1340
+ hasFullStack: boolean;
1341
+ /**
1342
+ * Text describing the stack. Either stack or parsedStack should have a value.
1343
+ */
1344
+ stack: string;
1345
+ /**
1346
+ * List of stack frames. Either stack or parsedStack should have a value.
1347
+ */
1348
+ parsedStack: IStackFrame[];
1349
+ }
1350
+
1351
+ declare interface IExceptionDetailsInternal {
1352
+ id: number;
1353
+ outerId: number;
1354
+ typeName: string;
1355
+ message: string;
1356
+ hasFullStack: boolean;
1357
+ stack: string;
1358
+ parsedStack: IExceptionStackFrameInternal[];
1359
+ }
1360
+
1361
+ export declare interface IExceptionInternal extends IPartC {
1362
+ ver: string;
1363
+ id: string;
1364
+ exceptions: IExceptionDetailsInternal[];
1365
+ severityLevel?: SeverityLevel | number;
1366
+ problemGroup: string;
1367
+ isManual: boolean;
1368
+ }
1369
+
1370
+ declare interface IExceptionStackFrameInternal {
1371
+ level: number;
1372
+ method: string;
1373
+ assembly: string;
1374
+ fileName: string;
1375
+ line: number;
1376
+ pos?: number;
1377
+ }
1378
+
1379
+ /**
1380
+ * @export
1381
+ * @interface IExceptionTelemetry
1382
+ * @description Exception interface used as primary parameter to trackException
1383
+ */
1384
+ export declare interface IExceptionTelemetry extends IPartC {
1385
+ /**
1386
+ * Unique guid identifying this error
1387
+ */
1388
+ id?: string;
1389
+ /**
1390
+ * @deprecated
1391
+ * @type {Error}
1392
+ * @memberof IExceptionTelemetry
1393
+ * @description DEPRECATED: Please use exception instead. Behavior/usage for exception remains the same as this field.
1394
+ */
1395
+ error?: Error;
1396
+ /**
1397
+ * @type {Error}
1398
+ * @memberof IExceptionTelemetry
1399
+ * @description Error Object(s)
1400
+ */
1401
+ exception?: Error | IAutoExceptionTelemetry;
1402
+ /**
1403
+ * @description Specified severity of exception for use with
1404
+ * telemetry filtering in dashboard
1405
+ * @type {(SeverityLevel | number)}
1406
+ * @memberof IExceptionTelemetry
1407
+ */
1408
+ severityLevel?: SeverityLevel | number;
1409
+ }
1410
+
1411
+ export declare interface IInternal {
1412
+ /**
1413
+ * The SDK version used to create this telemetry item.
1414
+ */
1415
+ sdkVersion: string;
1416
+ /**
1417
+ * The SDK agent version.
1418
+ */
1419
+ agentVersion: string;
1420
+ /**
1421
+ * The Snippet version used to initialize the sdk instance, this will contain either
1422
+ * undefined/null - Snippet not used
1423
+ * '-' - Version and legacy mode not determined
1424
+ * # - Version # of the snippet
1425
+ * #.l - Version # in legacy mode
1426
+ * .l - No defined version, but used legacy mode initialization
1427
+ */
1428
+ snippetVer: string;
1429
+ /**
1430
+ * Identifies the source of the sdk script
1431
+ */
1432
+ sdkSrc: string;
1433
+ }
1434
+
1435
+ export declare interface ILocation {
1436
+ /**
1437
+ * Client IP address for reverse lookup
1438
+ */
1439
+ ip: string;
1440
+ }
1441
+
1442
+ /**
1443
+ * Instances of Message represent printf-like trace statements that are text-searched. Log4Net, NLog and other text-based log file entries are translated into intances of this type. The message does not have measurements.
1444
+ */
1445
+ declare interface IMessageData extends IDomain {
1446
+ /**
1447
+ * Schema version
1448
+ */
1449
+ ver: number;
1450
+ /**
1451
+ * Trace message
1452
+ */
1453
+ message: string;
1454
+ /**
1455
+ * Trace severity level.
1456
+ */
1457
+ severityLevel: SeverityLevel;
1458
+ /**
1459
+ * Collection of custom properties.
1460
+ */
1461
+ properties: any;
1462
+ /**
1463
+ * Collection of custom measurements.
1464
+ */
1465
+ measurements: any;
1466
+ }
1467
+
1468
+ /**
1469
+ * An instance of the Metric item is a list of measurements (single data points) and/or aggregations.
1470
+ */
1471
+ declare interface IMetricData extends IDomain {
1472
+ /**
1473
+ * Schema version
1474
+ */
1475
+ ver: number;
1476
+ /**
1477
+ * List of metrics. Only one metric in the list is currently supported by Application Insights storage. If multiple data points were sent only the first one will be used.
1478
+ */
1479
+ metrics: IDataPoint[];
1480
+ /**
1481
+ * Collection of custom properties.
1482
+ */
1483
+ properties: any;
1484
+ /**
1485
+ * Collection of custom measurements.
1486
+ */
1487
+ measurements: any;
1488
+ }
1489
+
1490
+ export declare interface IMetricTelemetry extends IPartC {
1491
+ /**
1492
+ * @description (required) - name of this metric
1493
+ * @type {string}
1494
+ * @memberof IMetricTelemetry
1495
+ */
1496
+ name: string;
1497
+ /**
1498
+ * @description (required) - Recorded value/average for this metric
1499
+ * @type {number}
1500
+ * @memberof IMetricTelemetry
1501
+ */
1502
+ average: number;
1503
+ /**
1504
+ * @description (optional) Number of samples represented by the average.
1505
+ * @type {number=}
1506
+ * @memberof IMetricTelemetry
1507
+ * @default sampleCount=1
1508
+ */
1509
+ sampleCount?: number;
1510
+ /**
1511
+ * @description (optional) The smallest measurement in the sample. Defaults to the average
1512
+ * @type {number}
1513
+ * @memberof IMetricTelemetry
1514
+ * @default min=average
1515
+ */
1516
+ min?: number;
1517
+ /**
1518
+ * @description (optional) The largest measurement in the sample. Defaults to the average.
1519
+ * @type {number}
1520
+ * @memberof IMetricTelemetry
1521
+ * @default max=average
1522
+ */
1523
+ max?: number;
1524
+ /**
1525
+ * (optional) The standard deviation measurement in the sample, Defaults to undefined which results in zero.
1526
+ */
1527
+ stdDev?: number;
1528
+ /**
1529
+ * @description custom defined iKey
1530
+ * @type {string}
1531
+ * @memberof IMetricTelemetry
1532
+ */
1533
+ iKey?: string;
1534
+ }
1535
+
1536
+ export declare interface IOperatingSystem {
1537
+ name: string;
1538
+ }
1539
+
1540
+ /**
1541
+ * An instance of PageView represents a generic action on a page like a button click. It is also the base type for PageView.
1542
+ */
1543
+ export declare interface IPageViewData extends IEventData {
1544
+ /**
1545
+ * Request URL with all query string parameters
1546
+ */
1547
+ url: string;
1548
+ /**
1549
+ * Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view (PageViewData), this is the duration. For a page view with performance information (PageViewPerfData), this is the page load time. Must be less than 1000 days.
1550
+ */
1551
+ duration: string;
1552
+ /**
1553
+ * Identifier of a page view instance. Used for correlation between page view and other telemetry items.
1554
+ */
1555
+ id: string;
1556
+ }
1557
+
1558
+ /**
1559
+ * An instance of PageViewPerf represents: a page view with no performance data, a page view with performance data, or just the performance data of an earlier page request.
1560
+ */
1561
+ declare interface IPageViewPerfData extends IPageViewData {
1562
+ /**
1563
+ * Performance total in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
1564
+ */
1565
+ perfTotal: string;
1566
+ /**
1567
+ * Network connection time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
1568
+ */
1569
+ networkConnect: string;
1570
+ /**
1571
+ * Sent request time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
1572
+ */
1573
+ sentRequest: string;
1574
+ /**
1575
+ * Received response time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
1576
+ */
1577
+ receivedResponse: string;
1578
+ /**
1579
+ * DOM processing time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
1580
+ */
1581
+ domProcessing: string;
1582
+ }
1583
+
1584
+ export declare interface IPageViewPerformanceTelemetry extends IPartC {
1585
+ /**
1586
+ * name String - The name of the page. Defaults to the document title.
1587
+ */
1588
+ name?: string;
1589
+ /**
1590
+ * url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.
1591
+ */
1592
+ uri?: string;
1593
+ /**
1594
+ * Performance total in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff". This is total duration in timespan format.
1595
+ */
1596
+ perfTotal?: string;
1597
+ /**
1598
+ * Performance total in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff". This represents the total page load time.
1599
+ */
1600
+ duration?: string;
1601
+ /**
1602
+ * Sent request time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
1603
+ */
1604
+ networkConnect?: string;
1605
+ /**
1606
+ * Sent request time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff.
1607
+ */
1608
+ sentRequest?: string;
1609
+ /**
1610
+ * Received response time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff.
1611
+ */
1612
+ receivedResponse?: string;
1613
+ /**
1614
+ * DOM processing time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
1615
+ */
1616
+ domProcessing?: string;
1617
+ }
1618
+
1619
+ export declare interface IPageViewPerformanceTelemetryInternal extends IPageViewPerformanceTelemetry {
1620
+ /**
1621
+ * An identifier assigned to each distinct impression for the purposes of correlating with pageview.
1622
+ * A new id is automatically generated on each pageview. You can manually specify this field if you
1623
+ * want to use a specific value instead.
1624
+ */
1625
+ id?: string;
1626
+ /**
1627
+ * Version of the part B schema, todo: set this value in trackpageView
1628
+ */
1629
+ ver?: string;
1630
+ /**
1631
+ * Field indicating whether this instance of PageViewPerformance is valid and should be sent
1632
+ */
1633
+ isValid?: boolean;
1634
+ /**
1635
+ * Duration in miliseconds
1636
+ */
1637
+ durationMs?: number;
1638
+ }
1639
+
1640
+ /**
1641
+ * Pageview telemetry interface
1642
+ */
1643
+ export declare interface IPageViewTelemetry extends IPartC {
1644
+ /**
1645
+ * name String - The string you used as the name in startTrackPage. Defaults to the document title.
1646
+ */
1647
+ name?: string;
1648
+ /**
1649
+ * uri String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.
1650
+ */
1651
+ uri?: string;
1652
+ /**
1653
+ * refUri String - the URL of the source page where current page is loaded from
1654
+ */
1655
+ refUri?: string;
1656
+ /**
1657
+ * pageType String - page type
1658
+ */
1659
+ pageType?: string;
1660
+ /**
1661
+ * isLoggedIn - boolean is user logged in
1662
+ */
1663
+ isLoggedIn?: boolean;
1664
+ /**
1665
+ * Property bag to contain additional custom properties (Part C)
1666
+ */
1667
+ properties?: {
1668
+ /**
1669
+ * The number of milliseconds it took to load the page. Defaults to undefined. If set to default value, page load time is calculated internally.
1670
+ */
1671
+ duration?: number;
1672
+ [key: string]: any;
1673
+ };
1674
+ /**
1675
+ * iKey String - custom defined iKey.
1676
+ */
1677
+ iKey?: string;
1678
+ }
1679
+
1680
+ export declare interface IPageViewTelemetryInternal extends IPageViewTelemetry {
1681
+ /**
1682
+ * An identifier assigned to each distinct impression for the purposes of correlating with pageview.
1683
+ * A new id is automatically generated on each pageview. You can manually specify this field if you
1684
+ * want to use a specific value instead.
1685
+ */
1686
+ id?: string;
1687
+ /**
1688
+ * Version of the part B schema, todo: set this value in trackpageView
1689
+ */
1690
+ ver?: string;
1691
+ }
1692
+
1693
+ /**
1694
+ * PartC telemetry interface
1695
+ */
1696
+ declare interface IPartC {
1697
+ /**
1698
+ * Property bag to contain additional custom properties (Part C)
1699
+ */
1700
+ properties?: {
1701
+ [key: string]: any;
1702
+ };
1703
+ /**
1704
+ * Property bag to contain additional custom measurements (Part C)
1705
+ * @deprecated -- please use properties instead
1706
+ */
1707
+ measurements?: {
1708
+ [key: string]: number;
1709
+ };
1710
+ }
1711
+
1712
+ export declare interface IPropertiesPlugin {
1713
+ readonly context: ITelemetryContext;
1714
+ }
1715
+
1716
+ /**
1717
+ * An instance of Remote Dependency represents an interaction of the monitored component with a remote component/service like SQL or an HTTP endpoint.
1718
+ */
1719
+ declare interface IRemoteDependencyData extends IDomain {
1720
+ /**
1721
+ * Schema version
1722
+ */
1723
+ ver: number;
1724
+ /**
1725
+ * Name of the command initiated with this dependency call. Low cardinality value. Examples are stored procedure name and URL path template.
1726
+ */
1727
+ name: string;
1728
+ /**
1729
+ * Identifier of a dependency call instance. Used for correlation with the request telemetry item corresponding to this dependency call.
1730
+ */
1731
+ id: string;
1732
+ /**
1733
+ * Result code of a dependency call. Examples are SQL error code and HTTP status code.
1734
+ */
1735
+ resultCode: string;
1736
+ /**
1737
+ * Request duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000 days.
1738
+ */
1739
+ duration: string;
1740
+ /**
1741
+ * Indication of successful or unsuccessful call.
1742
+ */
1743
+ success: boolean;
1744
+ /**
1745
+ * Command initiated by this dependency call. Examples are SQL statement and HTTP URL's with all query parameters.
1746
+ */
1747
+ data: string;
1748
+ /**
1749
+ * Target site of a dependency call. Examples are server name, host address.
1750
+ */
1751
+ target: string;
1752
+ /**
1753
+ * Dependency type name. Very low cardinality value for logical grouping of dependencies and interpretation of other fields like commandName and resultCode. Examples are SQL, Azure table, and HTTP.
1754
+ */
1755
+ type: string;
1756
+ /**
1757
+ * Collection of custom properties.
1758
+ */
1759
+ properties: any;
1760
+ /**
1761
+ * Collection of custom measurements.
1762
+ */
1763
+ measurements: any;
1764
+ }
1765
+
1766
+ export declare interface IRequestContext {
1767
+ status?: number;
1768
+ xhr?: XMLHttpRequest;
1769
+ request?: Request;
1770
+ response?: Response | string;
1771
+ }
1772
+
1773
+ export declare interface IRequestHeaders {
1774
+ /**
1775
+ * Request-Context header
1776
+ */
1777
+ requestContextHeader: string;
1778
+ /**
1779
+ * Target instrumentation header that is added to the response and retrieved by the
1780
+ * calling application when processing incoming responses.
1781
+ */
1782
+ requestContextTargetKey: string;
1783
+ /**
1784
+ * Request-Context appId format
1785
+ */
1786
+ requestContextAppIdFormat: string;
1787
+ /**
1788
+ * Request-Id header
1789
+ */
1790
+ requestIdHeader: string;
1791
+ /**
1792
+ * W3C distributed tracing protocol header
1793
+ */
1794
+ traceParentHeader: string;
1795
+ /**
1796
+ * W3C distributed tracing protocol state header
1797
+ */
1798
+ traceStateHeader: string;
1799
+ /**
1800
+ * Sdk-Context header
1801
+ * If this header passed with appId in content then appId will be returned back by the backend.
1802
+ */
1803
+ sdkContextHeader: string;
1804
+ /**
1805
+ * String to pass in header for requesting appId back from the backend.
1806
+ */
1807
+ sdkContextHeaderAppIdRequest: string;
1808
+ requestContextHeaderLowerCase: string;
1809
+ }
1810
+
1811
+ export declare interface ISample {
1812
+ /**
1813
+ * Sample rate
1814
+ */
1815
+ sampleRate: number;
1816
+ isSampledIn(envelope: ITelemetryItem): boolean;
1817
+ }
1818
+
1819
+ export { isBeaconApiSupported }
1820
+
1821
+ export declare function isCrossOriginError(message: string | Event, url: string, lineNumber: number, columnNumber: number, error: Error | Event): boolean;
1822
+
1823
+ export declare interface ISerializable {
1824
+ /**
1825
+ * The set of fields for a serializable object.
1826
+ * This defines the serialization order and a value of true/false
1827
+ * for each field defines whether the field is required or not.
1828
+ */
1829
+ aiDataContract: any;
1830
+ }
1831
+
1832
+ export declare interface ISession {
1833
+ /**
1834
+ * The session ID.
1835
+ */
1836
+ id?: string;
1837
+ /**
1838
+ * The date at which this guid was genereated.
1839
+ * Per the spec the ID will be regenerated if more than acquisitionSpan milliseconds ellapse from this time.
1840
+ */
1841
+ acquisitionDate?: number;
1842
+ /**
1843
+ * The date at which this session ID was last reported.
1844
+ * This value should be updated whenever telemetry is sent using this ID.
1845
+ * Per the spec the ID will be regenerated if more than renewalSpan milliseconds elapse from this time with no activity.
1846
+ */
1847
+ renewalDate?: number;
1848
+ }
1849
+
1850
+ export declare function isInternalApplicationInsightsEndpoint(endpointUrl: string): boolean;
1851
+
1852
+ export { isSampledFlag }
1853
+
1854
+ declare interface IStackDetails {
1855
+ src: string;
1856
+ obj: string[];
1857
+ }
1858
+
1859
+ /**
1860
+ * Stack frame information.
1861
+ */
1862
+ declare interface IStackFrame {
1863
+ /**
1864
+ * Level in the call stack. For the long stacks SDK may not report every function in a call stack.
1865
+ */
1866
+ level: number;
1867
+ /**
1868
+ * Method name.
1869
+ */
1870
+ method: string;
1871
+ /**
1872
+ * Name of the assembly (dll, jar, etc.) containing this function.
1873
+ */
1874
+ assembly: string;
1875
+ /**
1876
+ * File name or URL of the method implementation.
1877
+ */
1878
+ fileName: string;
1879
+ /**
1880
+ * Line number of the code implementation.
1881
+ */
1882
+ line: number;
1883
+ }
1884
+
1885
+ export { isValidSpanId }
1886
+
1887
+ export { isValidTraceId }
1888
+
1889
+ export { isValidTraceParent }
1890
+
1891
+ export declare interface ITelemetryContext {
1892
+ /**
1893
+ * The object describing a component tracked by this object.
1894
+ */
1895
+ readonly application: IApplication;
1896
+ /**
1897
+ * The object describing a device tracked by this object.
1898
+ */
1899
+ readonly device: IDevice;
1900
+ /**
1901
+ * The object describing internal settings.
1902
+ */
1903
+ readonly internal: IInternal;
1904
+ /**
1905
+ * The object describing a location tracked by this object.
1906
+ */
1907
+ readonly location: ILocation;
1908
+ /**
1909
+ * The object describing a operation tracked by this object.
1910
+ */
1911
+ readonly telemetryTrace: ITelemetryTrace;
1912
+ /**
1913
+ * The object describing a user tracked by this object.
1914
+ */
1915
+ readonly user: IUserContext;
1916
+ /**
1917
+ * The object describing a session tracked by this object.
1918
+ */
1919
+ readonly session: ISession;
1920
+ /**
1921
+ * The object describing os details tracked by this object.
1922
+ */
1923
+ readonly os?: IOperatingSystem;
1924
+ /**
1925
+ * The object describing we details tracked by this object.
1926
+ */
1927
+ readonly web?: IWeb;
1928
+ /**
1929
+ * application id obtained from breeze responses. Is used if appId is not specified by root config
1930
+ */
1931
+ appId: () => string;
1932
+ /**
1933
+ * session id obtained from session manager.
1934
+ */
1935
+ getSessionId: () => string;
1936
+ }
1937
+
1938
+ export declare interface ITelemetryTrace {
1939
+ /**
1940
+ * Trace id
1941
+ */
1942
+ traceID?: string;
1943
+ /**
1944
+ * Parent id
1945
+ */
1946
+ parentID?: string;
1947
+ /**
1948
+ * @deprecated Never Used
1949
+ * Trace state
1950
+ */
1951
+ traceState?: ITraceState;
1952
+ /**
1953
+ * An integer representation of the W3C TraceContext trace-flags. https://www.w3.org/TR/trace-context/#trace-flags
1954
+ */
1955
+ traceFlags?: number;
1956
+ /**
1957
+ * Name
1958
+ */
1959
+ name?: string;
1960
+ }
1961
+
1962
+ /**
1963
+ * Identifies frequency of items sent
1964
+ * Default: send data on 28th every 3 month each year
1965
+ */
1966
+ export declare interface IThrottleInterval {
1967
+ /**
1968
+ * Identifies month interval that items can be sent
1969
+ * For example, if it is set to 2 and start date is in Jan, items will be sent out every two months (Jan, March, May etc.)
1970
+ * If both monthInterval and dayInterval are undefined, it will be set to 3
1971
+ */
1972
+ monthInterval?: number;
1973
+ /**
1974
+ * Identifies days Interval from start date that items can be sent
1975
+ * Default: undefined
1976
+ */
1977
+ dayInterval?: number;
1978
+ /**
1979
+ * Identifies days within each month that items can be sent
1980
+ * If both monthInterval and dayInterval are undefined, it will be default to [28]
1981
+ */
1982
+ daysOfMonth?: number[];
1983
+ }
1984
+
1985
+ /**
1986
+ * Identifies limit number/percentage of items sent per time
1987
+ * If both are provided, minimum number between the two will be used
1988
+ */
1989
+ export declare interface IThrottleLimit {
1990
+ /**
1991
+ * Identifies sampling percentage of items per time
1992
+ * The percentage is set to 4 decimal places, for example: 1 means 0.0001%
1993
+ * Default: 100 (0.01%)
1994
+ */
1995
+ samplingRate?: number;
1996
+ /**
1997
+ * Identifies limit number of items per time
1998
+ * Default: 1
1999
+ */
2000
+ maxSendNumber?: number;
2001
+ }
2002
+
2003
+ /**
2004
+ * Identifies object for local storage
2005
+ */
2006
+ export declare interface IThrottleLocalStorageObj {
2007
+ /**
2008
+ * Identifies start date
2009
+ */
2010
+ date: Date;
2011
+ /**
2012
+ * Identifies current count
2013
+ */
2014
+ count: number;
2015
+ /**
2016
+ * identifies previous triggered throttle date
2017
+ */
2018
+ preTriggerDate?: Date;
2019
+ }
2020
+
2021
+ /**
2022
+ * Identifies basic config
2023
+ */
2024
+ export declare interface IThrottleMgrConfig {
2025
+ /**
2026
+ * Identifies message key to be used for local storage key
2027
+ * Default: IThrottleMsgKey.default
2028
+ */
2029
+ msgKey?: IThrottleMsgKey;
2030
+ /**
2031
+ * Identifies if throttle is disabled
2032
+ * Default: false
2033
+ */
2034
+ disabled?: boolean;
2035
+ /**
2036
+ * Identifies limit number/percentage of items sent per time
2037
+ * Default: sampling percentage 0.01% with one item sent per time
2038
+ */
2039
+ limit?: IThrottleLimit;
2040
+ /**
2041
+ * Identifies frequency of items sent
2042
+ * Default: send data on 28th every 3 month each year
2043
+ */
2044
+ interval?: IThrottleInterval;
2045
+ }
2046
+
2047
+ export declare const enum IThrottleMsgKey {
2048
+ /**
2049
+ * Default Message key for non pre-defined message
2050
+ */
2051
+ default = 0,
2052
+ /**
2053
+ * Message key for ikey Deprecation
2054
+ */
2055
+ ikeyDeprecate = 1,
2056
+ /**
2057
+ * Message key for cdn Deprecation
2058
+ */
2059
+ cdnDeprecate = 2
2060
+ }
2061
+
2062
+ /**
2063
+ * Identifies throttle result
2064
+ */
2065
+ export declare interface IThrottleResult {
2066
+ /**
2067
+ * Identifies if items are sent
2068
+ */
2069
+ isThrottled: boolean;
2070
+ /**
2071
+ * Identifies numbers of items are sent
2072
+ * if isThrottled is false, it will be set to 0
2073
+ */
2074
+ throttleNum: number;
2075
+ }
2076
+
2077
+ export { ITraceParent }
2078
+
2079
+ export declare interface ITraceState {
2080
+ }
2081
+
2082
+ export declare interface ITraceTelemetry extends IPartC {
2083
+ /**
2084
+ * @description A message string
2085
+ * @type {string}
2086
+ * @memberof ITraceTelemetry
2087
+ */
2088
+ message: string;
2089
+ /**
2090
+ * @description Severity level of the logging message used for filtering in the portal
2091
+ * @type {SeverityLevel}
2092
+ * @memberof ITraceTelemetry
2093
+ */
2094
+ severityLevel?: SeverityLevel;
2095
+ /**
2096
+ * @description custom defiend iKey
2097
+ * @type {SeverityLevel}
2098
+ * @memberof ITraceTelemetry
2099
+ */
2100
+ iKey?: string;
2101
+ }
2102
+
2103
+ export declare interface IUser {
2104
+ /**
2105
+ * The telemetry configuration.
2106
+ */
2107
+ config: any;
2108
+ /**
2109
+ * The user ID.
2110
+ */
2111
+ id: string;
2112
+ /**
2113
+ * Authenticated user id
2114
+ */
2115
+ authenticatedId: string;
2116
+ /**
2117
+ * The account ID.
2118
+ */
2119
+ accountId: string;
2120
+ /**
2121
+ * The account acquisition date.
2122
+ */
2123
+ accountAcquisitionDate: string;
2124
+ /**
2125
+ * The localId
2126
+ */
2127
+ localId: string;
2128
+ /**
2129
+ * A flag indicating whether this represents a new user
2130
+ */
2131
+ isNewUser?: boolean;
2132
+ /**
2133
+ * A flag indicating whether the user cookie has been set
2134
+ */
2135
+ isUserCookieSet?: boolean;
2136
+ }
2137
+
2138
+ export declare interface IUserContext extends IUser {
2139
+ setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string, storeInCookie?: boolean): void;
2140
+ clearAuthenticatedUserContext(): void;
2141
+ update(userId?: string): void;
2142
+ }
2143
+
2144
+ export declare interface IWeb {
2145
+ /**
2146
+ * Browser name, set at ingestion
2147
+ */
2148
+ browser: string;
2149
+ /**
2150
+ * Browser ver, set at ingestion.
2151
+ */
2152
+ browserVer: string;
2153
+ /**
2154
+ * Language
2155
+ */
2156
+ browserLang: string;
2157
+ /**
2158
+ * User consent, populated to properties bag
2159
+ */
2160
+ userConsent: boolean;
2161
+ /**
2162
+ * Whether event was fired manually, populated to properties bag
2163
+ */
2164
+ isManual: boolean;
2165
+ /**
2166
+ * Screen resolution, populated to properties bag
2167
+ */
2168
+ screenRes: string;
2169
+ /**
2170
+ * Current domain. Leverages Window.location.hostname. populated to properties bag
2171
+ */
2172
+ domain: string;
2173
+ }
2174
+
2175
+ export declare class Metric implements IMetricData, ISerializable {
2176
+ static envelopeType: string;
2177
+ static dataType: string;
2178
+ aiDataContract: {
2179
+ ver: FieldType;
2180
+ metrics: FieldType;
2181
+ properties: FieldType;
2182
+ };
2183
+ /**
2184
+ * Schema version
2185
+ */
2186
+ ver: number;
2187
+ /**
2188
+ * List of metrics. Only one metric in the list is currently supported by Application Insights storage. If multiple data points were sent only the first one will be used.
2189
+ */
2190
+ metrics: DataPoint[];
2191
+ /**
2192
+ * Collection of custom properties.
2193
+ */
2194
+ properties: any;
2195
+ /**
2196
+ * Collection of custom measurements.
2197
+ */
2198
+ measurements: any;
2199
+ /**
2200
+ * Constructs a new instance of the MetricTelemetry object
2201
+ */
2202
+ constructor(logger: IDiagnosticLogger, name: string, value: number, count?: number, min?: number, max?: number, stdDev?: number, properties?: any, measurements?: {
2203
+ [key: string]: number;
2204
+ });
2205
+ }
2206
+
2207
+ /**
2208
+ * Convert ms to c# time span format
2209
+ */
2210
+ export declare function msToTimeSpan(totalms: number): string;
2211
+
2212
+ export declare class PageView implements IPageViewData, ISerializable {
2213
+ static envelopeType: string;
2214
+ static dataType: string;
2215
+ aiDataContract: {
2216
+ ver: FieldType;
2217
+ name: FieldType;
2218
+ url: FieldType;
2219
+ duration: FieldType;
2220
+ properties: FieldType;
2221
+ measurements: FieldType;
2222
+ id: FieldType;
2223
+ };
2224
+ /**
2225
+ * Schema version
2226
+ */
2227
+ ver: number;
2228
+ /**
2229
+ * Event name. Keep it low cardinality to allow proper grouping and useful metrics.
2230
+ */
2231
+ name: string;
2232
+ /**
2233
+ * Collection of custom properties.
2234
+ */
2235
+ properties: any;
2236
+ /**
2237
+ * Collection of custom measurements.
2238
+ */
2239
+ measurements: any;
2240
+ /**
2241
+ * Request URL with all query string parameters
2242
+ */
2243
+ url: string;
2244
+ /**
2245
+ * Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view (PageViewData), this is the duration. For a page view with performance information (PageViewPerfData), this is the page load time. Must be less than 1000 days.
2246
+ */
2247
+ duration: string;
2248
+ /**
2249
+ * Identifier of a page view instance. Used for correlation between page view and other telemetry items.
2250
+ */
2251
+ id: string;
2252
+ /**
2253
+ * Constructs a new instance of the PageEventTelemetry object
2254
+ */
2255
+ constructor(logger: IDiagnosticLogger, name?: string, url?: string, durationMs?: number, properties?: {
2256
+ [key: string]: string;
2257
+ }, measurements?: {
2258
+ [key: string]: number;
2259
+ }, id?: string);
2260
+ }
2261
+
2262
+ export declare class PageViewPerformance implements IPageViewPerfData, ISerializable {
2263
+ static envelopeType: string;
2264
+ static dataType: string;
2265
+ aiDataContract: {
2266
+ ver: FieldType;
2267
+ name: FieldType;
2268
+ url: FieldType;
2269
+ duration: FieldType;
2270
+ perfTotal: FieldType;
2271
+ networkConnect: FieldType;
2272
+ sentRequest: FieldType;
2273
+ receivedResponse: FieldType;
2274
+ domProcessing: FieldType;
2275
+ properties: FieldType;
2276
+ measurements: FieldType;
2277
+ };
2278
+ /**
2279
+ * Schema version
2280
+ */
2281
+ ver: number;
2282
+ /**
2283
+ * Event name. Keep it low cardinality to allow proper grouping and useful metrics.
2284
+ */
2285
+ name: string;
2286
+ /**
2287
+ * Collection of custom properties.
2288
+ */
2289
+ properties: any;
2290
+ /**
2291
+ * Collection of custom measurements.
2292
+ */
2293
+ measurements: any;
2294
+ /**
2295
+ * Request URL with all query string parameters
2296
+ */
2297
+ url: string;
2298
+ /**
2299
+ * Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view (PageViewData), this is the duration. For a page view with performance information (PageViewPerfData), this is the page load time. Must be less than 1000 days.
2300
+ */
2301
+ duration: string;
2302
+ /**
2303
+ * Identifier of a page view instance. Used for correlation between page view and other telemetry items.
2304
+ */
2305
+ id: string;
2306
+ /**
2307
+ * Performance total in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
2308
+ */
2309
+ perfTotal: string;
2310
+ /**
2311
+ * Network connection time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
2312
+ */
2313
+ networkConnect: string;
2314
+ /**
2315
+ * Sent request time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
2316
+ */
2317
+ sentRequest: string;
2318
+ /**
2319
+ * Received response time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
2320
+ */
2321
+ receivedResponse: string;
2322
+ /**
2323
+ * DOM processing time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
2324
+ */
2325
+ domProcessing: string;
2326
+ /**
2327
+ * Constructs a new instance of the PageEventTelemetry object
2328
+ */
2329
+ constructor(logger: IDiagnosticLogger, name: string, url: string, unused: number, properties?: {
2330
+ [key: string]: string;
2331
+ }, measurements?: {
2332
+ [key: string]: number;
2333
+ }, cs4BaseData?: IPageViewPerformanceTelemetry);
2334
+ }
2335
+
2336
+ export declare function parseConnectionString(connectionString?: string): ConnectionString;
2337
+
2338
+ export { parseTraceParent }
2339
+
2340
+ export declare const ProcessLegacy = "ProcessLegacy";
2341
+
2342
+ export declare const PropertiesPluginIdentifier = "AppInsightsPropertiesPlugin";
2343
+
2344
+ export declare class RemoteDependencyData implements IRemoteDependencyData, ISerializable {
2345
+ static envelopeType: string;
2346
+ static dataType: string;
2347
+ aiDataContract: {
2348
+ id: FieldType;
2349
+ ver: FieldType;
2350
+ name: FieldType;
2351
+ resultCode: FieldType;
2352
+ duration: FieldType;
2353
+ success: FieldType;
2354
+ data: FieldType;
2355
+ target: FieldType;
2356
+ type: FieldType;
2357
+ properties: FieldType;
2358
+ measurements: FieldType;
2359
+ kind: FieldType;
2360
+ value: FieldType;
2361
+ count: FieldType;
2362
+ min: FieldType;
2363
+ max: FieldType;
2364
+ stdDev: FieldType;
2365
+ dependencyKind: FieldType;
2366
+ dependencySource: FieldType;
2367
+ commandName: FieldType;
2368
+ dependencyTypeName: FieldType;
2369
+ };
2370
+ /**
2371
+ * Schema version
2372
+ */
2373
+ ver: number;
2374
+ /**
2375
+ * Name of the command initiated with this dependency call. Low cardinality value. Examples are stored procedure name and URL path template.
2376
+ */
2377
+ name: string;
2378
+ /**
2379
+ * Identifier of a dependency call instance. Used for correlation with the request telemetry item corresponding to this dependency call.
2380
+ */
2381
+ id: string;
2382
+ /**
2383
+ * Result code of a dependency call. Examples are SQL error code and HTTP status code.
2384
+ */
2385
+ resultCode: string;
2386
+ /**
2387
+ * Request duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000 days.
2388
+ */
2389
+ duration: string;
2390
+ /**
2391
+ * Indication of successful or unsuccessful call.
2392
+ */
2393
+ success: boolean;
2394
+ /**
2395
+ * Command initiated by this dependency call. Examples are SQL statement and HTTP URL's with all query parameters.
2396
+ */
2397
+ data: string;
2398
+ /**
2399
+ * Target site of a dependency call. Examples are server name, host address.
2400
+ */
2401
+ target: string;
2402
+ /**
2403
+ * Dependency type name. Very low cardinality value for logical grouping of dependencies and interpretation of other fields like commandName and resultCode. Examples are SQL, Azure table, and HTTP.
2404
+ */
2405
+ type: string;
2406
+ /**
2407
+ * Collection of custom properties.
2408
+ */
2409
+ properties: any;
2410
+ /**
2411
+ * Collection of custom measurements.
2412
+ */
2413
+ measurements: any;
2414
+ /**
2415
+ * Constructs a new instance of the RemoteDependencyData object
2416
+ */
2417
+ constructor(logger: IDiagnosticLogger, id: string, absoluteUrl: string, commandName: string, value: number, success: boolean, resultCode: number, method?: string, requestAPI?: string, correlationContext?: string, properties?: Object, measurements?: Object);
2418
+ }
2419
+
2420
+ export declare const RequestHeaders: IRequestHeaders & {
2421
+ requestContextHeader: "Request-Context";
2422
+ requestContextTargetKey: "appId";
2423
+ requestContextAppIdFormat: "appId=cid-v1:";
2424
+ requestIdHeader: "Request-Id";
2425
+ traceParentHeader: "traceparent";
2426
+ traceStateHeader: "tracestate";
2427
+ sdkContextHeader: "Sdk-Context";
2428
+ sdkContextHeaderAppIdRequest: "appId";
2429
+ requestContextHeaderLowerCase: "request-context";
2430
+ 0: "Request-Context";
2431
+ 1: "appId";
2432
+ 2: "appId=cid-v1:";
2433
+ 3: "Request-Id";
2434
+ 4: "traceparent";
2435
+ 5: "tracestate";
2436
+ 6: "Sdk-Context";
2437
+ 7: "appId";
2438
+ 8: "request-context";
2439
+ };
2440
+
2441
+ export declare const SampleRate = "sampleRate";
2442
+
2443
+ /**
2444
+ * Defines the level of severity for the event.
2445
+ */
2446
+ export declare const SeverityLevel: EnumValue<typeof eSeverityLevel>;
2447
+
2448
+ export declare type SeverityLevel = number | eSeverityLevel;
2449
+
2450
+ export declare function stringToBoolOrDefault(str: any, defaultValue?: boolean): boolean;
2451
+
2452
+ export declare const strNotSpecified = "not_specified";
2453
+
2454
+ export declare class TelemetryItemCreator {
2455
+ /**
2456
+ * Create a telemetry item that the 1DS channel understands
2457
+ * @param item - domain specific properties; part B
2458
+ * @param baseType - telemetry item type. ie PageViewData
2459
+ * @param envelopeName - name of the envelope. ie Microsoft.ApplicationInsights.<instrumentation key>.PageView
2460
+ * @param customProperties - user defined custom properties; part C
2461
+ * @param systemProperties - system properties that are added to the context; part A
2462
+ * @returns ITelemetryItem that is sent to channel
2463
+ */
2464
+ static create: typeof createTelemetryItem;
2465
+ }
2466
+
2467
+ export declare class ThrottleMgr {
2468
+ canThrottle: () => boolean;
2469
+ sendMessage: (msgID: _eInternalMessageId, message: string, severity?: eLoggingSeverity) => IThrottleResult | null;
2470
+ getConfig: () => IThrottleMgrConfig;
2471
+ isTriggered: () => boolean;
2472
+ isReady: () => boolean;
2473
+ onReadyState: (isReady?: boolean) => boolean;
2474
+ flush: () => boolean;
2475
+ config: IThrottleMgrConfig;
2476
+ constructor(config?: IThrottleMgrConfig, core?: IAppInsightsCore, namePrefix?: string, unloadHookContainer?: IUnloadHookContainer);
2477
+ }
2478
+
2479
+ export declare class Trace implements IMessageData, ISerializable {
2480
+ static envelopeType: string;
2481
+ static dataType: string;
2482
+ aiDataContract: {
2483
+ ver: FieldType;
2484
+ message: FieldType;
2485
+ severityLevel: FieldType;
2486
+ properties: FieldType;
2487
+ };
2488
+ /**
2489
+ * Schema version
2490
+ */
2491
+ ver: number;
2492
+ /**
2493
+ * Trace message
2494
+ */
2495
+ message: string;
2496
+ /**
2497
+ * Trace severity level.
2498
+ */
2499
+ severityLevel: SeverityLevel;
2500
+ /**
2501
+ * Collection of custom properties.
2502
+ */
2503
+ properties: any;
2504
+ /**
2505
+ * Collection of custom measurements.
2506
+ */
2507
+ measurements: any;
2508
+ /**
2509
+ * Constructs a new instance of the TraceTelemetry object
2510
+ */
2511
+ constructor(logger: IDiagnosticLogger, message: string, severityLevel?: SeverityLevel, properties?: any, measurements?: {
2512
+ [key: string]: number;
2513
+ });
2514
+ }
2515
+
2516
+ export declare function urlGetAbsoluteUrl(url: string): string;
2517
+
2518
+ export declare function urlGetCompleteUrl(method: string, absoluteUrl: string): string;
2519
+
2520
+ export declare function urlGetPathName(url: string): string;
2521
+
2522
+ export declare function urlParseFullHost(url: string, inclPort?: boolean): string;
2523
+
2524
+ export declare function urlParseHost(url: string, inclPort?: boolean): string;
2525
+
2526
+ export declare function urlParseUrl(url: string): HTMLAnchorElement;
2527
+
2528
+ /**
2529
+ * Returns whether LocalStorage can be used, if the reset parameter is passed a true this will override
2530
+ * any previous disable calls.
2531
+ * @param reset - Should the usage be reset and determined only based on whether LocalStorage is available
2532
+ */
2533
+ export declare function utlCanUseLocalStorage(reset?: boolean): boolean;
2534
+
2535
+ export declare function utlCanUseSessionStorage(reset?: boolean): boolean;
2536
+
2537
+ /**
2538
+ * Disables the global SDK usage of local or session storage if available
2539
+ */
2540
+ export declare function utlDisableStorage(): void;
2541
+
2542
+ /**
2543
+ * Re-enables the global SDK usage of local or session storage if available
2544
+ */
2545
+ export declare function utlEnableStorage(): void;
2546
+
2547
+ export declare function utlGetLocalStorage(logger: IDiagnosticLogger, name: string): string;
2548
+
2549
+ export declare function utlGetSessionStorage(logger: IDiagnosticLogger, name: string): string;
2550
+
2551
+ export declare function utlGetSessionStorageKeys(): string[];
2552
+
2553
+ export declare function utlRemoveSessionStorage(logger: IDiagnosticLogger, name: string): boolean;
2554
+
2555
+ export declare function utlRemoveStorage(logger: IDiagnosticLogger, name: string): boolean;
2556
+
2557
+ export declare function utlSetLocalStorage(logger: IDiagnosticLogger, name: string, data: string): boolean;
2558
+
2559
+ export declare function utlSetSessionStorage(logger: IDiagnosticLogger, name: string, data: string): boolean;
2560
+
2561
+ export { }