@microsoft/applicationinsights-common 2.8.0-nightly.2202-06 → 2.8.0-nightly.2204-06

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 (254) hide show
  1. package/browser/applicationinsights-common.integrity.json +9 -9
  2. package/browser/applicationinsights-common.js +926 -539
  3. package/browser/applicationinsights-common.js.map +1 -1
  4. package/browser/applicationinsights-common.min.js +2 -2
  5. package/browser/applicationinsights-common.min.js.map +1 -1
  6. package/dist/applicationinsights-common.api.json +2625 -945
  7. package/dist/applicationinsights-common.api.md +103 -46
  8. package/dist/applicationinsights-common.d.ts +520 -286
  9. package/dist/applicationinsights-common.js +926 -539
  10. package/dist/applicationinsights-common.js.map +1 -1
  11. package/dist/applicationinsights-common.min.js +2 -2
  12. package/dist/applicationinsights-common.min.js.map +1 -1
  13. package/dist/applicationinsights-common.rollup.d.ts +520 -286
  14. package/dist-esm/ConnectionStringParser.js +1 -1
  15. package/dist-esm/Constants.js +1 -1
  16. package/dist-esm/DomHelperFuncs.js +1 -1
  17. package/dist-esm/Enums.js +11 -24
  18. package/dist-esm/Enums.js.map +1 -1
  19. package/dist-esm/HelperFuncs.js +7 -6
  20. package/dist-esm/HelperFuncs.js.map +1 -1
  21. package/dist-esm/Interfaces/ConnectionString.js +1 -1
  22. package/dist-esm/Interfaces/Context/IApplication.js +1 -1
  23. package/dist-esm/Interfaces/Context/IDevice.js +1 -1
  24. package/dist-esm/Interfaces/Context/IInternal.js +1 -1
  25. package/dist-esm/Interfaces/Context/ILocation.js +1 -1
  26. package/dist-esm/Interfaces/Context/IOperatingSystem.js +1 -1
  27. package/dist-esm/Interfaces/Context/ISample.js +1 -1
  28. package/dist-esm/Interfaces/Context/ISession.js +1 -1
  29. package/dist-esm/Interfaces/Context/ITelemetryTrace.js +1 -1
  30. package/dist-esm/Interfaces/Context/IUser.js +1 -1
  31. package/dist-esm/Interfaces/Context/IWeb.js +1 -1
  32. package/dist-esm/Interfaces/Contracts/AvailabilityData.js +52 -0
  33. package/dist-esm/Interfaces/Contracts/AvailabilityData.js.map +1 -0
  34. package/dist-esm/Interfaces/Contracts/{Generated/ContextTagKeys.js → ContextTagKeys.js} +1 -1
  35. package/dist-esm/Interfaces/Contracts/{Generated/ContextTagKeys.js.map → ContextTagKeys.js.map} +0 -0
  36. package/dist-esm/Interfaces/Contracts/DataPointType.js +8 -0
  37. package/dist-esm/Interfaces/Contracts/DataPointType.js.map +1 -0
  38. package/dist-esm/Interfaces/Contracts/DependencyKind.js +8 -0
  39. package/dist-esm/Interfaces/Contracts/DependencyKind.js.map +1 -0
  40. package/dist-esm/Interfaces/Contracts/DependencySourceType.js +8 -0
  41. package/dist-esm/Interfaces/Contracts/DependencySourceType.js.map +1 -0
  42. package/dist-esm/Interfaces/Contracts/{Generated/Domain.js → IBase.js} +2 -2
  43. package/dist-esm/Interfaces/Contracts/IBase.js.map +1 -0
  44. package/dist-esm/Interfaces/Contracts/IData.js +8 -0
  45. package/dist-esm/Interfaces/Contracts/IData.js.map +1 -0
  46. package/dist-esm/Interfaces/Contracts/IDataPoint.js +6 -0
  47. package/dist-esm/Interfaces/Contracts/IDataPoint.js.map +1 -0
  48. package/dist-esm/Interfaces/Contracts/IDomain.js +8 -0
  49. package/dist-esm/Interfaces/Contracts/IDomain.js.map +1 -0
  50. package/dist-esm/Interfaces/Contracts/IEnvelope.js +46 -0
  51. package/dist-esm/Interfaces/Contracts/IEnvelope.js.map +1 -0
  52. package/dist-esm/Interfaces/Contracts/IEventData.js +8 -0
  53. package/dist-esm/Interfaces/Contracts/IEventData.js.map +1 -0
  54. package/dist-esm/Interfaces/Contracts/IExceptionData.js +8 -0
  55. package/dist-esm/Interfaces/Contracts/IExceptionData.js.map +1 -0
  56. package/dist-esm/Interfaces/Contracts/IExceptionDetails.js +8 -0
  57. package/dist-esm/Interfaces/Contracts/IExceptionDetails.js.map +1 -0
  58. package/dist-esm/Interfaces/Contracts/IMessageData.js +8 -0
  59. package/dist-esm/Interfaces/Contracts/IMessageData.js.map +1 -0
  60. package/dist-esm/Interfaces/Contracts/IMetricData.js +8 -0
  61. package/dist-esm/Interfaces/Contracts/IMetricData.js.map +1 -0
  62. package/dist-esm/Interfaces/Contracts/IPageViewData.js +8 -0
  63. package/dist-esm/Interfaces/Contracts/IPageViewData.js.map +1 -0
  64. package/dist-esm/Interfaces/Contracts/IPageViewPerfData.js +8 -0
  65. package/dist-esm/Interfaces/Contracts/IPageViewPerfData.js.map +1 -0
  66. package/dist-esm/Interfaces/Contracts/IRemoteDependencyData.js +8 -0
  67. package/dist-esm/Interfaces/Contracts/IRemoteDependencyData.js.map +1 -0
  68. package/dist-esm/Interfaces/Contracts/IStackFrame.js +8 -0
  69. package/dist-esm/Interfaces/Contracts/IStackFrame.js.map +1 -0
  70. package/dist-esm/Interfaces/Contracts/RequestData.js +46 -0
  71. package/dist-esm/Interfaces/Contracts/RequestData.js.map +1 -0
  72. package/dist-esm/Interfaces/Contracts/{Generated/SeverityLevel.js → SeverityLevel.js} +1 -1
  73. package/dist-esm/Interfaces/Contracts/{Generated/SeverityLevel.js.map → SeverityLevel.js.map} +0 -0
  74. package/dist-esm/Interfaces/IAppInsights.js +1 -1
  75. package/dist-esm/Interfaces/IChannelControlsAI.js +1 -1
  76. package/dist-esm/Interfaces/IConfig.js +1 -1
  77. package/dist-esm/Interfaces/ICorrelationConfig.js +1 -1
  78. package/dist-esm/Interfaces/IDependencyTelemetry.js +1 -1
  79. package/dist-esm/Interfaces/IEventTelemetry.js +1 -1
  80. package/dist-esm/Interfaces/IExceptionTelemetry.js +1 -1
  81. package/dist-esm/Interfaces/IMetricTelemetry.js +1 -1
  82. package/dist-esm/Interfaces/IPageViewPerformanceTelemetry.js +1 -1
  83. package/dist-esm/Interfaces/IPageViewTelemetry.js +1 -1
  84. package/dist-esm/Interfaces/IPartC.js +1 -1
  85. package/dist-esm/Interfaces/IPropertiesPlugin.js +1 -1
  86. package/dist-esm/Interfaces/IRequestContext.js +1 -1
  87. package/dist-esm/Interfaces/ITelemetryContext.js +1 -1
  88. package/dist-esm/Interfaces/ITraceTelemetry.js +1 -1
  89. package/dist-esm/Interfaces/PartAExtensions.js +2 -2
  90. package/dist-esm/Interfaces/PartAExtensions.js.map +1 -1
  91. package/dist-esm/Interfaces/Telemetry/IEnvelope.js +1 -1
  92. package/dist-esm/Interfaces/Telemetry/ISerializable.js +1 -1
  93. package/dist-esm/RequestResponseHeaders.js +1 -1
  94. package/dist-esm/StorageHelperFuncs.js +27 -12
  95. package/dist-esm/StorageHelperFuncs.js.map +1 -1
  96. package/dist-esm/Telemetry/Common/Data.js +6 -11
  97. package/dist-esm/Telemetry/Common/Data.js.map +1 -1
  98. package/dist-esm/Telemetry/Common/DataPoint.js +8 -9
  99. package/dist-esm/Telemetry/Common/DataPoint.js.map +1 -1
  100. package/dist-esm/Telemetry/Common/DataSanitizer.js +10 -10
  101. package/dist-esm/Telemetry/Common/DataSanitizer.js.map +1 -1
  102. package/dist-esm/Telemetry/Common/Envelope.js +12 -12
  103. package/dist-esm/Telemetry/Common/Envelope.js.map +1 -1
  104. package/dist-esm/Telemetry/Event.js +9 -12
  105. package/dist-esm/Telemetry/Event.js.map +1 -1
  106. package/dist-esm/Telemetry/Exception.js +74 -81
  107. package/dist-esm/Telemetry/Exception.js.map +1 -1
  108. package/dist-esm/Telemetry/Metric.js +9 -12
  109. package/dist-esm/Telemetry/Metric.js.map +1 -1
  110. package/dist-esm/Telemetry/PageView.js +12 -15
  111. package/dist-esm/Telemetry/PageView.js.map +1 -1
  112. package/dist-esm/Telemetry/PageViewPerformance.js +16 -19
  113. package/dist-esm/Telemetry/PageViewPerformance.js.map +1 -1
  114. package/dist-esm/Telemetry/RemoteDependencyData.js +17 -20
  115. package/dist-esm/Telemetry/RemoteDependencyData.js.map +1 -1
  116. package/dist-esm/Telemetry/Trace.js +10 -13
  117. package/dist-esm/Telemetry/Trace.js.map +1 -1
  118. package/dist-esm/TelemetryItemCreator.js +1 -1
  119. package/dist-esm/UrlHelperFuncs.js +1 -1
  120. package/dist-esm/Util.js +1 -1
  121. package/dist-esm/applicationinsights-common.js +4 -7
  122. package/dist-esm/applicationinsights-common.js.map +1 -1
  123. package/package.json +3 -3
  124. package/src/Enums.ts +19 -3
  125. package/src/HelperFuncs.ts +7 -5
  126. package/src/Interfaces/Contracts/AvailabilityData.ts +57 -0
  127. package/src/Interfaces/Contracts/{Generated/ContextTagKeys.ts → ContextTagKeys.ts} +0 -0
  128. package/src/Interfaces/Contracts/{Generated/DataPointType.ts → DataPointType.ts} +2 -3
  129. package/src/Interfaces/Contracts/{Generated/DependencyKind.ts → DependencyKind.ts} +2 -3
  130. package/src/Interfaces/Contracts/{Generated/DependencySourceType.ts → DependencySourceType.ts} +2 -3
  131. package/src/Interfaces/Contracts/{Generated/Base.ts → IBase.ts} +2 -7
  132. package/src/Interfaces/Contracts/{Generated/Data.ts → IData.ts} +5 -12
  133. package/src/Interfaces/Contracts/{Generated/DataPoint.ts → IDataPoint.ts} +8 -8
  134. package/src/Interfaces/Contracts/{Generated/Domain.ts → IDomain.ts} +1 -3
  135. package/src/Interfaces/Contracts/IEnvelope.ts +50 -0
  136. package/src/Interfaces/Contracts/{Generated/EventData.ts → IEventData.ts} +7 -10
  137. package/src/Interfaces/Contracts/{Generated/ExceptionData.ts → IExceptionData.ts} +8 -11
  138. package/src/Interfaces/Contracts/{Generated/ExceptionDetails.ts → IExceptionDetails.ts} +9 -10
  139. package/src/Interfaces/Contracts/{Generated/MessageData.ts → IMessageData.ts} +7 -10
  140. package/src/Interfaces/Contracts/{Generated/MetricData.ts → IMetricData.ts} +7 -10
  141. package/{types/Interfaces/Contracts/Generated/PageViewData.d.ts → src/Interfaces/Contracts/IPageViewData.ts} +10 -19
  142. package/src/Interfaces/Contracts/IPageViewPerfData.ts +35 -0
  143. package/src/Interfaces/Contracts/{Generated/RemoteDependencyData.ts → IRemoteDependencyData.ts} +13 -16
  144. package/src/Interfaces/Contracts/{Generated/StackFrame.ts → IStackFrame.ts} +6 -7
  145. package/src/Interfaces/Contracts/RequestData.ts +50 -0
  146. package/src/Interfaces/Contracts/{Generated/SeverityLevel.ts → SeverityLevel.ts} +0 -0
  147. package/src/Interfaces/IExceptionTelemetry.ts +1 -1
  148. package/src/Interfaces/ITraceTelemetry.ts +1 -1
  149. package/src/Interfaces/PartAExtensions.ts +1 -1
  150. package/src/Interfaces/Telemetry/IEnvelope.ts +35 -3
  151. package/src/StorageHelperFuncs.ts +40 -23
  152. package/src/Telemetry/Common/Data.ts +12 -4
  153. package/src/Telemetry/Common/DataPoint.ts +38 -2
  154. package/src/Telemetry/Common/DataSanitizer.ts +19 -19
  155. package/src/Telemetry/Common/Envelope.ts +51 -10
  156. package/src/Telemetry/Event.ts +30 -12
  157. package/src/Telemetry/Exception.ts +179 -80
  158. package/src/Telemetry/Metric.ts +27 -7
  159. package/src/Telemetry/PageView.ts +45 -10
  160. package/src/Telemetry/PageViewPerformance.ts +76 -14
  161. package/src/Telemetry/RemoteDependencyData.ts +70 -15
  162. package/src/Telemetry/Trace.ts +34 -8
  163. package/src/TelemetryItemCreator.ts +1 -1
  164. package/src/applicationinsights-common.ts +7 -7
  165. package/types/Enums.d.ts +13 -2
  166. package/types/Interfaces/Contracts/AvailabilityData.d.ts +0 -0
  167. package/types/Interfaces/Contracts/{Generated/ContextTagKeys.d.ts → ContextTagKeys.d.ts} +0 -0
  168. package/types/Interfaces/Contracts/{Generated/DataPointType.d.ts → DataPointType.d.ts} +1 -1
  169. package/types/Interfaces/Contracts/{Generated/DependencyKind.d.ts → DependencyKind.d.ts} +1 -1
  170. package/types/Interfaces/Contracts/{Generated/DependencySourceType.d.ts → DependencySourceType.d.ts} +1 -1
  171. package/types/Interfaces/Contracts/{Generated/Base.d.ts → IBase.d.ts} +1 -2
  172. package/types/Interfaces/Contracts/{Generated/Data.d.ts → IData.d.ts} +2 -3
  173. package/types/Interfaces/Contracts/{Generated/DataPoint.d.ts → IDataPoint.d.ts} +1 -1
  174. package/types/Interfaces/Contracts/{Generated/Domain.d.ts → IDomain.d.ts} +1 -1
  175. package/types/Interfaces/Contracts/IEnvelope.d.ts +0 -0
  176. package/types/Interfaces/Contracts/{Generated/EventData.d.ts → IEventData.d.ts} +2 -3
  177. package/types/Interfaces/Contracts/{Generated/ExceptionData.d.ts → IExceptionData.d.ts} +4 -5
  178. package/types/Interfaces/Contracts/{Generated/ExceptionDetails.d.ts → IExceptionDetails.d.ts} +3 -3
  179. package/types/Interfaces/Contracts/{Generated/MessageData.d.ts → IMessageData.d.ts} +2 -3
  180. package/types/Interfaces/Contracts/{Generated/MetricData.d.ts → IMetricData.d.ts} +4 -5
  181. package/types/Interfaces/Contracts/IPageViewData.d.ts +18 -0
  182. package/types/Interfaces/Contracts/IPageViewPerfData.d.ts +26 -0
  183. package/types/Interfaces/Contracts/{Generated/RemoteDependencyData.d.ts → IRemoteDependencyData.d.ts} +2 -3
  184. package/types/Interfaces/Contracts/{Generated/StackFrame.d.ts → IStackFrame.d.ts} +1 -1
  185. package/types/Interfaces/Contracts/RequestData.d.ts +0 -0
  186. package/types/Interfaces/Contracts/{Generated/SeverityLevel.d.ts → SeverityLevel.d.ts} +0 -0
  187. package/types/Interfaces/IExceptionTelemetry.d.ts +1 -1
  188. package/types/Interfaces/ITraceTelemetry.d.ts +1 -1
  189. package/types/Interfaces/PartAExtensions.d.ts +1 -1
  190. package/types/Interfaces/Telemetry/IEnvelope.d.ts +24 -0
  191. package/types/StorageHelperFuncs.d.ts +14 -2
  192. package/types/Telemetry/Common/Data.d.ts +10 -2
  193. package/types/Telemetry/Common/DataPoint.d.ts +31 -2
  194. package/types/Telemetry/Common/DataSanitizer.d.ts +3 -3
  195. package/types/Telemetry/Common/Envelope.d.ts +35 -4
  196. package/types/Telemetry/Event.d.ts +19 -3
  197. package/types/Telemetry/Exception.d.ts +75 -7
  198. package/types/Telemetry/Metric.d.ts +19 -2
  199. package/types/Telemetry/PageView.d.ts +30 -2
  200. package/types/Telemetry/PageViewPerformance.d.ts +50 -2
  201. package/types/Telemetry/RemoteDependencyData.d.ts +46 -2
  202. package/types/Telemetry/Trace.d.ts +23 -3
  203. package/types/applicationinsights-common.d.ts +7 -7
  204. package/types/tsdoc-metadata.json +1 -1
  205. package/dist-esm/Interfaces/Contracts/Generated/AvailabilityData.js +0 -27
  206. package/dist-esm/Interfaces/Contracts/Generated/AvailabilityData.js.map +0 -1
  207. package/dist-esm/Interfaces/Contracts/Generated/Base.js +0 -17
  208. package/dist-esm/Interfaces/Contracts/Generated/Base.js.map +0 -1
  209. package/dist-esm/Interfaces/Contracts/Generated/Data.js +0 -21
  210. package/dist-esm/Interfaces/Contracts/Generated/Data.js.map +0 -1
  211. package/dist-esm/Interfaces/Contracts/Generated/DataPoint.js +0 -21
  212. package/dist-esm/Interfaces/Contracts/Generated/DataPoint.js.map +0 -1
  213. package/dist-esm/Interfaces/Contracts/Generated/DataPointType.js +0 -16
  214. package/dist-esm/Interfaces/Contracts/Generated/DataPointType.js.map +0 -1
  215. package/dist-esm/Interfaces/Contracts/Generated/DependencyKind.js +0 -17
  216. package/dist-esm/Interfaces/Contracts/Generated/DependencyKind.js.map +0 -1
  217. package/dist-esm/Interfaces/Contracts/Generated/DependencySourceType.js +0 -17
  218. package/dist-esm/Interfaces/Contracts/Generated/DependencySourceType.js.map +0 -1
  219. package/dist-esm/Interfaces/Contracts/Generated/Domain.js.map +0 -1
  220. package/dist-esm/Interfaces/Contracts/Generated/Envelope.js +0 -28
  221. package/dist-esm/Interfaces/Contracts/Generated/Envelope.js.map +0 -1
  222. package/dist-esm/Interfaces/Contracts/Generated/EventData.js +0 -28
  223. package/dist-esm/Interfaces/Contracts/Generated/EventData.js.map +0 -1
  224. package/dist-esm/Interfaces/Contracts/Generated/ExceptionData.js +0 -32
  225. package/dist-esm/Interfaces/Contracts/Generated/ExceptionData.js.map +0 -1
  226. package/dist-esm/Interfaces/Contracts/Generated/ExceptionDetails.js +0 -24
  227. package/dist-esm/Interfaces/Contracts/Generated/ExceptionDetails.js.map +0 -1
  228. package/dist-esm/Interfaces/Contracts/Generated/MessageData.js +0 -28
  229. package/dist-esm/Interfaces/Contracts/Generated/MessageData.js.map +0 -1
  230. package/dist-esm/Interfaces/Contracts/Generated/MetricData.js +0 -32
  231. package/dist-esm/Interfaces/Contracts/Generated/MetricData.js.map +0 -1
  232. package/dist-esm/Interfaces/Contracts/Generated/PageViewData.js +0 -34
  233. package/dist-esm/Interfaces/Contracts/Generated/PageViewData.js.map +0 -1
  234. package/dist-esm/Interfaces/Contracts/Generated/PageViewPerfData.js +0 -34
  235. package/dist-esm/Interfaces/Contracts/Generated/PageViewPerfData.js.map +0 -1
  236. package/dist-esm/Interfaces/Contracts/Generated/RemoteDependencyData.js +0 -32
  237. package/dist-esm/Interfaces/Contracts/Generated/RemoteDependencyData.js.map +0 -1
  238. package/dist-esm/Interfaces/Contracts/Generated/RequestData.js +0 -28
  239. package/dist-esm/Interfaces/Contracts/Generated/RequestData.js.map +0 -1
  240. package/dist-esm/Interfaces/Contracts/Generated/StackFrame.js +0 -17
  241. package/dist-esm/Interfaces/Contracts/Generated/StackFrame.js.map +0 -1
  242. package/dist-esm/Telemetry/Common/Base.js +0 -22
  243. package/dist-esm/Telemetry/Common/Base.js.map +0 -1
  244. package/src/Interfaces/Contracts/Generated/AvailabilityData.ts +0 -57
  245. package/src/Interfaces/Contracts/Generated/Envelope.ts +0 -50
  246. package/src/Interfaces/Contracts/Generated/PageViewData.ts +0 -50
  247. package/src/Interfaces/Contracts/Generated/PageViewPerfData.ts +0 -70
  248. package/src/Interfaces/Contracts/Generated/RequestData.ts +0 -50
  249. package/src/Telemetry/Common/Base.ts +0 -14
  250. package/types/Interfaces/Contracts/Generated/AvailabilityData.d.ts +0 -42
  251. package/types/Interfaces/Contracts/Generated/Envelope.d.ts +0 -38
  252. package/types/Interfaces/Contracts/Generated/PageViewPerfData.d.ts +0 -51
  253. package/types/Interfaces/Contracts/Generated/RequestData.d.ts +0 -38
  254. package/types/Telemetry/Common/Base.d.ts +0 -8
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights Common JavaScript Library, 2.8.0-nightly.2202-06
2
+ * Microsoft Application Insights Common JavaScript Library, 2.8.0-nightly.2204-06
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -7,13 +7,14 @@
7
7
  */
