@microsoft/applicationinsights-common 2.8.0-beta.2203-16 → 2.8.0-nightly.2204-05

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 (223) hide show
  1. package/browser/applicationinsights-common.integrity.json +9 -9
  2. package/browser/applicationinsights-common.js +521 -743
  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 +2816 -1246
  7. package/dist/applicationinsights-common.api.md +87 -43
  8. package/dist/applicationinsights-common.d.ts +503 -290
  9. package/dist/applicationinsights-common.js +521 -743
  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 +503 -290
  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 +1 -1
  18. package/dist-esm/HelperFuncs.js +1 -1
  19. package/dist-esm/Interfaces/ConnectionString.js +1 -1
  20. package/dist-esm/Interfaces/Context/IApplication.js +1 -1
  21. package/dist-esm/Interfaces/Context/IDevice.js +1 -1
  22. package/dist-esm/Interfaces/Context/IInternal.js +1 -1
  23. package/dist-esm/Interfaces/Context/ILocation.js +1 -1
  24. package/dist-esm/Interfaces/Context/IOperatingSystem.js +1 -1
  25. package/dist-esm/Interfaces/Context/ISample.js +1 -1
  26. package/dist-esm/Interfaces/Context/ISession.js +1 -1
  27. package/dist-esm/Interfaces/Context/ITelemetryTrace.js +1 -1
  28. package/dist-esm/Interfaces/Context/IUser.js +1 -1
  29. package/dist-esm/Interfaces/Context/IWeb.js +1 -1
  30. package/dist-esm/Interfaces/Contracts/AvailabilityData.js +1 -1
  31. package/dist-esm/Interfaces/Contracts/ContextTagKeys.js +1 -1
  32. package/dist-esm/Interfaces/Contracts/DataPointType.js +1 -1
  33. package/dist-esm/Interfaces/Contracts/DependencyKind.js +1 -1
  34. package/dist-esm/Interfaces/Contracts/DependencySourceType.js +1 -1
  35. package/dist-esm/Interfaces/Contracts/IBase.js +1 -1
  36. package/dist-esm/Interfaces/Contracts/IData.js +1 -1
  37. package/dist-esm/Interfaces/Contracts/IDataPoint.js +1 -1
  38. package/dist-esm/Interfaces/Contracts/IDomain.js +1 -1
  39. package/dist-esm/Interfaces/Contracts/IEnvelope.js +1 -1
  40. package/dist-esm/Interfaces/Contracts/IEventData.js +1 -1
  41. package/dist-esm/Interfaces/Contracts/IExceptionData.js +1 -1
  42. package/dist-esm/Interfaces/Contracts/IExceptionDetails.js +1 -1
  43. package/dist-esm/Interfaces/Contracts/IMessageData.js +1 -1
  44. package/dist-esm/Interfaces/Contracts/IMetricData.js +1 -1
  45. package/dist-esm/Interfaces/Contracts/IPageViewData.js +1 -1
  46. package/dist-esm/Interfaces/Contracts/IPageViewPerfData.js +1 -1
  47. package/dist-esm/Interfaces/Contracts/IRemoteDependencyData.js +1 -1
  48. package/dist-esm/Interfaces/Contracts/IStackFrame.js +1 -1
  49. package/dist-esm/Interfaces/Contracts/RequestData.js +1 -1
  50. package/dist-esm/Interfaces/Contracts/SeverityLevel.js +1 -1
  51. package/dist-esm/Interfaces/IAppInsights.js +1 -1
  52. package/dist-esm/Interfaces/IChannelControlsAI.js +1 -1
  53. package/dist-esm/Interfaces/IConfig.js +1 -1
  54. package/dist-esm/Interfaces/ICorrelationConfig.js +1 -1
  55. package/dist-esm/Interfaces/IDependencyTelemetry.js +1 -1
  56. package/dist-esm/Interfaces/IEventTelemetry.js +1 -1
  57. package/dist-esm/Interfaces/IExceptionTelemetry.js +1 -1
  58. package/dist-esm/Interfaces/IMetricTelemetry.js +1 -1
  59. package/dist-esm/Interfaces/IPageViewPerformanceTelemetry.js +1 -1
  60. package/dist-esm/Interfaces/IPageViewTelemetry.js +1 -1
  61. package/dist-esm/Interfaces/IPartC.js +1 -1
  62. package/dist-esm/Interfaces/IPropertiesPlugin.js +1 -1
  63. package/dist-esm/Interfaces/IRequestContext.js +1 -1
  64. package/dist-esm/Interfaces/ITelemetryContext.js +1 -1
  65. package/dist-esm/Interfaces/ITraceTelemetry.js +1 -1
  66. package/dist-esm/Interfaces/PartAExtensions.js +2 -2
  67. package/dist-esm/Interfaces/PartAExtensions.js.map +1 -1
  68. package/dist-esm/Interfaces/Telemetry/IEnvelope.js +1 -1
  69. package/dist-esm/Interfaces/Telemetry/ISerializable.js +1 -1
  70. package/dist-esm/RequestResponseHeaders.js +1 -1
  71. package/dist-esm/StorageHelperFuncs.js +8 -8
  72. package/dist-esm/StorageHelperFuncs.js.map +1 -1
  73. package/dist-esm/Telemetry/Common/Data.js +6 -11
  74. package/dist-esm/Telemetry/Common/Data.js.map +1 -1
  75. package/dist-esm/Telemetry/Common/DataPoint.js +8 -9
  76. package/dist-esm/Telemetry/Common/DataPoint.js.map +1 -1
  77. package/dist-esm/Telemetry/Common/DataSanitizer.js +9 -9
  78. package/dist-esm/Telemetry/Common/DataSanitizer.js.map +1 -1
  79. package/dist-esm/Telemetry/Common/Envelope.js +12 -12
  80. package/dist-esm/Telemetry/Common/Envelope.js.map +1 -1
  81. package/dist-esm/Telemetry/Event.js +9 -12
  82. package/dist-esm/Telemetry/Event.js.map +1 -1
  83. package/dist-esm/Telemetry/Exception.js +74 -81
  84. package/dist-esm/Telemetry/Exception.js.map +1 -1
  85. package/dist-esm/Telemetry/Metric.js +9 -12
  86. package/dist-esm/Telemetry/Metric.js.map +1 -1
  87. package/dist-esm/Telemetry/PageView.js +12 -15
  88. package/dist-esm/Telemetry/PageView.js.map +1 -1
  89. package/dist-esm/Telemetry/PageViewPerformance.js +16 -19
  90. package/dist-esm/Telemetry/PageViewPerformance.js.map +1 -1
  91. package/dist-esm/Telemetry/RemoteDependencyData.js +17 -20
  92. package/dist-esm/Telemetry/RemoteDependencyData.js.map +1 -1
  93. package/dist-esm/Telemetry/Trace.js +10 -13
  94. package/dist-esm/Telemetry/Trace.js.map +1 -1
  95. package/dist-esm/TelemetryItemCreator.js +1 -1
  96. package/dist-esm/UrlHelperFuncs.js +1 -1
  97. package/dist-esm/Util.js +1 -1
  98. package/dist-esm/applicationinsights-common.js +3 -6
  99. package/dist-esm/applicationinsights-common.js.map +1 -1
  100. package/package.json +3 -3
  101. package/src/Interfaces/IExceptionTelemetry.ts +1 -1
  102. package/src/Interfaces/ITraceTelemetry.ts +1 -1
  103. package/src/Interfaces/PartAExtensions.ts +1 -1
  104. package/src/Interfaces/Telemetry/IEnvelope.ts +35 -3
  105. package/src/StorageHelperFuncs.ts +7 -7
  106. package/src/Telemetry/Common/Data.ts +12 -4
  107. package/src/Telemetry/Common/DataPoint.ts +38 -2
  108. package/src/Telemetry/Common/DataSanitizer.ts +10 -10
  109. package/src/Telemetry/Common/Envelope.ts +51 -10
  110. package/src/Telemetry/Event.ts +30 -12
  111. package/src/Telemetry/Exception.ts +158 -71
  112. package/src/Telemetry/Metric.ts +27 -7
  113. package/src/Telemetry/PageView.ts +45 -10
  114. package/src/Telemetry/PageViewPerformance.ts +76 -14
  115. package/src/Telemetry/RemoteDependencyData.ts +70 -15
  116. package/src/Telemetry/Trace.ts +34 -8
  117. package/src/applicationinsights-common.ts +5 -5
  118. package/types/Enums.d.ts +4 -4
  119. package/types/Interfaces/IExceptionTelemetry.d.ts +1 -1
  120. package/types/Interfaces/ITraceTelemetry.d.ts +1 -1
  121. package/types/Interfaces/PartAExtensions.d.ts +1 -1
  122. package/types/Interfaces/Telemetry/IEnvelope.d.ts +24 -0
  123. package/types/Telemetry/Common/Data.d.ts +10 -2
  124. package/types/Telemetry/Common/DataPoint.d.ts +31 -2
  125. package/types/Telemetry/Common/DataSanitizer.d.ts +3 -3
  126. package/types/Telemetry/Common/Envelope.d.ts +35 -4
  127. package/types/Telemetry/Event.d.ts +19 -3
  128. package/types/Telemetry/Exception.d.ts +75 -7
  129. package/types/Telemetry/Metric.d.ts +19 -2
  130. package/types/Telemetry/PageView.d.ts +30 -2
  131. package/types/Telemetry/PageViewPerformance.d.ts +50 -2
  132. package/types/Telemetry/RemoteDependencyData.d.ts +46 -2
  133. package/types/Telemetry/Trace.d.ts +23 -3
  134. package/types/applicationinsights-common.d.ts +5 -5
  135. package/types/tsdoc-metadata.json +1 -1
  136. package/dist-esm/Interfaces/Contracts/Generated/AvailabilityData.js +0 -27
  137. package/dist-esm/Interfaces/Contracts/Generated/AvailabilityData.js.map +0 -1
  138. package/dist-esm/Interfaces/Contracts/Generated/Base.js +0 -17
  139. package/dist-esm/Interfaces/Contracts/Generated/Base.js.map +0 -1
  140. package/dist-esm/Interfaces/Contracts/Generated/ContextTagKeys.js +0 -89
  141. package/dist-esm/Interfaces/Contracts/Generated/ContextTagKeys.js.map +0 -1
  142. package/dist-esm/Interfaces/Contracts/Generated/Data.js +0 -21
  143. package/dist-esm/Interfaces/Contracts/Generated/Data.js.map +0 -1
  144. package/dist-esm/Interfaces/Contracts/Generated/DataPoint.js +0 -21
  145. package/dist-esm/Interfaces/Contracts/Generated/DataPoint.js.map +0 -1
  146. package/dist-esm/Interfaces/Contracts/Generated/DataPointType.js +0 -16
  147. package/dist-esm/Interfaces/Contracts/Generated/DataPointType.js.map +0 -1
  148. package/dist-esm/Interfaces/Contracts/Generated/DependencyKind.js +0 -17
  149. package/dist-esm/Interfaces/Contracts/Generated/DependencyKind.js.map +0 -1
  150. package/dist-esm/Interfaces/Contracts/Generated/DependencySourceType.js +0 -17
  151. package/dist-esm/Interfaces/Contracts/Generated/DependencySourceType.js.map +0 -1
  152. package/dist-esm/Interfaces/Contracts/Generated/Domain.js +0 -8
  153. package/dist-esm/Interfaces/Contracts/Generated/Domain.js.map +0 -1
  154. package/dist-esm/Interfaces/Contracts/Generated/Envelope.js +0 -28
  155. package/dist-esm/Interfaces/Contracts/Generated/Envelope.js.map +0 -1
  156. package/dist-esm/Interfaces/Contracts/Generated/EventData.js +0 -28
  157. package/dist-esm/Interfaces/Contracts/Generated/EventData.js.map +0 -1
  158. package/dist-esm/Interfaces/Contracts/Generated/ExceptionData.js +0 -32
  159. package/dist-esm/Interfaces/Contracts/Generated/ExceptionData.js.map +0 -1
  160. package/dist-esm/Interfaces/Contracts/Generated/ExceptionDetails.js +0 -24
  161. package/dist-esm/Interfaces/Contracts/Generated/ExceptionDetails.js.map +0 -1
  162. package/dist-esm/Interfaces/Contracts/Generated/MessageData.js +0 -28
  163. package/dist-esm/Interfaces/Contracts/Generated/MessageData.js.map +0 -1
  164. package/dist-esm/Interfaces/Contracts/Generated/MetricData.js +0 -32
  165. package/dist-esm/Interfaces/Contracts/Generated/MetricData.js.map +0 -1
  166. package/dist-esm/Interfaces/Contracts/Generated/PageViewData.js +0 -34
  167. package/dist-esm/Interfaces/Contracts/Generated/PageViewData.js.map +0 -1
  168. package/dist-esm/Interfaces/Contracts/Generated/PageViewPerfData.js +0 -34
  169. package/dist-esm/Interfaces/Contracts/Generated/PageViewPerfData.js.map +0 -1
  170. package/dist-esm/Interfaces/Contracts/Generated/RemoteDependencyData.js +0 -32
  171. package/dist-esm/Interfaces/Contracts/Generated/RemoteDependencyData.js.map +0 -1
  172. package/dist-esm/Interfaces/Contracts/Generated/RequestData.js +0 -28
  173. package/dist-esm/Interfaces/Contracts/Generated/RequestData.js.map +0 -1
  174. package/dist-esm/Interfaces/Contracts/Generated/SeverityLevel.js +0 -19
  175. package/dist-esm/Interfaces/Contracts/Generated/SeverityLevel.js.map +0 -1
  176. package/dist-esm/Interfaces/Contracts/Generated/StackFrame.js +0 -17
  177. package/dist-esm/Interfaces/Contracts/Generated/StackFrame.js.map +0 -1
  178. package/dist-esm/Telemetry/Common/Base.js +0 -22
  179. package/dist-esm/Telemetry/Common/Base.js.map +0 -1
  180. package/src/Interfaces/Contracts/Generated/AvailabilityData.ts +0 -57
  181. package/src/Interfaces/Contracts/Generated/Base.ts +0 -18
  182. package/src/Interfaces/Contracts/Generated/ContextTagKeys.ts +0 -299
  183. package/src/Interfaces/Contracts/Generated/Data.ts +0 -26
  184. package/src/Interfaces/Contracts/Generated/DataPoint.ts +0 -44
  185. package/src/Interfaces/Contracts/Generated/DataPointType.ts +0 -11
  186. package/src/Interfaces/Contracts/Generated/DependencyKind.ts +0 -12
  187. package/src/Interfaces/Contracts/Generated/DependencySourceType.ts +0 -12
  188. package/src/Interfaces/Contracts/Generated/Domain.ts +0 -10
  189. package/src/Interfaces/Contracts/Generated/Envelope.ts +0 -50
  190. package/src/Interfaces/Contracts/Generated/EventData.ts +0 -33
  191. package/src/Interfaces/Contracts/Generated/ExceptionData.ts +0 -40
  192. package/src/Interfaces/Contracts/Generated/ExceptionDetails.ts +0 -46
  193. package/src/Interfaces/Contracts/Generated/MessageData.ts +0 -39
  194. package/src/Interfaces/Contracts/Generated/MetricData.ts +0 -34
  195. package/src/Interfaces/Contracts/Generated/PageViewData.ts +0 -50
  196. package/src/Interfaces/Contracts/Generated/PageViewPerfData.ts +0 -70
  197. package/src/Interfaces/Contracts/Generated/RemoteDependencyData.ts +0 -68
  198. package/src/Interfaces/Contracts/Generated/RequestData.ts +0 -50
  199. package/src/Interfaces/Contracts/Generated/SeverityLevel.ts +0 -15
  200. package/src/Interfaces/Contracts/Generated/StackFrame.ts +0 -34
  201. package/src/Telemetry/Common/Base.ts +0 -14
  202. package/types/Interfaces/Contracts/Generated/AvailabilityData.d.ts +0 -42
  203. package/types/Interfaces/Contracts/Generated/Base.d.ts +0 -10
  204. package/types/Interfaces/Contracts/Generated/ContextTagKeys.d.ts +0 -175
  205. package/types/Interfaces/Contracts/Generated/Data.d.ts +0 -15
  206. package/types/Interfaces/Contracts/Generated/DataPoint.d.ts +0 -34
  207. package/types/Interfaces/Contracts/Generated/DataPointType.d.ts +0 -7
  208. package/types/Interfaces/Contracts/Generated/DependencyKind.d.ts +0 -8
  209. package/types/Interfaces/Contracts/Generated/DependencySourceType.d.ts +0 -8
  210. package/types/Interfaces/Contracts/Generated/Domain.d.ts +0 -5
  211. package/types/Interfaces/Contracts/Generated/Envelope.d.ts +0 -38
  212. package/types/Interfaces/Contracts/Generated/EventData.d.ts +0 -23
  213. package/types/Interfaces/Contracts/Generated/ExceptionData.d.ts +0 -29
  214. package/types/Interfaces/Contracts/Generated/ExceptionDetails.d.ts +0 -34
  215. package/types/Interfaces/Contracts/Generated/MessageData.d.ts +0 -28
  216. package/types/Interfaces/Contracts/Generated/MetricData.d.ts +0 -24
  217. package/types/Interfaces/Contracts/Generated/PageViewData.d.ts +0 -35
  218. package/types/Interfaces/Contracts/Generated/PageViewPerfData.d.ts +0 -51
  219. package/types/Interfaces/Contracts/Generated/RemoteDependencyData.d.ts +0 -51
  220. package/types/Interfaces/Contracts/Generated/RequestData.d.ts +0 -38
  221. package/types/Interfaces/Contracts/Generated/SeverityLevel.d.ts +0 -10
  222. package/types/Interfaces/Contracts/Generated/StackFrame.d.ts +0 -25
  223. package/types/Telemetry/Common/Base.d.ts +0 -8
