@microsoft/applicationinsights-common 2.7.5-nightly.2204-03 → 2.7.6

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 (189) hide show
  1. package/browser/applicationinsights-common.integrity.json +9 -9
  2. package/browser/applicationinsights-common.js +244 -853
  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 +456 -386
  7. package/dist/applicationinsights-common.api.md +8 -21
  8. package/dist/applicationinsights-common.d.ts +12 -33
  9. package/dist/applicationinsights-common.js +244 -853
  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 +12 -33
  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 +24 -11
  18. package/dist-esm/Enums.js.map +1 -1
  19. package/dist-esm/HelperFuncs.js +6 -7
  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/Generated/AvailabilityData.js +1 -1
  33. package/dist-esm/Interfaces/Contracts/Generated/Base.js +1 -1
  34. package/dist-esm/Interfaces/Contracts/Generated/ContextTagKeys.js +1 -1
  35. package/dist-esm/Interfaces/Contracts/Generated/Data.js +1 -1
  36. package/dist-esm/Interfaces/Contracts/Generated/DataPoint.js +1 -1
  37. package/dist-esm/Interfaces/Contracts/Generated/DataPointType.js +1 -1
  38. package/dist-esm/Interfaces/Contracts/Generated/DependencyKind.js +1 -1
  39. package/dist-esm/Interfaces/Contracts/Generated/DependencySourceType.js +1 -1
  40. package/dist-esm/Interfaces/Contracts/Generated/Domain.js +1 -1
  41. package/dist-esm/Interfaces/Contracts/Generated/Envelope.js +1 -1
  42. package/dist-esm/Interfaces/Contracts/Generated/EventData.js +1 -1
  43. package/dist-esm/Interfaces/Contracts/Generated/ExceptionData.js +1 -1
  44. package/dist-esm/Interfaces/Contracts/Generated/ExceptionDetails.js +1 -1
  45. package/dist-esm/Interfaces/Contracts/Generated/MessageData.js +1 -1
  46. package/dist-esm/Interfaces/Contracts/Generated/MetricData.js +1 -1
  47. package/dist-esm/Interfaces/Contracts/Generated/PageViewData.js +1 -1
  48. package/dist-esm/Interfaces/Contracts/Generated/PageViewPerfData.js +1 -1
  49. package/dist-esm/Interfaces/Contracts/Generated/RemoteDependencyData.js +1 -1
  50. package/dist-esm/Interfaces/Contracts/Generated/RequestData.js +1 -1
  51. package/dist-esm/Interfaces/Contracts/Generated/SeverityLevel.js +1 -1
  52. package/dist-esm/Interfaces/Contracts/Generated/StackFrame.js +1 -1
  53. package/dist-esm/Interfaces/IAppInsights.js +1 -1
  54. package/dist-esm/Interfaces/IChannelControlsAI.js +1 -1
  55. package/dist-esm/Interfaces/IConfig.js +1 -1
  56. package/dist-esm/Interfaces/ICorrelationConfig.js +1 -1
  57. package/dist-esm/Interfaces/IDependencyTelemetry.js +1 -1
  58. package/dist-esm/Interfaces/IEventTelemetry.js +1 -1
  59. package/dist-esm/Interfaces/IExceptionTelemetry.js +1 -1
  60. package/dist-esm/Interfaces/IMetricTelemetry.js +1 -1
  61. package/dist-esm/Interfaces/IPageViewPerformanceTelemetry.js +1 -1
  62. package/dist-esm/Interfaces/IPageViewTelemetry.js +1 -1
  63. package/dist-esm/Interfaces/IPartC.js +1 -1
  64. package/dist-esm/Interfaces/IPropertiesPlugin.js +1 -1
  65. package/dist-esm/Interfaces/IRequestContext.js +1 -1
  66. package/dist-esm/Interfaces/ITelemetryContext.js +1 -1
  67. package/dist-esm/Interfaces/ITraceTelemetry.js +1 -1
  68. package/dist-esm/Interfaces/PartAExtensions.js +1 -1
  69. package/dist-esm/Interfaces/Telemetry/IEnvelope.js +1 -1
  70. package/dist-esm/Interfaces/Telemetry/ISerializable.js +1 -1
  71. package/dist-esm/RequestResponseHeaders.js +1 -1
  72. package/dist-esm/StorageHelperFuncs.js +12 -27
  73. package/dist-esm/StorageHelperFuncs.js.map +1 -1
  74. package/dist-esm/Telemetry/Common/Base.js +1 -1
  75. package/dist-esm/Telemetry/Common/Data.js +1 -1
  76. package/dist-esm/Telemetry/Common/DataPoint.js +1 -1
  77. package/dist-esm/Telemetry/Common/DataSanitizer.js +8 -8
  78. package/dist-esm/Telemetry/Common/DataSanitizer.js.map +1 -1
  79. package/dist-esm/Telemetry/Common/Envelope.js +1 -1
  80. package/dist-esm/Telemetry/Event.js +1 -1
  81. package/dist-esm/Telemetry/Exception.js +1 -1
  82. package/dist-esm/Telemetry/Metric.js +1 -1
  83. package/dist-esm/Telemetry/PageView.js +1 -1
  84. package/dist-esm/Telemetry/PageViewPerformance.js +1 -1
  85. package/dist-esm/Telemetry/RemoteDependencyData.js +1 -1
  86. package/dist-esm/Telemetry/Trace.js +1 -1
  87. package/dist-esm/TelemetryItemCreator.js +1 -1
  88. package/dist-esm/UrlHelperFuncs.js +1 -1
  89. package/dist-esm/Util.js +3 -3
  90. package/dist-esm/Util.js.map +1 -1
  91. package/dist-esm/applicationinsights-common.js +2 -2
  92. package/dist-esm/applicationinsights-common.js.map +1 -1
  93. package/package.json +54 -57
  94. package/src/Enums.ts +3 -19
  95. package/src/HelperFuncs.ts +5 -7
  96. package/src/StorageHelperFuncs.ts +17 -34
  97. package/src/Telemetry/Common/DataSanitizer.ts +13 -13
  98. package/src/Telemetry/Exception.ts +15 -27
  99. package/src/TelemetryItemCreator.ts +1 -1
  100. package/src/Util.ts +3 -2
  101. package/src/applicationinsights-common.ts +2 -2
  102. package/types/Enums.d.ts +2 -13
  103. package/types/StorageHelperFuncs.d.ts +2 -14
  104. package/types/applicationinsights-common.d.ts +2 -2
  105. package/types/tsdoc-metadata.json +1 -1
  106. package/dist-esm/Interfaces/Contracts/AvailabilityData.js +0 -52
  107. package/dist-esm/Interfaces/Contracts/AvailabilityData.js.map +0 -1
  108. package/dist-esm/Interfaces/Contracts/ContextTagKeys.js +0 -89
  109. package/dist-esm/Interfaces/Contracts/ContextTagKeys.js.map +0 -1
  110. package/dist-esm/Interfaces/Contracts/DataPointType.js +0 -8
  111. package/dist-esm/Interfaces/Contracts/DataPointType.js.map +0 -1
  112. package/dist-esm/Interfaces/Contracts/DependencyKind.js +0 -8
  113. package/dist-esm/Interfaces/Contracts/DependencyKind.js.map +0 -1
  114. package/dist-esm/Interfaces/Contracts/DependencySourceType.js +0 -8
  115. package/dist-esm/Interfaces/Contracts/DependencySourceType.js.map +0 -1
  116. package/dist-esm/Interfaces/Contracts/IBase.js +0 -8
  117. package/dist-esm/Interfaces/Contracts/IBase.js.map +0 -1
  118. package/dist-esm/Interfaces/Contracts/IData.js +0 -8
  119. package/dist-esm/Interfaces/Contracts/IData.js.map +0 -1
  120. package/dist-esm/Interfaces/Contracts/IDataPoint.js +0 -6
  121. package/dist-esm/Interfaces/Contracts/IDataPoint.js.map +0 -1
  122. package/dist-esm/Interfaces/Contracts/IDomain.js +0 -8
  123. package/dist-esm/Interfaces/Contracts/IDomain.js.map +0 -1
  124. package/dist-esm/Interfaces/Contracts/IEnvelope.js +0 -46
  125. package/dist-esm/Interfaces/Contracts/IEnvelope.js.map +0 -1
  126. package/dist-esm/Interfaces/Contracts/IEventData.js +0 -8
  127. package/dist-esm/Interfaces/Contracts/IEventData.js.map +0 -1
  128. package/dist-esm/Interfaces/Contracts/IExceptionData.js +0 -8
  129. package/dist-esm/Interfaces/Contracts/IExceptionData.js.map +0 -1
  130. package/dist-esm/Interfaces/Contracts/IExceptionDetails.js +0 -8
  131. package/dist-esm/Interfaces/Contracts/IExceptionDetails.js.map +0 -1
  132. package/dist-esm/Interfaces/Contracts/IMessageData.js +0 -8
  133. package/dist-esm/Interfaces/Contracts/IMessageData.js.map +0 -1
  134. package/dist-esm/Interfaces/Contracts/IMetricData.js +0 -8
  135. package/dist-esm/Interfaces/Contracts/IMetricData.js.map +0 -1
  136. package/dist-esm/Interfaces/Contracts/IPageViewData.js +0 -8
  137. package/dist-esm/Interfaces/Contracts/IPageViewData.js.map +0 -1
  138. package/dist-esm/Interfaces/Contracts/IPageViewPerfData.js +0 -8
  139. package/dist-esm/Interfaces/Contracts/IPageViewPerfData.js.map +0 -1
  140. package/dist-esm/Interfaces/Contracts/IRemoteDependencyData.js +0 -8
  141. package/dist-esm/Interfaces/Contracts/IRemoteDependencyData.js.map +0 -1
  142. package/dist-esm/Interfaces/Contracts/IStackFrame.js +0 -8
  143. package/dist-esm/Interfaces/Contracts/IStackFrame.js.map +0 -1
  144. package/dist-esm/Interfaces/Contracts/RequestData.js +0 -46
  145. package/dist-esm/Interfaces/Contracts/RequestData.js.map +0 -1
  146. package/dist-esm/Interfaces/Contracts/SeverityLevel.js +0 -19
  147. package/dist-esm/Interfaces/Contracts/SeverityLevel.js.map +0 -1
  148. package/src/Interfaces/Contracts/AvailabilityData.ts +0 -57
  149. package/src/Interfaces/Contracts/ContextTagKeys.ts +0 -299
  150. package/src/Interfaces/Contracts/DataPointType.ts +0 -10
  151. package/src/Interfaces/Contracts/DependencyKind.ts +0 -11
  152. package/src/Interfaces/Contracts/DependencySourceType.ts +0 -11
  153. package/src/Interfaces/Contracts/IBase.ts +0 -13
  154. package/src/Interfaces/Contracts/IData.ts +0 -19
  155. package/src/Interfaces/Contracts/IDataPoint.ts +0 -44
  156. package/src/Interfaces/Contracts/IDomain.ts +0 -8
  157. package/src/Interfaces/Contracts/IEnvelope.ts +0 -50
  158. package/src/Interfaces/Contracts/IEventData.ts +0 -30
  159. package/src/Interfaces/Contracts/IExceptionData.ts +0 -37
  160. package/src/Interfaces/Contracts/IExceptionDetails.ts +0 -45
  161. package/src/Interfaces/Contracts/IMessageData.ts +0 -36
  162. package/src/Interfaces/Contracts/IMetricData.ts +0 -31
  163. package/src/Interfaces/Contracts/IPageViewData.ts +0 -26
  164. package/src/Interfaces/Contracts/IPageViewPerfData.ts +0 -35
  165. package/src/Interfaces/Contracts/IRemoteDependencyData.ts +0 -65
  166. package/src/Interfaces/Contracts/IStackFrame.ts +0 -33
  167. package/src/Interfaces/Contracts/RequestData.ts +0 -50
  168. package/src/Interfaces/Contracts/SeverityLevel.ts +0 -15
  169. package/types/Interfaces/Contracts/AvailabilityData.d.ts +0 -0
  170. package/types/Interfaces/Contracts/ContextTagKeys.d.ts +0 -175
  171. package/types/Interfaces/Contracts/DataPointType.d.ts +0 -7
  172. package/types/Interfaces/Contracts/DependencyKind.d.ts +0 -8
  173. package/types/Interfaces/Contracts/DependencySourceType.d.ts +0 -8
  174. package/types/Interfaces/Contracts/IBase.d.ts +0 -9
  175. package/types/Interfaces/Contracts/IData.d.ts +0 -14
  176. package/types/Interfaces/Contracts/IDataPoint.d.ts +0 -34
  177. package/types/Interfaces/Contracts/IDomain.d.ts +0 -5
  178. package/types/Interfaces/Contracts/IEnvelope.d.ts +0 -0
  179. package/types/Interfaces/Contracts/IEventData.d.ts +0 -22
  180. package/types/Interfaces/Contracts/IExceptionData.d.ts +0 -28
  181. package/types/Interfaces/Contracts/IExceptionDetails.d.ts +0 -34
  182. package/types/Interfaces/Contracts/IMessageData.d.ts +0 -27
  183. package/types/Interfaces/Contracts/IMetricData.d.ts +0 -23
  184. package/types/Interfaces/Contracts/IPageViewData.d.ts +0 -18
  185. package/types/Interfaces/Contracts/IPageViewPerfData.d.ts +0 -26
  186. package/types/Interfaces/Contracts/IRemoteDependencyData.d.ts +0 -50
  187. package/types/Interfaces/Contracts/IStackFrame.d.ts +0 -25
  188. package/types/Interfaces/Contracts/RequestData.d.ts +0 -0
  189. package/types/Interfaces/Contracts/SeverityLevel.d.ts +0 -10
