@microsoft/sp-diagnostics 1.23.2 → 1.24.0-beta.3

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/dist/78359e4b-07c2-43c6-8d0b-d060b4d577e8.manifest.json +6 -11
  2. package/dist/index-internal-beta.d.ts +22 -0
  3. package/dist/index-internal-public.d.ts +22 -0
  4. package/dist/index-internal.d.ts +22 -0
  5. package/dist/sp-diagnostics_none_ebdbca9bc199b51d4466.js +1 -0
  6. package/dist/tsdoc-metadata.json +1 -1
  7. package/lib-commonjs/Api/Engagement/EngagementLogger.js +91 -96
  8. package/lib-commonjs/Api/Engagement/IEngagementHandler.js +9 -3
  9. package/lib-commonjs/Api/ExecutionQueue.js +73 -86
  10. package/lib-commonjs/Api/ILogData.js +6 -3
  11. package/lib-commonjs/Api/ILogEntry.js +5 -2
  12. package/lib-commonjs/Api/ILogErrorData.js +6 -3
  13. package/lib-commonjs/Api/ILogSource.js +10 -3
  14. package/lib-commonjs/Api/ILogVerboseData.js +6 -3
  15. package/lib-commonjs/Api/Log/LogHandler.js +27 -26
  16. package/lib-commonjs/Api/LogEntry.js +40 -39
  17. package/lib-commonjs/Api/LogFeature.js +14 -10
  18. package/lib-commonjs/Api/LogLevel.js +22 -19
  19. package/lib-commonjs/Api/LogManager/CircularBuffer.js +56 -64
  20. package/lib-commonjs/Api/LogManager/LogManager.js +61 -78
  21. package/lib-commonjs/Api/LogSource.js +37 -35
  22. package/lib-commonjs/Api/LogType.js +20 -15
  23. package/lib-commonjs/Api/Qos/AutoAlertableQosMonitor.js +68 -82
  24. package/lib-commonjs/Api/Qos/CustomerPromiseInterfaces/ICustomerPromiseErrorDetails.js +5 -2
  25. package/lib-commonjs/Api/Qos/CustomerPromiseInterfaces/IExtraDataForCustomerPromise.js +5 -2
  26. package/lib-commonjs/Api/Qos/IQos.js +5 -2
  27. package/lib-commonjs/Api/Qos/IQosEndEvent.js +5 -2
  28. package/lib-commonjs/Api/Qos/IQosExtraData.js +15 -3
  29. package/lib-commonjs/Api/Qos/IQosStartEvent.js +9 -3
  30. package/lib-commonjs/Api/Qos/QosLogger.js +54 -60
  31. package/lib-commonjs/Api/Qos/QosMonitor.js +163 -209
  32. package/lib-commonjs/Api/Qos/QosMonitorShareFailureWithCP.js +72 -92
  33. package/lib-commonjs/Api/Qos/QosResultType.js +14 -7
  34. package/lib-commonjs/Api/Trace/DefaultTraceHandler.js +20 -22
  35. package/lib-commonjs/Api/Trace/ITraceHandler.js +9 -3
  36. package/lib-commonjs/Api/Trace/ITraceLogger.js +5 -2
  37. package/lib-commonjs/Api/Trace/LogEvent.js +86 -125
  38. package/lib-commonjs/Api/Trace/TraceLogger.js +149 -161
  39. package/lib-commonjs/Diagnostics.js +68 -72
  40. package/lib-commonjs/DiagnosticsSettingsManager.js +48 -43
  41. package/lib-commonjs/IDiagnosticsSettings.js +5 -2
  42. package/lib-commonjs/common/Killswitches.js +13 -9
  43. package/lib-commonjs/extraData/DisplayApp.js +13 -5
  44. package/lib-commonjs/extraData/IDiagnosticContextInfo.js +5 -2
  45. package/lib-commonjs/extraData/IPageExtraData.js +5 -2
  46. package/lib-commonjs/extraData/PageType.js +15 -8
  47. package/lib-commonjs/extraData/PromotedState.js +18 -13
  48. package/lib-commonjs/extraData/WebTemplateId.js +13 -5
  49. package/lib-commonjs/extraData/setPageExtraData.js +37 -37
  50. package/lib-commonjs/index.js +102 -50
  51. package/{lib → lib-dts}/Api/Engagement/IEngagementHandler.d.ts +2 -0
  52. package/{lib → lib-dts}/Diagnostics.d.ts +11 -0
  53. package/{lib → lib-dts}/DiagnosticsSettingsManager.d.ts +4 -0
  54. package/lib-esm/Api/Engagement/EngagementLogger.js +137 -0
  55. package/lib-esm/Api/Engagement/IEngagementHandler.js +9 -0
  56. package/lib-esm/Api/ExecutionQueue.js +114 -0
  57. package/lib-esm/Api/ILogData.js +4 -0
  58. package/lib-esm/Api/ILogEntry.js +3 -0
  59. package/lib-esm/Api/ILogErrorData.js +4 -0
  60. package/lib-esm/Api/ILogSource.js +8 -0
  61. package/lib-esm/Api/ILogVerboseData.js +4 -0
  62. package/lib-esm/Api/Log/LogHandler.js +37 -0
  63. package/lib-esm/Api/LogEntry.js +44 -0
  64. package/lib-esm/Api/LogFeature.js +8 -0
  65. package/lib-esm/Api/LogLevel.js +20 -0
  66. package/lib-esm/Api/LogManager/CircularBuffer.js +83 -0
  67. package/lib-esm/Api/LogManager/LogManager.js +103 -0
  68. package/lib-esm/Api/LogSource.js +32 -0
  69. package/lib-esm/Api/LogType.js +20 -0
  70. package/lib-esm/Api/Qos/AutoAlertableQosMonitor.js +74 -0
  71. package/lib-esm/Api/Qos/CustomerPromiseInterfaces/ICustomerPromiseErrorDetails.js +6 -0
  72. package/lib-esm/Api/Qos/CustomerPromiseInterfaces/IExtraDataForCustomerPromise.js +6 -0
  73. package/lib-esm/Api/Qos/IQos.js +6 -0
  74. package/lib-esm/Api/Qos/IQosEndEvent.js +6 -0
  75. package/lib-esm/Api/Qos/IQosExtraData.js +12 -0
  76. package/lib-esm/Api/Qos/IQosStartEvent.js +6 -0
  77. package/lib-esm/Api/Qos/QosLogger.js +64 -0
  78. package/lib-esm/Api/Qos/QosMonitor.js +258 -0
  79. package/lib-esm/Api/Qos/QosMonitorShareFailureWithCP.js +89 -0
  80. package/lib-esm/Api/Qos/QosResultType.js +11 -0
  81. package/lib-esm/Api/Trace/DefaultTraceHandler.js +23 -0
  82. package/lib-esm/Api/Trace/ITraceHandler.js +9 -0
  83. package/lib-esm/Api/Trace/ITraceLogger.js +3 -0
  84. package/lib-esm/Api/Trace/LogEvent.js +104 -0
  85. package/lib-esm/Api/Trace/TraceLogger.js +180 -0
  86. package/lib-esm/Diagnostics.js +78 -0
  87. package/lib-esm/DiagnosticsSettingsManager.js +65 -0
  88. package/lib-esm/IDiagnosticsSettings.js +3 -0
  89. package/{lib → lib-esm}/common/Killswitches.js +3 -4
  90. package/{lib → lib-esm}/extraData/DisplayApp.js +3 -2
  91. package/lib-esm/extraData/IDiagnosticContextInfo.js +7 -0
  92. package/lib-esm/extraData/IPageExtraData.js +3 -0
  93. package/{lib → lib-esm}/extraData/PageType.js +4 -4
  94. package/lib-esm/extraData/PromotedState.js +15 -0
  95. package/{lib → lib-esm}/extraData/WebTemplateId.js +3 -2
  96. package/{lib → lib-esm}/extraData/setPageExtraData.js +14 -20
  97. package/{lib → lib-esm}/index.js +3 -3
  98. package/package.json +33 -6
  99. package/dist/sp-diagnostics_none_414da724f4073ce8bb98.js +0 -1
  100. package/lib/Api/Engagement/EngagementLogger.d.ts.map +0 -1
  101. package/lib/Api/Engagement/EngagementLogger.js +0 -143
  102. package/lib/Api/Engagement/IEngagementHandler.d.ts.map +0 -1
  103. package/lib/Api/Engagement/IEngagementHandler.js +0 -2
  104. package/lib/Api/ExecutionQueue.d.ts.map +0 -1
  105. package/lib/Api/ExecutionQueue.js +0 -131
  106. package/lib/Api/ILogData.d.ts.map +0 -1
  107. package/lib/Api/ILogData.js +0 -3
  108. package/lib/Api/ILogEntry.d.ts.map +0 -1
  109. package/lib/Api/ILogEntry.js +0 -2
  110. package/lib/Api/ILogErrorData.d.ts.map +0 -1
  111. package/lib/Api/ILogErrorData.js +0 -3
  112. package/lib/Api/ILogSource.d.ts.map +0 -1
  113. package/lib/Api/ILogSource.js +0 -3
  114. package/lib/Api/ILogVerboseData.d.ts.map +0 -1
  115. package/lib/Api/ILogVerboseData.js +0 -3
  116. package/lib/Api/Log/LogHandler.d.ts.map +0 -1
  117. package/lib/Api/Log/LogHandler.js +0 -40
  118. package/lib/Api/LogEntry.d.ts.map +0 -1
  119. package/lib/Api/LogEntry.js +0 -51
  120. package/lib/Api/LogFeature.d.ts.map +0 -1
  121. package/lib/Api/LogFeature.js +0 -11
  122. package/lib/Api/LogLevel.d.ts.map +0 -1
  123. package/lib/Api/LogLevel.js +0 -24
  124. package/lib/Api/LogManager/CircularBuffer.d.ts.map +0 -1
  125. package/lib/Api/LogManager/CircularBuffer.js +0 -98
  126. package/lib/Api/LogManager/LogManager.d.ts.map +0 -1
  127. package/lib/Api/LogManager/LogManager.js +0 -121
  128. package/lib/Api/LogSource.d.ts.map +0 -1
  129. package/lib/Api/LogSource.js +0 -40
  130. package/lib/Api/LogType.d.ts.map +0 -1
  131. package/lib/Api/LogType.js +0 -23
  132. package/lib/Api/Qos/AutoAlertableQosMonitor.d.ts.map +0 -1
  133. package/lib/Api/Qos/AutoAlertableQosMonitor.js +0 -93
  134. package/lib/Api/Qos/CustomerPromiseInterfaces/ICustomerPromiseErrorDetails.d.ts.map +0 -1
  135. package/lib/Api/Qos/CustomerPromiseInterfaces/ICustomerPromiseErrorDetails.js +0 -2
  136. package/lib/Api/Qos/CustomerPromiseInterfaces/IExtraDataForCustomerPromise.d.ts.map +0 -1
  137. package/lib/Api/Qos/CustomerPromiseInterfaces/IExtraDataForCustomerPromise.js +0 -2
  138. package/lib/Api/Qos/IQos.d.ts.map +0 -1
  139. package/lib/Api/Qos/IQos.js +0 -2
  140. package/lib/Api/Qos/IQosEndEvent.d.ts.map +0 -1
  141. package/lib/Api/Qos/IQosEndEvent.js +0 -2
  142. package/lib/Api/Qos/IQosExtraData.d.ts.map +0 -1
  143. package/lib/Api/Qos/IQosExtraData.js +0 -2
  144. package/lib/Api/Qos/IQosStartEvent.d.ts.map +0 -1
  145. package/lib/Api/Qos/IQosStartEvent.js +0 -2
  146. package/lib/Api/Qos/QosLogger.d.ts.map +0 -1
  147. package/lib/Api/Qos/QosLogger.js +0 -74
  148. package/lib/Api/Qos/QosMonitor.d.ts.map +0 -1
  149. package/lib/Api/Qos/QosMonitor.js +0 -304
  150. package/lib/Api/Qos/QosMonitorShareFailureWithCP.d.ts.map +0 -1
  151. package/lib/Api/Qos/QosMonitorShareFailureWithCP.js +0 -114
  152. package/lib/Api/Qos/QosResultType.d.ts.map +0 -1
  153. package/lib/Api/Qos/QosResultType.js +0 -11
  154. package/lib/Api/Trace/DefaultTraceHandler.d.ts.map +0 -1
  155. package/lib/Api/Trace/DefaultTraceHandler.js +0 -30
  156. package/lib/Api/Trace/ITraceHandler.d.ts.map +0 -1
  157. package/lib/Api/Trace/ITraceHandler.js +0 -2
  158. package/lib/Api/Trace/ITraceLogger.d.ts.map +0 -1
  159. package/lib/Api/Trace/ITraceLogger.js +0 -2
  160. package/lib/Api/Trace/LogEvent.d.ts.map +0 -1
  161. package/lib/Api/Trace/LogEvent.js +0 -147
  162. package/lib/Api/Trace/TraceLogger.d.ts.map +0 -1
  163. package/lib/Api/Trace/TraceLogger.js +0 -196
  164. package/lib/Diagnostics.d.ts.map +0 -1
  165. package/lib/Diagnostics.js +0 -82
  166. package/lib/DiagnosticsSettingsManager.d.ts.map +0 -1
  167. package/lib/DiagnosticsSettingsManager.js +0 -62
  168. package/lib/IDiagnosticsSettings.d.ts.map +0 -1
  169. package/lib/IDiagnosticsSettings.js +0 -2
  170. package/lib/common/Killswitches.d.ts.map +0 -1
  171. package/lib/extraData/DisplayApp.d.ts.map +0 -1
  172. package/lib/extraData/IDiagnosticContextInfo.d.ts.map +0 -1
  173. package/lib/extraData/IDiagnosticContextInfo.js +0 -2
  174. package/lib/extraData/IPageExtraData.d.ts.map +0 -1
  175. package/lib/extraData/IPageExtraData.js +0 -2
  176. package/lib/extraData/PageType.d.ts.map +0 -1
  177. package/lib/extraData/PromotedState.d.ts.map +0 -1
  178. package/lib/extraData/PromotedState.js +0 -17
  179. package/lib/extraData/WebTemplateId.d.ts.map +0 -1
  180. package/lib/extraData/setPageExtraData.d.ts.map +0 -1
  181. package/lib/index.d.ts.map +0 -1
  182. /package/{lib → lib-dts}/Api/Engagement/EngagementLogger.d.ts +0 -0
  183. /package/{lib → lib-dts}/Api/ExecutionQueue.d.ts +0 -0
  184. /package/{lib → lib-dts}/Api/ILogData.d.ts +0 -0
  185. /package/{lib → lib-dts}/Api/ILogEntry.d.ts +0 -0
  186. /package/{lib → lib-dts}/Api/ILogErrorData.d.ts +0 -0
  187. /package/{lib → lib-dts}/Api/ILogSource.d.ts +0 -0
  188. /package/{lib → lib-dts}/Api/ILogVerboseData.d.ts +0 -0
  189. /package/{lib → lib-dts}/Api/Log/LogHandler.d.ts +0 -0
  190. /package/{lib → lib-dts}/Api/LogEntry.d.ts +0 -0
  191. /package/{lib → lib-dts}/Api/LogFeature.d.ts +0 -0
  192. /package/{lib → lib-dts}/Api/LogLevel.d.ts +0 -0
  193. /package/{lib → lib-dts}/Api/LogManager/CircularBuffer.d.ts +0 -0
  194. /package/{lib → lib-dts}/Api/LogManager/LogManager.d.ts +0 -0
  195. /package/{lib → lib-dts}/Api/LogSource.d.ts +0 -0
  196. /package/{lib → lib-dts}/Api/LogType.d.ts +0 -0
  197. /package/{lib → lib-dts}/Api/Qos/AutoAlertableQosMonitor.d.ts +0 -0
  198. /package/{lib → lib-dts}/Api/Qos/CustomerPromiseInterfaces/ICustomerPromiseErrorDetails.d.ts +0 -0
  199. /package/{lib → lib-dts}/Api/Qos/CustomerPromiseInterfaces/IExtraDataForCustomerPromise.d.ts +0 -0
  200. /package/{lib → lib-dts}/Api/Qos/IQos.d.ts +0 -0
  201. /package/{lib → lib-dts}/Api/Qos/IQosEndEvent.d.ts +0 -0
  202. /package/{lib → lib-dts}/Api/Qos/IQosExtraData.d.ts +0 -0
  203. /package/{lib → lib-dts}/Api/Qos/IQosStartEvent.d.ts +0 -0
  204. /package/{lib → lib-dts}/Api/Qos/QosLogger.d.ts +0 -0
  205. /package/{lib → lib-dts}/Api/Qos/QosMonitor.d.ts +0 -0
  206. /package/{lib → lib-dts}/Api/Qos/QosMonitorShareFailureWithCP.d.ts +0 -0
  207. /package/{lib → lib-dts}/Api/Qos/QosResultType.d.ts +0 -0
  208. /package/{lib → lib-dts}/Api/Trace/DefaultTraceHandler.d.ts +0 -0
  209. /package/{lib → lib-dts}/Api/Trace/ITraceHandler.d.ts +0 -0
  210. /package/{lib → lib-dts}/Api/Trace/ITraceLogger.d.ts +0 -0
  211. /package/{lib → lib-dts}/Api/Trace/LogEvent.d.ts +0 -0
  212. /package/{lib → lib-dts}/Api/Trace/TraceLogger.d.ts +0 -0
  213. /package/{lib → lib-dts}/IDiagnosticsSettings.d.ts +0 -0
  214. /package/{lib → lib-dts}/common/Killswitches.d.ts +0 -0
  215. /package/{lib → lib-dts}/extraData/DisplayApp.d.ts +0 -0
  216. /package/{lib → lib-dts}/extraData/IDiagnosticContextInfo.d.ts +0 -0
  217. /package/{lib → lib-dts}/extraData/IPageExtraData.d.ts +0 -0
  218. /package/{lib → lib-dts}/extraData/PageType.d.ts +0 -0
  219. /package/{lib → lib-dts}/extraData/PromotedState.d.ts +0 -0
  220. /package/{lib → lib-dts}/extraData/WebTemplateId.d.ts +0 -0
  221. /package/{lib → lib-dts}/extraData/setPageExtraData.d.ts +0 -0
  222. /package/{lib → lib-dts}/index.d.ts +0 -0
  223. /package/{lib → lib-esm}/sp-diagnostics.manifest.json +0 -0
