@webex/internal-plugin-metrics 3.12.0-next.5 → 3.12.0-next.51
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/README.md +274 -0
- package/dist/automated-user.js +19 -0
- package/dist/automated-user.js.map +1 -0
- package/dist/batcher.js +3 -0
- package/dist/batcher.js.map +1 -1
- package/dist/call-diagnostic/call-diagnostic-metrics-latencies.js +635 -62
- package/dist/call-diagnostic/call-diagnostic-metrics-latencies.js.map +1 -1
- package/dist/call-diagnostic/call-diagnostic-metrics.js +188 -78
- package/dist/call-diagnostic/call-diagnostic-metrics.js.map +1 -1
- package/dist/call-diagnostic/call-diagnostic-metrics.util.js +5 -0
- package/dist/call-diagnostic/call-diagnostic-metrics.util.js.map +1 -1
- package/dist/call-diagnostic/config.js +16 -3
- package/dist/call-diagnostic/config.js.map +1 -1
- package/dist/config.js +8 -0
- package/dist/config.js.map +1 -1
- package/dist/index.js +25 -1
- package/dist/index.js.map +1 -1
- package/dist/metrics.js +118 -5
- package/dist/metrics.js.map +1 -1
- package/dist/metrics.types.js +4 -0
- package/dist/metrics.types.js.map +1 -1
- package/dist/network-telemetry.js +610 -0
- package/dist/network-telemetry.js.map +1 -0
- package/dist/new-metrics.js +63 -17
- package/dist/new-metrics.js.map +1 -1
- package/dist/privacy-and-security-permission-enricher/constants.js +18 -0
- package/dist/privacy-and-security-permission-enricher/constants.js.map +1 -0
- package/dist/privacy-and-security-permission-enricher/index.js +143 -0
- package/dist/privacy-and-security-permission-enricher/index.js.map +1 -0
- package/dist/privacy-and-security-permission-enricher/types.js +7 -0
- package/dist/privacy-and-security-permission-enricher/types.js.map +1 -0
- package/dist/privacy-and-security-permission-enricher/utils.js +71 -0
- package/dist/privacy-and-security-permission-enricher/utils.js.map +1 -0
- package/dist/types/automated-user.d.ts +2 -0
- package/dist/types/call-diagnostic/call-diagnostic-metrics-latencies.d.ts +208 -5
- package/dist/types/call-diagnostic/call-diagnostic-metrics.d.ts +73 -14
- package/dist/types/call-diagnostic/config.d.ts +4 -0
- package/dist/types/config.d.ts +9 -0
- package/dist/types/index.d.ts +5 -3
- package/dist/types/metrics.types.d.ts +7 -2
- package/dist/types/network-telemetry.d.ts +108 -0
- package/dist/types/new-metrics.d.ts +17 -1
- package/dist/types/privacy-and-security-permission-enricher/constants.d.ts +6 -0
- package/dist/types/privacy-and-security-permission-enricher/index.d.ts +40 -0
- package/dist/types/privacy-and-security-permission-enricher/types.d.ts +14 -0
- package/dist/types/privacy-and-security-permission-enricher/utils.d.ts +5 -0
- package/dist/types/unhandled-exception-telemetry/index.d.ts +60 -0
- package/dist/types/unhandled-exception-telemetry/utils.d.ts +6 -0
- package/dist/unhandled-exception-telemetry/index.js +330 -0
- package/dist/unhandled-exception-telemetry/index.js.map +1 -0
- package/dist/unhandled-exception-telemetry/utils.js +105 -0
- package/dist/unhandled-exception-telemetry/utils.js.map +1 -0
- package/package.json +12 -11
- package/src/automated-user.ts +16 -0
- package/src/batcher.js +4 -0
- package/src/call-diagnostic/call-diagnostic-metrics-latencies.ts +781 -71
- package/src/call-diagnostic/call-diagnostic-metrics.ts +119 -16
- package/src/call-diagnostic/call-diagnostic-metrics.util.ts +5 -0
- package/src/call-diagnostic/config.ts +14 -0
- package/src/config.js +8 -0
- package/src/index.ts +16 -0
- package/src/metrics.js +123 -5
- package/src/metrics.types.ts +25 -3
- package/src/network-telemetry.ts +757 -0
- package/src/new-metrics.ts +56 -6
- package/src/privacy-and-security-permission-enricher/constants.ts +33 -0
- package/src/privacy-and-security-permission-enricher/index.ts +142 -0
- package/src/privacy-and-security-permission-enricher/types.ts +21 -0
- package/src/privacy-and-security-permission-enricher/utils.ts +82 -0
- package/src/unhandled-exception-telemetry/index.ts +403 -0
- package/src/unhandled-exception-telemetry/utils.ts +101 -0
- package/test/unit/spec/automated-user.ts +43 -0
- package/test/unit/spec/batcher.js +43 -0
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics-batcher.ts +14 -2
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics-latencies.ts +1424 -293
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.ts +906 -159
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.util.ts +27 -0
- package/test/unit/spec/metrics.js +14 -5
- package/test/unit/spec/network-telemetry.ts +610 -0
- package/test/unit/spec/new-metrics.ts +203 -50
- package/test/unit/spec/prelogin-metrics-batcher.ts +71 -36
- package/test/unit/spec/privacy-and-security-permission-enricher.ts +318 -0
- package/test/unit/spec/unhandled-exception-telemetry/utils.ts +109 -0
- package/test/unit/spec/unhandled-exception-telemetry.ts +688 -0
package/dist/metrics.js
CHANGED
|
@@ -13,14 +13,16 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
13
13
|
exports.default = void 0;
|
|
14
14
|
exports.getOSNameInternal = getOSNameInternal;
|
|
15
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
16
|
+
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
16
17
|
var _webexCore = require("@webex/webex-core");
|
|
17
18
|
var _common = require("@webex/common");
|
|
18
19
|
var _config = require("./config");
|
|
19
20
|
var _batcher = _interopRequireDefault(require("./batcher"));
|
|
20
21
|
var _clientMetricsBatcher = _interopRequireDefault(require("./client-metrics-batcher"));
|
|
21
22
|
var _clientMetricsPreloginBatcher = _interopRequireDefault(require("./client-metrics-prelogin-batcher"));
|
|
23
|
+
var _networkTelemetry = require("./network-telemetry");
|
|
22
24
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; } /* eslint-disable default-param-last */ /*!
|
|
25
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; } /* eslint-disable default-param-last */ /* eslint-disable valid-jsdoc */ /*!
|
|
24
26
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
25
27
|
*/
|
|
26
28
|
var _BrowserDetection = (0, _common.BrowserDetection)(),
|
|
@@ -54,6 +56,110 @@ var Metrics = _webexCore.WebexPlugin.extend({
|
|
|
54
56
|
clientMetricsPreloginBatcher: _clientMetricsPreloginBatcher.default
|
|
55
57
|
},
|
|
56
58
|
namespace: 'Metrics',
|
|
59
|
+
/**
|
|
60
|
+
* Registers SDK request outcome monitoring.
|
|
61
|
+
* @param args
|
|
62
|
+
* @returns
|
|
63
|
+
*/
|
|
64
|
+
initialize: function initialize() {
|
|
65
|
+
var _WebexPlugin$prototyp,
|
|
66
|
+
_this = this;
|
|
67
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
68
|
+
args[_key] = arguments[_key];
|
|
69
|
+
}
|
|
70
|
+
(_WebexPlugin$prototyp = _webexCore.WebexPlugin.prototype.initialize).call.apply(_WebexPlugin$prototyp, [this].concat(args));
|
|
71
|
+
|
|
72
|
+
// Metrics may also be constructed as a standalone plugin. Request events are
|
|
73
|
+
// available only when it is attached to a Webex instance.
|
|
74
|
+
if (!this.parent && !this.collection) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
var initializeNetworkTelemetry = function initializeNetworkTelemetry() {
|
|
78
|
+
var _this$webex, _this$webex$config, _this$webex$config$me, _this$webex$config$me2;
|
|
79
|
+
if (_this.networkTelemetry || ((_this$webex = _this.webex) === null || _this$webex === void 0 ? void 0 : (_this$webex$config = _this$webex.config) === null || _this$webex$config === void 0 ? void 0 : (_this$webex$config$me = _this$webex$config.metrics) === null || _this$webex$config$me === void 0 ? void 0 : (_this$webex$config$me2 = _this$webex$config$me.networkTelemetry) === null || _this$webex$config$me2 === void 0 ? void 0 : _this$webex$config$me2.enabled) !== true) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
_this.networkTelemetry = (0, _networkTelemetry.createNetworkTelemetryCollector)({
|
|
83
|
+
intervalMs: _this.webex.config.metrics.networkTelemetry.intervalMs,
|
|
84
|
+
submitMetric: _this.submitNetworkTelemetryMetric.bind(_this),
|
|
85
|
+
onSubmissionFailure: _this.handleNetworkTelemetrySubmissionFailure.bind(_this)
|
|
86
|
+
});
|
|
87
|
+
_this.listenTo(_this.webex, 'request:start', _this.recordNetworkRequestStart);
|
|
88
|
+
_this.listenTo(_this.webex, 'request:success', _this.recordNetworkRequestSuccess);
|
|
89
|
+
_this.listenTo(_this.webex, 'request:failure', _this.recordNetworkRequestFailure);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
// Ampersand initializes children before WebexCore.initialize() populates
|
|
93
|
+
// webex.config. Run immediately for already-configured hosts (including
|
|
94
|
+
// MockWebex), and listen for the real core's post-initialization notification.
|
|
95
|
+
this.listenToOnce(this.webex, 'change:config', initializeNetworkTelemetry);
|
|
96
|
+
initializeNetworkTelemetry();
|
|
97
|
+
},
|
|
98
|
+
/**
|
|
99
|
+
* Records an SDK request being sent in the current reporting window.
|
|
100
|
+
* @param options
|
|
101
|
+
* @returns
|
|
102
|
+
*/
|
|
103
|
+
recordNetworkRequestStart: function recordNetworkRequestStart(options) {
|
|
104
|
+
this.networkTelemetry.recordRequest(options);
|
|
105
|
+
},
|
|
106
|
+
/**
|
|
107
|
+
* Records a successful SDK request for the current reporting window.
|
|
108
|
+
* @param options
|
|
109
|
+
* @returns
|
|
110
|
+
*/
|
|
111
|
+
recordNetworkRequestSuccess: function recordNetworkRequestSuccess(options) {
|
|
112
|
+
this.networkTelemetry.recordResponse(options);
|
|
113
|
+
},
|
|
114
|
+
/**
|
|
115
|
+
* Records a failed SDK request for the current reporting window.
|
|
116
|
+
* @param options
|
|
117
|
+
* @param reason
|
|
118
|
+
* @returns
|
|
119
|
+
*/
|
|
120
|
+
recordNetworkRequestFailure: function recordNetworkRequestFailure(options, reason) {
|
|
121
|
+
this.networkTelemetry.recordFailure(options, reason);
|
|
122
|
+
},
|
|
123
|
+
/**
|
|
124
|
+
* Submits the current network telemetry window immediately.
|
|
125
|
+
* @returns
|
|
126
|
+
*/
|
|
127
|
+
flushNetworkTelemetry: function flushNetworkTelemetry() {
|
|
128
|
+
if (!this.networkTelemetry) {
|
|
129
|
+
return _promise.default.resolve();
|
|
130
|
+
}
|
|
131
|
+
return this.networkTelemetry.flush();
|
|
132
|
+
},
|
|
133
|
+
/**
|
|
134
|
+
* Submits a completed network telemetry window through client metrics.
|
|
135
|
+
* @param name
|
|
136
|
+
* @param properties
|
|
137
|
+
* @returns
|
|
138
|
+
*/
|
|
139
|
+
submitNetworkTelemetryMetric: function submitNetworkTelemetryMetric(name, properties) {
|
|
140
|
+
return this.submitClientMetrics(name, properties);
|
|
141
|
+
},
|
|
142
|
+
/**
|
|
143
|
+
* Logs a network telemetry submission failure without affecting SDK requests.
|
|
144
|
+
* @returns
|
|
145
|
+
*/
|
|
146
|
+
handleNetworkTelemetrySubmissionFailure: function handleNetworkTelemetrySubmissionFailure() {
|
|
147
|
+
var _this$webex$logger;
|
|
148
|
+
(_this$webex$logger = this.webex.logger) === null || _this$webex$logger === void 0 ? void 0 : _this$webex$logger.warn('metrics: failed to submit network request summary telemetry');
|
|
149
|
+
},
|
|
150
|
+
/**
|
|
151
|
+
* Stops network telemetry collection and submission.
|
|
152
|
+
* @returns
|
|
153
|
+
*/
|
|
154
|
+
stopNetworkTelemetry: function stopNetworkTelemetry() {
|
|
155
|
+
if (!this.networkTelemetry) {
|
|
156
|
+
return _promise.default.resolve();
|
|
157
|
+
}
|
|
158
|
+
this.stopListening(this.webex, 'request:start', this.recordNetworkRequestStart);
|
|
159
|
+
this.stopListening(this.webex, 'request:success', this.recordNetworkRequestSuccess);
|
|
160
|
+
this.stopListening(this.webex, 'request:failure', this.recordNetworkRequestFailure);
|
|
161
|
+
return this.networkTelemetry.stop();
|
|
162
|
+
},
|
|
57
163
|
submit: function submit(key, value) {
|
|
58
164
|
return this.batcher.request(_objectSpread({
|
|
59
165
|
key: key
|
|
@@ -75,13 +181,20 @@ var Metrics = _webexCore.WebexPlugin.extend({
|
|
|
75
181
|
};
|
|
76
182
|
// @ts-ignore
|
|
77
183
|
var providedClientVersion = (_this$webex$meetings = this.webex.meetings) === null || _this$webex$meetings === void 0 ? void 0 : (_this$webex$meetings$ = _this$webex$meetings.config) === null || _this$webex$meetings$ === void 0 ? void 0 : (_this$webex$meetings$2 = _this$webex$meetings$.metrics) === null || _this$webex$meetings$2 === void 0 ? void 0 : _this$webex$meetings$2.clientVersion;
|
|
184
|
+
var _this$webex$config2 = this.webex.config,
|
|
185
|
+
appName = _this$webex$config2.appName,
|
|
186
|
+
appVersion = _this$webex$config2.appVersion;
|
|
187
|
+
// Browser location is unavailable when the SDK runs in Node.js.
|
|
188
|
+
// eslint-disable-next-line no-undef
|
|
189
|
+
var browserLocation = typeof window !== 'undefined' ? window.location : undefined;
|
|
78
190
|
payload.tags = _objectSpread(_objectSpread({}, props.tags), {}, {
|
|
191
|
+
app_name: appName !== null && appName !== void 0 ? appName : 'unknown',
|
|
192
|
+
app_url: (browserLocation === null || browserLocation === void 0 ? void 0 : browserLocation.origin) || (browserLocation === null || browserLocation === void 0 ? void 0 : browserLocation.hostname) || 'non-browser',
|
|
193
|
+
app_version: appVersion !== null && appVersion !== void 0 ? appVersion : 'unknown',
|
|
79
194
|
browser: getBrowserName(),
|
|
80
195
|
os: getOSNameInternal(),
|
|
81
196
|
appVersion: providedClientVersion,
|
|
82
|
-
|
|
83
|
-
// eslint-disable-next-line no-undef
|
|
84
|
-
domain: typeof window !== 'undefined' ? window.location.hostname || 'non-browser' : 'non-browser' // Check what else we could measure
|
|
197
|
+
domain: (browserLocation === null || browserLocation === void 0 ? void 0 : browserLocation.hostname) || 'non-browser'
|
|
85
198
|
});
|
|
86
199
|
payload.fields = _objectSpread(_objectSpread({}, props.fields), {}, {
|
|
87
200
|
browser_version: getBrowserVersion(),
|
|
@@ -147,7 +260,7 @@ var Metrics = _webexCore.WebexPlugin.extend({
|
|
|
147
260
|
}
|
|
148
261
|
});
|
|
149
262
|
},
|
|
150
|
-
version: "3.12.0-next.
|
|
263
|
+
version: "3.12.0-next.51"
|
|
151
264
|
});
|
|
152
265
|
var _default = exports.default = Metrics;
|
|
153
266
|
//# sourceMappingURL=metrics.js.map
|
package/dist/metrics.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_webexCore","require","_common","_config","_batcher","_interopRequireDefault","_clientMetricsBatcher","_clientMetricsPreloginBatcher","ownKeys","e","r","t","_Object$keys","_Object$getOwnPropertySymbols","o","filter","_Object$getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","Object","forEach","_defineProperty2","default","_Object$getOwnPropertyDescriptors","_Object$defineProperties","_Object$defineProperty","_BrowserDetection","BrowserDetection","getOSName","getOSVersion","getBrowserName","getBrowserVersion","getOSNameInternal","_OSMap$getOSName","OSMap","OS_NAME","OTHERS","getSparkUserAgent","webex","_webex$config","_ref","config","appName","appVersion","appPlatform","sparkUserAgent","CLIENT_NAME","concat","Metrics","WebexPlugin","extend","children","batcher","Batcher","clientMetricsBatcher","ClientMetricsBatcher","clientMetricsPreloginBatcher","ClientMetricsPreloginBatcher","namespace","submit","key","value","request","getClientMetricsPayload","eventName","props","_this$webex$meetings","_this$webex$meetings$","_this$webex$meetings$2","Error","payload","metricName","providedClientVersion","meetings","metrics","clientVersion","tags","browser","os","domain","window","location","hostname","fields","browser_version","os_version","sdk_version","version","platform","spark_user_agent","client_id","credentials","type","context","app","locale","name","eventPayload","timestamp","Date","valueOf","submitClientMetrics","undefined","preLoginId","savePreLoginId","aliasUser","method","api","resource","headers","body","qs","alias","_default","exports"],"sources":["metrics.js"],"sourcesContent":["/* eslint-disable default-param-last */\n\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {WebexPlugin} from '@webex/webex-core';\nimport {BrowserDetection} from '@webex/common';\nimport {OS_NAME, OSMap, CLIENT_NAME} from './config';\n\nimport Batcher from './batcher';\nimport ClientMetricsBatcher from './client-metrics-batcher';\nimport ClientMetricsPreloginBatcher from './client-metrics-prelogin-batcher';\n\nconst {getOSName, getOSVersion, getBrowserName, getBrowserVersion} = BrowserDetection();\n\nexport function getOSNameInternal() {\n return OSMap[getOSName()] ?? OS_NAME.OTHERS;\n}\n\nfunction getSparkUserAgent(webex) {\n const {appName, appVersion, appPlatform} = webex?.config ?? {};\n\n let sparkUserAgent = CLIENT_NAME;\n\n if (appName) {\n sparkUserAgent += ` ${appName}/${appVersion ?? '0.0'}`;\n }\n\n if (appPlatform) {\n sparkUserAgent += ` ${appPlatform}`;\n }\n\n return sparkUserAgent;\n}\n\nconst Metrics = WebexPlugin.extend({\n children: {\n batcher: Batcher,\n clientMetricsBatcher: ClientMetricsBatcher,\n clientMetricsPreloginBatcher: ClientMetricsPreloginBatcher,\n },\n\n namespace: 'Metrics',\n\n submit(key, value) {\n return this.batcher.request({key, ...value});\n },\n\n /**\n * Returns the payload for submitting client metrics.\n * @param {string} eventName\n * @param {any} props\n * @returns {any} - the payload\n */\n getClientMetricsPayload(eventName, props) {\n if (!eventName) {\n throw Error('Missing behavioral metric name. Please provide one');\n }\n const payload = {metricName: eventName};\n // @ts-ignore\n const providedClientVersion = this.webex.meetings?.config?.metrics?.clientVersion;\n\n payload.tags = {\n ...props.tags,\n browser: getBrowserName(),\n os: getOSNameInternal(),\n appVersion: providedClientVersion,\n\n // Node does not like this so we need to check if it exists or not\n // eslint-disable-next-line no-undef\n domain:\n typeof window !== 'undefined' ? window.location.hostname || 'non-browser' : 'non-browser', // Check what else we could measure\n };\n\n payload.fields = {\n ...props.fields,\n browser_version: getBrowserVersion(),\n os_version: getOSVersion(),\n sdk_version: this.webex.version,\n platform: 'Web',\n spark_user_agent: getSparkUserAgent(this.webex),\n client_id: this.webex.credentials.config.client_id,\n };\n\n payload.type = props.type || this.webex.config.metrics.type;\n\n payload.context = {\n ...props.context,\n app: {\n version: this.webex.version,\n },\n locale: 'en-US',\n os: {\n name: getOSNameInternal(),\n version: getOSVersion(),\n },\n };\n\n if (props.eventPayload) {\n payload.eventPayload = props.eventPayload;\n }\n\n // Mocking the time in tests when running in node\n // is impossible so unable to use Date.now()\n payload.timestamp = new Date().valueOf();\n\n return payload;\n },\n\n /**\n * This corresponds to #sendSemiStructured() in the deprecated metrics handler\n * @param {string} eventName\n * @param {Object} props\n * @param {string} preLoginId\n * @returns {Object} HttpResponse object\n */\n submitClientMetrics(eventName, props = {}, preLoginId) {\n const payload = this.getClientMetricsPayload(eventName, props);\n\n if (preLoginId) {\n this.clientMetricsPreloginBatcher.savePreLoginId(preLoginId);\n\n return this.clientMetricsPreloginBatcher.request(payload);\n }\n\n return this.clientMetricsBatcher.request(payload);\n },\n\n /**\n * Issue request to alias a user's pre-login ID with their CI UUID\n * @param {string} preLoginId\n * @returns {Object} HttpResponse object\n */\n aliasUser(preLoginId) {\n return this.request({\n method: 'POST',\n api: 'metrics',\n resource: 'clientmetrics',\n headers: {\n 'x-prelogin-userid': preLoginId,\n },\n body: {},\n qs: {\n alias: true,\n },\n });\n },\n});\n\nexport default Metrics;\n"],"mappings":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AACQ,OAAO,CAAC;IAC3D;IAEA,OAAO,IAAI,CAAChB,oBAAoB,CAACQ,OAAO,CAACQ,OAAO,CAAC;EACnD,CAAC;EAED;AACF;AACA;AACA;AACA;EACEmC,SAAS,WAATA,SAASA,CAACF,UAAU,EAAE;IACpB,OAAO,IAAI,CAACzC,OAAO,CAAC;MAClB4C,MAAM,EAAE,MAAM;MACdC,GAAG,EAAE,SAAS;MACdC,QAAQ,EAAE,eAAe;MACzBC,OAAO,EAAE;QACP,mBAAmB,EAAEN;MACvB,CAAC;MACDO,IAAI,EAAE,CAAC,CAAC;MACRC,EAAE,EAAE;QACFC,KAAK,EAAE;MACT;IACF,CAAC,CAAC;EACJ,CAAC;EAAAzB,OAAA;AACH,CAAC,CAAC;AAAC,IAAA0B,QAAA,GAAAC,OAAA,CAAA5F,OAAA,GAEY0B,OAAO","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_webexCore","require","_common","_config","_batcher","_interopRequireDefault","_clientMetricsBatcher","_clientMetricsPreloginBatcher","_networkTelemetry","ownKeys","e","r","t","_Object$keys","_Object$getOwnPropertySymbols","o","filter","_Object$getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","Object","forEach","_defineProperty2","default","_Object$getOwnPropertyDescriptors","_Object$defineProperties","_Object$defineProperty","_BrowserDetection","BrowserDetection","getOSName","getOSVersion","getBrowserName","getBrowserVersion","getOSNameInternal","_OSMap$getOSName","OSMap","OS_NAME","OTHERS","getSparkUserAgent","webex","_webex$config","_ref","config","appName","appVersion","appPlatform","sparkUserAgent","CLIENT_NAME","concat","Metrics","WebexPlugin","extend","children","batcher","Batcher","clientMetricsBatcher","ClientMetricsBatcher","clientMetricsPreloginBatcher","ClientMetricsPreloginBatcher","namespace","initialize","_WebexPlugin$prototyp","_this","_len","args","Array","_key","prototype","call","parent","collection","initializeNetworkTelemetry","_this$webex","_this$webex$config","_this$webex$config$me","_this$webex$config$me2","networkTelemetry","metrics","enabled","createNetworkTelemetryCollector","intervalMs","submitMetric","submitNetworkTelemetryMetric","bind","onSubmissionFailure","handleNetworkTelemetrySubmissionFailure","listenTo","recordNetworkRequestStart","recordNetworkRequestSuccess","recordNetworkRequestFailure","listenToOnce","options","recordRequest","recordResponse","reason","recordFailure","flushNetworkTelemetry","_promise","resolve","flush","name","properties","submitClientMetrics","_this$webex$logger","logger","warn","stopNetworkTelemetry","stopListening","stop","submit","key","value","request","getClientMetricsPayload","eventName","props","_this$webex$meetings","_this$webex$meetings$","_this$webex$meetings$2","Error","payload","metricName","providedClientVersion","meetings","clientVersion","_this$webex$config2","browserLocation","window","location","undefined","tags","app_name","app_url","origin","hostname","app_version","browser","os","domain","fields","browser_version","os_version","sdk_version","version","platform","spark_user_agent","client_id","credentials","type","context","app","locale","eventPayload","timestamp","Date","valueOf","preLoginId","savePreLoginId","aliasUser","method","api","resource","headers","body","qs","alias","_default","exports"],"sources":["metrics.js"],"sourcesContent":["/* eslint-disable default-param-last */\n/* eslint-disable valid-jsdoc */\n\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {WebexPlugin} from '@webex/webex-core';\nimport {BrowserDetection} from '@webex/common';\nimport {OS_NAME, OSMap, CLIENT_NAME} from './config';\n\nimport Batcher from './batcher';\nimport ClientMetricsBatcher from './client-metrics-batcher';\nimport ClientMetricsPreloginBatcher from './client-metrics-prelogin-batcher';\nimport {createNetworkTelemetryCollector} from './network-telemetry';\n\nconst {getOSName, getOSVersion, getBrowserName, getBrowserVersion} = BrowserDetection();\n\nexport function getOSNameInternal() {\n return OSMap[getOSName()] ?? OS_NAME.OTHERS;\n}\n\nfunction getSparkUserAgent(webex) {\n const {appName, appVersion, appPlatform} = webex?.config ?? {};\n\n let sparkUserAgent = CLIENT_NAME;\n\n if (appName) {\n sparkUserAgent += ` ${appName}/${appVersion ?? '0.0'}`;\n }\n\n if (appPlatform) {\n sparkUserAgent += ` ${appPlatform}`;\n }\n\n return sparkUserAgent;\n}\n\nconst Metrics = WebexPlugin.extend({\n children: {\n batcher: Batcher,\n clientMetricsBatcher: ClientMetricsBatcher,\n clientMetricsPreloginBatcher: ClientMetricsPreloginBatcher,\n },\n\n namespace: 'Metrics',\n\n /**\n * Registers SDK request outcome monitoring.\n * @param args\n * @returns\n */\n initialize(...args) {\n WebexPlugin.prototype.initialize.call(this, ...args);\n\n // Metrics may also be constructed as a standalone plugin. Request events are\n // available only when it is attached to a Webex instance.\n if (!this.parent && !this.collection) {\n return;\n }\n\n const initializeNetworkTelemetry = () => {\n if (\n this.networkTelemetry ||\n this.webex?.config?.metrics?.networkTelemetry?.enabled !== true\n ) {\n return;\n }\n\n this.networkTelemetry = createNetworkTelemetryCollector({\n intervalMs: this.webex.config.metrics.networkTelemetry.intervalMs,\n submitMetric: this.submitNetworkTelemetryMetric.bind(this),\n onSubmissionFailure: this.handleNetworkTelemetrySubmissionFailure.bind(this),\n });\n this.listenTo(this.webex, 'request:start', this.recordNetworkRequestStart);\n this.listenTo(this.webex, 'request:success', this.recordNetworkRequestSuccess);\n this.listenTo(this.webex, 'request:failure', this.recordNetworkRequestFailure);\n };\n\n // Ampersand initializes children before WebexCore.initialize() populates\n // webex.config. Run immediately for already-configured hosts (including\n // MockWebex), and listen for the real core's post-initialization notification.\n this.listenToOnce(this.webex, 'change:config', initializeNetworkTelemetry);\n initializeNetworkTelemetry();\n },\n\n /**\n * Records an SDK request being sent in the current reporting window.\n * @param options\n * @returns\n */\n recordNetworkRequestStart(options) {\n this.networkTelemetry.recordRequest(options);\n },\n\n /**\n * Records a successful SDK request for the current reporting window.\n * @param options\n * @returns\n */\n recordNetworkRequestSuccess(options) {\n this.networkTelemetry.recordResponse(options);\n },\n\n /**\n * Records a failed SDK request for the current reporting window.\n * @param options\n * @param reason\n * @returns\n */\n recordNetworkRequestFailure(options, reason) {\n this.networkTelemetry.recordFailure(options, reason);\n },\n\n /**\n * Submits the current network telemetry window immediately.\n * @returns\n */\n flushNetworkTelemetry() {\n if (!this.networkTelemetry) {\n return Promise.resolve();\n }\n\n return this.networkTelemetry.flush();\n },\n\n /**\n * Submits a completed network telemetry window through client metrics.\n * @param name\n * @param properties\n * @returns\n */\n submitNetworkTelemetryMetric(name, properties) {\n return this.submitClientMetrics(name, properties);\n },\n\n /**\n * Logs a network telemetry submission failure without affecting SDK requests.\n * @returns\n */\n handleNetworkTelemetrySubmissionFailure() {\n this.webex.logger?.warn('metrics: failed to submit network request summary telemetry');\n },\n\n /**\n * Stops network telemetry collection and submission.\n * @returns\n */\n stopNetworkTelemetry() {\n if (!this.networkTelemetry) {\n return Promise.resolve();\n }\n\n this.stopListening(this.webex, 'request:start', this.recordNetworkRequestStart);\n this.stopListening(this.webex, 'request:success', this.recordNetworkRequestSuccess);\n this.stopListening(this.webex, 'request:failure', this.recordNetworkRequestFailure);\n\n return this.networkTelemetry.stop();\n },\n\n submit(key, value) {\n return this.batcher.request({key, ...value});\n },\n\n /**\n * Returns the payload for submitting client metrics.\n * @param {string} eventName\n * @param {any} props\n * @returns {any} - the payload\n */\n getClientMetricsPayload(eventName, props) {\n if (!eventName) {\n throw Error('Missing behavioral metric name. Please provide one');\n }\n const payload = {metricName: eventName};\n // @ts-ignore\n const providedClientVersion = this.webex.meetings?.config?.metrics?.clientVersion;\n const {appName, appVersion} = this.webex.config;\n // Browser location is unavailable when the SDK runs in Node.js.\n // eslint-disable-next-line no-undef\n const browserLocation = typeof window !== 'undefined' ? window.location : undefined;\n\n payload.tags = {\n ...props.tags,\n app_name: appName ?? 'unknown',\n app_url: browserLocation?.origin || browserLocation?.hostname || 'non-browser',\n app_version: appVersion ?? 'unknown',\n browser: getBrowserName(),\n os: getOSNameInternal(),\n appVersion: providedClientVersion,\n domain: browserLocation?.hostname || 'non-browser',\n };\n\n payload.fields = {\n ...props.fields,\n browser_version: getBrowserVersion(),\n os_version: getOSVersion(),\n sdk_version: this.webex.version,\n platform: 'Web',\n spark_user_agent: getSparkUserAgent(this.webex),\n client_id: this.webex.credentials.config.client_id,\n };\n\n payload.type = props.type || this.webex.config.metrics.type;\n\n payload.context = {\n ...props.context,\n app: {\n version: this.webex.version,\n },\n locale: 'en-US',\n os: {\n name: getOSNameInternal(),\n version: getOSVersion(),\n },\n };\n\n if (props.eventPayload) {\n payload.eventPayload = props.eventPayload;\n }\n\n // Mocking the time in tests when running in node\n // is impossible so unable to use Date.now()\n payload.timestamp = new Date().valueOf();\n\n return payload;\n },\n\n /**\n * This corresponds to #sendSemiStructured() in the deprecated metrics handler\n * @param {string} eventName\n * @param {Object} props\n * @param {string} preLoginId\n * @returns {Object} HttpResponse object\n */\n submitClientMetrics(eventName, props = {}, preLoginId) {\n const payload = this.getClientMetricsPayload(eventName, props);\n\n if (preLoginId) {\n this.clientMetricsPreloginBatcher.savePreLoginId(preLoginId);\n\n return this.clientMetricsPreloginBatcher.request(payload);\n }\n\n return this.clientMetricsBatcher.request(payload);\n },\n\n /**\n * Issue request to alias a user's pre-login ID with their CI UUID\n * @param {string} preLoginId\n * @returns {Object} HttpResponse object\n */\n aliasUser(preLoginId) {\n return this.request({\n method: 'POST',\n api: 'metrics',\n resource: 'clientmetrics',\n headers: {\n 'x-prelogin-userid': preLoginId,\n },\n body: {},\n qs: {\n alias: true,\n },\n });\n },\n});\n\nexport default Metrics;\n"],"mappings":";;;;;;;;;;;;;;;;AAOA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,QAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,qBAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,6BAAA,GAAAF,sBAAA,CAAAJ,OAAA;AACA,IAAAO,iBAAA,GAAAP,OAAA;AAAoE,SAAAQ,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAH,CAAA,OAAAI,6BAAA,QAAAC,CAAA,GAAAD,6BAAA,CAAAJ,CAAA,GAAAC,CAAA,KA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IACpB,OAAO,IAAI,CAAC5C,OAAO,CAAC;MAClB+C,MAAM,EAAE,MAAM;MACdC,GAAG,EAAE,SAAS;MACdC,QAAQ,EAAE,eAAe;MACzBC,OAAO,EAAE;QACP,mBAAmB,EAAEN;MACvB,CAAC;MACDO,IAAI,EAAE,CAAC,CAAC;MACRC,EAAE,EAAE;QACFC,KAAK,EAAE;MACT;IACF,CAAC,CAAC;EACJ,CAAC;EAAAtB,OAAA;AACH,CAAC,CAAC;AAAC,IAAAuB,QAAA,GAAAC,OAAA,CAAAhJ,OAAA,GAEY0B,OAAO","ignoreList":[]}
|
package/dist/metrics.types.js
CHANGED
|
@@ -4,4 +4,8 @@ var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/defi
|
|
|
4
4
|
_Object$defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
+
exports.LOCUS_SYNC_LATENCY_EVENT_NAMES = void 0;
|
|
8
|
+
var LOCUS_SYNC_LATENCY_EVENT_NAMES = exports.LOCUS_SYNC_LATENCY_EVENT_NAMES = ['internal.client.locus.sync.start', 'internal.client.locus.hashtree.request', 'internal.client.locus.hashtree.response', 'internal.client.locus.sync.request', 'internal.client.locus.sync.response', 'internal.client.locus.sync.message.received'];
|
|
9
|
+
|
|
10
|
+
// for compatibilty, can be remove after wxcc-desktop did change their imports.
|
|
7
11
|
//# sourceMappingURL=metrics.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["metrics.types.ts"],"sourcesContent":["import type {\n ClientEvent as RawClientEvent,\n Event as RawEvent,\n MediaQualityEvent as RawMediaQualityEvent,\n FeatureEvent as RawFeatureEvent,\n} from '@webex/event-dictionary-ts';\n\nexport type Event = Omit<RawEvent, 'event'> & {\n event: RawClientEvent | RawMediaQualityEvent | RawFeatureEvent;\n};\n\nexport type ClientEventError = NonNullable<RawClientEvent['errors']>[0];\n\nexport type EnvironmentType = NonNullable<RawEvent['origin']['environment']>;\n\nexport type NewEnvironmentType = NonNullable<RawEvent['origin']['newEnvironment']>;\n\nexport type ClientLaunchMethodType = NonNullable<\n RawEvent['origin']['clientInfo']\n>['clientLaunchMethod'];\n\nexport type ClientUserNameInput = NonNullable<RawClientEvent['userNameInput']>;\n\nexport type ClientEmailInput = NonNullable<RawClientEvent['emailInput']>;\n\nexport type BrowserLaunchMethodType = NonNullable<\n RawEvent['origin']['clientInfo']\n>['browserLaunchMethod'];\n\nexport type MetricEventProduct = 'webex' | 'wxcc_desktop' | 'wxcc_crm' | 'wxcc_sdk';\n\nexport type MetricEventAgent = 'user' | 'browser' | 'system' | 'sdk' | 'redux' | 'service' | 'api';\n\nexport type MetricEventVerb =\n | 'abort'\n | 'accept'\n | 'activate'\n | 'apply'\n | 'answer'\n | 'authorize'\n | 'build'\n | 'cancel'\n | 'change'\n | 'click'\n | 'close'\n | 'complete'\n | 'connect'\n | 'create'\n | 'deactivate'\n | 'decrypt'\n | 'delete'\n | 'deliver'\n | 'destroy'\n | 'disable'\n | 'disconnect'\n | 'dismiss'\n | 'display'\n | 'download'\n | 'edit'\n | 'enable'\n | 'encrypt'\n | 'end'\n | 'expire'\n | 'fail'\n | 'fetch'\n | 'fire'\n | 'generate'\n | 'get'\n | 'hide'\n | 'hover'\n | 'ignore'\n | 'initialize'\n | 'initiate'\n | 'invalidate'\n | 'join'\n | 'list'\n | 'load'\n | 'login'\n | 'logout'\n | 'notify'\n | 'offer'\n | 'open'\n | 'press'\n | 'receive'\n | 'refer'\n | 'refresh'\n | 'register'\n | 'release'\n | 'reload'\n | 'reject'\n | 'request'\n | 'reset'\n | 'resize'\n | 'respond'\n | 'retry'\n | 'revoke'\n | 'save'\n | 'search'\n | 'select'\n | 'send'\n | 'set'\n | 'sign'\n | 'start'\n | 'submit'\n | 'switch'\n | 'sync'\n | 'toggle'\n | 'transfer'\n | 'unregister'\n | 'update'\n | 'upload'\n | 'use'\n | 'validate'\n | 'view'\n | 'visit'\n | 'wait'\n | 'warn'\n | 'exit';\n\nexport type MetricEventJoinFlowVersion = 'Other' | 'NewFTE';\nexport type MetricEventMeetingJoinPhase = 'pre-join' | 'join' | 'in-meeting';\n\nexport type SubmitClientEventOptions = {\n meetingId?: string;\n mediaConnections?: any[];\n rawError?: any;\n correlationId?: string;\n sessionCorrelationId?: string;\n preLoginId?: string;\n environment?: EnvironmentType;\n newEnvironmentType?: NewEnvironmentType;\n clientLaunchMethod?: ClientLaunchMethodType;\n browserLaunchMethod?: BrowserLaunchMethodType;\n webexConferenceIdStr?: string;\n globalMeetingId?: string;\n joinFlowVersion?: MetricEventJoinFlowVersion;\n meetingJoinPhase?: MetricEventMeetingJoinPhase;\n triggeredTime?: string;\n emailInput?: ClientEmailInput;\n userNameInput?: ClientUserNameInput;\n vendorId?: string;\n};\n\nexport type SubmitMQEOptions = {\n meetingId: string;\n mediaConnections?: any[];\n networkType?: Event['origin']['networkType'];\n webexConferenceIdStr?: string;\n globalMeetingId?: string;\n};\n\nexport type InternalEvent = {\n name:\n | 'internal.client.meetinginfo.request'\n | 'internal.client.meetinginfo.response'\n | 'internal.register.device.request'\n | 'internal.register.device.response'\n | 'internal.reset.join.latencies'\n | 'internal.client.meeting.click.joinbutton'\n | 'internal.host.meeting.participant.admitted'\n | 'internal.client.meeting.interstitial-window.showed'\n | 'internal.client.interstitial-window.click.joinbutton'\n | 'internal.client.add-media.turn-discovery.start'\n | 'internal.client.add-media.turn-discovery.end'\n | 'internal.client.share.initiated'\n | 'internal.client.share.stopped';\n\n payload?: never;\n options?: never;\n};\n\nexport interface ClientEvent {\n name: RawClientEvent['name'];\n payload?: RawClientEvent;\n options?: SubmitClientEventOptions;\n}\n\nexport interface DeviceContext {\n app: {version: string};\n device: {id: string};\n locale: string;\n os: {\n name: string;\n version: string;\n };\n}\n\nexport type MetricType = 'behavioral' | 'operational' | 'business';\n\nexport type Table = 'wbxapp_callend_metrics' | 'business_metrics' | 'business_ucf' | 'default';\n\ntype InternalEventPayload = string | number | boolean;\nexport type EventPayload = Record<string, InternalEventPayload>;\nexport type BehavioralEventPayload = EventPayload; // for compatibilty, can be remove after wxcc-desktop did change their imports.\n\nexport interface BusinessEventPayload {\n metricName: string;\n timestamp: number;\n context: DeviceContext;\n browserDetails: object;\n value: EventPayload;\n}\n\nexport interface BusinessEvent {\n type: string[];\n eventPayload: BusinessEventPayload;\n}\n\nexport interface TaggedEvent {\n context: DeviceContext;\n metricName: string;\n tags: EventPayload;\n timestamp: number;\n type: [MetricType];\n}\n\nexport type BehavioralEvent = TaggedEvent;\nexport type OperationalEvent = TaggedEvent;\n\nexport interface FeatureEvent {\n name: RawFeatureEvent['name'];\n payload?: RawFeatureEvent;\n options?: SubmitClientEventOptions;\n}\n\nexport interface MediaQualityEvent {\n name: RawMediaQualityEvent['name'];\n payload?: RawMediaQualityEvent;\n options: SubmitMQEOptions;\n}\n\nexport type RecursivePartial<T> = {\n [P in keyof T]?: T[P] extends (infer U)[]\n ? RecursivePartial<U>[]\n : T[P] extends object\n ? RecursivePartial<T[P]>\n : T[P];\n};\n\nexport type MetricEventNames =\n | InternalEvent['name']\n | ClientEvent['name']\n | BehavioralEvent['metricName']\n | OperationalEvent['metricName']\n | BusinessEvent['eventPayload']['metricName']\n | FeatureEvent['name']\n | MediaQualityEvent['name'];\n\nexport type ClientInfo = NonNullable<RawEvent['origin']['clientInfo']>;\nexport type ClientType = NonNullable<RawEvent['origin']['clientInfo']>['clientType'];\nexport type SubClientType = NonNullable<RawEvent['origin']['clientInfo']>['subClientType'];\nexport type NetworkType = NonNullable<RawEvent['origin']>['networkType'];\n\nexport type ClientSubServiceType = ClientEvent['payload']['webexSubServiceType'];\nexport type ClientEventPayload = RecursivePartial<ClientEvent['payload']>;\nexport type ClientEventLeaveReason = ClientEvent['payload']['leaveReason'];\nexport type ClientEventPayloadError = ClientEvent['payload']['errors'];\n\nexport type ClientFeatureEventPayload = RecursivePartial<FeatureEvent['payload']>;\n\nexport type MediaQualityEventAudioSetupDelayPayload = NonNullable<\n MediaQualityEvent['payload']\n>['audioSetupDelay'];\nexport type MediaQualityEventVideoSetupDelayPayload = NonNullable<\n MediaQualityEvent['payload']\n>['videoSetupDelay'];\n\nexport type SubmitMQEPayload = RecursivePartial<MediaQualityEvent['payload']> & {\n intervals: NonNullable<MediaQualityEvent['payload']>['intervals'];\n};\n\nexport type SubmitInternalEvent = (args: {\n name: InternalEvent['name'];\n payload?: RecursivePartial<InternalEvent['payload']>;\n options?: any;\n}) => void;\n\nexport type SubmitBehavioralEvent = (args: {\n product: MetricEventProduct;\n agent: MetricEventAgent;\n target: string;\n verb: MetricEventVerb;\n payload?: EventPayload;\n}) => void;\n\nexport type SubmitClientEvent = (args: {\n name: ClientEvent['name'];\n payload?: RecursivePartial<ClientEvent['payload']>;\n options?: SubmitClientEventOptions;\n}) => Promise<any>;\n\nexport type SubmitOperationalEvent = (args: {\n name: OperationalEvent['metricName'];\n payload: EventPayload;\n}) => void;\n\nexport type SubmitBusinessEvent = (args: {\n name: OperationalEvent['metricName'];\n payload: EventPayload;\n metadata?: EventPayload;\n table?: Table;\n}) => void;\n\nexport type SubmitMQE = (args: {\n name: MediaQualityEvent['name'];\n payload: SubmitMQEPayload;\n options: any;\n}) => void;\n\nexport type BuildClientEventFetchRequestOptions = (args: {\n name: ClientEvent['name'];\n payload?: RecursivePartial<ClientEvent['payload']>;\n options?: SubmitClientEventOptions;\n}) => Promise<any>;\n\nexport type PreComputedLatencies =\n | 'internal.client.pageJMT'\n | 'internal.download.time'\n | 'internal.get.cluster.time'\n | 'internal.click.to.interstitial'\n | 'internal.click.to.interstitial.with.user.delay'\n | 'internal.refresh.captcha.time'\n | 'internal.exchange.ci.token.time'\n | 'internal.get.u2c.time'\n | 'internal.call.init.join.req'\n | 'internal.other.app.api.time'\n | 'internal.api.fetch.intelligence.models';\n\nexport interface IdType {\n meetingId?: string;\n callId?: string;\n}\n\nexport interface IMetricsAttributes {\n type: string;\n version: string;\n userId: string;\n correlationId: string;\n connectionId: string;\n data: any[];\n meetingId?: string;\n callId?: string;\n}\n\nexport interface DelayedClientEvent {\n name: ClientEvent['name'];\n payload?: RecursivePartial<ClientEvent['payload']>;\n options?: SubmitClientEventOptions;\n}\n\nexport type SubmitFeatureEvent = (args: {\n name: FeatureEvent['name'];\n payload?: RecursivePartial<FeatureEvent['payload']>;\n options?: SubmitClientEventOptions;\n}) => Promise<any>;\n\nexport interface DelayedClientFeatureEvent {\n name: FeatureEvent['name'];\n payload?: RecursivePartial<FeatureEvent['payload']>;\n options?: SubmitClientEventOptions;\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["LOCUS_SYNC_LATENCY_EVENT_NAMES","exports"],"sources":["metrics.types.ts"],"sourcesContent":["import type {\n ClientEvent as RawClientEvent,\n Event as RawEvent,\n MediaQualityEvent as RawMediaQualityEvent,\n FeatureEvent as RawFeatureEvent,\n} from '@webex/event-dictionary-ts';\n\nexport type Event = Omit<RawEvent, 'event'> & {\n event: RawClientEvent | RawMediaQualityEvent | RawFeatureEvent;\n};\n\nexport type ClientEventError = NonNullable<RawClientEvent['errors']>[0];\n\nexport type EnvironmentType = NonNullable<RawEvent['origin']['environment']>;\n\nexport type NewEnvironmentType = NonNullable<RawEvent['origin']['newEnvironment']>;\n\nexport type ClientLaunchMethodType = NonNullable<\n RawEvent['origin']['clientInfo']\n>['clientLaunchMethod'];\n\nexport type ClientUserNameInput = NonNullable<RawClientEvent['userNameInput']>;\n\nexport type ClientEmailInput = NonNullable<RawClientEvent['emailInput']>;\n\nexport type PrivacyAndSecurityPermission = NonNullable<\n RawClientEvent['privacyAndSecurityPermission']\n>;\n\nexport type PrivacyAndSecurityPermissionResource = keyof PrivacyAndSecurityPermission;\n\nexport type PrivacyAndSecurityPermissionState =\n PrivacyAndSecurityPermission[PrivacyAndSecurityPermissionResource];\n\nexport type BrowserLaunchMethodType = NonNullable<\n RawEvent['origin']['clientInfo']\n>['browserLaunchMethod'];\n\nexport type MetricEventProduct = 'webex' | 'wxcc_desktop' | 'wxcc_crm' | 'wxcc_sdk';\n\nexport type MetricEventAgent = 'user' | 'browser' | 'system' | 'sdk' | 'redux' | 'service' | 'api';\n\nexport type MetricEventVerb =\n | 'abort'\n | 'accept'\n | 'activate'\n | 'apply'\n | 'answer'\n | 'authorize'\n | 'build'\n | 'cancel'\n | 'change'\n | 'click'\n | 'close'\n | 'complete'\n | 'connect'\n | 'create'\n | 'deactivate'\n | 'decrypt'\n | 'delete'\n | 'deliver'\n | 'destroy'\n | 'disable'\n | 'disconnect'\n | 'dismiss'\n | 'display'\n | 'download'\n | 'edit'\n | 'enable'\n | 'encrypt'\n | 'end'\n | 'expire'\n | 'fail'\n | 'fetch'\n | 'fire'\n | 'generate'\n | 'get'\n | 'hide'\n | 'hover'\n | 'ignore'\n | 'initialize'\n | 'initiate'\n | 'invalidate'\n | 'join'\n | 'list'\n | 'load'\n | 'login'\n | 'logout'\n | 'notify'\n | 'offer'\n | 'open'\n | 'press'\n | 'receive'\n | 'refer'\n | 'refresh'\n | 'register'\n | 'release'\n | 'reload'\n | 'reject'\n | 'request'\n | 'reset'\n | 'resize'\n | 'respond'\n | 'retry'\n | 'revoke'\n | 'save'\n | 'search'\n | 'select'\n | 'send'\n | 'set'\n | 'sign'\n | 'start'\n | 'submit'\n | 'switch'\n | 'sync'\n | 'toggle'\n | 'transfer'\n | 'unregister'\n | 'update'\n | 'upload'\n | 'use'\n | 'validate'\n | 'view'\n | 'visit'\n | 'wait'\n | 'warn'\n | 'exit';\n\nexport type MetricEventJoinFlowVersion = 'Other' | 'NewFTE';\nexport type MetricEventMeetingJoinPhase = 'pre-join' | 'join' | 'in-meeting';\n\nexport type SubmitClientEventOptions = {\n meetingId?: string;\n mediaConnections?: any[];\n rawError?: any;\n correlationId?: string;\n sessionCorrelationId?: string;\n preLoginId?: string;\n environment?: EnvironmentType;\n newEnvironmentType?: NewEnvironmentType;\n clientLaunchMethod?: ClientLaunchMethodType;\n browserLaunchMethod?: BrowserLaunchMethodType;\n webexConferenceIdStr?: string;\n globalMeetingId?: string;\n joinFlowVersion?: MetricEventJoinFlowVersion;\n meetingJoinPhase?: MetricEventMeetingJoinPhase;\n triggeredTime?: string;\n emailInput?: ClientEmailInput;\n userNameInput?: ClientUserNameInput;\n vendorId?: string;\n};\n\nexport type SubmitMQEOptions = {\n meetingId: string;\n mediaConnections?: any[];\n networkType?: Event['origin']['networkType'];\n webexConferenceIdStr?: string;\n globalMeetingId?: string;\n};\n\nexport const LOCUS_SYNC_LATENCY_EVENT_NAMES = [\n 'internal.client.locus.sync.start',\n 'internal.client.locus.hashtree.request',\n 'internal.client.locus.hashtree.response',\n 'internal.client.locus.sync.request',\n 'internal.client.locus.sync.response',\n 'internal.client.locus.sync.message.received',\n] as const;\n\nexport type LocusSyncLatencyEventName = (typeof LOCUS_SYNC_LATENCY_EVENT_NAMES)[number];\n\nexport type InternalEvent = {\n name:\n | 'internal.client.meetinginfo.request'\n | 'internal.client.meetinginfo.response'\n | 'internal.register.device.request'\n | 'internal.register.device.response'\n | 'internal.reset.join.latencies'\n | 'internal.host.meeting.participant.admitted'\n | 'internal.client.meeting.interstitial-window.showed'\n | 'internal.client.interstitial-window.click.joinbutton'\n | 'internal.client.add-media.turn-discovery.start'\n | 'internal.client.add-media.turn-discovery.end'\n | 'internal.client.share.initiated'\n | 'internal.client.share.stopped'\n | LocusSyncLatencyEventName;\n\n payload?: never;\n options?: never;\n};\n\nexport interface ClientEvent {\n name: RawClientEvent['name'];\n payload?: RawClientEvent;\n options?: SubmitClientEventOptions;\n}\n\nexport interface DeviceContext {\n app: {version: string};\n device: {id: string};\n locale: string;\n os: {\n name: string;\n version: string;\n };\n}\n\nexport type MetricType = 'behavioral' | 'operational' | 'business';\n\nexport type Table = 'wbxapp_callend_metrics' | 'business_metrics' | 'business_ucf' | 'default';\n\ntype InternalEventPayload = string | number | boolean;\nexport type EventPayload = Record<string, InternalEventPayload>;\nexport type BehavioralEventPayload = EventPayload; // for compatibilty, can be remove after wxcc-desktop did change their imports.\n\nexport interface BusinessEventPayload {\n metricName: string;\n timestamp: number;\n context: DeviceContext;\n browserDetails: object;\n value: EventPayload;\n}\n\nexport interface BusinessEvent {\n type: string[];\n eventPayload: BusinessEventPayload;\n}\n\nexport interface TaggedEvent {\n context: DeviceContext;\n metricName: string;\n tags: EventPayload;\n timestamp: number;\n type: [MetricType];\n}\n\nexport type BehavioralEvent = TaggedEvent;\nexport type OperationalEvent = TaggedEvent;\n\nexport interface FeatureEvent {\n name: RawFeatureEvent['name'];\n payload?: RawFeatureEvent;\n options?: SubmitClientEventOptions;\n}\n\nexport interface MediaQualityEvent {\n name: RawMediaQualityEvent['name'];\n payload?: RawMediaQualityEvent;\n options: SubmitMQEOptions;\n}\n\nexport type RecursivePartial<T> = {\n [P in keyof T]?: T[P] extends (infer U)[]\n ? RecursivePartial<U>[]\n : T[P] extends object\n ? RecursivePartial<T[P]>\n : T[P];\n};\n\nexport type MetricEventNames =\n | InternalEvent['name']\n | ClientEvent['name']\n | BehavioralEvent['metricName']\n | OperationalEvent['metricName']\n | BusinessEvent['eventPayload']['metricName']\n | FeatureEvent['name']\n | MediaQualityEvent['name'];\n\nexport type ClientInfo = NonNullable<RawEvent['origin']['clientInfo']>;\nexport type ClientType = NonNullable<RawEvent['origin']['clientInfo']>['clientType'];\nexport type SubClientType = NonNullable<RawEvent['origin']['clientInfo']>['subClientType'];\nexport type NetworkType = NonNullable<RawEvent['origin']>['networkType'];\n\nexport type ClientSubServiceType = ClientEvent['payload']['webexSubServiceType'];\nexport type ClientEventPayload = RecursivePartial<ClientEvent['payload']>;\nexport type ClientEventLeaveReason = ClientEvent['payload']['leaveReason'];\nexport type ClientEventPayloadError = ClientEvent['payload']['errors'];\n\nexport type ClientFeatureEventPayload = RecursivePartial<FeatureEvent['payload']>;\n\nexport type MediaQualityEventAudioSetupDelayPayload = NonNullable<\n MediaQualityEvent['payload']\n>['audioSetupDelay'];\nexport type MediaQualityEventVideoSetupDelayPayload = NonNullable<\n MediaQualityEvent['payload']\n>['videoSetupDelay'];\n\nexport type SubmitMQEPayload = RecursivePartial<MediaQualityEvent['payload']> & {\n intervals: NonNullable<MediaQualityEvent['payload']>['intervals'];\n};\n\nexport type SubmitInternalEvent = (args: {\n name: InternalEvent['name'];\n payload?: RecursivePartial<InternalEvent['payload']>;\n options?: any;\n}) => void;\n\nexport type SubmitBehavioralEvent = (args: {\n product: MetricEventProduct;\n agent: MetricEventAgent;\n target: string;\n verb: MetricEventVerb;\n payload?: EventPayload;\n}) => void;\n\nexport type SubmitClientEvent = (args: {\n name: ClientEvent['name'];\n payload?: RecursivePartial<ClientEvent['payload']>;\n options?: SubmitClientEventOptions;\n}) => Promise<any>;\n\nexport type SubmitOperationalEvent = (args: {\n name: OperationalEvent['metricName'];\n payload: EventPayload;\n}) => void;\n\nexport type SubmitBusinessEvent = (args: {\n name: OperationalEvent['metricName'];\n payload: EventPayload;\n metadata?: EventPayload;\n table?: Table;\n}) => void;\n\nexport type SubmitMQE = (args: {\n name: MediaQualityEvent['name'];\n payload: SubmitMQEPayload;\n options: any;\n}) => void;\n\nexport type BuildClientEventFetchRequestOptions = (args: {\n name: ClientEvent['name'];\n payload?: RecursivePartial<ClientEvent['payload']>;\n options?: SubmitClientEventOptions;\n}) => Promise<any>;\n\nexport type PreComputedLatencies =\n | 'internal.client.pageJMT'\n | 'internal.download.time'\n | 'internal.get.cluster.time'\n | 'internal.click.to.interstitial'\n | 'internal.click.to.interstitial.with.user.delay'\n | 'internal.click.to.interstitial.for.client.jmt'\n | 'internal.refresh.captcha.time'\n | 'internal.exchange.ci.token.time'\n | 'internal.get.u2c.time'\n | 'internal.call.init.join.req'\n | 'internal.other.app.api.time'\n | 'internal.api.fetch.intelligence.models'\n | 'internal.client.locus.sync.random.backoff';\n\nexport interface IdType {\n meetingId?: string;\n callId?: string;\n}\n\nexport interface IMetricsAttributes {\n type: string;\n version: string;\n userId: string;\n correlationId: string;\n connectionId: string;\n data: any[];\n meetingId?: string;\n callId?: string;\n}\n\nexport interface DelayedClientEvent {\n name: ClientEvent['name'];\n payload?: RecursivePartial<ClientEvent['payload']>;\n options?: SubmitClientEventOptions;\n}\n\nexport type SubmitFeatureEvent = (args: {\n name: FeatureEvent['name'];\n payload?: RecursivePartial<FeatureEvent['payload']>;\n options?: SubmitClientEventOptions;\n}) => Promise<any>;\n\nexport interface DelayedClientFeatureEvent {\n name: FeatureEvent['name'];\n payload?: RecursivePartial<FeatureEvent['payload']>;\n options?: SubmitClientEventOptions;\n}\n"],"mappings":";;;;;;;AAgKO,IAAMA,8BAA8B,GAAAC,OAAA,CAAAD,8BAAA,GAAG,CAC5C,kCAAkC,EAClC,wCAAwC,EACxC,yCAAyC,EACzC,oCAAoC,EACpC,qCAAqC,EACrC,6CAA6C,CACrC;;AA8CyC","ignoreList":[]}
|