@webex/internal-plugin-metrics 3.10.0-next.2 → 3.10.0-next.4
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/batcher.js.map +1 -1
- package/dist/behavioral-metrics.js +6 -8
- package/dist/behavioral-metrics.js.map +1 -1
- package/dist/business-metrics.js +6 -8
- package/dist/business-metrics.js.map +1 -1
- package/dist/call-diagnostic/call-diagnostic-metrics-batcher.js.map +1 -1
- package/dist/call-diagnostic/call-diagnostic-metrics-latencies.js +10 -13
- package/dist/call-diagnostic/call-diagnostic-metrics-latencies.js.map +1 -1
- package/dist/call-diagnostic/call-diagnostic-metrics.js +44 -48
- package/dist/call-diagnostic/call-diagnostic-metrics.js.map +1 -1
- package/dist/call-diagnostic/call-diagnostic-metrics.util.js +2 -2
- package/dist/call-diagnostic/call-diagnostic-metrics.util.js.map +1 -1
- package/dist/call-diagnostic/config.js.map +1 -1
- package/dist/client-metrics-batcher.js.map +1 -1
- package/dist/client-metrics-prelogin-batcher.js.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/generic-metrics.js +11 -14
- package/dist/generic-metrics.js.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/metrics.js +1 -2
- package/dist/metrics.js.map +1 -1
- package/dist/metrics.types.js.map +1 -1
- package/dist/new-metrics.js +24 -27
- package/dist/new-metrics.js.map +1 -1
- package/dist/operational-metrics.js +6 -8
- package/dist/operational-metrics.js.map +1 -1
- package/dist/prelogin-metrics-batcher.js.map +1 -1
- package/dist/rtcMetrics/constants.js.map +1 -1
- package/dist/rtcMetrics/index.js +2 -4
- package/dist/rtcMetrics/index.js.map +1 -1
- package/dist/types/call-diagnostic/call-diagnostic-metrics.d.ts +3 -1
- package/dist/utils.js.map +1 -1
- package/package.json +2 -2
|
@@ -23,10 +23,9 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/
|
|
|
23
23
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/slicedToArray"));
|
|
24
24
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
25
25
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
26
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/assertThisInitialized"));
|
|
27
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
|
28
26
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
|
|
29
27
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
|
|
28
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
|
30
29
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
31
30
|
var _common = require("@webex/common");
|
|
32
31
|
var _uuid = _interopRequireDefault(require("uuid"));
|
|
@@ -40,8 +39,8 @@ var _preloginMetricsBatcher = _interopRequireDefault(require("../prelogin-metric
|
|
|
40
39
|
var _config2 = require("./config");
|
|
41
40
|
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; }
|
|
42
41
|
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; }
|
|
43
|
-
function
|
|
44
|
-
function _isNativeReflectConstruct() {
|
|
42
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
43
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable class-methods-use-this */ /* eslint-disable valid-jsdoc */
|
|
45
44
|
var _BrowserDetection = (0, _common.BrowserDetection)(),
|
|
46
45
|
getOSVersion = _BrowserDetection.getOSVersion,
|
|
47
46
|
getBrowserName = _BrowserDetection.getBrowserName,
|
|
@@ -52,8 +51,6 @@ var _BrowserDetection = (0, _common.BrowserDetection)(),
|
|
|
52
51
|
* @class CallDiagnosticMetrics
|
|
53
52
|
*/
|
|
54
53
|
var CallDiagnosticMetrics = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
55
|
-
(0, _inherits2.default)(CallDiagnosticMetrics, _StatelessWebexPlugin);
|
|
56
|
-
var _super = _createSuper(CallDiagnosticMetrics);
|
|
57
54
|
/**
|
|
58
55
|
* Constructor
|
|
59
56
|
* @param args
|
|
@@ -64,25 +61,25 @@ var CallDiagnosticMetrics = exports.default = /*#__PURE__*/function (_StatelessW
|
|
|
64
61
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
65
62
|
args[_key] = arguments[_key];
|
|
66
63
|
}
|
|
67
|
-
_this =
|
|
64
|
+
_this = _callSuper(this, CallDiagnosticMetrics, [].concat(args));
|
|
68
65
|
// @ts-ignore
|
|
69
66
|
// @ts-ignore
|
|
70
|
-
(0, _defineProperty2.default)(
|
|
67
|
+
(0, _defineProperty2.default)(_this, "callDiagnosticEventsBatcher", void 0);
|
|
71
68
|
// @ts-ignore
|
|
72
|
-
(0, _defineProperty2.default)(
|
|
73
|
-
(0, _defineProperty2.default)(
|
|
69
|
+
(0, _defineProperty2.default)(_this, "preLoginMetricsBatcher", void 0);
|
|
70
|
+
(0, _defineProperty2.default)(_this, "logger", void 0);
|
|
74
71
|
// to avoid adding @ts-ignore everywhere
|
|
75
|
-
(0, _defineProperty2.default)(
|
|
76
|
-
(0, _defineProperty2.default)(
|
|
77
|
-
(0, _defineProperty2.default)(
|
|
78
|
-
(0, _defineProperty2.default)(
|
|
79
|
-
(0, _defineProperty2.default)(
|
|
80
|
-
(0, _defineProperty2.default)(
|
|
81
|
-
(0, _defineProperty2.default)(
|
|
82
|
-
(0, _defineProperty2.default)(
|
|
72
|
+
(0, _defineProperty2.default)(_this, "hasLoggedBrowserSerial", void 0);
|
|
73
|
+
(0, _defineProperty2.default)(_this, "device", void 0);
|
|
74
|
+
(0, _defineProperty2.default)(_this, "delayedClientEvents", []);
|
|
75
|
+
(0, _defineProperty2.default)(_this, "delayedClientFeatureEvents", []);
|
|
76
|
+
(0, _defineProperty2.default)(_this, "eventErrorCache", new _weakMap.default());
|
|
77
|
+
(0, _defineProperty2.default)(_this, "isMercuryConnected", false);
|
|
78
|
+
(0, _defineProperty2.default)(_this, "eventLimitTracker", new _map.default());
|
|
79
|
+
(0, _defineProperty2.default)(_this, "eventLimitWarningsLogged", new _set.default());
|
|
83
80
|
// the default validator before piping an event to the batcher
|
|
84
81
|
// this function can be overridden by the user
|
|
85
|
-
(0, _defineProperty2.default)(
|
|
82
|
+
(0, _defineProperty2.default)(_this, "validator", function (options) {
|
|
86
83
|
return _promise.default.resolve({
|
|
87
84
|
event: options === null || options === void 0 ? void 0 : options.event,
|
|
88
85
|
valid: true
|
|
@@ -94,7 +91,7 @@ var CallDiagnosticMetrics = exports.default = /*#__PURE__*/function (_StatelessW
|
|
|
94
91
|
* @param preLoginId
|
|
95
92
|
* @returns
|
|
96
93
|
*/
|
|
97
|
-
(0, _defineProperty2.default)(
|
|
94
|
+
(0, _defineProperty2.default)(_this, "submitToCallDiagnosticsPreLogin", function (event, preLoginId) {
|
|
98
95
|
// build metrics-a event type
|
|
99
96
|
var finalEvent = {
|
|
100
97
|
eventPayload: event,
|
|
@@ -119,7 +116,8 @@ var CallDiagnosticMetrics = exports.default = /*#__PURE__*/function (_StatelessW
|
|
|
119
116
|
* Returns the login type of the current user
|
|
120
117
|
* @returns one of 'login-ci','unverified-guest', null
|
|
121
118
|
*/
|
|
122
|
-
(0,
|
|
119
|
+
(0, _inherits2.default)(CallDiagnosticMetrics, _StatelessWebexPlugin);
|
|
120
|
+
return (0, _createClass2.default)(CallDiagnosticMetrics, [{
|
|
123
121
|
key: "getCurLoginType",
|
|
124
122
|
value: function getCurLoginType() {
|
|
125
123
|
// @ts-ignore
|
|
@@ -221,7 +219,7 @@ var CallDiagnosticMetrics = exports.default = /*#__PURE__*/function (_StatelessW
|
|
|
221
219
|
this.hasLoggedBrowserSerial = true;
|
|
222
220
|
}
|
|
223
221
|
if (defaultClientType && defaultSubClientType || options.clientType && options.subClientType) {
|
|
224
|
-
var _this$webex$meetings, _this$webex$meetings$7, _this$webex$meetings$8, _this$webex$meetings$9, _this$webex$meetings$
|
|
222
|
+
var _this$webex$meetings, _this$webex$meetings$7, _this$webex$meetings$8, _this$webex$meetings$9, _this$webex$meetings$0, _this$webex$meetings$1;
|
|
225
223
|
var origin = {
|
|
226
224
|
name: 'endpoint',
|
|
227
225
|
networkType: (options === null || options === void 0 ? void 0 : options.networkType) || 'unknown',
|
|
@@ -238,8 +236,8 @@ var CallDiagnosticMetrics = exports.default = /*#__PURE__*/function (_StatelessW
|
|
|
238
236
|
publicNetworkPrefix:
|
|
239
237
|
// @ts-ignore
|
|
240
238
|
(0, _callDiagnosticMetrics.anonymizeIPAddress)((_this$webex$meetings$9 = this.webex.meetings.geoHintInfo) === null || _this$webex$meetings$9 === void 0 ? void 0 : _this$webex$meetings$9.clientAddress) || undefined,
|
|
241
|
-
localNetworkPrefix: (0, _callDiagnosticMetrics.anonymizeIPAddress)(
|
|
242
|
-
(_this$webex$meetings$
|
|
239
|
+
localNetworkPrefix: (0, _callDiagnosticMetrics.anonymizeIPAddress)(// @ts-ignore
|
|
240
|
+
(_this$webex$meetings$0 = this.webex.meetings.meetingCollection.get(meetingId)) === null || _this$webex$meetings$0 === void 0 ? void 0 : (_this$webex$meetings$1 = _this$webex$meetings$0.statsAnalyzer) === null || _this$webex$meetings$1 === void 0 ? void 0 : _this$webex$meetings$1.getLocalIpAddress()) || undefined,
|
|
243
241
|
osVersion: getOSVersion() || 'unknown',
|
|
244
242
|
subClientType: (options === null || options === void 0 ? void 0 : options.subClientType) || defaultSubClientType,
|
|
245
243
|
os: (0, _metrics.getOSNameInternal)(),
|
|
@@ -293,7 +291,6 @@ var CallDiagnosticMetrics = exports.default = /*#__PURE__*/function (_StatelessW
|
|
|
293
291
|
var identifiers = {
|
|
294
292
|
correlationId: 'unknown' // concerned with setting this to unknown. This will fail diagnostic events parsing because it's not a uuid pattern
|
|
295
293
|
};
|
|
296
|
-
|
|
297
294
|
if (meeting) {
|
|
298
295
|
identifiers.correlationId = meeting.correlationId;
|
|
299
296
|
if (meeting.sessionCorrelationId) {
|
|
@@ -369,7 +366,7 @@ var CallDiagnosticMetrics = exports.default = /*#__PURE__*/function (_StatelessW
|
|
|
369
366
|
}, {
|
|
370
367
|
key: "prepareDiagnosticEvent",
|
|
371
368
|
value: function prepareDiagnosticEvent(eventData, options) {
|
|
372
|
-
var _this$webex$meetings$
|
|
369
|
+
var _this$webex$meetings$10;
|
|
373
370
|
var meetingId = options.meetingId,
|
|
374
371
|
triggeredTime = options.triggeredTime;
|
|
375
372
|
var origin = this.getOrigin(options, meetingId);
|
|
@@ -383,7 +380,7 @@ var CallDiagnosticMetrics = exports.default = /*#__PURE__*/function (_StatelessW
|
|
|
383
380
|
sent: 'not_defined_yet'
|
|
384
381
|
},
|
|
385
382
|
// @ts-ignore
|
|
386
|
-
senderCountryCode: (_this$webex$meetings$
|
|
383
|
+
senderCountryCode: (_this$webex$meetings$10 = this.webex.meetings.geoHintInfo) === null || _this$webex$meetings$10 === void 0 ? void 0 : _this$webex$meetings$10.countryCode,
|
|
387
384
|
event: eventData
|
|
388
385
|
};
|
|
389
386
|
|
|
@@ -964,9 +961,9 @@ var CallDiagnosticMetrics = exports.default = /*#__PURE__*/function (_StatelessW
|
|
|
964
961
|
*/
|
|
965
962
|
}, {
|
|
966
963
|
key: "createFeatureEventObjectInMeeting",
|
|
967
|
-
value: function createFeatureEventObjectInMeeting(
|
|
968
|
-
var name =
|
|
969
|
-
options =
|
|
964
|
+
value: function createFeatureEventObjectInMeeting(_ref0) {
|
|
965
|
+
var name = _ref0.name,
|
|
966
|
+
options = _ref0.options;
|
|
970
967
|
var commonObject = this.createCommonEventObjectInMeeting({
|
|
971
968
|
name: name,
|
|
972
969
|
options: options,
|
|
@@ -987,11 +984,11 @@ var CallDiagnosticMetrics = exports.default = /*#__PURE__*/function (_StatelessW
|
|
|
987
984
|
*/
|
|
988
985
|
}, {
|
|
989
986
|
key: "createClientEventObjectPreMeeting",
|
|
990
|
-
value: function createClientEventObjectPreMeeting(
|
|
987
|
+
value: function createClientEventObjectPreMeeting(_ref1) {
|
|
991
988
|
var _this$webex$meetings5, _this$webex$meetings6, _this$webex$meetings7;
|
|
992
|
-
var name =
|
|
993
|
-
options =
|
|
994
|
-
errors =
|
|
989
|
+
var name = _ref1.name,
|
|
990
|
+
options = _ref1.options,
|
|
991
|
+
errors = _ref1.errors;
|
|
995
992
|
var correlationId = options.correlationId,
|
|
996
993
|
globalMeetingId = options.globalMeetingId,
|
|
997
994
|
webexConferenceIdStr = options.webexConferenceIdStr,
|
|
@@ -1047,10 +1044,10 @@ var CallDiagnosticMetrics = exports.default = /*#__PURE__*/function (_StatelessW
|
|
|
1047
1044
|
*/
|
|
1048
1045
|
}, {
|
|
1049
1046
|
key: "prepareClientEvent",
|
|
1050
|
-
value: function prepareClientEvent(
|
|
1051
|
-
var name =
|
|
1052
|
-
payload =
|
|
1053
|
-
options =
|
|
1047
|
+
value: function prepareClientEvent(_ref10) {
|
|
1048
|
+
var name = _ref10.name,
|
|
1049
|
+
payload = _ref10.payload,
|
|
1050
|
+
options = _ref10.options;
|
|
1054
1051
|
var meetingId = options.meetingId,
|
|
1055
1052
|
correlationId = options.correlationId,
|
|
1056
1053
|
rawError = options.rawError;
|
|
@@ -1106,11 +1103,11 @@ var CallDiagnosticMetrics = exports.default = /*#__PURE__*/function (_StatelessW
|
|
|
1106
1103
|
*/
|
|
1107
1104
|
}, {
|
|
1108
1105
|
key: "submitClientEvent",
|
|
1109
|
-
value: function submitClientEvent(
|
|
1110
|
-
var name =
|
|
1111
|
-
payload =
|
|
1112
|
-
options =
|
|
1113
|
-
delaySubmitEvent =
|
|
1106
|
+
value: function submitClientEvent(_ref11) {
|
|
1107
|
+
var name = _ref11.name,
|
|
1108
|
+
payload = _ref11.payload,
|
|
1109
|
+
options = _ref11.options,
|
|
1110
|
+
delaySubmitEvent = _ref11.delaySubmitEvent;
|
|
1114
1111
|
if (delaySubmitEvent) {
|
|
1115
1112
|
// Preserve the time when the event was triggered if delaying the submission to Call Diagnostics
|
|
1116
1113
|
var delayedOptions = _objectSpread(_objectSpread({}, options), {}, {
|
|
@@ -1222,12 +1219,12 @@ var CallDiagnosticMetrics = exports.default = /*#__PURE__*/function (_StatelessW
|
|
|
1222
1219
|
* @throws
|
|
1223
1220
|
*/
|
|
1224
1221
|
function () {
|
|
1225
|
-
var _buildClientEventFetchRequestOptions = (0, _asyncToGenerator2.default)(
|
|
1222
|
+
var _buildClientEventFetchRequestOptions = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(_ref12) {
|
|
1226
1223
|
var name, payload, options, clientEvent, diagnosticEvent, request;
|
|
1227
|
-
return _regenerator.default.wrap(function
|
|
1224
|
+
return _regenerator.default.wrap(function (_context) {
|
|
1228
1225
|
while (1) switch (_context.prev = _context.next) {
|
|
1229
1226
|
case 0:
|
|
1230
|
-
name =
|
|
1227
|
+
name = _ref12.name, payload = _ref12.payload, options = _ref12.options;
|
|
1231
1228
|
this.logger.log(_config2.CALL_DIAGNOSTIC_LOG_IDENTIFIER, 'CallDiagnosticMetrics: @buildClientEventFetchRequestOptions. Building request options object for fetch()...', "name: ".concat(name));
|
|
1232
1229
|
clientEvent = this.prepareClientEvent({
|
|
1233
1230
|
name: name,
|
|
@@ -1260,7 +1257,7 @@ var CallDiagnosticMetrics = exports.default = /*#__PURE__*/function (_StatelessW
|
|
|
1260
1257
|
|
|
1261
1258
|
// @ts-ignore
|
|
1262
1259
|
return _context.abrupt("return", this.webex.prepareFetchOptions(request));
|
|
1263
|
-
case
|
|
1260
|
+
case 1:
|
|
1264
1261
|
case "end":
|
|
1265
1262
|
return _context.stop();
|
|
1266
1263
|
}
|
|
@@ -1302,6 +1299,5 @@ var CallDiagnosticMetrics = exports.default = /*#__PURE__*/function (_StatelessW
|
|
|
1302
1299
|
this.device = device;
|
|
1303
1300
|
}
|
|
1304
1301
|
}]);
|
|
1305
|
-
return CallDiagnosticMetrics;
|
|
1306
1302
|
}(_webexCore.StatelessWebexPlugin);
|
|
1307
1303
|
//# sourceMappingURL=call-diagnostic-metrics.js.map
|