8
8
 
9
9
  declare namespace ApplicationInsights {
10
+ import { _eInternalMessageId } from '@microsoft/applicationinsights-core-js';
11
+ import { EnumValue } from '@microsoft/applicationinsights-core-js';
10
12
  import { IChannelControls } from '@microsoft/applicationinsights-core-js';
11
13
  import { IConfiguration } from '@microsoft/applicationinsights-core-js';
12
14
  import { ICookieMgr } from '@microsoft/applicationinsights-core-js';
13
15
  import { ICookieMgrConfig } from '@microsoft/applicationinsights-core-js';
14
16
  import { ICustomProperties } from '@microsoft/applicationinsights-core-js';
15
17
  import { IDiagnosticLogger } from '@microsoft/applicationinsights-core-js';
16
- import { _InternalMessageId } from '@microsoft/applicationinsights-core-js';
17
18
  import { IPlugin } from '@microsoft/applicationinsights-core-js';
18
19
  import { isBeaconsSupported as isBeaconApiSupported } from '@microsoft/applicationinsights-core-js';
19
20
  import { ITelemetryItem } from '@microsoft/applicationinsights-core-js';
@@ -21,18 +22,17 @@ declare namespace ApplicationInsights {
21
22
  /**
22
23
  * Data struct to contain only C section with custom fields.
23
24
  */
24
- class AIBase {
25
+ interface AIBase {
25
26
  /**
26
27
  * Name of item (B section) if any. If telemetry data is derived straight from this, this should be null.
27
28
  */
28
29
  baseType: string;
29
- constructor();
30
30
  }
31
31
 
32
32
  /**
33
33
  * Data struct to contain both B and C sections.
34
34
  */
35
- class AIData<TDomain> extends AIBase {
35
+ interface AIData<TDomain> extends AIBase {
36
36
  /**
37
37
  * Name of item (B section) if any. If telemetry data is derived straight from this, this should be null.
38
38
  */
@@ -41,7 +41,6 @@ declare namespace ApplicationInsights {
41
41
  * Container for data item (B section).
42
42
  */
43
43
  baseData: TDomain;
44
- constructor();
45
44
  }
46
45
 
47
46
  const AnalyticsPluginIdentifier = "ApplicationInsightsAnalytics";
@@ -74,7 +73,7 @@ declare namespace ApplicationInsights {
74
73
 
75
74
  let CtxTagKeys: ContextTagKeys;
76
75
 
77
- class Data<TDomain> extends AIData<TDomain> implements ISerializable {
76
+ class Data<TDomain> implements AIData<TDomain>, ISerializable {
78
77
  /**
79
78
  * The data contract for serializing this object.
80
79
  */
@@ -82,16 +81,33 @@ declare namespace ApplicationInsights {
82
81
  baseType: FieldType;
83
82
  baseData: FieldType;
84
83
  };
84
+ /**
85
+ * Name of item (B section) if any. If telemetry data is derived straight from this, this should be null.
86
+ */
87
+ baseType: string;
88
+ /**
89
+ * Container for data item (B section).
90
+ */
91
+ baseData: TDomain;
85
92
  /**
86
93
  * Constructs a new instance of telemetry data.
87
94
  */
88
95
  constructor(baseType: string, data: TDomain);
89
96
  }
90
97
 
91
- /**
92
- * Metric data single measurement.
93
- */
94
- class DataPoint {
98
+ class DataPoint implements IDataPoint, ISerializable {
99
+ /**
100
+ * The data contract for serializing this object.
101
+ */
102
+ aiDataContract: {
103
+ name: FieldType;
104
+ kind: FieldType;
105
+ value: FieldType;
106
+ count: FieldType;
107
+ min: FieldType;
108
+ max: FieldType;
109
+ stdDev: FieldType;
110
+ };
95
111
  /**
96
112
  * Name of the metric.
97
113
  */
@@ -125,7 +141,7 @@ declare namespace ApplicationInsights {
125
141
  /**
126
142
  * Type of the metric data measurement.
127
143
  */
128
- enum DataPointType {
144
+ const enum DataPointType {
129
145
  Measurement = 0,
130
146
  Aggregation = 1
131
147
  }
@@ -134,7 +150,7 @@ declare namespace ApplicationInsights {
134
150
 
135
151
  function dataSanitizeId(logger: IDiagnosticLogger, id: string): string;
136
152
 
137
- function dataSanitizeInput(logger: IDiagnosticLogger, input: any, maxLength: number, _msgId: _InternalMessageId): any;
153
+ function dataSanitizeInput(logger: IDiagnosticLogger, input: any, maxLength: number, _msgId: _eInternalMessageId): any;
138
154
 
139
155
  function dataSanitizeKey(logger: IDiagnosticLogger, name: any): any;
140
156
 
@@ -206,7 +222,17 @@ declare namespace ApplicationInsights {
206
222
  */
207
223
  const DisabledPropertyName: string;
208
224
 
209
- enum DistributedTracingModes {
225
+ const DistributedTracingModes: EnumValue< {
226
+ AI: number;
227
+ AI_AND_W3C: number;
228
+ W3C: number;
229
+ }>;
230
+
231
+ type DistributedTracingModes = number | eDistributedTracingModes;
232
+
233
+ function dsPadNumber(num: number): string;
234
+
235
+ const enum eDistributedTracingModes {
210
236
  /**
211
237
  * (Default) Send Application Insights correlation headers
212
238
  */
@@ -221,29 +247,11 @@ declare namespace ApplicationInsights {
221
247
  W3C = 2
222
248
  }
223
249
 
224
- /**
225
- * The abstract common base of all domains.
226
- */
227
- interface Domain {
228
- }
229
-
230
- function dsPadNumber(num: number): string;
231
-
232
- class Envelope extends Envelope_2 implements IEnvelope {
250
+ class Envelope implements IEnvelope {
233
251
  /**
234
252
  * The data contract for serializing this object.
235
253
  */
236
254
  aiDataContract: any;
237
- /**
238
- * Constructs a new instance of telemetry data.
239
- */
240
- constructor(logger: IDiagnosticLogger, data: AIBase, name: string);
241
- }
242
-
243
- /**
244
- * System variables for a telemetry item.
245
- */
246
- class Envelope_2 {
247
255
  /**
248
256
  * 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.
249
257
  */
@@ -276,9 +284,13 @@ declare namespace ApplicationInsights {
276
284
  * Telemetry data item.
277
285
  */
278
286
  data: AIBase;
287
+ /**
288
+ * Constructs a new instance of telemetry data.
289
+ */
290
+ constructor(logger: IDiagnosticLogger, data: AIBase, name: string);
279
291
  }
280
292
 
281
- class Event_2 extends EventData implements ISerializable {
293
+ class Event_2 implements IEventData, ISerializable {
282
294
  static envelopeType: string;
283
295
  static dataType: string;
284
296
  aiDataContract: {
@@ -287,17 +299,6 @@ declare namespace ApplicationInsights {
287
299
  properties: FieldType;
288
300
  measurements: FieldType;
289
301
  };
290
- /**
291
- * Constructs a new instance of the EventTelemetry object
292
- */
293
- constructor(logger: IDiagnosticLogger, name: string, properties?: any, measurements?: any);
294
- }
295
- export { Event_2 as Event }
296
-
297
- /**
298
- * 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.
299
- */
300
- class EventData implements Domain {
301
302
  /**
302
303
  * Schema version
303
304
  */
@@ -314,10 +315,14 @@ declare namespace ApplicationInsights {
314
315
  * Collection of custom measurements.
315
316
  */
316
317
  measurements: any;
317
- constructor();
318
+ /**
319
+ * Constructs a new instance of the EventTelemetry object
320
+ */
321
+ constructor(logger: IDiagnosticLogger, name: string, properties?: any, measurements?: any);
318
322
  }
323
+ export { Event_2 as Event }
319
324
 
320
- class Exception extends ExceptionData implements ISerializable {
325
+ class Exception implements IExceptionData, ISerializable {
321
326
  static envelopeType: string;
322
327
  static dataType: string;
323
328
  id?: string;
@@ -330,30 +335,6 @@ declare namespace ApplicationInsights {
330
335
  properties: FieldType;
331
336
  measurements: FieldType;
332
337
  };
333
- /**
334
- * Constructs a new instance of the ExceptionTelemetry object
335
- */
336
- constructor(logger: IDiagnosticLogger, exception: Error | IExceptionInternal | IAutoExceptionTelemetry, properties?: {
337
- [key: string]: any;
338
- }, measurements?: {
339
- [key: string]: number;
340
- }, severityLevel?: SeverityLevel, id?: string);
341
- static CreateAutoException(message: string | Event, url: string, lineNumber: number, columnNumber: number, error: any, evt?: Event | string, stack?: string, errorSrc?: string): IAutoExceptionTelemetry;
342
- static CreateFromInterface(logger: IDiagnosticLogger, exception: IExceptionInternal, properties?: any, measurements?: {
343
- [key: string]: number;
344
- }): Exception;
345
- toInterface(): IExceptionInternal;
346
- /**
347
- * Creates a simple exception with 1 stack frame. Useful for manual constracting of exception.
348
- */
349
- static CreateSimpleException(message: string, typeName: string, assembly: string, fileName: string, details: string, line: number): Exception;
350
- static formatError: typeof _formatErrorCode;
351
- }
352
-
353
- /**
354
- * An instance of Exception represents a handled or unhandled exception that occurred during execution of the monitored application.
355
- */
356
- class ExceptionData implements Domain {
357
338
  /**
358
339
  * Schema version
359
340
  */
@@ -361,7 +342,7 @@ declare namespace ApplicationInsights {
361
342
  /**
362
343
  * Exception chain - list of inner exceptions.
363
344
  */
364
- exceptions: ExceptionDetails[];
345
+ exceptions: IExceptionDetails[];
365
346
  /**
366
347
  * Severity level. Mostly used to indicate exception severity level when it is reported by logging library.
367
348
  */
@@ -374,41 +355,24 @@ declare namespace ApplicationInsights {
374
355
  * Collection of custom measurements.
375
356
  */
376
357
  measurements: any;
377
- constructor();
378
- }
379
-
380
- /**
381
- * Exception details of the exception in a chain.
382
- */
383
- class ExceptionDetails {
384
- /**
385
- * In case exception is nested (outer exception contains inner one), the id and outerId properties are used to represent the nesting.
386
- */
387
- id: number;
388
- /**
389
- * The value of outerId is a reference to an element in ExceptionDetails that represents the outer exception
390
- */
391
- outerId: number;
392
- /**
393
- * Exception type name.
394
- */
395
- typeName: string;
396
- /**
397
- * Exception message.
398
- */
399
- message: string;
400
- /**
401
- * Indicates if full exception stack is provided in the exception. The stack may be trimmed, such as in the case of a StackOverflow exception.
402
- */
403
- hasFullStack: boolean;
404
358
  /**
405
- * Text describing the stack. Either stack or parsedStack should have a value.
359
+ * Constructs a new instance of the ExceptionTelemetry object
406
360
  */
407
- stack: string;
361
+ constructor(logger: IDiagnosticLogger, exception: Error | IExceptionInternal | IAutoExceptionTelemetry, properties?: {
362
+ [key: string]: any;
363
+ }, measurements?: {
364
+ [key: string]: number;
365
+ }, severityLevel?: SeverityLevel, id?: string);
366
+ static CreateAutoException(message: string | Event, url: string, lineNumber: number, columnNumber: number, error: any, evt?: Event | string, stack?: string, errorSrc?: string): IAutoExceptionTelemetry;
367
+ static CreateFromInterface(logger: IDiagnosticLogger, exception: IExceptionInternal, properties?: any, measurements?: {
368
+ [key: string]: number;
369
+ }): Exception;
370
+ toInterface(): IExceptionInternal;
408
371
  /**
409
- * List of stack frames. Either stack or parsedStack should have a value.
372
+ * Creates a simple exception with 1 stack frame. Useful for manual constracting of exception.
410
373
  */
411
- parsedStack: StackFrame[];
374
+ static CreateSimpleException(message: string, typeName: string, assembly: string, fileName: string, details: string, line: number): Exception;
375
+ static formatError: typeof _formatErrorCode;
412
376
  }
413
377
 
414
378
  const Extensions: {
@@ -1103,6 +1067,40 @@ declare namespace ApplicationInsights {
1103
1067
  getCorrelationContextValue(responseHeader: string, key: string): string | undefined;
1104
1068
  }
1105
1069
 
1070
+ /**
1071
+ * Metric data single measurement.
1072
+ */
1073
+ interface IDataPoint {
1074
+ /**
1075
+ * Name of the metric.
1076
+ */
1077
+ name: string;
1078
+ /**
1079
+ * Metric type. Single measurement or the aggregated value.
1080
+ */
1081
+ kind: DataPointType;
1082
+ /**
1083
+ * Single value for measurement. Sum of individual measurements for the aggregation.
1084
+ */
1085
+ value: number;
1086
+ /**
1087
+ * Metric weight of the aggregated metric. Should not be set for a measurement.
1088
+ */
1089
+ count: number;
1090
+ /**
1091
+ * Minimum value of the aggregated metric. Should not be set for a measurement.
1092
+ */
1093
+ min: number;
1094
+ /**
1095
+ * Maximum value of the aggregated metric. Should not be set for a measurement.
1096
+ */
1097
+ max: number;
1098
+ /**
1099
+ * Standard deviation of the aggregated metric. Should not be set for a measurement.
1100
+ */
1101
+ stdDev: number;
1102
+ }
1103
+
1106
1104
  interface IDataSanitizer {
1107
1105
  /**
1108
1106
  * Max length allowed for custom names.
@@ -1141,7 +1139,7 @@ declare namespace ApplicationInsights {
1141
1139
  sanitizeProperties: (logger: IDiagnosticLogger, properties: any) => any;
1142
1140
  sanitizeMeasurements: (logger: IDiagnosticLogger, measurements: any) => any;
1143
1141
  sanitizeId: (logger: IDiagnosticLogger, id: string) => string;
1144
- sanitizeInput: (logger: IDiagnosticLogger, input: any, maxLength: number, _msgId: _InternalMessageId) => any;
1142
+ sanitizeInput: (logger: IDiagnosticLogger, input: any, maxLength: number, _msgId: _eInternalMessageId) => any;
1145
1143
  padNumber: (num: number) => string;
1146
1144
  /**
1147
1145
  * helper method to trim strings (IE8 does not implement String.prototype.trim)
@@ -1200,19 +1198,71 @@ declare namespace ApplicationInsights {
1200
1198
  ip: string;
1201
1199
  }
1202
1200
 
1201
+ /**
1202
+ * The abstract common base of all domains.
1203
+ */
1204
+ interface IDomain {
1205
+ }
1206
+
1203
1207
  interface IEnvelope extends ISerializable {
1208
+ /**
1209
+ * 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.
1210
+ */
1204
1211
  ver: number;
1212
+ /**
1213
+ * Type name of telemetry data item.
1214
+ */
1205
1215
  name: string;
1216
+ /**
1217
+ * 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.
1218
+ */
1206
1219
  time: string;
1220
+ /**
1221
+ * Sampling rate used in application. This telemetry item represents 1 / sampleRate actual telemetry items.
1222
+ */
1207
1223
  sampleRate: number;
1224
+ /**
1225
+ * Sequence field used to track absolute order of uploaded events.
1226
+ */
1208
1227
  seq: string;
1228
+ /**
1229
+ * 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.
1230
+ */
1209
1231
  iKey: string;
1232
+ /**
1233
+ * Key/value collection of context properties. See ContextTagKeys for information on available properties.
1234
+ */
1210
1235
  tags: {
1211
1236
  [name: string]: any;
1212
1237
  };
1238
+ /**
1239
+ * Telemetry data item.
1240
+ */
1213
1241
  data: any;
1214
1242
  }
1215
1243
 
1244
+ /**
1245
+ * 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.
1246
+ */
1247
+ interface IEventData extends IDomain {
1248
+ /**
1249
+ * Schema version
1250
+ */
1251
+ ver: number;
1252
+ /**
1253
+ * Event name. Keep it low cardinality to allow proper grouping and useful metrics.
1254
+ */
1255
+ name: string;
1256
+ /**
1257
+ * Collection of custom properties.
1258
+ */
1259
+ properties: any;
1260
+ /**
1261
+ * Collection of custom measurements.
1262
+ */
1263
+ measurements: any;
1264
+ }
1265
+
1216
1266
  interface IEventTelemetry extends IPartC {
1217
1267
  /**
1218
1268
  * @description An event name string
@@ -1228,51 +1278,111 @@ declare namespace ApplicationInsights {
1228
1278
  iKey?: string;
1229
1279
  }
1230
1280
 
1231
- interface IExceptionDetailsInternal {
1232
- id: number;
1233
- outerId: number;
1234
- typeName: string;
1235
- message: string;
1236
- hasFullStack: boolean;
1237
- stack: string;
1238
- parsedStack: IExceptionStackFrameInternal[];
1239
- }
1240
-
1241
- interface IExceptionInternal extends IPartC {
1242
- ver: string;
1243
- id: string;
1244
- exceptions: IExceptionDetailsInternal[];
1245
- severityLevel?: SeverityLevel | number;
1246
- problemGroup: string;
1247
- isManual: boolean;
1248
- }
1249
-
1250
- interface IExceptionStackFrameInternal {
1251
- level: number;
1252
- method: string;
1253
- assembly: string;
1254
- fileName: string;
1255
- line: number;
1256
- pos?: number;
1257
- }
1258
-
1259
1281
  /**
1260
- * @export
1261
- * @interface IExceptionTelemetry
1262
- * @description Exception interface used as primary parameter to trackException
1282
+ * An instance of Exception represents a handled or unhandled exception that occurred during execution of the monitored application.
1263
1283
  */
1264
- interface IExceptionTelemetry extends IPartC {
1284
+ interface IExceptionData extends IDomain {
1265
1285
  /**
1266
- * Unique guid identifying this error
1286
+ * Schema version
1267
1287
  */
1268
- id?: string;
1288
+ ver: number;
1269
1289
  /**
1270
- * @deprecated
1271
- * @type {Error}
1272
- * @memberof IExceptionTelemetry
1273
- * @description DEPRECATED: Please use exception instead. Behavior/usage for exception remains the same as this field.
1290
+ * Exception chain - list of inner exceptions.
1274
1291
  */
1275
- error?: Error;
1292
+ exceptions: IExceptionDetails[];
1293
+ /**
1294
+ * Severity level. Mostly used to indicate exception severity level when it is reported by logging library.
1295
+ */
1296
+ severityLevel: SeverityLevel;
1297
+ /**
1298
+ * Collection of custom properties.
1299
+ */
1300
+ properties: any;
1301
+ /**
1302
+ * Collection of custom measurements.
1303
+ */
1304
+ measurements: any;
1305
+ }
1306
+
1307
+ /**
1308
+ * Exception details of the exception in a chain.
1309
+ */
1310
+ interface IExceptionDetails {
1311
+ /**
1312
+ * In case exception is nested (outer exception contains inner one), the id and outerId properties are used to represent the nesting.
1313
+ */
1314
+ id: number;
1315
+ /**
1316
+ * The value of outerId is a reference to an element in ExceptionDetails that represents the outer exception
1317
+ */
1318
+ outerId: number;
1319
+ /**
1320
+ * Exception type name.
1321
+ */
1322
+ typeName: string;
1323
+ /**
1324
+ * Exception message.
1325
+ */
1326
+ message: string;
1327
+ /**
1328
+ * Indicates if full exception stack is provided in the exception. The stack may be trimmed, such as in the case of a StackOverflow exception.
1329
+ */
1330
+ hasFullStack: boolean;
1331
+ /**
1332
+ * Text describing the stack. Either stack or parsedStack should have a value.
1333
+ */
1334
+ stack: string;
1335
+ /**
1336
+ * List of stack frames. Either stack or parsedStack should have a value.
1337
+ */
1338
+ parsedStack: IStackFrame[];
1339
+ }
1340
+
1341
+ interface IExceptionDetailsInternal {
1342
+ id: number;
1343
+ outerId: number;
1344
+ typeName: string;
1345
+ message: string;
1346
+ hasFullStack: boolean;
1347
+ stack: string;
1348
+ parsedStack: IExceptionStackFrameInternal[];
1349
+ }
1350
+
1351
+ interface IExceptionInternal extends IPartC {
1352
+ ver: string;
1353
+ id: string;
1354
+ exceptions: IExceptionDetailsInternal[];
1355
+ severityLevel?: SeverityLevel | number;
1356
+ problemGroup: string;
1357
+ isManual: boolean;
1358
+ }
1359
+
1360
+ interface IExceptionStackFrameInternal {
1361
+ level: number;
1362
+ method: string;
1363
+ assembly: string;
1364
+ fileName: string;
1365
+ line: number;
1366
+ pos?: number;
1367
+ }
1368
+
1369
+ /**
1370
+ * @export
1371
+ * @interface IExceptionTelemetry
1372
+ * @description Exception interface used as primary parameter to trackException
1373
+ */
1374
+ interface IExceptionTelemetry extends IPartC {
1375
+ /**
1376
+ * Unique guid identifying this error
1377
+ */
1378
+ id?: string;
1379
+ /**
1380
+ * @deprecated
1381
+ * @type {Error}
1382
+ * @memberof IExceptionTelemetry
1383
+ * @description DEPRECATED: Please use exception instead. Behavior/usage for exception remains the same as this field.
1384
+ */
1385
+ error?: Error;
1276
1386
  /**
1277
1387
  * @type {Error}
1278
1388
  * @memberof IExceptionTelemetry
@@ -1319,6 +1429,54 @@ declare namespace ApplicationInsights {
1319
1429
  ip: string;
1320
1430
  }
1321
1431
 
1432
+ /**
1433
+ * 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.
1434
+ */
1435
+ interface IMessageData extends IDomain {
1436
+ /**
1437
+ * Schema version
1438
+ */
1439
+ ver: number;
1440
+ /**
1441
+ * Trace message
1442
+ */
1443
+ message: string;
1444
+ /**
1445
+ * Trace severity level.
1446
+ */
1447
+ severityLevel: SeverityLevel;
1448
+ /**
1449
+ * Collection of custom properties.
1450
+ */
1451
+ properties: any;
1452
+ /**
1453
+ * Collection of custom measurements.
1454
+ */
1455
+ measurements: any;
1456
+ }
1457
+
1458
+ /**
1459
+ * An instance of the Metric item is a list of measurements (single data points) and/or aggregations.
1460
+ */
1461
+ interface IMetricData extends IDomain {
1462
+ /**
1463
+ * Schema version
1464
+ */
1465
+ ver: number;
1466
+ /**
1467
+ * 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.
1468
+ */
1469
+ metrics: IDataPoint[];
1470
+ /**
1471
+ * Collection of custom properties.
1472
+ */
1473
+ properties: any;
1474
+ /**
1475
+ * Collection of custom measurements.
1476
+ */
1477
+ measurements: any;
1478
+ }
1479
+
1322
1480
  interface IMetricTelemetry extends IPartC {
1323
1481
  /**
1324
1482
  * @description (required) - name of this metric
@@ -1369,6 +1527,50 @@ declare namespace ApplicationInsights {
1369
1527
  name: string;
1370
1528
  }
1371
1529
 
1530
+ /**
1531
+ * An instance of PageView represents a generic action on a page like a button click. It is also the base type for PageView.
1532
+ */
1533
+ interface IPageViewData extends IEventData {
1534
+ /**
1535
+ * Request URL with all query string parameters
1536
+ */
1537
+ url: string;
1538
+ /**
1539
+ * 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.
1540
+ */
1541
+ duration: string;
1542
+ /**
1543
+ * Identifier of a page view instance. Used for correlation between page view and other telemetry items.
1544
+ */
1545
+ id: string;
1546
+ }
1547
+
1548
+ /**
1549
+ * 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.
1550
+ */
1551
+ interface IPageViewPerfData extends IPageViewData {
1552
+ /**
1553
+ * Performance total in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
1554
+ */
1555
+ perfTotal: string;
1556
+ /**
1557
+ * Network connection time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
1558
+ */
1559
+ networkConnect: string;
1560
+ /**
1561
+ * Sent request time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
1562
+ */
1563
+ sentRequest: string;
1564
+ /**
1565
+ * Received response time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
1566
+ */
1567
+ receivedResponse: string;
1568
+ /**
1569
+ * DOM processing time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
1570
+ */
1571
+ domProcessing: string;
1572
+ }
1573
+
1372
1574
  interface IPageViewPerformanceTelemetry extends IPartC {
1373
1575
  /**
1374
1576
  * name String - The name of the page. Defaults to the document title.
@@ -1501,6 +1703,56 @@ declare namespace ApplicationInsights {
1501
1703
  readonly context: ITelemetryContext;
1502
1704
  }
1503
1705
 
1706
+ /**
1707
+ * An instance of Remote Dependency represents an interaction of the monitored component with a remote component/service like SQL or an HTTP endpoint.
1708
+ */
1709
+ interface IRemoteDependencyData extends IDomain {
1710
+ /**
1711
+ * Schema version
1712
+ */
1713
+ ver: number;
1714
+ /**
1715
+ * Name of the command initiated with this dependency call. Low cardinality value. Examples are stored procedure name and URL path template.
1716
+ */
1717
+ name: string;
1718
+ /**
1719
+ * Identifier of a dependency call instance. Used for correlation with the request telemetry item corresponding to this dependency call.
1720
+ */
1721
+ id: string;
1722
+ /**
1723
+ * Result code of a dependency call. Examples are SQL error code and HTTP status code.
1724
+ */
1725
+ resultCode: string;
1726
+ /**
1727
+ * Request duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000 days.
1728
+ */
1729
+ duration: string;
1730
+ /**
1731
+ * Indication of successful or unsuccessful call.
1732
+ */
1733
+ success: boolean;
1734
+ /**
1735
+ * Command initiated by this dependency call. Examples are SQL statement and HTTP URL's with all query parameters.
1736
+ */
1737
+ data: string;
1738
+ /**
1739
+ * Target site of a dependency call. Examples are server name, host address.
1740
+ */
1741
+ target: string;
1742
+ /**
1743
+ * 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.
1744
+ */
1745
+ type: string;
1746
+ /**
1747
+ * Collection of custom properties.
1748
+ */
1749
+ properties: any;
1750
+ /**
1751
+ * Collection of custom measurements.
1752
+ */
1753
+ measurements: any;
1754
+ }
1755
+
1504
1756
  interface IRequestContext {
1505
1757
  status?: number;
1506
1758
  xhr?: XMLHttpRequest;
@@ -1592,6 +1844,32 @@ declare namespace ApplicationInsights {
1592
1844
  obj: string[];
1593
1845
  }
1594
1846
 
1847
+ /**
1848
+ * Stack frame information.
1849
+ */
1850
+ interface IStackFrame {
1851
+ /**
1852
+ * Level in the call stack. For the long stacks SDK may not report every function in a call stack.
1853
+ */
1854
+ level: number;
1855
+ /**
1856
+ * Method name.
1857
+ */
1858
+ method: string;
1859
+ /**
1860
+ * Name of the assembly (dll, jar, etc.) containing this function.
1861
+ */
1862
+ assembly: string;
1863
+ /**
1864
+ * File name or URL of the method implementation.
1865
+ */
1866
+ fileName: string;
1867
+ /**
1868
+ * Line number of the code implementation.
1869
+ */
1870
+ line: number;
1871
+ }
1872
+
1595
1873
  interface ITelemetryContext {
1596
1874
  /**
1597
1875
  * The object describing a component tracked by this object.
@@ -1931,34 +2209,7 @@ declare namespace ApplicationInsights {
1931
2209
  domain: string;
1932
2210
  }
1933
2211
 
1934
- /**
1935
- * 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.
1936
- */
1937
- class MessageData implements Domain {
1938
- /**
1939
- * Schema version
1940
- */
1941
- ver: number;
1942
- /**
1943
- * Trace message
1944
- */
1945
- message: string;
1946
- /**
1947
- * Trace severity level.
1948
- */
1949
- severityLevel: SeverityLevel;
1950
- /**
1951
- * Collection of custom properties.
1952
- */
1953
- properties: any;
1954
- /**
1955
- * Collection of custom measurements.
1956
- */
1957
- measurements: any;
1958
- constructor();
1959
- }
1960
-
1961
- class Metric extends MetricData implements ISerializable {
2212
+ class Metric implements IMetricData, ISerializable {
1962
2213
  static envelopeType: string;
1963
2214
  static dataType: string;
1964
2215
  aiDataContract: {
@@ -1966,18 +2217,6 @@ declare namespace ApplicationInsights {
1966
2217
  metrics: FieldType;
1967
2218
  properties: FieldType;
1968
2219
  };
1969
- /**
1970
- * Constructs a new instance of the MetricTelemetry object
1971
- */
1972
- constructor(logger: IDiagnosticLogger, name: string, value: number, count?: number, min?: number, max?: number, stdDev?: number, properties?: any, measurements?: {
1973
- [key: string]: number;
1974
- });
1975
- }
1976
-
1977
- /**
1978
- * An instance of the Metric item is a list of measurements (single data points) and/or aggregations.
1979
- */
1980
- class MetricData implements Domain {
1981
2220
  /**
1982
2221
  * Schema version
1983
2222
  */
@@ -1994,7 +2233,12 @@ declare namespace ApplicationInsights {
1994
2233
  * Collection of custom measurements.
1995
2234
  */
1996
2235
  measurements: any;
1997
- constructor();
2236
+ /**
2237
+ * Constructs a new instance of the MetricTelemetry object
2238
+ */
2239
+ constructor(logger: IDiagnosticLogger, name: string, value: number, count?: number, min?: number, max?: number, stdDev?: number, properties?: any, measurements?: {
2240
+ [key: string]: number;
2241
+ });
1998
2242
  }
1999
2243
 
2000
2244
  /**
@@ -2002,7 +2246,7 @@ declare namespace ApplicationInsights {
2002
2246
  */
2003
2247
  function msToTimeSpan(totalms: number): string;
2004
2248
 
2005
- class PageView extends PageViewData implements ISerializable {
2249
+ class PageView implements IPageViewData, ISerializable {
2006
2250
  static envelopeType: string;
2007
2251
  static dataType: string;
2008
2252
  aiDataContract: {
@@ -2014,6 +2258,34 @@ declare namespace ApplicationInsights {
2014
2258
  measurements: FieldType;
2015
2259
  id: FieldType;
2016
2260
  };
2261
+ /**
2262
+ * Schema version
2263
+ */
2264
+ ver: number;
2265
+ /**
2266
+ * Event name. Keep it low cardinality to allow proper grouping and useful metrics.
2267
+ */
2268
+ name: string;
2269
+ /**
2270
+ * Collection of custom properties.
2271
+ */
2272
+ properties: any;
2273
+ /**
2274
+ * Collection of custom measurements.
2275
+ */
2276
+ measurements: any;
2277
+ /**
2278
+ * Request URL with all query string parameters
2279
+ */
2280
+ url: string;
2281
+ /**
2282
+ * 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.
2283
+ */
2284
+ duration: string;
2285
+ /**
2286
+ * Identifier of a page view instance. Used for correlation between page view and other telemetry items.
2287
+ */
2288
+ id: string;
2017
2289
  /**
2018
2290
  * Constructs a new instance of the PageEventTelemetry object
2019
2291
  */
@@ -2024,30 +2296,30 @@ declare namespace ApplicationInsights {
2024
2296
  }, id?: string);
2025
2297
  }
2026
2298
 
2027
- /**
2028
- * An instance of PageView represents a generic action on a page like a button click. It is also the base type for PageView.
2029
- */
2030
- class PageViewData extends EventData {
2299
+ class PageViewPerformance implements IPageViewPerfData, ISerializable {
2300
+ static envelopeType: string;
2301
+ static dataType: string;
2302
+ aiDataContract: {
2303
+ ver: FieldType;
2304
+ name: FieldType;
2305
+ url: FieldType;
2306
+ duration: FieldType;
2307
+ perfTotal: FieldType;
2308
+ networkConnect: FieldType;
2309
+ sentRequest: FieldType;
2310
+ receivedResponse: FieldType;
2311
+ domProcessing: FieldType;
2312
+ properties: FieldType;
2313
+ measurements: FieldType;
2314
+ };
2031
2315
  /**
2032
2316
  * Schema version
2033
2317
  */
2034
2318
  ver: number;
2035
- /**
2036
- * Request URL with all query string parameters
2037
- */
2038
- url: string;
2039
2319
  /**
2040
2320
  * Event name. Keep it low cardinality to allow proper grouping and useful metrics.
2041
2321
  */
2042
2322
  name: string;
2043
- /**
2044
- * 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.
2045
- */
2046
- duration: string;
2047
- /**
2048
- * Identifier of a page view instance. Used for correlation between page view and other telemetry items.
2049
- */
2050
- id: string;
2051
2323
  /**
2052
2324
  * Collection of custom properties.
2053
2325
  */
@@ -2056,33 +2328,22 @@ declare namespace ApplicationInsights {
2056
2328
  * Collection of custom measurements.
2057
2329
  */
2058
2330
  measurements: any;
2059
- constructor();
2060
- }
2061
-
2062
- /**
2063
- * 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.
2064
- */
2065
- class PageViewPerfData extends PageViewData {
2066
- /**
2067
- * Schema version
2068
- */
2069
- ver: number;
2070
2331
  /**
2071
2332
  * Request URL with all query string parameters
2072
2333
  */
2073
2334
  url: string;
2074
2335
  /**
2075
- * Performance total in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
2336
+ * 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.
2076
2337
  */
2077
- perfTotal: string;
2338
+ duration: string;
2078
2339
  /**
2079
- * Event name. Keep it low cardinality to allow proper grouping and useful metrics.
2340
+ * Identifier of a page view instance. Used for correlation between page view and other telemetry items.
2080
2341
  */
2081
- name: string;
2342
+ id: string;
2082
2343
  /**
2083
- * 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.
2344
+ * Performance total in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
2084
2345
  */
2085
- duration: string;
2346
+ perfTotal: string;
2086
2347
  /**
2087
2348
  * Network connection time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
2088
2349
  */
@@ -2099,33 +2360,6 @@ declare namespace ApplicationInsights {
2099
2360
  * DOM processing time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
2100
2361
  */
2101
2362
  domProcessing: string;
2102
- /**
2103
- * Collection of custom properties.
2104
- */
2105
- properties: any;
2106
- /**
2107
- * Collection of custom measurements.
2108
- */
2109
- measurements: any;
2110
- constructor();
2111
- }
2112
-
2113
- class PageViewPerformance extends PageViewPerfData implements ISerializable {
2114
- static envelopeType: string;
2115
- static dataType: string;
2116
- aiDataContract: {
2117
- ver: FieldType;
2118
- name: FieldType;
2119
- url: FieldType;
2120
- duration: FieldType;
2121
- perfTotal: FieldType;
2122
- networkConnect: FieldType;
2123
- sentRequest: FieldType;
2124
- receivedResponse: FieldType;
2125
- domProcessing: FieldType;
2126
- properties: FieldType;
2127
- measurements: FieldType;
2128
- };
2129
2363
  /**
2130
2364
  * Constructs a new instance of the PageEventTelemetry object
2131
2365
  */
@@ -2142,7 +2376,7 @@ declare namespace ApplicationInsights {
2142
2376
 
2143
2377
  const PropertiesPluginIdentifier = "AppInsightsPropertiesPlugin";
2144
2378
 
2145
- class RemoteDependencyData extends RemoteDependencyData_2 implements ISerializable {
2379
+ class RemoteDependencyData implements IRemoteDependencyData, ISerializable {
2146
2380
  static envelopeType: string;
2147
2381
  static dataType: string;
2148
2382
  aiDataContract: {
@@ -2168,16 +2402,6 @@ declare namespace ApplicationInsights {
2168
2402
  commandName: FieldType;
2169
2403
  dependencyTypeName: FieldType;
2170
2404
  };
2171
- /**
2172
- * Constructs a new instance of the RemoteDependencyData object
2173
- */
2174
- 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);
2175
- }
2176
-
2177
- /**
2178
- * An instance of Remote Dependency represents an interaction of the monitored component with a remote component/service like SQL or an HTTP endpoint.
2179
- */
2180
- class RemoteDependencyData_2 implements Domain {
2181
2405
  /**
2182
2406
  * Schema version
2183
2407
  */
@@ -2222,7 +2446,10 @@ declare namespace ApplicationInsights {
2222
2446
  * Collection of custom measurements.
2223
2447
  */
2224
2448
  measurements: any;
2225
- constructor();
2449
+ /**
2450
+ * Constructs a new instance of the RemoteDependencyData object
2451
+ */
2452
+ 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);
2226
2453
  }
2227
2454
 
2228
2455
  const RequestHeaders: IRequestHeaders;
@@ -2240,32 +2467,6 @@ declare namespace ApplicationInsights {
2240
2467
  Critical = 4
2241
2468
  }
2242
2469
 
2243
- /**
2244
- * Stack frame information.
2245
- */
2246
- class StackFrame {
2247
- /**
2248
- * Level in the call stack. For the long stacks SDK may not report every function in a call stack.
2249
- */
2250
- level: number;
2251
- /**
2252
- * Method name.
2253
- */
2254
- method: string;
2255
- /**
2256
- * Name of the assembly (dll, jar, etc.) containing this function.
2257
- */
2258
- assembly: string;
2259
- /**
2260
- * File name or URL of the method implementation.
2261
- */
2262
- fileName: string;
2263
- /**
2264
- * Line number of the code implementation.
2265
- */
2266
- line: number;
2267
- }
2268
-
2269
2470
  function stringToBoolOrDefault(str: any, defaultValue?: boolean): boolean;
2270
2471
 
2271
2472
  const strNotSpecified = "not_specified";
@@ -2287,7 +2488,7 @@ declare namespace ApplicationInsights {
2287
2488
  }): ITelemetryItem;
2288
2489
  }
2289
2490
 
2290
- class Trace extends MessageData implements ISerializable {
2491
+ class Trace implements IMessageData, ISerializable {
2291
2492
  static envelopeType: string;
2292
2493
  static dataType: string;
2293
2494
  aiDataContract: {
@@ -2296,6 +2497,26 @@ declare namespace ApplicationInsights {
2296
2497
  severityLevel: FieldType;
2297
2498
  properties: FieldType;
2298
2499
  };
2500
+ /**
2501
+ * Schema version
2502
+ */
2503
+ ver: number;
2504
+ /**
2505
+ * Trace message
2506
+ */
2507
+ message: string;
2508
+ /**
2509
+ * Trace severity level.
2510
+ */
2511
+ severityLevel: SeverityLevel;
2512
+ /**
2513
+ * Collection of custom properties.
2514
+ */
2515
+ properties: any;
2516
+ /**
2517
+ * Collection of custom measurements.
2518
+ */
2519
+ measurements: any;
2299
2520
  /**
2300
2521
  * Constructs a new instance of the TraceTelemetry object
2301
2522
  */
@@ -2320,12 +2541,25 @@ declare namespace ApplicationInsights {
2320
2541
 
2321
2542
  const Util: IUtil;
2322
2543
 
2323
- function utlCanUseLocalStorage(): boolean;
2544
+ /**
2545
+ * Returns whether LocalStorage can be used, if the reset parameter is passed a true this will override
2546
+ * any previous disable calls.
2547
+ * @param reset - Should the usage be reset and determined only based on whether LocalStorage is available
2548
+ */
2549
+ function utlCanUseLocalStorage(reset?: boolean): boolean;
2324
2550
 
2325
- function utlCanUseSessionStorage(): boolean;
2551
+ function utlCanUseSessionStorage(reset?: boolean): boolean;
2326
2552
 
2553
+ /**
2554
+ * Disables the global SDK usage of local or session storage if available
2555
+ */
2327
2556
  function utlDisableStorage(): void;
2328
2557
 
2558
+ /**
2559
+ * Re-enables the global SDK usage of local or session storage if available
2560
+ */
2561
+ function utlEnableStorage(): void;
2562
+
2329
2563
  function utlGetLocalStorage(logger: IDiagnosticLogger, name: string): string;
2330
2564
 
2331
2565
  function utlGetSessionStorage(logger: IDiagnosticLogger, name: string): string;