@@ -5,11 +5,11 @@ import { dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString, d
5
5
  import { FieldType } from "../Enums";
6
6
  import { ISerializable } from "../Interfaces/Telemetry/ISerializable";
7
7
  import { AjaxHelperParseDependencyPath} from "../Util";
8
- import { RemoteDependencyData as GeneratedRemoteDependencyData } from "../Interfaces/Contracts/Generated/RemoteDependencyData";
8
+ import { IRemoteDependencyData } from "../Interfaces/Contracts/IRemoteDependencyData";
9
9
  import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
10
10
  import { msToTimeSpan } from "../HelperFuncs";
11
11
 
12
- export class RemoteDependencyData extends GeneratedRemoteDependencyData implements ISerializable {
12
+ export class RemoteDependencyData implements IRemoteDependencyData, ISerializable {
13
13
 
14
14
  public static envelopeType = "Microsoft.ApplicationInsights.{0}.RemoteDependency";
15
15
  public static dataType = "RemoteDependencyData";
@@ -39,29 +39,84 @@ export class RemoteDependencyData extends GeneratedRemoteDependencyData implemen
39
39
  dependencyTypeName: FieldType.Default
40
40
  }
41
41
 
42
+ /**
43
+ * Schema version
44
+ */
45
+ public ver: number; // = 2;
46
+
47
+ /**
48
+ * Name of the command initiated with this dependency call. Low cardinality value. Examples are stored procedure name and URL path template.
49
+ */
50
+ public name: string;
51
+
52
+ /**
53
+ * Identifier of a dependency call instance. Used for correlation with the request telemetry item corresponding to this dependency call.
54
+ */
55
+ public id: string;
56
+
57
+ /**
58
+ * Result code of a dependency call. Examples are SQL error code and HTTP status code.
59
+ */
60
+ public resultCode: string;
61
+
62
+ /**
63
+ * Request duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000 days.
64
+ */
65
+ public duration: string;
66
+
67
+ /**
68
+ * Indication of successful or unsuccessful call.
69
+ */
70
+ public success: boolean; /* true */
71
+
72
+ /**
73
+ * Command initiated by this dependency call. Examples are SQL statement and HTTP URL's with all query parameters.
74
+ */
75
+ public data: string;
76
+
77
+ /**
78
+ * Target site of a dependency call. Examples are server name, host address.
79
+ */
80
+ public target: string;
81
+
82
+ /**
83
+ * 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.
84
+ */
85
+ public type: string;
86
+
87
+ /**
88
+ * Collection of custom properties.
89
+ */
90
+ public properties: any; // = {};
91
+
92
+ /**
93
+ * Collection of custom measurements.
94
+ */
95
+ public measurements: any; // = {};
96
+
42
97
  /**
43
98
  * Constructs a new instance of the RemoteDependencyData object
44
99
  */
45
100
  constructor(logger: IDiagnosticLogger, id: string, absoluteUrl: string, commandName: string, value: number, success: boolean, resultCode: number, method?: string, requestAPI: string = "Ajax", correlationContext?: string, properties?: Object, measurements?: Object) {
46
- super();
47
-
48
- this.id = id;
101
+ let _self = this;
49
102
 
50
- this.duration = msToTimeSpan(value);
51
- this.success = success;
52
- this.resultCode = resultCode + "";
103
+ _self.ver = 2;
104
+ _self.id = id;
105
+ _self.duration = msToTimeSpan(value);
106
+ _self.success = success;
107
+ _self.resultCode = resultCode + "";
53
108
 
54
- this.type = dataSanitizeString(logger, requestAPI);
109
+ _self.type = dataSanitizeString(logger, requestAPI);
55
110
 
56
111
  const dependencyFields = AjaxHelperParseDependencyPath(logger, absoluteUrl, method, commandName);
57
- this.data = dataSanitizeUrl(logger, commandName) || dependencyFields.data; // get a value from hosturl if commandName not available
58
- this.target = dataSanitizeString(logger, dependencyFields.target);
112
+ _self.data = dataSanitizeUrl(logger, commandName) || dependencyFields.data; // get a value from hosturl if commandName not available
113
+ _self.target = dataSanitizeString(logger, dependencyFields.target);
59
114
  if (correlationContext) {
60
- this.target = `${this.target} | ${correlationContext}`;
115
+ _self.target = `${_self.target} | ${correlationContext}`;
61
116
  }
62
- this.name = dataSanitizeString(logger, dependencyFields.name);
117
+ _self.name = dataSanitizeString(logger, dependencyFields.name);
63
118
 
64
- this.properties = dataSanitizeProperties(logger, properties);
65
- this.measurements = dataSanitizeMeasurements(logger, measurements);
119
+ _self.properties = dataSanitizeProperties(logger, properties);
120
+ _self.measurements = dataSanitizeMeasurements(logger, measurements);
66
121
  }
67
122
  }
@@ -1,15 +1,15 @@
1
1
  // Copyright (c) Microsoft Corporation. All rights reserved.
2
2
  // Licensed under the MIT License.
3
3
 
4
- import { MessageData } from "../Interfaces/Contracts/Generated/MessageData";
4
+ import { IMessageData } from "../Interfaces/Contracts/IMessageData";
5
5
  import { ISerializable } from "../Interfaces/Telemetry/ISerializable";
6
6
  import { dataSanitizeMessage, dataSanitizeProperties, dataSanitizeMeasurements } from "./Common/DataSanitizer";
7
7
  import { FieldType } from "../Enums";
8
- import { SeverityLevel } from "../Interfaces/Contracts/Generated/SeverityLevel";
8
+ import { SeverityLevel } from "../Interfaces/Contracts/SeverityLevel";
9
9
  import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
10
10
  import { strNotSpecified } from "../Constants";
11
11
 
12
- export class Trace extends MessageData implements ISerializable {
12
+ export class Trace implements IMessageData, ISerializable {
13
13
 
14
14
  public static envelopeType = "Microsoft.ApplicationInsights.{0}.Message";
15
15
  public static dataType = "MessageData";
@@ -21,18 +21,44 @@ export class Trace extends MessageData implements ISerializable {
21
21
  properties: FieldType.Default
22
22
  };
23
23
 
24
+ /**
25
+ * Schema version
26
+ */
27
+ public ver: number; // = 2;
28
+
29
+ /**
30
+ * Trace message
31
+ */
32
+ public message: string;
33
+
34
+ /**
35
+ * Trace severity level.
36
+ */
37
+ public severityLevel: SeverityLevel;
38
+
39
+ /**
40
+ * Collection of custom properties.
41
+ */
42
+ public properties: any;
43
+
44
+ /**
45
+ * Collection of custom measurements.
46
+ */
47
+ public measurements: any;
48
+
24
49
  /**
25
50
  * Constructs a new instance of the TraceTelemetry object
26
51
  */
27
52
  constructor(logger: IDiagnosticLogger, message: string, severityLevel?: SeverityLevel, properties?: any, measurements?: { [key: string]: number }) {
28
- super();
53
+ let _self = this;
54
+ _self.ver = 2;
29
55
  message = message || strNotSpecified;
30
- this.message = dataSanitizeMessage(logger, message);
31
- this.properties = dataSanitizeProperties(logger, properties);
32
- this.measurements = dataSanitizeMeasurements(logger, measurements);
56
+ _self.message = dataSanitizeMessage(logger, message);
57
+ _self.properties = dataSanitizeProperties(logger, properties);
58
+ _self.measurements = dataSanitizeMeasurements(logger, measurements);
33
59
 
34
60
  if (severityLevel) {
35
- this.severityLevel = severityLevel;
61
+ _self.severityLevel = severityLevel;
36
62
  }
37
63
  }
38
64
  }
@@ -9,8 +9,8 @@ export { parseConnectionString, ConnectionStringParser } from "./ConnectionStrin
9
9
  export { FieldType } from "./Enums";
10
10
  export { IRequestHeaders, RequestHeaders } from "./RequestResponseHeaders";
11
11
  export { DisabledPropertyName, ProcessLegacy, SampleRate, HttpMethod, DEFAULT_BREEZE_ENDPOINT, strNotSpecified } from "./Constants";
12
- export { Data as AIData } from "./Interfaces/Contracts/Generated/Data";
13
- export { Base as AIBase } from "./Interfaces/Contracts/Generated/Base";
12
+ export { IData as AIData } from "./Interfaces/Contracts/IData";
13
+ export { IBase as AIBase } from "./Interfaces/Contracts/IBase";
14
14
  export { ISerializable } from "./Interfaces/Telemetry/ISerializable";
15
15
  export { IEnvelope } from "./Interfaces/Telemetry/IEnvelope";
16
16
  export { Envelope } from "./Telemetry/Common/Envelope";
@@ -18,7 +18,7 @@ export { Event } from "./Telemetry/Event";
18
18
  export { Exception } from "./Telemetry/Exception";
19
19
  export { Metric } from "./Telemetry/Metric";
20
20
  export { PageView } from "./Telemetry/PageView";
21
- export { PageViewData } from "./Interfaces/Contracts/Generated/PageViewData";
21
+ export { IPageViewData } from "./Interfaces/Contracts/IPageViewData";
22
22
  export { RemoteDependencyData } from "./Telemetry/RemoteDependencyData";
23
23
  export { IEventTelemetry } from "./Interfaces/IEventTelemetry";
24
24
  export { ITraceTelemetry } from "./Interfaces/ITraceTelemetry";
@@ -30,10 +30,10 @@ export { IPageViewPerformanceTelemetry, IPageViewPerformanceTelemetryInternal }
30
30
  export { Trace } from "./Telemetry/Trace";
31
31
  export { PageViewPerformance } from "./Telemetry/PageViewPerformance";
32
32
  export { Data } from "./Telemetry/Common/Data";
33
- export { SeverityLevel } from "./Interfaces/Contracts/Generated/SeverityLevel";
33
+ export { SeverityLevel } from "./Interfaces/Contracts/SeverityLevel";
34
34
  export { IConfig, ConfigurationManager } from "./Interfaces/IConfig";
35
35
  export { IChannelControlsAI } from "./Interfaces/IChannelControlsAI";
36
- export { IContextTagKeys, ContextTagKeys } from "./Interfaces/Contracts/Generated/ContextTagKeys";
36
+ export { IContextTagKeys, ContextTagKeys } from "./Interfaces/Contracts/ContextTagKeys";
37
37
  export {
38
38
  DataSanitizerValues, IDataSanitizer, DataSanitizer,
39
39
  dataSanitizeKeyAndAddUniqueness, dataSanitizeKey, dataSanitizeString, dataSanitizeUrl, dataSanitizeMessage,
package/types/Enums.d.ts CHANGED
@@ -5,10 +5,10 @@ export declare const enum eStorageType {
5
5
  LocalStorage = 0,
6
6
  SessionStorage = 1
7
7
  }
8
- export declare const StorageType: {
8
+ export declare const StorageType: import("@microsoft/applicationinsights-core-js").EnumValue<{
9
9
  LocalStorage: number;
10
10
  SessionStorage: number;
11
- };
11
+ }>;
12
12
  export declare type StorageType = eStorageType | typeof StorageType;
13
13
  /**
14
14
  * Enum is used in aiDataContract to describe how fields are serialized.
@@ -34,9 +34,9 @@ export declare const enum eDistributedTracingModes {
34
34
  */
35
35
  W3C = 2
36
36
  }
37
- export declare const DistributedTracingModes: {
37
+ export declare const DistributedTracingModes: import("@microsoft/applicationinsights-core-js").EnumValue<{
38
38
  AI: number;
39
39
  AI_AND_W3C: number;
40
40
  W3C: number;
41
- };
41
+ }>;
42
42
  export declare type DistributedTracingModes = number | eDistributedTracingModes;
@@ -1,4 +1,4 @@
1
- import { SeverityLevel } from "./Contracts/Generated/SeverityLevel";
1
+ import { SeverityLevel } from "./Contracts/SeverityLevel";
2
2
  import { IPartC } from "./IPartC";
3
3
  /**
4
4
  * @export
@@ -1,4 +1,4 @@
1
- import { SeverityLevel } from "./Contracts/Generated/SeverityLevel";
1
+ import { SeverityLevel } from "./Contracts/SeverityLevel";
2
2
  import { IPartC } from "./IPartC";
3
3
  export interface ITraceTelemetry extends IPartC {
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { ContextTagKeys } from "./Contracts/Generated/ContextTagKeys";
1
+ import { ContextTagKeys } from "./Contracts/ContextTagKeys";
2
2
  export declare const Extensions: {
3
3
  UserExt: string;
4
4
  DeviceExt: string;
@@ -1,13 +1,37 @@
1
1
  import { ISerializable } from "./ISerializable";
2
2
  export interface IEnvelope extends ISerializable {
3
+ /**
4
+ * 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.
5
+ */
3
6
  ver: number;
7
+ /**
8
+ * Type name of telemetry data item.
9
+ */
4
10
  name: string;
11
+ /**
12
+ * 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.
13
+ */
5
14
  time: string;
15
+ /**
16
+ * Sampling rate used in application. This telemetry item represents 1 / sampleRate actual telemetry items.
17
+ */
6
18
  sampleRate: number;
19
+ /**
20
+ * Sequence field used to track absolute order of uploaded events.
21
+ */
7
22
  seq: string;
23
+ /**
24
+ * 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.
25
+ */
8
26
  iKey: string;
27
+ /**
28
+ * Key/value collection of context properties. See ContextTagKeys for information on available properties.
29
+ */
9
30
  tags: {
10
31
  [name: string]: any;
11
32
  };
33
+ /**
34
+ * Telemetry data item.
35
+ */
12
36
  data: any;
13
37
  }
@@ -1,7 +1,7 @@
1
- import { Data as AIData } from "../../Interfaces/Contracts/Generated/Data";
1
+ import { IData } from "../../Interfaces/Contracts/IData";
2
2
  import { ISerializable } from "../../Interfaces/Telemetry/ISerializable";
3
3
  import { FieldType } from "../../Enums";
4
- export declare class Data<TDomain> extends AIData<TDomain> implements ISerializable {
4
+ export declare class Data<TDomain> implements IData<TDomain>, ISerializable {
5
5
  /**
6
6
  * The data contract for serializing this object.
7
7
  */
@@ -9,6 +9,14 @@ export declare class Data<TDomain> extends AIData<TDomain> implements ISerializa
9
9
  baseType: FieldType;
10
10
  baseData: FieldType;
11
11
  };
12
+ /**
13
+ * Name of item (B section) if any. If telemetry data is derived straight from this, this should be null.
14
+ */
15
+ baseType: string;
16
+ /**
17
+ * Container for data item (B section).
18
+ */
19
+ baseData: TDomain;
12
20
  /**
13
21
  * Constructs a new instance of telemetry data.
14
22
  */
@@ -1,7 +1,8 @@
1
- import { DataPoint as AIDataPoint } from "../../Interfaces/Contracts/Generated/DataPoint";
1
+ import { IDataPoint } from "../../Interfaces/Contracts/IDataPoint";
2
2
  import { ISerializable } from "../../Interfaces/Telemetry/ISerializable";
3
3
  import { FieldType } from "../../Enums";
4
- export declare class DataPoint extends AIDataPoint implements ISerializable {
4
+ import { DataPointType } from "../../Interfaces/Contracts/DataPointType";
5
+ export declare class DataPoint implements IDataPoint, ISerializable {
5
6
  /**
6
7
  * The data contract for serializing this object.
7
8
  */
@@ -14,4 +15,32 @@ export declare class DataPoint extends AIDataPoint implements ISerializable {
14
15
  max: FieldType;
15
16
  stdDev: FieldType;
16
17
  };
18
+ /**
19
+ * Name of the metric.
20
+ */
21
+ name: string;
22
+ /**
23
+ * Metric type. Single measurement or the aggregated value.
24
+ */
25
+ kind: DataPointType;
26
+ /**
27
+ * Single value for measurement. Sum of individual measurements for the aggregation.
28
+ */
29
+ value: number;
30
+ /**
31
+ * Metric weight of the aggregated metric. Should not be set for a measurement.
32
+ */
33
+ count: number;
34
+ /**
35
+ * Minimum value of the aggregated metric. Should not be set for a measurement.
36
+ */
37
+ min: number;
38
+ /**
39
+ * Maximum value of the aggregated metric. Should not be set for a measurement.
40
+ */
41
+ max: number;
42
+ /**
43
+ * Standard deviation of the aggregated metric. Should not be set for a measurement.
44
+ */
45
+ stdDev: number;
17
46
  }
@@ -1,4 +1,4 @@
1
- import { IDiagnosticLogger, _InternalMessageId } from "@microsoft/applicationinsights-core-js";
1
+ import { IDiagnosticLogger, _eInternalMessageId } from "@microsoft/applicationinsights-core-js";
2
2
  export declare const enum DataSanitizerValues {
3
3
  /**
4
4
  * Max length allowed for custom names.
@@ -38,7 +38,7 @@ export declare function dataSanitizeException(logger: IDiagnosticLogger, excepti
38
38
  export declare function dataSanitizeProperties(logger: IDiagnosticLogger, properties: any): any;
39
39
  export declare function dataSanitizeMeasurements(logger: IDiagnosticLogger, measurements: any): any;
40
40
  export declare function dataSanitizeId(logger: IDiagnosticLogger, id: string): string;
41
- export declare function dataSanitizeInput(logger: IDiagnosticLogger, input: any, maxLength: number, _msgId: _InternalMessageId): any;
41
+ export declare function dataSanitizeInput(logger: IDiagnosticLogger, input: any, maxLength: number, _msgId: _eInternalMessageId): any;
42
42
  export declare function dsPadNumber(num: number): string;
43
43
  export interface IDataSanitizer {
44
44
  /**
@@ -78,7 +78,7 @@ export interface IDataSanitizer {
78
78
  sanitizeProperties: (logger: IDiagnosticLogger, properties: any) => any;
79
79
  sanitizeMeasurements: (logger: IDiagnosticLogger, measurements: any) => any;
80
80
  sanitizeId: (logger: IDiagnosticLogger, id: string) => string;
81
- sanitizeInput: (logger: IDiagnosticLogger, input: any, maxLength: number, _msgId: _InternalMessageId) => any;
81
+ sanitizeInput: (logger: IDiagnosticLogger, input: any, maxLength: number, _msgId: _eInternalMessageId) => any;
82
82
  padNumber: (num: number) => string;
83
83
  /**
84
84
  * helper method to trim strings (IE8 does not implement String.prototype.trim)
@@ -1,14 +1,45 @@
1
- import { Envelope as AIEnvelope } from "../../Interfaces/Contracts/Generated/Envelope";
2
- import { Base } from "../../Interfaces/Contracts/Generated/Base";
1
+ import { IBase } from "../../Interfaces/Contracts/IBase";
3
2
  import { IEnvelope } from "../../Interfaces/Telemetry/IEnvelope";
4
3
  import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
5
- export declare class Envelope extends AIEnvelope implements IEnvelope {
4
+ export declare class Envelope implements IEnvelope {
6
5
  /**
7
6
  * The data contract for serializing this object.
8
7
  */
9
8
  aiDataContract: any;
9
+ /**
10
+ * 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.
11
+ */
12
+ ver: number;
13
+ /**
14
+ * Type name of telemetry data item.
15
+ */
16
+ name: string;
17
+ /**
18
+ * 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.
19
+ */
20
+ time: string;
21
+ /**
22
+ * Sampling rate used in application. This telemetry item represents 1 / sampleRate actual telemetry items.
23
+ */
24
+ sampleRate: number;
25
+ /**
26
+ * Sequence field used to track absolute order of uploaded events.
27
+ */
28
+ seq: string;
29
+ /**
30
+ * 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.
31
+ */
32
+ iKey: string;
33
+ /**
34
+ * Key/value collection of context properties. See ContextTagKeys for information on available properties.
35
+ */
36
+ tags: any;
37
+ /**
38
+ * Telemetry data item.
39
+ */
40
+ data: IBase;
10
41
  /**
11
42
  * Constructs a new instance of telemetry data.
12
43
  */
13
- constructor(logger: IDiagnosticLogger, data: Base, name: string);
44
+ constructor(logger: IDiagnosticLogger, data: IBase, name: string);
14
45
  }
@@ -1,8 +1,8 @@
1
- import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
2
- import { EventData } from "../Interfaces/Contracts/Generated/EventData";
1
+ import { IEventData } from "../Interfaces/Contracts/IEventData";
3
2
  import { ISerializable } from "../Interfaces/Telemetry/ISerializable";
4
3
  import { FieldType } from "../Enums";
5
- export declare class Event extends EventData implements ISerializable {
4
+ import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
5
+ export declare class Event implements IEventData, ISerializable {
6
6
  static envelopeType: string;
7
7
  static dataType: string;
8
8
  aiDataContract: {
@@ -11,6 +11,22 @@ export declare class Event extends EventData implements ISerializable {
11
11
  properties: FieldType;
12
12
  measurements: FieldType;
13
13
  };
14
+ /**
15
+ * Schema version
16
+ */
17
+ ver: number;
18
+ /**
19
+ * Event name. Keep it low cardinality to allow proper grouping and useful metrics.
20
+ */
21
+ name: string;
22
+ /**
23
+ * Collection of custom properties.
24
+ */
25
+ properties: any;
26
+ /**
27
+ * Collection of custom measurements.
28
+ */
29
+ measurements: any;
14
30
  /**
15
31
  * Constructs a new instance of the EventTelemetry object
16
32
  */
@@ -1,9 +1,9 @@
1
- import { StackFrame } from "../Interfaces/Contracts/Generated/StackFrame";
2
- import { ExceptionData } from "../Interfaces/Contracts/Generated/ExceptionData";
3
- import { ExceptionDetails } from "../Interfaces/Contracts/Generated/ExceptionDetails";
1
+ import { IStackFrame } from "../Interfaces/Contracts/IStackFrame";
2
+ import { IExceptionData } from "../Interfaces/Contracts/IExceptionData";
3
+ import { IExceptionDetails } from "../Interfaces/Contracts/IExceptionDetails";
4
4
  import { ISerializable } from "../Interfaces/Telemetry/ISerializable";
5
5
  import { FieldType } from "../Enums";
6
- import { SeverityLevel } from "../Interfaces/Contracts/Generated/SeverityLevel";
6
+ import { SeverityLevel } from "../Interfaces/Contracts/SeverityLevel";
7
7
  import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
8
8
  import { IExceptionInternal, IExceptionDetailsInternal, IExceptionStackFrameInternal, IAutoExceptionTelemetry } from "../Interfaces/IExceptionTelemetry";
9
9
  /**
@@ -11,7 +11,7 @@ import { IExceptionInternal, IExceptionDetailsInternal, IExceptionStackFrameInte
11
11
  * @param errorObj The supplied errorObj
12
12
  */
13
13
  export declare function _formatErrorCode(errorObj: any): any;
14
- export declare class Exception extends ExceptionData implements ISerializable {
14
+ export declare class Exception implements IExceptionData, ISerializable {
15
15
  static envelopeType: string;
16
16
  static dataType: string;
17
17
  id?: string;
@@ -24,6 +24,26 @@ export declare class Exception extends ExceptionData implements ISerializable {
24
24
  properties: FieldType;
25
25
  measurements: FieldType;
26
26
  };
27
+ /**
28
+ * Schema version
29
+ */
30
+ ver: number;
31
+ /**
32
+ * Exception chain - list of inner exceptions.
33
+ */
34
+ exceptions: IExceptionDetails[];
35
+ /**
36
+ * Severity level. Mostly used to indicate exception severity level when it is reported by logging library.
37
+ */
38
+ severityLevel: SeverityLevel;
39
+ /**
40
+ * Collection of custom properties.
41
+ */
42
+ properties: any;
43
+ /**
44
+ * Collection of custom measurements.
45
+ */
46
+ measurements: any;
27
47
  /**
28
48
  * Constructs a new instance of the ExceptionTelemetry object
29
49
  */
@@ -43,7 +63,7 @@ export declare class Exception extends ExceptionData implements ISerializable {
43
63
  static CreateSimpleException(message: string, typeName: string, assembly: string, fileName: string, details: string, line: number): Exception;
44
64
  static formatError: typeof _formatErrorCode;
45
65
  }
46
- export declare class _ExceptionDetails extends ExceptionDetails implements ISerializable {
66
+ export declare class _ExceptionDetails implements IExceptionDetails, ISerializable {
47
67
  aiDataContract: {
48
68
  id: FieldType;
49
69
  outerId: FieldType;
@@ -53,13 +73,41 @@ export declare class _ExceptionDetails extends ExceptionDetails implements ISeri
53
73
  stack: FieldType;
54
74
  parsedStack: FieldType;
55
75
  };
76
+ /**
77
+ * In case exception is nested (outer exception contains inner one), the id and outerId properties are used to represent the nesting.
78
+ */
79
+ id: number;
80
+ /**
81
+ * The value of outerId is a reference to an element in ExceptionDetails that represents the outer exception
82
+ */
83
+ outerId: number;
84
+ /**
85
+ * Exception type name.
86
+ */
87
+ typeName: string;
88
+ /**
89
+ * Exception message.
90
+ */
91
+ message: string;
92
+ /**
93
+ * Indicates if full exception stack is provided in the exception. The stack may be trimmed, such as in the case of a StackOverflow exception.
94
+ */
95
+ hasFullStack: boolean;
96
+ /**
97
+ * Text describing the stack. Either stack or parsedStack should have a value.
98
+ */
99
+ stack: string;
100
+ /**
101
+ * List of stack frames. Either stack or parsedStack should have a value.
102
+ */
103
+ parsedStack: IStackFrame[];
56
104
  constructor(logger: IDiagnosticLogger, exception: Error | IExceptionDetailsInternal | IAutoExceptionTelemetry, properties?: {
57
105
  [key: string]: any;
58
106
  });
59
107
  toInterface(): IExceptionDetailsInternal;
60
108
  static CreateFromInterface(logger: IDiagnosticLogger, exception: IExceptionDetailsInternal): _ExceptionDetails;
61
109
  }
62
- export declare class _StackFrame extends StackFrame implements ISerializable {
110
+ export declare class _StackFrame implements IStackFrame, ISerializable {
63
111
  static regex: RegExp;
64
112
  static baseSize: number;
65
113
  sizeInBytes: number;
@@ -70,6 +118,26 @@ export declare class _StackFrame extends StackFrame implements ISerializable {
70
118
  fileName: FieldType;
71
119
  line: FieldType;
72
120
  };
121
+ /**
122
+ * Level in the call stack. For the long stacks SDK may not report every function in a call stack.
123
+ */
124
+ level: number;
125
+ /**
126
+ * Method name.
127
+ */
128
+ method: string;
129
+ /**
130
+ * Name of the assembly (dll, jar, etc.) containing this function.
131
+ */
132
+ assembly: string;
133
+ /**
134
+ * File name or URL of the method implementation.
135
+ */
136
+ fileName: string;
137
+ /**
138
+ * Line number of the code implementation.
139
+ */
140
+ line: number;
73
141
  constructor(sourceFrame: string | IExceptionStackFrameInternal, level: number);
74
142
  static CreateFromInterface(frame: IExceptionStackFrameInternal): _StackFrame;
75
143
  toInterface(): {
@@ -1,8 +1,9 @@
1
- import { MetricData } from "../Interfaces/Contracts/Generated/MetricData";
1
+ import { IMetricData } from "../Interfaces/Contracts/IMetricData";
2
2
  import { ISerializable } from "../Interfaces/Telemetry/ISerializable";
3
3
  import { FieldType } from "../Enums";
4
+ import { DataPoint } from "./Common/DataPoint";
4
5
  import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
5
- export declare class Metric extends MetricData implements ISerializable {
6
+ export declare class Metric implements IMetricData, ISerializable {
6
7
  static envelopeType: string;
7
8
  static dataType: string;
8
9
  aiDataContract: {
@@ -10,6 +11,22 @@ export declare class Metric extends MetricData implements ISerializable {
10
11
  metrics: FieldType;
11
12
  properties: FieldType;
12
13
  };
14
+ /**
15
+ * Schema version
16
+ */
17
+ ver: number;
18
+ /**
19
+ * 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.
20
+ */
21
+ metrics: DataPoint[];
22
+ /**
23
+ * Collection of custom properties.
24
+ */
25
+ properties: any;
26
+ /**
27
+ * Collection of custom measurements.
28
+ */
29
+ measurements: any;
13
30
  /**
14
31
  * Constructs a new instance of the MetricTelemetry object
15
32
  */