@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,223 +0,0 @@
1
- // Copyright (c) Microsoft Corporation. All rights reserved.
2
- // Licensed under the MIT License.
3
-
4
- import {
5
- IDiagnosticLogger, _eInternalMessageId, _throwInternal, dumpObj, eLoggingSeverity, getExceptionName, getGlobal, getGlobalInst,
6
- isNullOrUndefined, objForEachKey
7
- } from "@microsoft/applicationinsights-core-js";
8
- import { StorageType } from "./Enums";
9
-
10
- let _canUseLocalStorage: boolean = undefined;
11
- let _canUseSessionStorage: boolean = undefined;
12
-
13
- /**
14
- * Gets the localStorage object if available
15
- * @return {Storage} - Returns the storage object if available else returns null
16
- */
17
- function _getLocalStorageObject(): Storage {
18
- if (utlCanUseLocalStorage()) {
19
- return _getVerifiedStorageObject(StorageType.LocalStorage);
20
- }
21
-
22
- return null;
23
- }
24
-
25
- /**
26
- * Tests storage object (localStorage or sessionStorage) to verify that it is usable
27
- * More details here: https://mathiasbynens.be/notes/localstorage-pattern
28
- * @param storageType - Type of storage
29
- * @return {Storage} Returns storage object verified that it is usable
30
- */
31
- function _getVerifiedStorageObject(storageType: StorageType): Storage {
32
- try {
33
- if (isNullOrUndefined(getGlobal())) {
34
- return null;
35
- }
36
- let uid = (new Date).toString();
37
- let storage: Storage = getGlobalInst(storageType === StorageType.LocalStorage ? "localStorage" : "sessionStorage");
38
- storage.setItem(uid, uid);
39
- let fail = storage.getItem(uid) !== uid;
40
- storage.removeItem(uid);
41
- if (!fail) {
42
- return storage;
43
- }
44
- } catch (exception) {
45
- // eslint-disable-next-line no-empty
46
- }
47
-
48
- return null;
49
- }
50
-
51
- /**
52
- * Gets the sessionStorage object if available
53
- * @return {Storage} - Returns the storage object if available else returns null
54
- */
55
- function _getSessionStorageObject(): Storage {
56
- if (utlCanUseSessionStorage()) {
57
- return _getVerifiedStorageObject(StorageType.SessionStorage);
58
- }
59
-
60
- return null;
61
- }
62
-
63
- /**
64
- * Disables the global SDK usage of local or session storage if available
65
- */
66
- export function utlDisableStorage() {
67
- _canUseLocalStorage = false;
68
- _canUseSessionStorage = false;
69
- }
70
-
71
- /**
72
- * Re-enables the global SDK usage of local or session storage if available
73
- */
74
- export function utlEnableStorage() {
75
- _canUseLocalStorage = utlCanUseLocalStorage(true);
76
- _canUseSessionStorage = utlCanUseSessionStorage(true);
77
- }
78
-
79
- /**
80
- * Returns whether LocalStorage can be used, if the reset parameter is passed a true this will override
81
- * any previous disable calls.
82
- * @param reset - Should the usage be reset and determined only based on whether LocalStorage is available
83
- */
84
- export function utlCanUseLocalStorage(reset?: boolean): boolean {
85
- if (reset || _canUseLocalStorage === undefined) {
86
- _canUseLocalStorage = !!_getVerifiedStorageObject(StorageType.LocalStorage);
87
- }
88
-
89
- return _canUseLocalStorage;
90
- }
91
-
92
- export function utlGetLocalStorage(logger: IDiagnosticLogger, name: string): string {
93
- const storage = _getLocalStorageObject();
94
- if (storage !== null) {
95
- try {
96
- return storage.getItem(name);
97
- } catch (e) {
98
- _canUseLocalStorage = false;
99
-
100
- _throwInternal(logger,
101
- eLoggingSeverity.WARNING,
102
- _eInternalMessageId.BrowserCannotReadLocalStorage,
103
- "Browser failed read of local storage. " + getExceptionName(e),
104
- { exception: dumpObj(e) });
105
- }
106
- }
107
- return null;
108
- }
109
-
110
- export function utlSetLocalStorage(logger: IDiagnosticLogger, name: string, data: string): boolean {
111
- const storage = _getLocalStorageObject();
112
- if (storage !== null) {
113
- try {
114
- storage.setItem(name, data);
115
- return true;
116
- } catch (e) {
117
- _canUseLocalStorage = false;
118
-
119
- _throwInternal(logger,
120
- eLoggingSeverity.WARNING,
121
- _eInternalMessageId.BrowserCannotWriteLocalStorage,
122
- "Browser failed write to local storage. " + getExceptionName(e),
123
- { exception: dumpObj(e) });
124
- }
125
- }
126
- return false;
127
- }
128
-
129
- export function utlRemoveStorage(logger: IDiagnosticLogger, name: string): boolean {
130
- const storage = _getLocalStorageObject();
131
- if (storage !== null) {
132
- try {
133
- storage.removeItem(name);
134
- return true;
135
- } catch (e) {
136
- _canUseLocalStorage = false;
137
-
138
- _throwInternal(logger,
139
- eLoggingSeverity.WARNING,
140
- _eInternalMessageId.BrowserFailedRemovalFromLocalStorage,
141
- "Browser failed removal of local storage item. " + getExceptionName(e),
142
- { exception: dumpObj(e) });
143
- }
144
- }
145
- return false;
146
- }
147
-
148
- export function utlCanUseSessionStorage(reset?: boolean): boolean {
149
- if (reset || _canUseSessionStorage === undefined) {
150
- _canUseSessionStorage = !!_getVerifiedStorageObject(StorageType.SessionStorage);
151
- }
152
-
153
- return _canUseSessionStorage;
154
- }
155
-
156
- export function utlGetSessionStorageKeys(): string[] {
157
- const keys: string[] = [];
158
-
159
- if (utlCanUseSessionStorage()) {
160
- objForEachKey(getGlobalInst<any>("sessionStorage"), (key) => {
161
- keys.push(key);
162
- });
163
- }
164
-
165
- return keys;
166
- }
167
-
168
- export function utlGetSessionStorage(logger: IDiagnosticLogger, name: string): string {
169
- const storage = _getSessionStorageObject();
170
- if (storage !== null) {
171
- try {
172
- return storage.getItem(name);
173
- } catch (e) {
174
- _canUseSessionStorage = false;
175
-
176
- _throwInternal(logger,
177
- eLoggingSeverity.WARNING,
178
- _eInternalMessageId.BrowserCannotReadSessionStorage,
179
- "Browser failed read of session storage. " + getExceptionName(e),
180
- { exception: dumpObj(e) });
181
- }
182
- }
183
- return null;
184
- }
185
-
186
- export function utlSetSessionStorage(logger: IDiagnosticLogger, name: string, data: string): boolean {
187
- const storage = _getSessionStorageObject();
188
- if (storage !== null) {
189
- try {
190
- storage.setItem(name, data);
191
- return true;
192
- } catch (e) {
193
- _canUseSessionStorage = false;
194
-
195
- _throwInternal(logger,
196
- eLoggingSeverity.WARNING,
197
- _eInternalMessageId.BrowserCannotWriteSessionStorage,
198
- "Browser failed write to session storage. " + getExceptionName(e),
199
- { exception: dumpObj(e) });
200
- }
201
- }
202
- return false;
203
- }
204
-
205
- export function utlRemoveSessionStorage(logger: IDiagnosticLogger, name: string): boolean {
206
- const storage = _getSessionStorageObject();
207
- if (storage !== null) {
208
- try {
209
- storage.removeItem(name);
210
- return true;
211
- } catch (e) {
212
- _canUseSessionStorage = false;
213
-
214
- _throwInternal(logger,
215
- eLoggingSeverity.WARNING,
216
- _eInternalMessageId.BrowserFailedRemovalFromSessionStorage,
217
- "Browser failed removal of session storage item. " + getExceptionName(e),
218
- { exception: dumpObj(e) });
219
- }
220
- }
221
-
222
- return false;
223
- }
@@ -1,35 +0,0 @@
1
- // Copyright (c) Microsoft Corporation. All rights reserved.
2
- // Licensed under the MIT License.
3
-
4
- import { IData } from "../../Interfaces/Contracts/IData";
5
- import { ISerializable } from "../../Interfaces/Telemetry/ISerializable";
6
- import { FieldType } from "../../Enums";
7
-
8
- export class Data<TDomain> implements IData<TDomain>, ISerializable {
9
-
10
- /**
11
- * The data contract for serializing this object.
12
- */
13
- public aiDataContract = {
14
- baseType: FieldType.Required,
15
- baseData: FieldType.Required
16
- }
17
-
18
- /**
19
- * Name of item (B section) if any. If telemetry data is derived straight from this, this should be null.
20
- */
21
- public baseType: string;
22
-
23
- /**
24
- * Container for data item (B section).
25
- */
26
- public baseData: TDomain;
27
-
28
- /**
29
- * Constructs a new instance of telemetry data.
30
- */
31
- constructor(baseType: string, data: TDomain) {
32
- this.baseType = baseType;
33
- this.baseData = data;
34
- }
35
- }
@@ -1,58 +0,0 @@
1
- // Copyright (c) Microsoft Corporation. All rights reserved.
2
- // Licensed under the MIT License.
3
-
4
- import { FieldType } from "../../Enums";
5
- import { DataPointType } from "../../Interfaces/Contracts/DataPointType";
6
- import { IDataPoint } from "../../Interfaces/Contracts/IDataPoint";
7
- import { ISerializable } from "../../Interfaces/Telemetry/ISerializable";
8
-
9
- export class DataPoint implements IDataPoint, ISerializable {
10
-
11
- /**
12
- * The data contract for serializing this object.
13
- */
14
- public aiDataContract = {
15
- name: FieldType.Required,
16
- kind: FieldType.Default,
17
- value: FieldType.Required,
18
- count: FieldType.Default,
19
- min: FieldType.Default,
20
- max: FieldType.Default,
21
- stdDev: FieldType.Default
22
- }
23
-
24
- /**
25
- * Name of the metric.
26
- */
27
- public name: string;
28
-
29
- /**
30
- * Metric type. Single measurement or the aggregated value.
31
- */
32
- public kind: DataPointType = DataPointType.Measurement;
33
-
34
- /**
35
- * Single value for measurement. Sum of individual measurements for the aggregation.
36
- */
37
- public value: number;
38
-
39
- /**
40
- * Metric weight of the aggregated metric. Should not be set for a measurement.
41
- */
42
- public count: number;
43
-
44
- /**
45
- * Minimum value of the aggregated metric. Should not be set for a measurement.
46
- */
47
- public min: number;
48
-
49
- /**
50
- * Maximum value of the aggregated metric. Should not be set for a measurement.
51
- */
52
- public max: number;
53
-
54
- /**
55
- * Standard deviation of the aggregated metric. Should not be set for a measurement.
56
- */
57
- public stdDev: number;
58
- }
@@ -1,197 +0,0 @@
1
- // Copyright (c) Microsoft Corporation. All rights reserved.
2
- // Licensed under the MIT License.
3
-
4
- import {
5
- IDiagnosticLogger, _eInternalMessageId, _throwInternal, eLoggingSeverity, getJSON, hasJSON, isObject, objForEachKey, strTrim
6
- } from "@microsoft/applicationinsights-core-js";
7
-
8
- export const enum DataSanitizerValues {
9
- /**
10
- * Max length allowed for custom names.
11
- */
12
- MAX_NAME_LENGTH = 150,
13
-
14
- /**
15
- * Max length allowed for Id field in page views.
16
- */
17
- MAX_ID_LENGTH = 128,
18
-
19
- /**
20
- * Max length allowed for custom values.
21
- */
22
- MAX_PROPERTY_LENGTH = 8192,
23
-
24
- /**
25
- * Max length allowed for names
26
- */
27
- MAX_STRING_LENGTH = 1024,
28
-
29
- /**
30
- * Max length allowed for url.
31
- */
32
- MAX_URL_LENGTH = 2048,
33
-
34
- /**
35
- * Max length allowed for messages.
36
- */
37
- MAX_MESSAGE_LENGTH = 32768,
38
-
39
- /**
40
- * Max length allowed for exceptions.
41
- */
42
- MAX_EXCEPTION_LENGTH = 32768
43
- }
44
-
45
- export function dataSanitizeKeyAndAddUniqueness(logger: IDiagnosticLogger, key: any, map: any) {
46
- const origLength = key.length;
47
- let field = dataSanitizeKey(logger, key);
48
-
49
- // validation truncated the length. We need to add uniqueness
50
- if (field.length !== origLength) {
51
- let i = 0;
52
- let uniqueField = field;
53
- while (map[uniqueField] !== undefined) {
54
- i++;
55
- uniqueField = field.substring(0, DataSanitizerValues.MAX_NAME_LENGTH - 3) + dsPadNumber(i);
56
- }
57
- field = uniqueField;
58
- }
59
- return field;
60
- }
61
-
62
- export function dataSanitizeKey(logger: IDiagnosticLogger, name: any) {
63
- let nameTrunc: String;
64
- if (name) {
65
- // Remove any leading or trailing whitespace
66
- name = strTrim(name.toString());
67
-
68
- // truncate the string to 150 chars
69
- if (name.length > DataSanitizerValues.MAX_NAME_LENGTH) {
70
- nameTrunc = name.substring(0, DataSanitizerValues.MAX_NAME_LENGTH);
71
- _throwInternal(logger,
72
- eLoggingSeverity.WARNING,
73
- _eInternalMessageId.NameTooLong,
74
- "name is too long. It has been truncated to " + DataSanitizerValues.MAX_NAME_LENGTH + " characters.",
75
- { name }, true);
76
- }
77
- }
78
-
79
- return nameTrunc || name;
80
- }
81
-
82
- export function dataSanitizeString(logger: IDiagnosticLogger, value: any, maxLength: number = DataSanitizerValues.MAX_STRING_LENGTH) {
83
- let valueTrunc : String;
84
- if (value) {
85
- maxLength = maxLength ? maxLength : DataSanitizerValues.MAX_STRING_LENGTH; // in case default parameters dont work
86
- value = strTrim(value.toString());
87
- if (value.length > maxLength) {
88
- valueTrunc = value.substring(0, maxLength);
89
- _throwInternal(logger,
90
- eLoggingSeverity.WARNING,
91
- _eInternalMessageId.StringValueTooLong,
92
- "string value is too long. It has been truncated to " + maxLength + " characters.",
93
- { value }, true);
94
- }
95
- }
96
-
97
- return valueTrunc || value;
98
- }
99
-
100
- export function dataSanitizeUrl(logger: IDiagnosticLogger, url: any) {
101
- return dataSanitizeInput(logger, url, DataSanitizerValues.MAX_URL_LENGTH, _eInternalMessageId.UrlTooLong);
102
- }
103
-
104
- export function dataSanitizeMessage(logger: IDiagnosticLogger, message: any) {
105
- let messageTrunc : String;
106
- if (message) {
107
- if (message.length > DataSanitizerValues.MAX_MESSAGE_LENGTH) {
108
- messageTrunc = message.substring(0, DataSanitizerValues.MAX_MESSAGE_LENGTH);
109
- _throwInternal(logger,
110
- eLoggingSeverity.WARNING, _eInternalMessageId.MessageTruncated,
111
- "message is too long, it has been truncated to " + DataSanitizerValues.MAX_MESSAGE_LENGTH + " characters.",
112
- { message },
113
- true);
114
- }
115
- }
116
-
117
- return messageTrunc || message;
118
- }
119
-
120
- export function dataSanitizeException(logger: IDiagnosticLogger, exception: any) {
121
- let exceptionTrunc : String;
122
- if (exception) {
123
- // Make surte its a string
124
- let value:string = "" + exception;
125
- if (value.length > DataSanitizerValues.MAX_EXCEPTION_LENGTH) {
126
- exceptionTrunc = value.substring(0, DataSanitizerValues.MAX_EXCEPTION_LENGTH);
127
- _throwInternal(logger,
128
- eLoggingSeverity.WARNING, _eInternalMessageId.ExceptionTruncated, "exception is too long, it has been truncated to " + DataSanitizerValues.MAX_EXCEPTION_LENGTH + " characters.",
129
- { exception }, true);
130
- }
131
- }
132
-
133
- return exceptionTrunc || exception;
134
- }
135
-
136
- export function dataSanitizeProperties(logger: IDiagnosticLogger, properties: any) {
137
- if (properties) {
138
- const tempProps = {};
139
- objForEachKey(properties, (prop, value) => {
140
- if (isObject(value) && hasJSON()) {
141
- // Stringify any part C properties
142
- try {
143
- value = getJSON().stringify(value);
144
- } catch (e) {
145
- _throwInternal(logger,eLoggingSeverity.WARNING, _eInternalMessageId.CannotSerializeObjectNonSerializable, "custom property is not valid", { exception: e}, true);
146
- }
147
- }
148
- value = dataSanitizeString(logger, value, DataSanitizerValues.MAX_PROPERTY_LENGTH);
149
- prop = dataSanitizeKeyAndAddUniqueness(logger, prop, tempProps);
150
- tempProps[prop] = value;
151
- });
152
- properties = tempProps;
153
- }
154
-
155
- return properties;
156
- }
157
-
158
- export function dataSanitizeMeasurements(logger: IDiagnosticLogger, measurements: any) {
159
- if (measurements) {
160
- const tempMeasurements = {};
161
- objForEachKey(measurements, (measure, value) => {
162
- measure = dataSanitizeKeyAndAddUniqueness(logger, measure, tempMeasurements);
163
- tempMeasurements[measure] = value;
164
- });
165
-
166
- measurements = tempMeasurements;
167
- }
168
-
169
- return measurements;
170
- }
171
-
172
- export function dataSanitizeId(logger: IDiagnosticLogger, id: string): string {
173
- return id ? dataSanitizeInput(logger, id, DataSanitizerValues.MAX_ID_LENGTH, _eInternalMessageId.IdTooLong).toString() : id;
174
- }
175
-
176
- export function dataSanitizeInput(logger: IDiagnosticLogger, input: any, maxLength: number, _msgId: _eInternalMessageId) {
177
- let inputTrunc : String;
178
- if (input) {
179
- input = strTrim(input.toString());
180
- if (input.length > maxLength) {
181
- inputTrunc = input.substring(0, maxLength);
182
- _throwInternal(logger,
183
- eLoggingSeverity.WARNING,
184
- _msgId,
185
- "input is too long, it has been truncated to " + maxLength + " characters.",
186
- { data: input },
187
- true);
188
- }
189
- }
190
-
191
- return inputTrunc || input;
192
- }
193
-
194
- export function dsPadNumber(num: number) {
195
- const s = "00" + num;
196
- return s.substr(s.length - 3);
197
- }
@@ -1,81 +0,0 @@
1
- // Copyright (c) Microsoft Corporation. All rights reserved.
2
- // Licensed under the MIT License.
3
-
4
- import { IDiagnosticLogger, toISOString } from "@microsoft/applicationinsights-core-js";
5
- import { strNotSpecified } from "../../Constants";
6
- import { FieldType } from "../../Enums";
7
- import { IBase } from "../../Interfaces/Contracts/IBase";
8
- import { IEnvelope } from "../../Interfaces/Telemetry/IEnvelope";
9
- import { dataSanitizeString } from "./DataSanitizer";
10
-
11
- export class Envelope implements IEnvelope {
12
-
13
- /**
14
- * The data contract for serializing this object.
15
- */
16
- public aiDataContract: any;
17
-
18
- /**
19
- * 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.
20
- */
21
- public ver: number; /* 1 */
22
-
23
- /**
24
- * Type name of telemetry data item.
25
- */
26
- public name: string;
27
-
28
- /**
29
- * 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.
30
- */
31
- public time: string;
32
-
33
- /**
34
- * Sampling rate used in application. This telemetry item represents 1 / sampleRate actual telemetry items.
35
- */
36
- public sampleRate: number; /* 100.0 */
37
-
38
- /**
39
- * Sequence field used to track absolute order of uploaded events.
40
- */
41
- public seq: string;
42
-
43
- /**
44
- * 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.
45
- */
46
- public iKey: string;
47
-
48
- /**
49
- * Key/value collection of context properties. See ContextTagKeys for information on available properties.
50
- */
51
- public tags: any; /* {} */
52
-
53
- /**
54
- * Telemetry data item.
55
- */
56
- public data: IBase;
57
-
58
- /**
59
- * Constructs a new instance of telemetry data.
60
- */
61
- constructor(logger: IDiagnosticLogger, data: IBase, name: string) {
62
- let _self = this;
63
- _self.ver = 1;
64
- _self.sampleRate = 100.0;
65
- _self.tags = {};
66
- _self.name = dataSanitizeString(logger, name) || strNotSpecified;
67
- _self.data = data;
68
- _self.time = toISOString(new Date());
69
-
70
- _self.aiDataContract = {
71
- time: FieldType.Required,
72
- iKey: FieldType.Required,
73
- name: FieldType.Required,
74
- sampleRate: () => {
75
- return (this.sampleRate === 100) ? FieldType.Hidden : FieldType.Required;
76
- },
77
- tags: FieldType.Required,
78
- data: FieldType.Required
79
- };
80
- }
81
- }
@@ -1,52 +0,0 @@
1
- // Copyright (c) Microsoft Corporation. All rights reserved.
2
- // Licensed under the MIT License.
3
-
4
- import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
5
- import { strNotSpecified } from "../Constants";
6
- import { FieldType } from "../Enums";
7
- import { IEventData } from "../Interfaces/Contracts/IEventData";
8
- import { ISerializable } from "../Interfaces/Telemetry/ISerializable";
9
- import { dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString } from "./Common/DataSanitizer";
10
-
11
- export class Event implements IEventData, ISerializable {
12
- public static envelopeType = "Microsoft.ApplicationInsights.{0}.Event";
13
- public static dataType = "EventData";
14
-
15
- public aiDataContract = {
16
- ver: FieldType.Required,
17
- name: FieldType.Required,
18
- properties: FieldType.Default,
19
- measurements: FieldType.Default
20
- };
21
-
22
- /**
23
- * Schema version
24
- */
25
- public ver: number; /* 2 */
26
-
27
- /**
28
- * Event name. Keep it low cardinality to allow proper grouping and useful metrics.
29
- */
30
- public name: string;
31
-
32
- /**
33
- * Collection of custom properties.
34
- */
35
- public properties: any; /* {} */
36
-
37
- /**
38
- * Collection of custom measurements.
39
- */
40
- public measurements: any; /* {} */
41
-
42
- /**
43
- * Constructs a new instance of the EventTelemetry object
44
- */
45
- constructor(logger: IDiagnosticLogger, name: string, properties?: any, measurements?: any) {
46
- let _self = this;
47
- _self.ver = 2;
48
- _self.name = dataSanitizeString(logger, name) || strNotSpecified;
49
- _self.properties = dataSanitizeProperties(logger, properties);
50
- _self.measurements = dataSanitizeMeasurements(logger, measurements);
51
- }
52
- }