package/src/Enums.ts CHANGED
@@ -1,35 +1,26 @@
1
1
  // Copyright (c) Microsoft Corporation. All rights reserved.
2
2
  // Licensed under the MIT License.
3
3
 
4
- import { createEnumStyle } from "@microsoft/applicationinsights-core-js";
5
-
6
4
  /**
7
5
  * Type of storage to differentiate between local storage and session storage
8
6
  */
9
- export const enum eStorageType {
7
+ export enum StorageType {
10
8
  LocalStorage,
11
9
  SessionStorage
12
10
  }
13
11
 
14
- export const StorageType = createEnumStyle<{ [key in (keyof typeof eStorageType)]: number; }>({
15
- LocalStorage: eStorageType.LocalStorage,
16
- SessionStorage: eStorageType.SessionStorage
17
- });
18
- export type StorageType = eStorageType | typeof StorageType;
19
-
20
-
21
12
  /**
22
13
  * Enum is used in aiDataContract to describe how fields are serialized.
23
14
  * For instance: (Fieldtype.Required | FieldType.Array) will mark the field as required and indicate it's an array
24
15
  */
25
16
  export const enum FieldType { Default = 0, Required = 1, Array = 2, Hidden = 4 }
26
17
 
27
- export const enum eDistributedTracingModes {
18
+ export enum DistributedTracingModes {
28
19
  /**
29
20
  * (Default) Send Application Insights correlation headers
30
21
  */
31
22
 
32
- AI = 0,
23
+ AI=0,
33
24
 
34
25
  /**
35
26
  * Send both W3C Trace Context headers and back-compatibility Application Insights headers
@@ -41,10 +32,3 @@ export const enum eDistributedTracingModes {
41
32
  */
42
33
  W3C
43
34
  }
44
-
45
- export const DistributedTracingModes = createEnumStyle<{ [key in (keyof typeof eDistributedTracingModes)]: number; }>({
46
- AI: eDistributedTracingModes.AI,
47
- AI_AND_W3C: eDistributedTracingModes.AI_AND_W3C,
48
- W3C: eDistributedTracingModes.W3C
49
- });
50
- export type DistributedTracingModes = number | eDistributedTracingModes;
@@ -3,8 +3,6 @@
3
3
 
4
4
  import { arrForEach, IPlugin, isString } from "@microsoft/applicationinsights-core-js";
5
5
 
6
- const strEmpty = "";
7
-
8
6
  export function stringToBoolOrDefault(str: any, defaultValue = false): boolean {
9
7
  if (str === undefined || str === null) {
10
8
  return defaultValue;
@@ -23,10 +21,10 @@ export function msToTimeSpan(totalms: number): string {
23
21
 
24
22
  totalms = Math.round(totalms);
25
23
 
26
- let ms = strEmpty + totalms % 1000;
27
- let sec = strEmpty + Math.floor(totalms / 1000) % 60;
28
- let min = strEmpty + Math.floor(totalms / (1000 * 60)) % 60;
29
- let hour = strEmpty + Math.floor(totalms / (1000 * 60 * 60)) % 24;
24
+ let ms = "" + totalms % 1000;
25
+ let sec = "" + Math.floor(totalms / 1000) % 60;
26
+ let min = "" + Math.floor(totalms / (1000 * 60)) % 60;
27
+ let hour = "" + Math.floor(totalms / (1000 * 60 * 60)) % 24;
30
28
  const days = Math.floor(totalms / (1000 * 60 * 60 * 24));
31
29
 
32
30
  ms = ms.length === 1 ? "00" + ms : ms.length === 2 ? "0" + ms : ms;
@@ -34,7 +32,7 @@ export function msToTimeSpan(totalms: number): string {
34
32
  min = min.length < 2 ? "0" + min : min;
35
33
  hour = hour.length < 2 ? "0" + hour : hour;
36
34
 
37
- return (days > 0 ? days + "." : strEmpty) + hour + ":" + min + ":" + sec + "." + ms;
35
+ return (days > 0 ? days + "." : "") + hour + ":" + min + ":" + sec + "." + ms;
38
36
  }
39
37
 
40
38
  export function getExtensionByName(extensions: IPlugin[], identifier: string): IPlugin | null {
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Microsoft Corporation. All rights reserved.
2
2
  // Licensed under the MIT License.
3
3
 
4
- import { dumpObj, getExceptionName, getGlobal, getGlobalInst, IDiagnosticLogger, isNullOrUndefined, eLoggingSeverity, objForEachKey, _InternalMessageId, _throwInternal } from "@microsoft/applicationinsights-core-js";
4
+ import { dumpObj, getExceptionName, getGlobal, getGlobalInst, IDiagnosticLogger, isNullOrUndefined, LoggingSeverity, objForEachKey, _InternalMessageId } from "@microsoft/applicationinsights-core-js";
5
5
  import { StorageType } from "./Enums";
6
6
 
7
7
  let _canUseLocalStorage: boolean = undefined;
@@ -57,29 +57,13 @@ function _getSessionStorageObject(): Storage {
57
57
  return null;
58
58
  }
59
59
 
60
- /**
61
- * Disables the global SDK usage of local or session storage if available
62
- */
63
60
  export function utlDisableStorage() {
64
61
  _canUseLocalStorage = false;
65
62
  _canUseSessionStorage = false;
66
63
  }
67
64
 
68
- /**
69
- * Re-enables the global SDK usage of local or session storage if available
70
- */
71
- export function utlEnableStorage() {
72
- _canUseLocalStorage = utlCanUseLocalStorage(true);
73
- _canUseSessionStorage = utlCanUseSessionStorage(true);
74
- }
75
-
76
- /**
77
- * Returns whether LocalStorage can be used, if the reset parameter is passed a true this will override
78
- * any previous disable calls.
79
- * @param reset - Should the usage be reset and determined only based on whether LocalStorage is available
80
- */
81
- export function utlCanUseLocalStorage(reset?: boolean): boolean {
82
- if (reset || _canUseLocalStorage === undefined) {
65
+ export function utlCanUseLocalStorage(): boolean {
66
+ if (_canUseLocalStorage === undefined) {
83
67
  _canUseLocalStorage = !!_getVerifiedStorageObject(StorageType.LocalStorage);
84
68
  }
85
69
 
@@ -94,8 +78,8 @@ export function utlGetLocalStorage(logger: IDiagnosticLogger, name: string): str
94
78
  } catch (e) {
95
79
  _canUseLocalStorage = false;
96
80
 
97
- _throwInternal(logger,
98
- eLoggingSeverity.WARNING,
81
+ logger.throwInternal(
82
+ LoggingSeverity.WARNING,
99
83
  _InternalMessageId.BrowserCannotReadLocalStorage,
100
84
  "Browser failed read of local storage. " + getExceptionName(e),
101
85
  { exception: dumpObj(e) });
@@ -113,8 +97,8 @@ export function utlSetLocalStorage(logger: IDiagnosticLogger, name: string, data
113
97
  } catch (e) {
114
98
  _canUseLocalStorage = false;
115
99
 
116
- _throwInternal(logger,
117
- eLoggingSeverity.WARNING,
100
+ logger.throwInternal(
101
+ LoggingSeverity.WARNING,
118
102
  _InternalMessageId.BrowserCannotWriteLocalStorage,
119
103
  "Browser failed write to local storage. " + getExceptionName(e),
120
104
  { exception: dumpObj(e) });
@@ -132,8 +116,8 @@ export function utlRemoveStorage(logger: IDiagnosticLogger, name: string): boole
132
116
  } catch (e) {
133
117
  _canUseLocalStorage = false;
134
118
 
135
- _throwInternal(logger,
136
- eLoggingSeverity.WARNING,
119
+ logger.throwInternal(
120
+ LoggingSeverity.WARNING,
137
121
  _InternalMessageId.BrowserFailedRemovalFromLocalStorage,
138
122
  "Browser failed removal of local storage item. " + getExceptionName(e),
139
123
  { exception: dumpObj(e) });
@@ -142,8 +126,8 @@ export function utlRemoveStorage(logger: IDiagnosticLogger, name: string): boole
142
126
  return false;
143
127
  }
144
128
 
145
- export function utlCanUseSessionStorage(reset?: boolean): boolean {
146
- if (reset || _canUseSessionStorage === undefined) {
129
+ export function utlCanUseSessionStorage(): boolean {
130
+ if (_canUseSessionStorage === undefined) {
147
131
  _canUseSessionStorage = !!_getVerifiedStorageObject(StorageType.SessionStorage);
148
132
  }
149
133
 
@@ -170,8 +154,8 @@ export function utlGetSessionStorage(logger: IDiagnosticLogger, name: string): s
170
154
  } catch (e) {
171
155
  _canUseSessionStorage = false;
172
156
 
173
- _throwInternal(logger,
174
- eLoggingSeverity.WARNING,
157
+ logger.throwInternal(
158
+ LoggingSeverity.WARNING,
175
159
  _InternalMessageId.BrowserCannotReadSessionStorage,
176
160
  "Browser failed read of session storage. " + getExceptionName(e),
177
161
  { exception: dumpObj(e) });
@@ -189,8 +173,8 @@ export function utlSetSessionStorage(logger: IDiagnosticLogger, name: string, da
189
173
  } catch (e) {
190
174
  _canUseSessionStorage = false;
191
175
 
192
- _throwInternal(logger,
193
- eLoggingSeverity.WARNING,
176
+ logger.throwInternal(
177
+ LoggingSeverity.WARNING,
194
178
  _InternalMessageId.BrowserCannotWriteSessionStorage,
195
179
  "Browser failed write to session storage. " + getExceptionName(e),
196
180
  { exception: dumpObj(e) });
@@ -208,13 +192,12 @@ export function utlRemoveSessionStorage(logger: IDiagnosticLogger, name: string)
208
192
  } catch (e) {
209
193
  _canUseSessionStorage = false;
210
194
 
211
- _throwInternal(logger,
212
- eLoggingSeverity.WARNING,
195
+ logger.throwInternal(
196
+ LoggingSeverity.WARNING,
213
197
  _InternalMessageId.BrowserFailedRemovalFromSessionStorage,
214
198
  "Browser failed removal of session storage item. " + getExceptionName(e),
215
199
  { exception: dumpObj(e) });
216
200
  }
217
201
  }
218
-
219
202
  return false;
220
203
  }
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Microsoft Corporation. All rights reserved.
2
2
  // Licensed under the MIT License.
3
3
 
4
- import { IDiagnosticLogger, eLoggingSeverity, _InternalMessageId, hasJSON, getJSON, objForEachKey, isObject, strTrim, _throwInternal } from "@microsoft/applicationinsights-core-js";
4
+ import { IDiagnosticLogger, LoggingSeverity, _InternalMessageId, hasJSON, getJSON, objForEachKey, isObject, strTrim } from "@microsoft/applicationinsights-core-js";
5
5
 
6
6
  export const enum DataSanitizerValues {
7
7
  /**
@@ -66,8 +66,8 @@ export function dataSanitizeKey(logger: IDiagnosticLogger, name: any) {
66
66
  // truncate the string to 150 chars
67
67
  if (name.length > DataSanitizerValues.MAX_NAME_LENGTH) {
68
68
  nameTrunc = name.substring(0, DataSanitizerValues.MAX_NAME_LENGTH);
69
- _throwInternal(logger,
70
- eLoggingSeverity.WARNING,
69
+ logger && logger.throwInternal(
70
+ LoggingSeverity.WARNING,
71
71
  _InternalMessageId.NameTooLong,
72
72
  "name is too long. It has been truncated to " + DataSanitizerValues.MAX_NAME_LENGTH + " characters.",
73
73
  { name }, true);
@@ -84,8 +84,8 @@ export function dataSanitizeString(logger: IDiagnosticLogger, value: any, maxLen
84
84
  value = strTrim(value);
85
85
  if (value.toString().length > maxLength) {
86
86
  valueTrunc = value.toString().substring(0, maxLength);
87
- _throwInternal(logger,
88
- eLoggingSeverity.WARNING,
87
+ logger && logger.throwInternal(
88
+ LoggingSeverity.WARNING,
89
89
  _InternalMessageId.StringValueTooLong,
90
90
  "string value is too long. It has been truncated to " + maxLength + " characters.",
91
91
  { value }, true);
@@ -104,8 +104,8 @@ export function dataSanitizeMessage(logger: IDiagnosticLogger, message: any) {
104
104
  if (message) {
105
105
  if (message.length > DataSanitizerValues.MAX_MESSAGE_LENGTH) {
106
106
  messageTrunc = message.substring(0, DataSanitizerValues.MAX_MESSAGE_LENGTH);
107
- _throwInternal(logger,
108
- eLoggingSeverity.WARNING, _InternalMessageId.MessageTruncated,
107
+ logger && logger.throwInternal(
108
+ LoggingSeverity.WARNING, _InternalMessageId.MessageTruncated,
109
109
  "message is too long, it has been truncated to " + DataSanitizerValues.MAX_MESSAGE_LENGTH + " characters.",
110
110
  { message },
111
111
  true);
@@ -122,8 +122,8 @@ export function dataSanitizeException(logger: IDiagnosticLogger, exception: any)
122
122
  let value:string = "" + exception;
123
123
  if (value.length > DataSanitizerValues.MAX_EXCEPTION_LENGTH) {
124
124
  exceptionTrunc = value.substring(0, DataSanitizerValues.MAX_EXCEPTION_LENGTH);
125
- _throwInternal(logger,
126
- eLoggingSeverity.WARNING, _InternalMessageId.ExceptionTruncated, "exception is too long, it has been truncated to " + DataSanitizerValues.MAX_EXCEPTION_LENGTH + " characters.",
125
+ logger && logger.throwInternal(
126
+ LoggingSeverity.WARNING, _InternalMessageId.ExceptionTruncated, "exception is too long, it has been truncated to " + DataSanitizerValues.MAX_EXCEPTION_LENGTH + " characters.",
127
127
  { exception }, true);
128
128
  }
129
129
  }
@@ -140,7 +140,7 @@ export function dataSanitizeProperties(logger: IDiagnosticLogger, properties: an
140
140
  try {
141
141
  value = getJSON().stringify(value);
142
142
  } catch (e) {
143
- _throwInternal(logger,eLoggingSeverity.WARNING, _InternalMessageId.CannotSerializeObjectNonSerializable, "custom property is not valid", { exception: e}, true);
143
+ logger && logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.CannotSerializeObjectNonSerializable, "custom property is not valid", { exception: e}, true);
144
144
  }
145
145
  }
146
146
  value = dataSanitizeString(logger, value, DataSanitizerValues.MAX_PROPERTY_LENGTH);
@@ -177,8 +177,8 @@ export function dataSanitizeInput(logger: IDiagnosticLogger, input: any, maxLeng
177
177
  input = strTrim(input);
178
178
  if (input.length > maxLength) {
179
179
  inputTrunc = input.substring(0, maxLength);
180
- _throwInternal(logger,
181
- eLoggingSeverity.WARNING,
180
+ logger && logger.throwInternal(
181
+ LoggingSeverity.WARNING,
182
182
  _msgId,
183
183
  "input is too long, it has been truncated to " + maxLength + " characters.",
184
184
  { data: input },
@@ -282,4 +282,4 @@ export const DataSanitizer: IDataSanitizer = {
282
282
  sanitizeInput: dataSanitizeInput,
283
283
  padNumber: dsPadNumber,
284
284
  trim: strTrim
285
- };
285
+ };
@@ -341,44 +341,32 @@ export class Exception extends ExceptionData implements ISerializable {
341
341
  this.exceptions = [new _ExceptionDetails(logger, exception, properties)];
342
342
  this.properties = dataSanitizeProperties(logger, properties);
343
343
  this.measurements = dataSanitizeMeasurements(logger, measurements);
344
- if (severityLevel) {
345
- this.severityLevel = severityLevel;
346
- }
347
- if (id) {
348
- this.id = id;
349
- }
344
+ if (severityLevel) { this.severityLevel = severityLevel; }
345
+ if (id) { this.id = id; }
350
346
  } else {
351
347
  this.exceptions = exception.exceptions;
352
348
  this.properties = exception.properties;
353
349
  this.measurements = exception.measurements;
354
- if (exception.severityLevel) {
355
- this.severityLevel = exception.severityLevel;
356
- }
357
- if (exception.id) {
358
- this.id = exception.id;
359
- }
360
- if (exception.problemGroup) {
361
- this.problemGroup = exception.problemGroup;
362
- }
350
+ if (exception.severityLevel) { this.severityLevel = exception.severityLevel; }
351
+ if (exception.id) { this.id = exception.id; }
352
+ if (exception.problemGroup) { this.problemGroup = exception.problemGroup; }
363
353
 
364
354
  // bool/int types, use isNullOrUndefined
365
355
  this.ver = 2; // TODO: handle the CS"4.0" ==> breeze 2 conversion in a better way
366
- if (!isNullOrUndefined(exception.isManual)) {
367
- this.isManual = exception.isManual;
368
- }
356
+ if (!isNullOrUndefined(exception.isManual)) { this.isManual = exception.isManual; }
369
357
  }
370
358
  }
371
359
 
372
360
  public static CreateAutoException(
373
- message: string | Event,
374
- url: string,
375
- lineNumber: number,
376
- columnNumber: number,
377
- error: any,
378
- evt?: Event|string,
379
- stack?: string,
380
- errorSrc?: string
381
- ): IAutoExceptionTelemetry {
361
+ message: string | Event,
362
+ url: string,
363
+ lineNumber: number,
364
+ columnNumber: number,
365
+ error: any,
366
+ evt?: Event|string,
367
+ stack?: string,
368
+ errorSrc?: string
369
+ ): IAutoExceptionTelemetry {
382
370
 
383
371
  let errorType = _getErrorType(error || evt || message);
384
372
 
@@ -29,7 +29,7 @@ export class TelemetryItemCreator {
29
29
  if (isNullOrUndefined(item) ||
30
30
  isNullOrUndefined(baseType) ||
31
31
  isNullOrUndefined(envelopeName)) {
32
- throw Error("Input doesn't contain all required fields");
32
+ throw Error("Input doesn't contain all required fields");
33
33
  }
34
34
 
35
35
  let iKey = "";
package/src/Util.ts CHANGED
@@ -9,7 +9,8 @@ import {
9
9
  dateNow, uaDisallowsSameSiteNone, disableCookies as coreDisableCookies,
10
10
  canUseCookies as coreCanUseCookies, getCookie as coreGetCookie,
11
11
  setCookie as coreSetCookie, deleteCookie as coreDeleteCookie,
12
- isBeaconsSupported
12
+ isBeaconsSupported,
13
+ arrIndexOf
13
14
  } from "@microsoft/applicationinsights-core-js";
14
15
  import { RequestHeaders } from "./RequestResponseHeaders";
15
16
  import { dataSanitizeString } from "./Telemetry/Common/DataSanitizer";
@@ -28,7 +29,7 @@ const _internalEndpoints: string[] = [
28
29
  ];
29
30
 
30
31
  export function isInternalApplicationInsightsEndpoint(endpointUrl: string): boolean {
31
- return _internalEndpoints.indexOf(endpointUrl.toLowerCase()) !== -1;
32
+ return arrIndexOf(_internalEndpoints, endpointUrl.toLowerCase()) !== -1;
32
33
  }
33
34
 
34
35
  export interface IUtil {
@@ -57,12 +57,12 @@ export { IPropertiesPlugin } from "./Interfaces/IPropertiesPlugin";
57
57
  export { IUser, IUserContext } from "./Interfaces/Context/IUser";
58
58
  export { ITelemetryTrace, ITraceState } from "./Interfaces/Context/ITelemetryTrace";
59
59
  export { IRequestContext } from "./Interfaces/IRequestContext";
60
- export { eDistributedTracingModes, DistributedTracingModes } from "./Enums";
60
+ export { DistributedTracingModes } from "./Enums";
61
61
  export { stringToBoolOrDefault, msToTimeSpan, getExtensionByName, isCrossOriginError } from "./HelperFuncs";
62
62
  export { isBeaconsSupported as isBeaconApiSupported } from "@microsoft/applicationinsights-core-js"
63
63
  export { createDomEvent } from "./DomHelperFuncs";
64
64
  export {
65
- utlDisableStorage, utlEnableStorage, utlCanUseLocalStorage, utlGetLocalStorage, utlSetLocalStorage, utlRemoveStorage,
65
+ utlDisableStorage, utlCanUseLocalStorage, utlGetLocalStorage, utlSetLocalStorage, utlRemoveStorage,
66
66
  utlCanUseSessionStorage, utlGetSessionStorageKeys, utlGetSessionStorage, utlSetSessionStorage, utlRemoveSessionStorage
67
67
  } from "./StorageHelperFuncs";
68
68
  export { urlParseUrl, urlGetAbsoluteUrl, urlGetPathName, urlGetCompleteUrl, urlParseHost, urlParseFullHost } from "./UrlHelperFuncs";
package/types/Enums.d.ts CHANGED
@@ -1,15 +1,10 @@
1
1
  /**
2
2
  * Type of storage to differentiate between local storage and session storage
3
3
  */
4
- export declare const enum eStorageType {
4
+ export declare enum StorageType {
5
5
  LocalStorage = 0,
6
6
  SessionStorage = 1
7
7
  }
8
- export declare const StorageType: {
9
- LocalStorage: number;
10
- SessionStorage: number;
11
- };
12
- export declare type StorageType = eStorageType | typeof StorageType;
13
8
  /**
14
9
  * Enum is used in aiDataContract to describe how fields are serialized.
15
10
  * For instance: (Fieldtype.Required | FieldType.Array) will mark the field as required and indicate it's an array
@@ -20,7 +15,7 @@ export declare const enum FieldType {
20
15
  Array = 2,
21
16
  Hidden = 4
22
17
  }
23
- export declare const enum eDistributedTracingModes {
18
+ export declare enum DistributedTracingModes {
24
19
  /**
25
20
  * (Default) Send Application Insights correlation headers
26
21
  */
@@ -34,9 +29,3 @@ export declare const enum eDistributedTracingModes {
34
29
  */
35
30
  W3C = 2
36
31
  }
37
- export declare const DistributedTracingModes: {
38
- AI: number;
39
- AI_AND_W3C: number;
40
- W3C: number;
41
- };
42
- export declare type DistributedTracingModes = number | eDistributedTracingModes;
@@ -1,22 +1,10 @@
1
1
  import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
2
- /**
3
- * Disables the global SDK usage of local or session storage if available
4
- */
5
2
  export declare function utlDisableStorage(): void;
6
- /**
7
- * Re-enables the global SDK usage of local or session storage if available
8
- */
9
- export declare function utlEnableStorage(): void;
10
- /**
11
- * Returns whether LocalStorage can be used, if the reset parameter is passed a true this will override
12
- * any previous disable calls.
13
- * @param reset - Should the usage be reset and determined only based on whether LocalStorage is available
14
- */
15
- export declare function utlCanUseLocalStorage(reset?: boolean): boolean;
3
+ export declare function utlCanUseLocalStorage(): boolean;
16
4
  export declare function utlGetLocalStorage(logger: IDiagnosticLogger, name: string): string;
17
5
  export declare function utlSetLocalStorage(logger: IDiagnosticLogger, name: string, data: string): boolean;
18
6
  export declare function utlRemoveStorage(logger: IDiagnosticLogger, name: string): boolean;
19
- export declare function utlCanUseSessionStorage(reset?: boolean): boolean;
7
+ export declare function utlCanUseSessionStorage(): boolean;
20
8
  export declare function utlGetSessionStorageKeys(): string[];
21
9
  export declare function utlGetSessionStorage(logger: IDiagnosticLogger, name: string): string;
22
10
  export declare function utlSetSessionStorage(logger: IDiagnosticLogger, name: string, data: string): boolean;
@@ -46,11 +46,11 @@ export { IPropertiesPlugin } from "./Interfaces/IPropertiesPlugin";
46
46
  export { IUser, IUserContext } from "./Interfaces/Context/IUser";
47
47
  export { ITelemetryTrace, ITraceState } from "./Interfaces/Context/ITelemetryTrace";
48
48
  export { IRequestContext } from "./Interfaces/IRequestContext";
49
- export { eDistributedTracingModes, DistributedTracingModes } from "./Enums";
49
+ export { DistributedTracingModes } from "./Enums";
50
50
  export { stringToBoolOrDefault, msToTimeSpan, getExtensionByName, isCrossOriginError } from "./HelperFuncs";
51
51
  export { isBeaconsSupported as isBeaconApiSupported } from "@microsoft/applicationinsights-core-js";
52
52
  export { createDomEvent } from "./DomHelperFuncs";
53
- export { utlDisableStorage, utlEnableStorage, utlCanUseLocalStorage, utlGetLocalStorage, utlSetLocalStorage, utlRemoveStorage, utlCanUseSessionStorage, utlGetSessionStorageKeys, utlGetSessionStorage, utlSetSessionStorage, utlRemoveSessionStorage } from "./StorageHelperFuncs";
53
+ export { utlDisableStorage, utlCanUseLocalStorage, utlGetLocalStorage, utlSetLocalStorage, utlRemoveStorage, utlCanUseSessionStorage, utlGetSessionStorageKeys, utlGetSessionStorage, utlSetSessionStorage, utlRemoveSessionStorage } from "./StorageHelperFuncs";
54
54
  export { urlParseUrl, urlGetAbsoluteUrl, urlGetPathName, urlGetCompleteUrl, urlParseHost, urlParseFullHost } from "./UrlHelperFuncs";
55
55
  export declare const PropertiesPluginIdentifier = "AppInsightsPropertiesPlugin";
56
56
  export declare const BreezeChannelIdentifier = "AppInsightsChannelPlugin";
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.19.5"
8
+ "packageVersion": "7.23.0"
9
9
  }
10
10
  ]
11
11
  }
@@ -1,52 +0,0 @@
1
- /*
2
- * Application Insights JavaScript SDK - Common, 2.7.5-nightly.2204-03
3
- * Copyright (c) Microsoft and contributors. All rights reserved.
4
- */
5
- "use strict";
6
- //
7
- //
8
- // // THIS FILE WAS AUTOGENERATED
9
- // import { Domain } from "./Domain";
10
- // "use strict";
11
- // /**
12
- // * Instances of AvailabilityData represent the result of executing an availability test.
13
- // */
14
- // export class AvailabilityData implements Domain {
15
- // /**
16
- // * Schema version
17
- // */
18
- // public ver: number = 2;
19
- // /**
20
- // * Identifier of a test run. Use it to correlate steps of test run and telemetry generated by the service.
21
- // */
22
- // public id: string;
23
- // /**
24
- // * Name of the test that these availability results represent.
25
- // */
26
- // public name: string;
27
- // /**
28
- // * Duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000 days.
29
- // */
30
- // public duration: string;
31
- // /**
32
- // * Success flag.
33
- // */
34
- // public success: boolean;
35
- // /**
36
- // * Name of the location where the test was run from.
37
- // */
38
- // public runLocation: string;
39
- // /**
40
- // * Diagnostic message for the result.
41
- // */
42
- // public message: string;
43
- // /**
44
- // * Collection of custom properties.
45
- // */
46
- // public properties: any = {};
47
- // /**
48
- // * Collection of custom measurements.
49
- // */
50
- // public measurements: any = {};
51
- // }
52
- //# sourceMappingURL=AvailabilityData.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AvailabilityData.js.map","sources":["AvailabilityData.js"],"sourcesContent":["\"use strict\";\r\n// // Copyright (c) Microsoft Corporation. All rights reserved.\r\n// // Licensed under the MIT License.\r\n// // THIS FILE WAS AUTOGENERATED\r\n// import { Domain } from \"./Domain\";\r\n// \"use strict\";\r\n// /**\r\n// * Instances of AvailabilityData represent the result of executing an availability test.\r\n// */\r\n// export class AvailabilityData implements Domain {\r\n// /**\r\n// * Schema version\r\n// */\r\n// public ver: number = 2;\r\n// /**\r\n// * Identifier of a test run. Use it to correlate steps of test run and telemetry generated by the service.\r\n// */\r\n// public id: string;\r\n// /**\r\n// * Name of the test that these availability results represent.\r\n// */\r\n// public name: string;\r\n// /**\r\n// * Duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000 days.\r\n// */\r\n// public duration: string;\r\n// /**\r\n// * Success flag.\r\n// */\r\n// public success: boolean;\r\n// /**\r\n// * Name of the location where the test was run from.\r\n// */\r\n// public runLocation: string;\r\n// /**\r\n// * Diagnostic message for the result.\r\n// */\r\n// public message: string;\r\n// /**\r\n// * Collection of custom properties.\r\n// */\r\n// public properties: any = {};\r\n// /**\r\n// * Collection of custom measurements.\r\n// */\r\n// public measurements: any = {};\r\n// }\r\n//# sourceMappingURL=AvailabilityData.js.map"],"names":[],"mappings":";;;;AAAA;AACA,GAA+D;AAC/D,GAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
@@ -1,89 +0,0 @@
1
- /*
2
- * Application Insights JavaScript SDK - Common, 2.7.5-nightly.2204-03
3
- * Copyright (c) Microsoft and contributors. All rights reserved.
4
- */
5
-
6
-
7
- import { __extendsFn as __extends } from "@microsoft/applicationinsights-shims";
8
- import { createClassFromInterface } from "@microsoft/applicationinsights-core-js";
9
- function _aiNameFunc(baseName) {
10
- var aiName = "ai." + baseName + ".";
11
- return function (name) {
12
- return aiName + name;
13
- };
14
- }
15
- var _aiApplication = _aiNameFunc("application");
16
- var _aiDevice = _aiNameFunc("device");
17
- var _aiLocation = _aiNameFunc("location");
18
- var _aiOperation = _aiNameFunc("operation");
19
- var _aiSession = _aiNameFunc("session");
20
- var _aiUser = _aiNameFunc("user");
21
- var _aiCloud = _aiNameFunc("cloud");
22
- var _aiInternal = _aiNameFunc("internal");
23
- var ContextTagKeys = /** @class */ (function (_super) {
24
- __extends(ContextTagKeys, _super);
25
- function ContextTagKeys() {
26
- return _super.call(this) || this;
27
- }
28
- return ContextTagKeys;
29
- }(createClassFromInterface({
30
- applicationVersion: _aiApplication("ver"),
31
- applicationBuild: _aiApplication("build"),
32
- applicationTypeId: _aiApplication("typeId"),
33
- applicationId: _aiApplication("applicationId"),
34
- applicationLayer: _aiApplication("layer"),
35
- deviceId: _aiDevice("id"),
36
- deviceIp: _aiDevice("ip"),
37
- deviceLanguage: _aiDevice("language"),
38
- deviceLocale: _aiDevice("locale"),
39
- deviceModel: _aiDevice("model"),
40
- deviceFriendlyName: _aiDevice("friendlyName"),
41
- deviceNetwork: _aiDevice("network"),
42
- deviceNetworkName: _aiDevice("networkName"),
43
- deviceOEMName: _aiDevice("oemName"),
44
- deviceOS: _aiDevice("os"),
45
- deviceOSVersion: _aiDevice("osVersion"),
46
- deviceRoleInstance: _aiDevice("roleInstance"),
47
- deviceRoleName: _aiDevice("roleName"),
48
- deviceScreenResolution: _aiDevice("screenResolution"),
49
- deviceType: _aiDevice("type"),
50
- deviceMachineName: _aiDevice("machineName"),
51
- deviceVMName: _aiDevice("vmName"),
52
- deviceBrowser: _aiDevice("browser"),
53
- deviceBrowserVersion: _aiDevice("browserVersion"),
54
- locationIp: _aiLocation("ip"),
55
- locationCountry: _aiLocation("country"),
56
- locationProvince: _aiLocation("province"),
57
- locationCity: _aiLocation("city"),
58
- operationId: _aiOperation("id"),
59
- operationName: _aiOperation("name"),
60
- operationParentId: _aiOperation("parentId"),
61
- operationRootId: _aiOperation("rootId"),
62
- operationSyntheticSource: _aiOperation("syntheticSource"),
63
- operationCorrelationVector: _aiOperation("correlationVector"),
64
- sessionId: _aiSession("id"),
65
- sessionIsFirst: _aiSession("isFirst"),
66
- sessionIsNew: _aiSession("isNew"),
67
- userAccountAcquisitionDate: _aiUser("accountAcquisitionDate"),
68
- userAccountId: _aiUser("accountId"),
69
- userAgent: _aiUser("userAgent"),
70
- userId: _aiUser("id"),
71
- userStoreRegion: _aiUser("storeRegion"),
72
- userAuthUserId: _aiUser("authUserId"),
73
- userAnonymousUserAcquisitionDate: _aiUser("anonUserAcquisitionDate"),
74
- userAuthenticatedUserAcquisitionDate: _aiUser("authUserAcquisitionDate"),
75
- cloudName: _aiCloud("name"),
76
- cloudRole: _aiCloud("role"),
77
- cloudRoleVer: _aiCloud("roleVer"),
78
- cloudRoleInstance: _aiCloud("roleInstance"),
79
- cloudEnvironment: _aiCloud("environment"),
80
- cloudLocation: _aiCloud("location"),
81
- cloudDeploymentUnit: _aiCloud("deploymentUnit"),
82
- internalNodeName: _aiInternal("nodeName"),
83
- internalSdkVersion: _aiInternal("sdkVersion"),
84
- internalAgentVersion: _aiInternal("agentVersion"),
85
- internalSnippet: _aiInternal("snippet"),
86
- internalSdkSrc: _aiInternal("sdkSrc")
87
- })));
88
- export { ContextTagKeys };
89
- //# sourceMappingURL=ContextTagKeys.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContextTagKeys.js.map","sources":["ContextTagKeys.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { __extends } from \"tslib\";\r\nimport { createClassFromInterface } from \"@microsoft/applicationinsights-core-js\";\r\nfunction _aiNameFunc(baseName) {\r\n var aiName = \"ai.\" + baseName + \".\";\r\n return function (name) {\r\n return aiName + name;\r\n };\r\n}\r\nvar _aiApplication = _aiNameFunc(\"application\");\r\nvar _aiDevice = _aiNameFunc(\"device\");\r\nvar _aiLocation = _aiNameFunc(\"location\");\r\nvar _aiOperation = _aiNameFunc(\"operation\");\r\nvar _aiSession = _aiNameFunc(\"session\");\r\nvar _aiUser = _aiNameFunc(\"user\");\r\nvar _aiCloud = _aiNameFunc(\"cloud\");\r\nvar _aiInternal = _aiNameFunc(\"internal\");\r\nvar ContextTagKeys = /** @class */ (function (_super) {\r\n __extends(ContextTagKeys, _super);\r\n function ContextTagKeys() {\r\n return _super.call(this) || this;\r\n }\r\n return ContextTagKeys;\r\n}(createClassFromInterface({\r\n applicationVersion: _aiApplication(\"ver\"),\r\n applicationBuild: _aiApplication(\"build\"),\r\n applicationTypeId: _aiApplication(\"typeId\"),\r\n applicationId: _aiApplication(\"applicationId\"),\r\n applicationLayer: _aiApplication(\"layer\"),\r\n deviceId: _aiDevice(\"id\"),\r\n deviceIp: _aiDevice(\"ip\"),\r\n deviceLanguage: _aiDevice(\"language\"),\r\n deviceLocale: _aiDevice(\"locale\"),\r\n deviceModel: _aiDevice(\"model\"),\r\n deviceFriendlyName: _aiDevice(\"friendlyName\"),\r\n deviceNetwork: _aiDevice(\"network\"),\r\n deviceNetworkName: _aiDevice(\"networkName\"),\r\n deviceOEMName: _aiDevice(\"oemName\"),\r\n deviceOS: _aiDevice(\"os\"),\r\n deviceOSVersion: _aiDevice(\"osVersion\"),\r\n deviceRoleInstance: _aiDevice(\"roleInstance\"),\r\n deviceRoleName: _aiDevice(\"roleName\"),\r\n deviceScreenResolution: _aiDevice(\"screenResolution\"),\r\n deviceType: _aiDevice(\"type\"),\r\n deviceMachineName: _aiDevice(\"machineName\"),\r\n deviceVMName: _aiDevice(\"vmName\"),\r\n deviceBrowser: _aiDevice(\"browser\"),\r\n deviceBrowserVersion: _aiDevice(\"browserVersion\"),\r\n locationIp: _aiLocation(\"ip\"),\r\n locationCountry: _aiLocation(\"country\"),\r\n locationProvince: _aiLocation(\"province\"),\r\n locationCity: _aiLocation(\"city\"),\r\n operationId: _aiOperation(\"id\"),\r\n operationName: _aiOperation(\"name\"),\r\n operationParentId: _aiOperation(\"parentId\"),\r\n operationRootId: _aiOperation(\"rootId\"),\r\n operationSyntheticSource: _aiOperation(\"syntheticSource\"),\r\n operationCorrelationVector: _aiOperation(\"correlationVector\"),\r\n sessionId: _aiSession(\"id\"),\r\n sessionIsFirst: _aiSession(\"isFirst\"),\r\n sessionIsNew: _aiSession(\"isNew\"),\r\n userAccountAcquisitionDate: _aiUser(\"accountAcquisitionDate\"),\r\n userAccountId: _aiUser(\"accountId\"),\r\n userAgent: _aiUser(\"userAgent\"),\r\n userId: _aiUser(\"id\"),\r\n userStoreRegion: _aiUser(\"storeRegion\"),\r\n userAuthUserId: _aiUser(\"authUserId\"),\r\n userAnonymousUserAcquisitionDate: _aiUser(\"anonUserAcquisitionDate\"),\r\n userAuthenticatedUserAcquisitionDate: _aiUser(\"authUserAcquisitionDate\"),\r\n cloudName: _aiCloud(\"name\"),\r\n cloudRole: _aiCloud(\"role\"),\r\n cloudRoleVer: _aiCloud(\"roleVer\"),\r\n cloudRoleInstance: _aiCloud(\"roleInstance\"),\r\n cloudEnvironment: _aiCloud(\"environment\"),\r\n cloudLocation: _aiCloud(\"location\"),\r\n cloudDeploymentUnit: _aiCloud(\"deploymentUnit\"),\r\n internalNodeName: _aiInternal(\"nodeName\"),\r\n internalSdkVersion: _aiInternal(\"sdkVersion\"),\r\n internalAgentVersion: _aiInternal(\"agentVersion\"),\r\n internalSnippet: _aiInternal(\"snippet\"),\r\n internalSdkSrc: _aiInternal(\"sdkSrc\")\r\n})));\r\nexport { ContextTagKeys };\r\n//# sourceMappingURL=ContextTagKeys.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC,gFAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
@@ -1,8 +0,0 @@
1
- /*
2
- * Application Insights JavaScript SDK - Common, 2.7.5-nightly.2204-03
3
- * Copyright (c) Microsoft and contributors. All rights reserved.
4
- */
5
-
6
-
7
- export {};
8
- //# sourceMappingURL=DataPointType.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataPointType.js.map","sources":["DataPointType.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nexport {};\r\n//# sourceMappingURL=DataPointType.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA"}