@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.
- package/dist/78359e4b-07c2-43c6-8d0b-d060b4d577e8.manifest.json +6 -11
- package/dist/index-internal-beta.d.ts +22 -0
- package/dist/index-internal-public.d.ts +22 -0
- package/dist/index-internal.d.ts +22 -0
- package/dist/sp-diagnostics_none_ebdbca9bc199b51d4466.js +1 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/lib-commonjs/Api/Engagement/EngagementLogger.js +91 -96
- package/lib-commonjs/Api/Engagement/IEngagementHandler.js +9 -3
- package/lib-commonjs/Api/ExecutionQueue.js +73 -86
- package/lib-commonjs/Api/ILogData.js +6 -3
- package/lib-commonjs/Api/ILogEntry.js +5 -2
- package/lib-commonjs/Api/ILogErrorData.js +6 -3
- package/lib-commonjs/Api/ILogSource.js +10 -3
- package/lib-commonjs/Api/ILogVerboseData.js +6 -3
- package/lib-commonjs/Api/Log/LogHandler.js +27 -26
- package/lib-commonjs/Api/LogEntry.js +40 -39
- package/lib-commonjs/Api/LogFeature.js +14 -10
- package/lib-commonjs/Api/LogLevel.js +22 -19
- package/lib-commonjs/Api/LogManager/CircularBuffer.js +56 -64
- package/lib-commonjs/Api/LogManager/LogManager.js +61 -78
- package/lib-commonjs/Api/LogSource.js +37 -35
- package/lib-commonjs/Api/LogType.js +20 -15
- package/lib-commonjs/Api/Qos/AutoAlertableQosMonitor.js +68 -82
- package/lib-commonjs/Api/Qos/CustomerPromiseInterfaces/ICustomerPromiseErrorDetails.js +5 -2
- package/lib-commonjs/Api/Qos/CustomerPromiseInterfaces/IExtraDataForCustomerPromise.js +5 -2
- package/lib-commonjs/Api/Qos/IQos.js +5 -2
- package/lib-commonjs/Api/Qos/IQosEndEvent.js +5 -2
- package/lib-commonjs/Api/Qos/IQosExtraData.js +15 -3
- package/lib-commonjs/Api/Qos/IQosStartEvent.js +9 -3
- package/lib-commonjs/Api/Qos/QosLogger.js +54 -60
- package/lib-commonjs/Api/Qos/QosMonitor.js +163 -209
- package/lib-commonjs/Api/Qos/QosMonitorShareFailureWithCP.js +72 -92
- package/lib-commonjs/Api/Qos/QosResultType.js +14 -7
- package/lib-commonjs/Api/Trace/DefaultTraceHandler.js +20 -22
- package/lib-commonjs/Api/Trace/ITraceHandler.js +9 -3
- package/lib-commonjs/Api/Trace/ITraceLogger.js +5 -2
- package/lib-commonjs/Api/Trace/LogEvent.js +86 -125
- package/lib-commonjs/Api/Trace/TraceLogger.js +149 -161
- package/lib-commonjs/Diagnostics.js +68 -72
- package/lib-commonjs/DiagnosticsSettingsManager.js +48 -43
- package/lib-commonjs/IDiagnosticsSettings.js +5 -2
- package/lib-commonjs/common/Killswitches.js +13 -9
- package/lib-commonjs/extraData/DisplayApp.js +13 -5
- package/lib-commonjs/extraData/IDiagnosticContextInfo.js +5 -2
- package/lib-commonjs/extraData/IPageExtraData.js +5 -2
- package/lib-commonjs/extraData/PageType.js +15 -8
- package/lib-commonjs/extraData/PromotedState.js +18 -13
- package/lib-commonjs/extraData/WebTemplateId.js +13 -5
- package/lib-commonjs/extraData/setPageExtraData.js +37 -37
- package/lib-commonjs/index.js +102 -50
- package/{lib → lib-dts}/Api/Engagement/IEngagementHandler.d.ts +2 -0
- package/{lib → lib-dts}/Diagnostics.d.ts +11 -0
- package/{lib → lib-dts}/DiagnosticsSettingsManager.d.ts +4 -0
- package/lib-esm/Api/Engagement/EngagementLogger.js +137 -0
- package/lib-esm/Api/Engagement/IEngagementHandler.js +9 -0
- package/lib-esm/Api/ExecutionQueue.js +114 -0
- package/lib-esm/Api/ILogData.js +4 -0
- package/lib-esm/Api/ILogEntry.js +3 -0
- package/lib-esm/Api/ILogErrorData.js +4 -0
- package/lib-esm/Api/ILogSource.js +8 -0
- package/lib-esm/Api/ILogVerboseData.js +4 -0
- package/lib-esm/Api/Log/LogHandler.js +37 -0
- package/lib-esm/Api/LogEntry.js +44 -0
- package/lib-esm/Api/LogFeature.js +8 -0
- package/lib-esm/Api/LogLevel.js +20 -0
- package/lib-esm/Api/LogManager/CircularBuffer.js +83 -0
- package/lib-esm/Api/LogManager/LogManager.js +103 -0
- package/lib-esm/Api/LogSource.js +32 -0
- package/lib-esm/Api/LogType.js +20 -0
- package/lib-esm/Api/Qos/AutoAlertableQosMonitor.js +74 -0
- package/lib-esm/Api/Qos/CustomerPromiseInterfaces/ICustomerPromiseErrorDetails.js +6 -0
- package/lib-esm/Api/Qos/CustomerPromiseInterfaces/IExtraDataForCustomerPromise.js +6 -0
- package/lib-esm/Api/Qos/IQos.js +6 -0
- package/lib-esm/Api/Qos/IQosEndEvent.js +6 -0
- package/lib-esm/Api/Qos/IQosExtraData.js +12 -0
- package/lib-esm/Api/Qos/IQosStartEvent.js +6 -0
- package/lib-esm/Api/Qos/QosLogger.js +64 -0
- package/lib-esm/Api/Qos/QosMonitor.js +258 -0
- package/lib-esm/Api/Qos/QosMonitorShareFailureWithCP.js +89 -0
- package/lib-esm/Api/Qos/QosResultType.js +11 -0
- package/lib-esm/Api/Trace/DefaultTraceHandler.js +23 -0
- package/lib-esm/Api/Trace/ITraceHandler.js +9 -0
- package/lib-esm/Api/Trace/ITraceLogger.js +3 -0
- package/lib-esm/Api/Trace/LogEvent.js +104 -0
- package/lib-esm/Api/Trace/TraceLogger.js +180 -0
- package/lib-esm/Diagnostics.js +78 -0
- package/lib-esm/DiagnosticsSettingsManager.js +65 -0
- package/lib-esm/IDiagnosticsSettings.js +3 -0
- package/{lib → lib-esm}/common/Killswitches.js +3 -4
- package/{lib → lib-esm}/extraData/DisplayApp.js +3 -2
- package/lib-esm/extraData/IDiagnosticContextInfo.js +7 -0
- package/lib-esm/extraData/IPageExtraData.js +3 -0
- package/{lib → lib-esm}/extraData/PageType.js +4 -4
- package/lib-esm/extraData/PromotedState.js +15 -0
- package/{lib → lib-esm}/extraData/WebTemplateId.js +3 -2
- package/{lib → lib-esm}/extraData/setPageExtraData.js +14 -20
- package/{lib → lib-esm}/index.js +3 -3
- package/package.json +33 -6
- package/dist/sp-diagnostics_none_414da724f4073ce8bb98.js +0 -1
- package/lib/Api/Engagement/EngagementLogger.d.ts.map +0 -1
- package/lib/Api/Engagement/EngagementLogger.js +0 -143
- package/lib/Api/Engagement/IEngagementHandler.d.ts.map +0 -1
- package/lib/Api/Engagement/IEngagementHandler.js +0 -2
- package/lib/Api/ExecutionQueue.d.ts.map +0 -1
- package/lib/Api/ExecutionQueue.js +0 -131
- package/lib/Api/ILogData.d.ts.map +0 -1
- package/lib/Api/ILogData.js +0 -3
- package/lib/Api/ILogEntry.d.ts.map +0 -1
- package/lib/Api/ILogEntry.js +0 -2
- package/lib/Api/ILogErrorData.d.ts.map +0 -1
- package/lib/Api/ILogErrorData.js +0 -3
- package/lib/Api/ILogSource.d.ts.map +0 -1
- package/lib/Api/ILogSource.js +0 -3
- package/lib/Api/ILogVerboseData.d.ts.map +0 -1
- package/lib/Api/ILogVerboseData.js +0 -3
- package/lib/Api/Log/LogHandler.d.ts.map +0 -1
- package/lib/Api/Log/LogHandler.js +0 -40
- package/lib/Api/LogEntry.d.ts.map +0 -1
- package/lib/Api/LogEntry.js +0 -51
- package/lib/Api/LogFeature.d.ts.map +0 -1
- package/lib/Api/LogFeature.js +0 -11
- package/lib/Api/LogLevel.d.ts.map +0 -1
- package/lib/Api/LogLevel.js +0 -24
- package/lib/Api/LogManager/CircularBuffer.d.ts.map +0 -1
- package/lib/Api/LogManager/CircularBuffer.js +0 -98
- package/lib/Api/LogManager/LogManager.d.ts.map +0 -1
- package/lib/Api/LogManager/LogManager.js +0 -121
- package/lib/Api/LogSource.d.ts.map +0 -1
- package/lib/Api/LogSource.js +0 -40
- package/lib/Api/LogType.d.ts.map +0 -1
- package/lib/Api/LogType.js +0 -23
- package/lib/Api/Qos/AutoAlertableQosMonitor.d.ts.map +0 -1
- package/lib/Api/Qos/AutoAlertableQosMonitor.js +0 -93
- package/lib/Api/Qos/CustomerPromiseInterfaces/ICustomerPromiseErrorDetails.d.ts.map +0 -1
- package/lib/Api/Qos/CustomerPromiseInterfaces/ICustomerPromiseErrorDetails.js +0 -2
- package/lib/Api/Qos/CustomerPromiseInterfaces/IExtraDataForCustomerPromise.d.ts.map +0 -1
- package/lib/Api/Qos/CustomerPromiseInterfaces/IExtraDataForCustomerPromise.js +0 -2
- package/lib/Api/Qos/IQos.d.ts.map +0 -1
- package/lib/Api/Qos/IQos.js +0 -2
- package/lib/Api/Qos/IQosEndEvent.d.ts.map +0 -1
- package/lib/Api/Qos/IQosEndEvent.js +0 -2
- package/lib/Api/Qos/IQosExtraData.d.ts.map +0 -1
- package/lib/Api/Qos/IQosExtraData.js +0 -2
- package/lib/Api/Qos/IQosStartEvent.d.ts.map +0 -1
- package/lib/Api/Qos/IQosStartEvent.js +0 -2
- package/lib/Api/Qos/QosLogger.d.ts.map +0 -1
- package/lib/Api/Qos/QosLogger.js +0 -74
- package/lib/Api/Qos/QosMonitor.d.ts.map +0 -1
- package/lib/Api/Qos/QosMonitor.js +0 -304
- package/lib/Api/Qos/QosMonitorShareFailureWithCP.d.ts.map +0 -1
- package/lib/Api/Qos/QosMonitorShareFailureWithCP.js +0 -114
- package/lib/Api/Qos/QosResultType.d.ts.map +0 -1
- package/lib/Api/Qos/QosResultType.js +0 -11
- package/lib/Api/Trace/DefaultTraceHandler.d.ts.map +0 -1
- package/lib/Api/Trace/DefaultTraceHandler.js +0 -30
- package/lib/Api/Trace/ITraceHandler.d.ts.map +0 -1
- package/lib/Api/Trace/ITraceHandler.js +0 -2
- package/lib/Api/Trace/ITraceLogger.d.ts.map +0 -1
- package/lib/Api/Trace/ITraceLogger.js +0 -2
- package/lib/Api/Trace/LogEvent.d.ts.map +0 -1
- package/lib/Api/Trace/LogEvent.js +0 -147
- package/lib/Api/Trace/TraceLogger.d.ts.map +0 -1
- package/lib/Api/Trace/TraceLogger.js +0 -196
- package/lib/Diagnostics.d.ts.map +0 -1
- package/lib/Diagnostics.js +0 -82
- package/lib/DiagnosticsSettingsManager.d.ts.map +0 -1
- package/lib/DiagnosticsSettingsManager.js +0 -62
- package/lib/IDiagnosticsSettings.d.ts.map +0 -1
- package/lib/IDiagnosticsSettings.js +0 -2
- package/lib/common/Killswitches.d.ts.map +0 -1
- package/lib/extraData/DisplayApp.d.ts.map +0 -1
- package/lib/extraData/IDiagnosticContextInfo.d.ts.map +0 -1
- package/lib/extraData/IDiagnosticContextInfo.js +0 -2
- package/lib/extraData/IPageExtraData.d.ts.map +0 -1
- package/lib/extraData/IPageExtraData.js +0 -2
- package/lib/extraData/PageType.d.ts.map +0 -1
- package/lib/extraData/PromotedState.d.ts.map +0 -1
- package/lib/extraData/PromotedState.js +0 -17
- package/lib/extraData/WebTemplateId.d.ts.map +0 -1
- package/lib/extraData/setPageExtraData.d.ts.map +0 -1
- package/lib/index.d.ts.map +0 -1
- /package/{lib → lib-dts}/Api/Engagement/EngagementLogger.d.ts +0 -0
- /package/{lib → lib-dts}/Api/ExecutionQueue.d.ts +0 -0
- /package/{lib → lib-dts}/Api/ILogData.d.ts +0 -0
- /package/{lib → lib-dts}/Api/ILogEntry.d.ts +0 -0
- /package/{lib → lib-dts}/Api/ILogErrorData.d.ts +0 -0
- /package/{lib → lib-dts}/Api/ILogSource.d.ts +0 -0
- /package/{lib → lib-dts}/Api/ILogVerboseData.d.ts +0 -0
- /package/{lib → lib-dts}/Api/Log/LogHandler.d.ts +0 -0
- /package/{lib → lib-dts}/Api/LogEntry.d.ts +0 -0
- /package/{lib → lib-dts}/Api/LogFeature.d.ts +0 -0
- /package/{lib → lib-dts}/Api/LogLevel.d.ts +0 -0
- /package/{lib → lib-dts}/Api/LogManager/CircularBuffer.d.ts +0 -0
- /package/{lib → lib-dts}/Api/LogManager/LogManager.d.ts +0 -0
- /package/{lib → lib-dts}/Api/LogSource.d.ts +0 -0
- /package/{lib → lib-dts}/Api/LogType.d.ts +0 -0
- /package/{lib → lib-dts}/Api/Qos/AutoAlertableQosMonitor.d.ts +0 -0
- /package/{lib → lib-dts}/Api/Qos/CustomerPromiseInterfaces/ICustomerPromiseErrorDetails.d.ts +0 -0
- /package/{lib → lib-dts}/Api/Qos/CustomerPromiseInterfaces/IExtraDataForCustomerPromise.d.ts +0 -0
- /package/{lib → lib-dts}/Api/Qos/IQos.d.ts +0 -0
- /package/{lib → lib-dts}/Api/Qos/IQosEndEvent.d.ts +0 -0
- /package/{lib → lib-dts}/Api/Qos/IQosExtraData.d.ts +0 -0
- /package/{lib → lib-dts}/Api/Qos/IQosStartEvent.d.ts +0 -0
- /package/{lib → lib-dts}/Api/Qos/QosLogger.d.ts +0 -0
- /package/{lib → lib-dts}/Api/Qos/QosMonitor.d.ts +0 -0
- /package/{lib → lib-dts}/Api/Qos/QosMonitorShareFailureWithCP.d.ts +0 -0
- /package/{lib → lib-dts}/Api/Qos/QosResultType.d.ts +0 -0
- /package/{lib → lib-dts}/Api/Trace/DefaultTraceHandler.d.ts +0 -0
- /package/{lib → lib-dts}/Api/Trace/ITraceHandler.d.ts +0 -0
- /package/{lib → lib-dts}/Api/Trace/ITraceLogger.d.ts +0 -0
- /package/{lib → lib-dts}/Api/Trace/LogEvent.d.ts +0 -0
- /package/{lib → lib-dts}/Api/Trace/TraceLogger.d.ts +0 -0
- /package/{lib → lib-dts}/IDiagnosticsSettings.d.ts +0 -0
- /package/{lib → lib-dts}/common/Killswitches.d.ts +0 -0
- /package/{lib → lib-dts}/extraData/DisplayApp.d.ts +0 -0
- /package/{lib → lib-dts}/extraData/IDiagnosticContextInfo.d.ts +0 -0
- /package/{lib → lib-dts}/extraData/IPageExtraData.d.ts +0 -0
- /package/{lib → lib-dts}/extraData/PageType.d.ts +0 -0
- /package/{lib → lib-dts}/extraData/PromotedState.d.ts +0 -0
- /package/{lib → lib-dts}/extraData/WebTemplateId.d.ts +0 -0
- /package/{lib → lib-dts}/extraData/setPageExtraData.d.ts +0 -0
- /package/{lib → lib-dts}/index.d.ts +0 -0
- /package/{lib → lib-esm}/sp-diagnostics.manifest.json +0 -0
|
@@ -1,3 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Interface for SPFx QoS extraData field.
|
|
3
|
+
* This provides schema validation through the interface to consolidate all extra data in a known set of fields.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* The goal of this interface is to provide a comprehensive list of extra data fields and encourage re-use, even if
|
|
7
|
+
* it's used in a different context.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/ "use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", {
|
|
12
|
+
value: true
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=./IQosExtraData.js.map
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* IQosStartEvent interface.
|
|
3
|
+
* @internal
|
|
4
|
+
*/ "use strict";
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=./IQosStartEvent.js.map
|
|
@@ -1,77 +1,71 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return QosLogger;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
12
|
+
const _ExecutionQueue = /*#__PURE__*/ _interop_require_default._(require("../ExecutionQueue"));
|
|
13
|
+
class QosLogger {
|
|
14
|
+
static get instance() {
|
|
15
|
+
if (!this._instance) {
|
|
16
|
+
this._instance = new QosLogger();
|
|
17
|
+
}
|
|
18
|
+
return this._instance;
|
|
15
19
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
configurable: true
|
|
25
|
-
});
|
|
26
|
-
Object.defineProperty(QosLogger.prototype, "shouldProcessInRealTime", {
|
|
27
|
-
get: function () {
|
|
28
|
-
return this._shouldProcessInRealTime;
|
|
29
|
-
},
|
|
30
|
-
set: function (processInRealTime) {
|
|
31
|
-
this._shouldProcessInRealTime = processInRealTime;
|
|
32
|
-
this._deferExecutor.shouldExecuteInRealTime = processInRealTime;
|
|
33
|
-
},
|
|
34
|
-
enumerable: false,
|
|
35
|
-
configurable: true
|
|
36
|
-
});
|
|
37
|
-
QosLogger.prototype.setLogger = function (qosLogger) {
|
|
20
|
+
get shouldProcessInRealTime() {
|
|
21
|
+
return this._shouldProcessInRealTime;
|
|
22
|
+
}
|
|
23
|
+
set shouldProcessInRealTime(processInRealTime) {
|
|
24
|
+
this._shouldProcessInRealTime = processInRealTime;
|
|
25
|
+
this._deferExecutor.shouldExecuteInRealTime = processInRealTime;
|
|
26
|
+
}
|
|
27
|
+
setLogger(qosLogger) {
|
|
38
28
|
this._qosLogger = qosLogger;
|
|
39
|
-
}
|
|
40
|
-
|
|
29
|
+
}
|
|
30
|
+
getQosEvent(key) {
|
|
41
31
|
return this._qosEvents.get(key);
|
|
42
|
-
}
|
|
43
|
-
|
|
32
|
+
}
|
|
33
|
+
startQosMonitor(key, startData) {
|
|
44
34
|
if (!this._qosEvents.has(key)) {
|
|
45
35
|
this._deferExecutor.addExecutionEntry('start', key, startData);
|
|
46
36
|
}
|
|
47
|
-
}
|
|
48
|
-
|
|
37
|
+
}
|
|
38
|
+
writeQosEndResult(key, endData) {
|
|
49
39
|
this._deferExecutor.addExecutionEntry('end', key, endData);
|
|
50
|
-
}
|
|
51
|
-
|
|
40
|
+
}
|
|
41
|
+
_startMonitor(key, event) {
|
|
52
42
|
if (this._qosLogger) {
|
|
53
43
|
this._qosEvents.set(key, new this._qosLogger(event));
|
|
54
44
|
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
45
|
+
}
|
|
46
|
+
_endMonitor(key, event) {
|
|
47
|
+
const qosEvent = this._qosEvents.get(key);
|
|
58
48
|
if (qosEvent) {
|
|
59
49
|
qosEvent.end(event);
|
|
60
50
|
this._qosEvents.delete(key);
|
|
61
51
|
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
});
|
|
52
|
+
}
|
|
53
|
+
_initializeLogger() {
|
|
54
|
+
const startHandler = (key, e)=>{
|
|
55
|
+
this._startMonitor(key, e);
|
|
56
|
+
};
|
|
57
|
+
const endHandler = (key, e)=>{
|
|
58
|
+
this._endMonitor(key, e);
|
|
59
|
+
};
|
|
71
60
|
this._deferExecutor.addHandler('start', startHandler);
|
|
72
61
|
this._deferExecutor.addHandler('end', endHandler);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
62
|
+
}
|
|
63
|
+
constructor(){
|
|
64
|
+
this._qosEvents = new Map();
|
|
65
|
+
this._deferExecutor = new _ExecutionQueue.default();
|
|
66
|
+
this._shouldProcessInRealTime = false;
|
|
67
|
+
this._initializeLogger();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
//# sourceMappingURL=./QosLogger.js.map
|
|
@@ -1,165 +1,87 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return QosMonitor;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
12
|
+
const _spcorelibrary = require("@microsoft/sp-core-library");
|
|
13
|
+
const _odspcorebundle = require("@msinternal/odsp-core-bundle");
|
|
14
|
+
const _TraceLogger = /*#__PURE__*/ _interop_require_default._(require("../Trace/TraceLogger"));
|
|
15
|
+
const _QosResultType = require("./QosResultType");
|
|
16
|
+
const _QosLogger = /*#__PURE__*/ _interop_require_default._(require("./QosLogger"));
|
|
17
|
+
const _EngagementLogger = /*#__PURE__*/ _interop_require_default._(require("../Engagement/EngagementLogger"));
|
|
18
|
+
const _Diagnostics = /*#__PURE__*/ _interop_require_default._(require("../../Diagnostics"));
|
|
19
|
+
const _DiagnosticsSettingsManager = /*#__PURE__*/ _interop_require_default._(require("../../DiagnosticsSettingsManager"));
|
|
20
|
+
const _splodashsubset = require("@microsoft/sp-lodash-subset");
|
|
21
|
+
const LOG_SOURCE = {
|
|
16
22
|
id: 'QosMonitor'
|
|
17
23
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
*
|
|
26
|
-
* @internal
|
|
27
|
-
*/
|
|
28
|
-
var QosMonitor = /** @class */ (function () {
|
|
29
|
-
/**
|
|
30
|
-
* Creates a QoS monitor (initializes it and logs the start event)
|
|
31
|
-
* @param scenarioName - Unique name of the QoS scenario
|
|
32
|
-
* You will see start tag: SPPages.ScenarioName.Start
|
|
33
|
-
* @param copyToCosmos - Indicate whether this data should be used as Engagement as well, and sent to COSMOS.
|
|
34
|
-
* @param copyToInterana - Indicate whether this data should be used as Engagement as well, and sent to Interana.
|
|
35
|
-
*/
|
|
36
|
-
function QosMonitor(scenarioName, copyToCosmos, copyToInterana) {
|
|
37
|
-
var _a;
|
|
38
|
-
if (copyToCosmos === void 0) { copyToCosmos = false; }
|
|
39
|
-
if (copyToInterana === void 0) { copyToInterana = false; }
|
|
40
|
-
var _this = this;
|
|
41
|
-
this._qosResultTypeValue = (_a = {},
|
|
42
|
-
_a[QosResultType_1.QosResultType.Success] = 'Success',
|
|
43
|
-
_a[QosResultType_1.QosResultType.Failure] = 'Failure',
|
|
44
|
-
_a[QosResultType_1.QosResultType.ExpectedFailure] = 'ExpectedFailure',
|
|
45
|
-
_a);
|
|
46
|
-
this._ensureAuthoringSessionId = function () {
|
|
47
|
-
var _a, _b, _c, _d;
|
|
48
|
-
var authoringSessionId = (_b = (_a = DiagnosticsSettingsManager_1.default.settings) === null || _a === void 0 ? void 0 : _a.extraDiagnosticInfo) === null || _b === void 0 ? void 0 : _b.authoringSessionId;
|
|
49
|
-
if (authoringSessionId) {
|
|
50
|
-
_this._ensureEndExtraData();
|
|
51
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
52
|
-
_this._endExtraData[AUTHORING_SESSION_ID_KEY] = authoringSessionId;
|
|
53
|
-
var authoringOpSequenceId = (_d = (_c = DiagnosticsSettingsManager_1.default.settings) === null || _c === void 0 ? void 0 : _c.extraDiagnosticInfo) === null || _d === void 0 ? void 0 : _d.authoringOpSequenceId;
|
|
54
|
-
if (authoringOpSequenceId) {
|
|
55
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
56
|
-
_this._endExtraData[AUTHORING_OP_SEQUENCE_ID_KEY] = authoringOpSequenceId;
|
|
57
|
-
}
|
|
58
|
-
var authoringSessionClientCount = Diagnostics_1.default.getAuthoringSessionClientCountInfo();
|
|
59
|
-
if (authoringSessionClientCount && _this._endExtraData) {
|
|
60
|
-
_this._endExtraData[AUTHORING_SESSION_CLIENT_COUNT] = authoringSessionClientCount;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
sp_core_library_2.Validate.isNonemptyString(scenarioName, 'scenarioName');
|
|
65
|
-
this._id = sp_core_library_2.Guid.newGuid().toString();
|
|
66
|
-
if (!this._isDebugSession()) {
|
|
67
|
-
QosLogger_1.default.instance.startQosMonitor(this._id, { name: scenarioName });
|
|
68
|
-
}
|
|
69
|
-
this._scenarioName = scenarioName;
|
|
70
|
-
this._hasEnded = false;
|
|
71
|
-
this._copyToCosmos = copyToCosmos;
|
|
72
|
-
this._copyToInterana = copyToInterana;
|
|
73
|
-
}
|
|
74
|
-
QosMonitor.startRealTimeProcessing = function () {
|
|
75
|
-
if (!QosLogger_1.default.instance.shouldProcessInRealTime) {
|
|
24
|
+
const QOS_MONISTOR_HAS_ENDED_ERROR_STRING = "QoS monitor '{0}' has ended with '{1}' already. Ignoring '{2}' tag.";
|
|
25
|
+
const AUTHORING_SESSION_ID_KEY = 'AuthoringSessionId';
|
|
26
|
+
const AUTHORING_OP_SEQUENCE_ID_KEY = 'AuthoringOpSequenceId';
|
|
27
|
+
const AUTHORING_SESSION_CLIENT_COUNT = 'AuthoringSessionClientCount';
|
|
28
|
+
class QosMonitor {
|
|
29
|
+
static startRealTimeProcessing() {
|
|
30
|
+
if (!_QosLogger.default.instance.shouldProcessInRealTime) {
|
|
76
31
|
this._shouldProcessInRealTime(true);
|
|
77
32
|
}
|
|
78
|
-
}
|
|
33
|
+
}
|
|
79
34
|
/**
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
});
|
|
107
|
-
Object.defineProperty(QosMonitor.prototype, "resultType", {
|
|
108
|
-
get: function () {
|
|
109
|
-
return this._endResult;
|
|
110
|
-
},
|
|
111
|
-
enumerable: false,
|
|
112
|
-
configurable: true
|
|
113
|
-
});
|
|
114
|
-
Object.defineProperty(QosMonitor.prototype, "extraData", {
|
|
115
|
-
get: function () {
|
|
116
|
-
return this._endExtraData;
|
|
117
|
-
},
|
|
118
|
-
set: function (value) {
|
|
119
|
-
this._endExtraData = value;
|
|
120
|
-
},
|
|
121
|
-
enumerable: false,
|
|
122
|
-
configurable: true
|
|
123
|
-
});
|
|
124
|
-
Object.defineProperty(QosMonitor.prototype, "hasEnded", {
|
|
125
|
-
get: function () {
|
|
126
|
-
return this._hasEnded;
|
|
127
|
-
},
|
|
128
|
-
enumerable: false,
|
|
129
|
-
configurable: true
|
|
130
|
-
});
|
|
35
|
+
* Only used in unit tests
|
|
36
|
+
* @internal
|
|
37
|
+
*/ static _shouldProcessInRealTime(processInRealTime) {
|
|
38
|
+
_QosLogger.default.instance.shouldProcessInRealTime = processInRealTime;
|
|
39
|
+
}
|
|
40
|
+
get name() {
|
|
41
|
+
return this._scenarioName;
|
|
42
|
+
}
|
|
43
|
+
get shortEventName() {
|
|
44
|
+
return 'Qos';
|
|
45
|
+
}
|
|
46
|
+
get resultCode() {
|
|
47
|
+
return this._endResultCode;
|
|
48
|
+
}
|
|
49
|
+
get resultType() {
|
|
50
|
+
return this._endResult;
|
|
51
|
+
}
|
|
52
|
+
get extraData() {
|
|
53
|
+
return this._endExtraData;
|
|
54
|
+
}
|
|
55
|
+
set extraData(value) {
|
|
56
|
+
this._endExtraData = value;
|
|
57
|
+
}
|
|
58
|
+
get hasEnded() {
|
|
59
|
+
return this._hasEnded;
|
|
60
|
+
}
|
|
131
61
|
/**
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
};
|
|
62
|
+
* QoS monitor ends with success
|
|
63
|
+
* You will see success tag: SPPages.ScenarioName.Success
|
|
64
|
+
*/ // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
65
|
+
writeSuccess(extraData) {
|
|
66
|
+
this._writeQosEnd(_QosResultType.QosResultType.Success, undefined, undefined, extraData);
|
|
67
|
+
}
|
|
139
68
|
/**
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
QosMonitor.prototype.writeUnexpectedFailure = function (tagNameSuffix, ex,
|
|
145
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
69
|
+
* QoS monitor ends with failure
|
|
70
|
+
* You will see failure tag: SPPages.ScenarioName.<failuretag>.Failure.
|
|
71
|
+
* <failuretag> will be filled with param tagName
|
|
72
|
+
*/ writeUnexpectedFailure(tagNameSuffix = 'DefaultUnexpected', ex, // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
146
73
|
extraData) {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
};
|
|
74
|
+
this._writeQosEnd(_QosResultType.QosResultType.Failure, tagNameSuffix, ex, extraData);
|
|
75
|
+
}
|
|
150
76
|
/*
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
QosMonitor.prototype.writeExpectedFailure = function (tagNameSuffix, ex,
|
|
156
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
77
|
+
* QoS monitor ends with expected failure
|
|
78
|
+
* You will see success tag: ModernPublish.RenderPublishPage.<failuretag>.ExpectedFailure.
|
|
79
|
+
* <failuretag> will be filled with param tagName
|
|
80
|
+
*/ writeExpectedFailure(tagNameSuffix = 'DefaultExpected', ex, // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
157
81
|
extraData) {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
QosMonitor.prototype._writeQosEnd = function (resultType, tagNameSuffix, ex,
|
|
162
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
82
|
+
this._writeQosEnd(_QosResultType.QosResultType.ExpectedFailure, tagNameSuffix, ex, extraData);
|
|
83
|
+
}
|
|
84
|
+
_writeQosEnd(resultType, tagNameSuffix, ex, // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
163
85
|
extraData) {
|
|
164
86
|
if (this._shouldSkip(resultType)) {
|
|
165
87
|
return;
|
|
@@ -167,44 +89,40 @@ var QosMonitor = /** @class */ (function () {
|
|
|
167
89
|
this._ensureCorrelationId(resultType, extraData);
|
|
168
90
|
this._endResultCode = tagNameSuffix;
|
|
169
91
|
this._endResult = resultType;
|
|
170
|
-
|
|
171
|
-
if (ex instanceof
|
|
172
|
-
|
|
92
|
+
const errorString = !ex ? undefined : (0, _odspcorebundle.getErrorMessage)(ex);
|
|
93
|
+
if (ex instanceof _odspcorebundle.CustomError) {
|
|
94
|
+
const endSchema = (0, _odspcorebundle.getQosEndSchemaFromError)(ex);
|
|
173
95
|
if (endSchema) {
|
|
174
96
|
endSchema.resultType = this._endResult;
|
|
175
97
|
// Make sure the extraData from `endSchema` takes priority so that
|
|
176
98
|
// extra data like correlation id from the error object is logged
|
|
177
99
|
// instead of the generic extra data from `_endExtraData`.
|
|
178
|
-
endSchema.extraData = (0,
|
|
100
|
+
endSchema.extraData = (0, _splodashsubset.merge)({}, this._endExtraData, endSchema.extraData);
|
|
179
101
|
}
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
var endData = {
|
|
102
|
+
_QosLogger.default.instance.writeQosEndResult(this._id, endSchema);
|
|
103
|
+
} else {
|
|
104
|
+
const endData = {
|
|
184
105
|
resultCode: this._endResultCode,
|
|
185
106
|
resultType: this._endResult,
|
|
186
107
|
error: errorString,
|
|
187
108
|
extraData: this._endExtraData
|
|
188
109
|
};
|
|
189
|
-
|
|
110
|
+
_QosLogger.default.instance.writeQosEndResult(this._id, endData);
|
|
190
111
|
}
|
|
191
112
|
this._writeToEngagement();
|
|
192
|
-
}
|
|
113
|
+
}
|
|
193
114
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
194
|
-
|
|
195
|
-
var _this = this;
|
|
115
|
+
_ensureCorrelationId(resultType, extraData) {
|
|
196
116
|
if (extraData) {
|
|
197
117
|
this._ensureEndExtraData();
|
|
198
118
|
// Instead of slower ...[spread], copy over the incoming values manually
|
|
199
119
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
200
|
-
Object.keys(extraData).forEach(
|
|
120
|
+
Object.keys(extraData).forEach((k)=>this._endExtraData[k] = extraData[k]);
|
|
201
121
|
}
|
|
202
|
-
if (
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
(this._endExtraData[capitalKey] || this._endExtraData[lowerKey])) ||
|
|
207
|
-
DiagnosticsSettingsManager_1.default.settings.correlationId);
|
|
122
|
+
if (_DiagnosticsSettingsManager.default.isInitialized && resultType !== _QosResultType.QosResultType.Success) {
|
|
123
|
+
const capitalKey = 'CorrelationId';
|
|
124
|
+
const lowerKey = 'correlationId';
|
|
125
|
+
const correlationId = this._endExtraData && (this._endExtraData[capitalKey] || this._endExtraData[lowerKey]) || _DiagnosticsSettingsManager.default.settings.correlationId;
|
|
208
126
|
if (correlationId) {
|
|
209
127
|
if (!this._endExtraData) {
|
|
210
128
|
this._endExtraData = {};
|
|
@@ -214,27 +132,26 @@ var QosMonitor = /** @class */ (function () {
|
|
|
214
132
|
}
|
|
215
133
|
this._logHostType();
|
|
216
134
|
this._ensureAuthoringSessionId();
|
|
217
|
-
}
|
|
218
|
-
|
|
135
|
+
}
|
|
136
|
+
_ensureEndExtraData() {
|
|
219
137
|
if (!this._endExtraData) {
|
|
220
138
|
this._endExtraData = {};
|
|
221
139
|
}
|
|
222
|
-
}
|
|
140
|
+
}
|
|
223
141
|
/**
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
var appHostType = sp_core_library_1._BrowserUtilities.getTeamsAppType();
|
|
142
|
+
* Logs the application hosted in Teams in combination with which Teams application it was hosted on.
|
|
143
|
+
* Viva1p-TeamsNative: Viva home app loaded through Teams Desktop application, not including mobile
|
|
144
|
+
* Viva1p-TeamsWeb: Viva home app loaded through Teams Web browser, not including mobile
|
|
145
|
+
* MEEBridge-TeamsNative: VivaConnections MEEBridge app loaded through Teams mobile client.
|
|
146
|
+
* ClassHome-TeamsNative: ClassHome app loaded through Teams Desktop application, not including mobile
|
|
147
|
+
* ClassHome-TeamsWeb: ClassHome app loaded through Teams Web browser, not including mobile
|
|
148
|
+
*/ _logHostType() {
|
|
149
|
+
if (_DiagnosticsSettingsManager.default.isInitialized) {
|
|
150
|
+
const appHostType = _spcorelibrary._BrowserUtilities.getTeamsAppType();
|
|
234
151
|
// Skip logging for default SPO path for now to limit quota impact
|
|
235
152
|
if (appHostType) {
|
|
236
153
|
this._ensureEndExtraData();
|
|
237
|
-
|
|
154
|
+
const hostKey = 'appHostType';
|
|
238
155
|
// Unlikely, but avoid overwriting matching key value
|
|
239
156
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
240
157
|
if (!this._endExtraData[hostKey]) {
|
|
@@ -243,41 +160,38 @@ var QosMonitor = /** @class */ (function () {
|
|
|
243
160
|
}
|
|
244
161
|
}
|
|
245
162
|
}
|
|
246
|
-
}
|
|
247
|
-
|
|
163
|
+
}
|
|
164
|
+
_isDebugSession() {
|
|
248
165
|
try {
|
|
249
|
-
if (!
|
|
166
|
+
if (!_spcorelibrary._SPKillSwitch.isActivated('761ccb86-4fa0-4f56-a05b-477bcc09bd9f' /* '08/01/2024', 'finnnavin: Let QoSMonitor run in debug, uploading is blocked at SDK-level.' */ )) {
|
|
250
167
|
return false;
|
|
168
|
+
} else {
|
|
169
|
+
return !!_spcorelibrary._BrowserUtilities.safelyAccessSessionStorage('spfx-debug');
|
|
251
170
|
}
|
|
252
|
-
|
|
253
|
-
return !!sp_core_library_1._BrowserUtilities.safelyAccessSessionStorage('spfx-debug');
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
catch (_a) {
|
|
171
|
+
} catch {
|
|
257
172
|
// KillSwitches throw exceptions when not initialized.
|
|
258
173
|
// Currently this only happens when spfx-debug is present, so telemetry isn't being logged by the handler, and we can return false.
|
|
259
174
|
return false;
|
|
260
175
|
}
|
|
261
|
-
}
|
|
262
|
-
|
|
176
|
+
}
|
|
177
|
+
_shouldSkip(result) {
|
|
263
178
|
if (this._hasEnded && this._endResult !== undefined) {
|
|
264
|
-
|
|
179
|
+
const message = _spcorelibrary.Text.format(QOS_MONISTOR_HAS_ENDED_ERROR_STRING, this.name, this._qosResultTypeValue[this._endResult], this._qosResultTypeValue[result]);
|
|
265
180
|
if (this._endResult !== result) {
|
|
266
|
-
|
|
181
|
+
_TraceLogger.default.logError(LOG_SOURCE, new Error(message));
|
|
267
182
|
}
|
|
268
183
|
if (DEBUG) {
|
|
269
|
-
|
|
184
|
+
_TraceLogger.default.logVerbose(LOG_SOURCE, message, 'skipEnd');
|
|
270
185
|
}
|
|
271
186
|
return true;
|
|
272
|
-
}
|
|
273
|
-
else {
|
|
187
|
+
} else {
|
|
274
188
|
this._hasEnded = true;
|
|
275
189
|
return this._isDebugSession();
|
|
276
190
|
}
|
|
277
|
-
}
|
|
278
|
-
|
|
191
|
+
}
|
|
192
|
+
_writeToEngagement() {
|
|
279
193
|
if (this._copyToInterana) {
|
|
280
|
-
|
|
194
|
+
_EngagementLogger.default.log({
|
|
281
195
|
name: this.name,
|
|
282
196
|
isIntentional: !!(this.extraData || {}).isIntentional,
|
|
283
197
|
extraData: this.extraData || {}
|
|
@@ -287,7 +201,7 @@ var QosMonitor = /** @class */ (function () {
|
|
|
287
201
|
// Engagement name requires certain format. Cannot just use QOS name.
|
|
288
202
|
// Record Qos name in extra data 'qosName'
|
|
289
203
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
290
|
-
|
|
204
|
+
const engagementData = {
|
|
291
205
|
name: 'Spfx.Qos.ToEngagement',
|
|
292
206
|
extraData: this.extraData || {}
|
|
293
207
|
};
|
|
@@ -298,10 +212,50 @@ var QosMonitor = /** @class */ (function () {
|
|
|
298
212
|
if (this.resultCode) {
|
|
299
213
|
engagementData.extraData.qosResultCode = this.resultCode;
|
|
300
214
|
}
|
|
301
|
-
|
|
215
|
+
_EngagementLogger.default.log(engagementData);
|
|
302
216
|
}
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Creates a QoS monitor (initializes it and logs the start event)
|
|
220
|
+
* @param scenarioName - Unique name of the QoS scenario
|
|
221
|
+
* You will see start tag: SPPages.ScenarioName.Start
|
|
222
|
+
* @param copyToCosmos - Indicate whether this data should be used as Engagement as well, and sent to COSMOS.
|
|
223
|
+
* @param copyToInterana - Indicate whether this data should be used as Engagement as well, and sent to Interana.
|
|
224
|
+
*/ constructor(scenarioName, copyToCosmos = false, copyToInterana = false){
|
|
225
|
+
this._qosResultTypeValue = {
|
|
226
|
+
[_QosResultType.QosResultType.Success]: 'Success',
|
|
227
|
+
[_QosResultType.QosResultType.Failure]: 'Failure',
|
|
228
|
+
[_QosResultType.QosResultType.ExpectedFailure]: 'ExpectedFailure'
|
|
229
|
+
};
|
|
230
|
+
this._ensureAuthoringSessionId = ()=>{
|
|
231
|
+
const authoringSessionId = _DiagnosticsSettingsManager.default.settings?.extraDiagnosticInfo?.authoringSessionId;
|
|
232
|
+
if (authoringSessionId) {
|
|
233
|
+
this._ensureEndExtraData();
|
|
234
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
235
|
+
this._endExtraData[AUTHORING_SESSION_ID_KEY] = authoringSessionId;
|
|
236
|
+
const authoringOpSequenceId = _DiagnosticsSettingsManager.default.settings?.extraDiagnosticInfo?.authoringOpSequenceId;
|
|
237
|
+
if (authoringOpSequenceId) {
|
|
238
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
239
|
+
this._endExtraData[AUTHORING_OP_SEQUENCE_ID_KEY] = authoringOpSequenceId;
|
|
240
|
+
}
|
|
241
|
+
const authoringSessionClientCount = _Diagnostics.default.getAuthoringSessionClientCountInfo();
|
|
242
|
+
if (authoringSessionClientCount && this._endExtraData) {
|
|
243
|
+
this._endExtraData[AUTHORING_SESSION_CLIENT_COUNT] = authoringSessionClientCount;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
_spcorelibrary.Validate.isNonemptyString(scenarioName, 'scenarioName');
|
|
248
|
+
this._id = _spcorelibrary.Guid.newGuid().toString();
|
|
249
|
+
if (!this._isDebugSession()) {
|
|
250
|
+
_QosLogger.default.instance.startQosMonitor(this._id, {
|
|
251
|
+
name: scenarioName
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
this._scenarioName = scenarioName;
|
|
255
|
+
this._hasEnded = false;
|
|
256
|
+
this._copyToCosmos = copyToCosmos;
|
|
257
|
+
this._copyToInterana = copyToInterana;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
//# sourceMappingURL=./QosMonitor.js.map
|