@@ -1,121 +0,0 @@
1
- import CircularBuffer from './CircularBuffer';
2
- /**
3
- * LogManager allows multiple handlers to process log events.
4
- * It caches the latest 5000 log events. If a handler is just added, the
5
- * handler is able to get access to the cached events and all incoming events.
6
- * Dev-dashboard and potentially third-party can use it to get access to events.
7
- * @internal
8
- */
9
- var LogManager = /** @class */ (function () {
10
- function LogManager(initialHandler) {
11
- this._shouldLogInRealTime = [];
12
- this._handlers = [];
13
- this._events = new CircularBuffer(LogManager._maxVerboseLog);
14
- if (initialHandler) {
15
- this.addHandler(initialHandler);
16
- }
17
- }
18
- Object.defineProperty(LogManager, "_maxVerboseLog", {
19
- get: function () {
20
- return 5000;
21
- },
22
- enumerable: false,
23
- configurable: true
24
- });
25
- Object.defineProperty(LogManager.prototype, "events", {
26
- /**
27
- * Event list for delayed asynchronous processing.
28
- * Events are accumulated in CircularBuffer for processing later.
29
- */
30
- get: function () {
31
- return this._events;
32
- },
33
- enumerable: false,
34
- configurable: true
35
- });
36
- /**
37
- * Registers an external logger to logger collection for asynchronous event logging.
38
- * Logger is registered once.
39
- */
40
- LogManager.prototype.addHandler = function (handler) {
41
- if (!this._containsHandler(handler)) {
42
- this._handlers.push(handler);
43
- this._shouldLogInRealTime.push(false);
44
- }
45
- };
46
- /**
47
- * Event logging operation for delayed asynchronous processing.
48
- */
49
- LogManager.prototype.log = function (event) {
50
- Object.freeze(event);
51
- this._events.push(event);
52
- this._processLogEvent(event);
53
- };
54
- /**
55
- * Removes an external logger from logger collection for asynchronous event logging.
56
- * Logger is registered once.
57
- */
58
- LogManager.prototype.removeHandler = function (handler) {
59
- var index = this._handlers.indexOf(handler);
60
- if (index > -1) {
61
- this._handlers.splice(index, 1);
62
- this._shouldLogInRealTime.splice(index, 1);
63
- }
64
- };
65
- /**
66
- * Reset function clears logger collection for asynchronous event logging.
67
- * All recorded events are purged.
68
- */
69
- LogManager.prototype.reset = function () {
70
- this._handlers = [];
71
- this._shouldLogInRealTime = [];
72
- this._events.removeAll();
73
- };
74
- /**
75
- * Processes all the buffered events using the registered handler.
76
- */
77
- LogManager.prototype.processAll = function (handler) {
78
- if (this._handlers.indexOf(handler) > -1) {
79
- this._processAllEvents(handler);
80
- }
81
- };
82
- LogManager.prototype._containsHandler = function (handler) {
83
- for (var _i = 0, _a = this._handlers; _i < _a.length; _i++) {
84
- var existingHandler = _a[_i];
85
- if (existingHandler === handler) {
86
- return true;
87
- }
88
- }
89
- return false;
90
- };
91
- LogManager.prototype._processAllEvents = function (handler) {
92
- this._events.forEach(function (event) {
93
- if (event) {
94
- try {
95
- handler(event);
96
- }
97
- catch (e) {
98
- // eslint-disable-next-line no-console
99
- console.error('failed to handle event:' + e.toString());
100
- }
101
- }
102
- });
103
- this._shouldLogInRealTime[this._handlers.indexOf(handler)] = true;
104
- };
105
- LogManager.prototype._processLogEvent = function (event) {
106
- for (var i = 0; i < this._handlers.length; i++) {
107
- if (this._shouldLogInRealTime[i] && event) {
108
- try {
109
- this._handlers[i](event);
110
- }
111
- catch (e) {
112
- // eslint-disable-next-line no-console
113
- console.error('failed to handle event:' + e.toString());
114
- }
115
- }
116
- }
117
- };
118
- return LogManager;
119
- }());
120
- export default LogManager;
121
- //# sourceMappingURL=LogManager.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LogSource.d.ts","sourceRoot":"","sources":["../../src/Api/LogSource.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,UAAU,EAA+B,MAAM,4BAA4B,CAAC;AAErF;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,SAAU,YAAW,UAAU;IAClD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAE7B;;;OAGG;WACW,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS;IAI3C,IAAW,EAAE,IAAI,MAAM,CAEtB;IAED;;OAEG;IACI,OAAO,IAAI,OAAO;IAIzB,OAAO;CAKR;AAED,gBAAgB;AAChB,eAAO,MAAM,mBAAmB,EAAE,UAAU,CAAC,SAAS,CAKrD,CAAC"}
@@ -1,40 +0,0 @@
1
- // Copyright (c) Microsoft. All rights reserved.
2
- import { ServiceKey, Validate } from '@microsoft/sp-core-library';
3
- /**
4
- * Represents a Log entry
5
- *
6
- * @internal
7
- */
8
- var LogSource = /** @class */ (function () {
9
- function LogSource(id) {
10
- Validate.isNotNullOrUndefined(id, 'id');
11
- this._id = id;
12
- }
13
- /**
14
- * Factory method to create an instance of the LogSource class
15
- * @returns a reference to an instance of the LogSource class
16
- */
17
- LogSource.create = function (id) {
18
- return new LogSource(id);
19
- };
20
- Object.defineProperty(LogSource.prototype, "id", {
21
- get: function () {
22
- return this._id;
23
- },
24
- enumerable: false,
25
- configurable: true
26
- });
27
- /**
28
- * @returns if the LogSource is empty.
29
- */
30
- LogSource.prototype.isEmpty = function () {
31
- return this._id.length === 0;
32
- };
33
- return LogSource;
34
- }());
35
- export default LogSource;
36
- /** @internal */
37
- export var logSourceServiceKey = ServiceKey.createCustom('sp-client-base:LogSource', function (serviceScope) {
38
- return LogSource.create('');
39
- });
40
- //# sourceMappingURL=LogSource.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LogType.d.ts","sourceRoot":"","sources":["../../src/Api/LogType.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,aAAK,OAAO;IACV;;OAEG;IACH,KAAK,IAAI;IAET;;OAEG;IACH,KAAK,IAAI;IAET;;OAEG;IACH,KAAK,IAAI;CACV;AAED,eAAe,OAAO,CAAC"}
@@ -1,23 +0,0 @@
1
- // Copyright (c) Microsoft. All rights reserved.
2
- /**
3
- * Represents the supported log types
4
- *
5
- * @internal
6
- */
7
- var LogType;
8
- (function (LogType) {
9
- /**
10
- * Trace level log. Use this for logging diagnostics
11
- */
12
- LogType[LogType["Trace"] = 1] = "Trace";
13
- /**
14
- * Event level log. Use this for logging usage etc
15
- */
16
- LogType[LogType["Event"] = 2] = "Event";
17
- /**
18
- * Use for errors
19
- */
20
- LogType[LogType["Error"] = 3] = "Error";
21
- })(LogType || (LogType = {}));
22
- export default LogType;
23
- //# sourceMappingURL=LogType.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AutoAlertableQosMonitor.d.ts","sourceRoot":"","sources":["../../../src/Api/Qos/AutoAlertableQosMonitor.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC;;;;;GAKG;AAEH,eAAO,MAAM,wBAAwB;IACnC;;OAEG;;IAEH;;;OAGG;;IAEH;;;;OAIG;;CAEK,CAAC;AAEX;;;;GAIG;AAEH,MAAM,MAAM,wBAAwB,GAClC,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAC;AAE3E;;;;;GAKG;AACH,qBAAa,uBAAwB,SAAQ,UAAU;IACrD,OAAO,CAAC,yBAAyB,CAA2B;IAE5D;;;;;;;OAOG;gBAED,YAAY,EAAE,MAAM,EACpB,wBAAwB,EAAE,wBAAwB,EAClD,gBAAgB,GAAE,OAAe;IAMnC;;;OAGG;IAEI,YAAY,CAAC,SAAS,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,IAAI;IAI7D;;;;OAIG;IACI,sBAAsB,CAC3B,aAAa,GAAE,MAA4B,EAC3C,EAAE,CAAC,EAAE,KAAK,EAEV,SAAS,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GACjC,IAAI;IASA,oBAAoB,CACzB,aAAa,GAAE,MAA0B,EACzC,EAAE,CAAC,EAAE,KAAK,EAEV,SAAS,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GACjC,IAAI;IAIP;;;OAGG;IAEH,OAAO,CAAC,oCAAoC;CAM7C"}
@@ -1,93 +0,0 @@
1
- import { __extends } from "tslib";
2
- import QosMonitor from './QosMonitor';
3
- /**
4
- * Object members correspond to auto alerting monitors.
5
- * Information about monitors: https://onedrive.visualstudio.com/WEX!/_wiki/wikis/WEX!.wiki/30583/Current-Monitors
6
- *
7
- * @internal
8
- */
9
- // eslint-disable-next-line @typescript-eslint/typedef
10
- export var AutoAlertableMonitorType = {
11
- /**
12
- * If QoS drops below a static threshold of 95 for a period, a sev 4 is fired.
13
- */
14
- StaticReliabilityQos95Sev4: 'StaticReliabilityQos95Sev4',
15
- /**
16
- * If QoS drops below some dynamic threshold "Medium" sensitivity (as defined by Geneva)
17
- * calculated from historical monitor data, a sev 4 is fired.
18
- */
19
- DynamicReliabilityQosMediumSev4: 'DynamicReliabilityQosMediumSev4',
20
- /**
21
- * If the number of expected errors increases past a "High" dynamic threshold sensitivity
22
- * (as defined by Geneva) calculated from historical monitor data OR QoS drops below some
23
- * dynamic threshold "Medium" sensitivity, a sev 4 is fired.
24
- */
25
- DynamicReliabilityExpectedFailureHighSev4: 'DynamicReliabilityExpectedFailureHighSev4'
26
- };
27
- /**
28
- * Qos logger which enforces using an existing altering monitor as determined by the
29
- * AlertableMonitorType.
30
- *
31
- * @internal
32
- */
33
- var AutoAlertableQosMonitor = /** @class */ (function (_super) {
34
- __extends(AutoAlertableQosMonitor, _super);
35
- /**
36
- * Creates a QoS monitor (initializes it and logs the start event) that enforces that end events
37
- * fired include the alertableMonitorType property in extraData corresponding to the
38
- *
39
- * @param scenarioName - Unique name of the QoS scenario
40
- * @param autoAlertableMonitorType - Correspond to existing alerting monitor that will track the events.
41
- * @param copyToEngagement - Indicate whether this data should be used as Engagement as well.
42
- */
43
- function AutoAlertableQosMonitor(scenarioName, autoAlertableMonitorType, copyToEngagement) {
44
- if (copyToEngagement === void 0) { copyToEngagement = false; }
45
- var _this = _super.call(this, scenarioName, /* copyToCosmos */ false, /* copyToInterana */ copyToEngagement) || this;
46
- _this._autoAlertableMonitorType = autoAlertableMonitorType;
47
- return _this;
48
- }
49
- /**
50
- * QoS monitor ends with success. Also writes AutoAlertableMonitorType to extraData.
51
- * You will see success tag: SPPages.ScenarioName.Success
52
- */
53
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
54
- AutoAlertableQosMonitor.prototype.writeSuccess = function (extraData) {
55
- _super.prototype.writeSuccess.call(this, this._getExtraDataWithAutoAlertableFields(extraData));
56
- };
57
- /**
58
- * QoS monitor ends with failure. Also writes AutoAlertableMonitorType to extraData.
59
- * You will see failure tag: SPPages.ScenarioName.<failuretag>.Failure.
60
- * <failuretag> will be filled with param tagName
61
- */
62
- AutoAlertableQosMonitor.prototype.writeUnexpectedFailure = function (tagNameSuffix, ex,
63
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
64
- extraData) {
65
- if (tagNameSuffix === void 0) { tagNameSuffix = 'DefaultUnexpected'; }
66
- _super.prototype.writeUnexpectedFailure.call(this, tagNameSuffix, ex, this._getExtraDataWithAutoAlertableFields(extraData));
67
- };
68
- /*
69
- * QoS monitor ends with expected failure. Also writes AutoAlertableMonitorType to extraData.
70
- * You will see success tag: ModernPublish.RenderPublishPage.<failuretag>.ExpectedFailure.
71
- * <failuretag> will be filled with param tagName
72
- */
73
- AutoAlertableQosMonitor.prototype.writeExpectedFailure = function (tagNameSuffix, ex,
74
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
75
- extraData) {
76
- if (tagNameSuffix === void 0) { tagNameSuffix = 'DefaultExpected'; }
77
- _super.prototype.writeExpectedFailure.call(this, tagNameSuffix, ex, this._getExtraDataWithAutoAlertableFields(extraData));
78
- };
79
- /**
80
- * Gets the extraData with additional auto alertable dimensions to indicate this uses the easy
81
- * alerting monitors.
82
- */
83
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
84
- AutoAlertableQosMonitor.prototype._getExtraDataWithAutoAlertableFields = function (extraData) {
85
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
86
- var returnedExtraData = extraData !== null && extraData !== void 0 ? extraData : {};
87
- returnedExtraData.autoAlertableMonitorType = AutoAlertableMonitorType[this._autoAlertableMonitorType];
88
- return returnedExtraData;
89
- };
90
- return AutoAlertableQosMonitor;
91
- }(QosMonitor));
92
- export { AutoAlertableQosMonitor };
93
- //# sourceMappingURL=AutoAlertableQosMonitor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ICustomerPromiseErrorDetails.d.ts","sourceRoot":"","sources":["../../../../src/Api/Qos/CustomerPromiseInterfaces/ICustomerPromiseErrorDetails.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ICustomerPromiseErrorDetails.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IExtraDataForCustomerPromise.d.ts","sourceRoot":"","sources":["../../../../src/Api/Qos/CustomerPromiseInterfaces/IExtraDataForCustomerPromise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACnF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,CAAC,YAAY,EAAE,4BAA4B,KAAK,IAAI,CAAC;IACjE,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=IExtraDataForCustomerPromise.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IQos.d.ts","sourceRoot":"","sources":["../../../src/Api/Qos/IQos.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD;;;GAGG;AACH,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE;QACJ,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,aAAa,CAAC;KAC3B,CAAC;IACF,cAAc,EAAE,MAAM,CAAC;IACvB,GAAG,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;CACjC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=IQos.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IQosEndEvent.d.ts","sourceRoot":"","sources":["../../../src/Api/Qos/IQosEndEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,aAAa,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=IQosEndEvent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IQosExtraData.d.ts","sourceRoot":"","sources":["../../../src/Api/Qos/IQosExtraData.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,WAAW,aAAa;IAG5B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAMxB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CAGjB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=IQosExtraData.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IQosStartEvent.d.ts","sourceRoot":"","sources":["../../../src/Api/Qos/IQosStartEvent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=IQosStartEvent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QosLogger.d.ts","sourceRoot":"","sources":["../../../src/Api/Qos/QosLogger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE,MAAM,MAAM,cAAc,GAAG,KAAK,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;AAEjE;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,SAAS;IAC5B,OAAO,CAAC,MAAM,CAAC,SAAS,CAAY;IAEpC,OAAO,CAAC,UAAU,CAA8C;IAChE,OAAO,CAAC,cAAc,CAAwC;IAC9D,OAAO,CAAC,wBAAwB,CAAkB;IAClD,OAAO,CAAC,UAAU,CAA6B;IAE/C,WAAkB,QAAQ,IAAI,SAAS,CAMtC;;IAMD,IAAW,uBAAuB,IAAI,OAAO,CAE5C;IAED,IAAW,uBAAuB,CAAC,iBAAiB,EAAE,OAAO,EAG5D;IAEM,SAAS,CAAC,SAAS,EAAE,KAAK,KAAK,EAAE,cAAc,KAAK,IAAI,GAAG,IAAI;IAI/D,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;IAI1C,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,GAAG,IAAI;IAM7D,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,IAAI;IAInE,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,iBAAiB;CAU1B"}
@@ -1,74 +0,0 @@
1
- import ExecutionQueue from '../ExecutionQueue';
2
- /**
3
- * QosLogger allows multiple QosMonitors to be deferred processed.
4
- * @internal
5
- */
6
- var QosLogger = /** @class */ (function () {
7
- function QosLogger() {
8
- this._qosEvents = new Map();
9
- this._deferExecutor = new ExecutionQueue();
10
- this._shouldProcessInRealTime = false;
11
- this._initializeLogger();
12
- }
13
- Object.defineProperty(QosLogger, "instance", {
14
- get: function () {
15
- if (!this._instance) {
16
- this._instance = new QosLogger();
17
- }
18
- return this._instance;
19
- },
20
- enumerable: false,
21
- configurable: true
22
- });
23
- Object.defineProperty(QosLogger.prototype, "shouldProcessInRealTime", {
24
- get: function () {
25
- return this._shouldProcessInRealTime;
26
- },
27
- set: function (processInRealTime) {
28
- this._shouldProcessInRealTime = processInRealTime;
29
- this._deferExecutor.shouldExecuteInRealTime = processInRealTime;
30
- },
31
- enumerable: false,
32
- configurable: true
33
- });
34
- QosLogger.prototype.setLogger = function (qosLogger) {
35
- this._qosLogger = qosLogger;
36
- };
37
- QosLogger.prototype.getQosEvent = function (key) {
38
- return this._qosEvents.get(key);
39
- };
40
- QosLogger.prototype.startQosMonitor = function (key, startData) {
41
- if (!this._qosEvents.has(key)) {
42
- this._deferExecutor.addExecutionEntry('start', key, startData);
43
- }
44
- };
45
- QosLogger.prototype.writeQosEndResult = function (key, endData) {
46
- this._deferExecutor.addExecutionEntry('end', key, endData);
47
- };
48
- QosLogger.prototype._startMonitor = function (key, event) {
49
- if (this._qosLogger) {
50
- this._qosEvents.set(key, new this._qosLogger(event));
51
- }
52
- };
53
- QosLogger.prototype._endMonitor = function (key, event) {
54
- var qosEvent = this._qosEvents.get(key);
55
- if (qosEvent) {
56
- qosEvent.end(event);
57
- this._qosEvents.delete(key);
58
- }
59
- };
60
- QosLogger.prototype._initializeLogger = function () {
61
- var _this = this;
62
- var startHandler = (function (key, e) {
63
- _this._startMonitor(key, e);
64
- });
65
- var endHandler = (function (key, e) {
66
- _this._endMonitor(key, e);
67
- });
68
- this._deferExecutor.addHandler('start', startHandler);
69
- this._deferExecutor.addHandler('end', endHandler);
70
- };
71
- return QosLogger;
72
- }());
73
- export default QosLogger;
74
- //# sourceMappingURL=QosLogger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QosMonitor.d.ts","sourceRoot":"","sources":["../../../src/Api/Qos/QosMonitor.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAkBhD;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,UAAU;IAC7B,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,aAAa,CAAsC;IAC3D,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,cAAc,CAAqB;IAC3C,OAAO,CAAC,UAAU,CAA4B;IAC9C,OAAO,CAAC,aAAa,CAAU;IAC/B,OAAO,CAAC,eAAe,CAAU;IACjC,OAAO,CAAC,mBAAmB,CAIzB;WAEY,uBAAuB,IAAI,IAAI;IAM7C;;;OAGG;WACW,wBAAwB,CAAC,iBAAiB,EAAE,OAAO,GAAG,IAAI;IAIxE;;;;;;OAMG;gBACgB,YAAY,EAAE,MAAM,EAAE,YAAY,GAAE,OAAe,EAAE,cAAc,GAAE,OAAe;IAevG,IAAW,IAAI,IAAI,MAAM,CAExB;IAED,IAAW,cAAc,IAAI,MAAM,CAElC;IAED,IAAW,UAAU,IAAI,MAAM,GAAG,SAAS,CAE1C;IAED,IAAW,UAAU,IAAI,aAAa,GAAG,SAAS,CAEjD;IAED,IAAW,SAAS,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAE1D;IAED,IAAW,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAE9D;IAED,IAAW,QAAQ,IAAI,OAAO,CAE7B;IAED;;;OAGG;IAEI,YAAY,CAAC,SAAS,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,IAAI;IAI7D;;;;OAIG;IACI,sBAAsB,CAC3B,aAAa,GAAE,MAA4B,EAC3C,EAAE,CAAC,EAAE,KAAK,EAEV,SAAS,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GACjC,IAAI;IASA,oBAAoB,CACzB,aAAa,GAAE,MAA0B,EACzC,EAAE,CAAC,EAAE,KAAK,EAEV,SAAS,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GACjC,IAAI;IAIP,OAAO,CAAC,YAAY;IAyCpB,OAAO,CAAC,oBAAoB;IA4B5B,OAAO,CAAC,yBAAyB,CAuB/B;IAEF,OAAO,CAAC,mBAAmB;IAM3B;;;;;;;OAOG;IACH,OAAO,CAAC,YAAY;IAiBpB,OAAO,CAAC,eAAe;IAkBvB,OAAO,CAAC,WAAW;IAsBnB,OAAO,CAAC,kBAAkB;CA4B3B"}