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

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