@webex/internal-plugin-metrics 3.8.0 → 3.8.1-next.10
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/call-diagnostic/call-diagnostic-metrics-latencies.js +49 -0
- package/dist/call-diagnostic/call-diagnostic-metrics-latencies.js.map +1 -1
- package/dist/call-diagnostic/call-diagnostic-metrics.js +301 -81
- package/dist/call-diagnostic/call-diagnostic-metrics.js.map +1 -1
- package/dist/call-diagnostic/call-diagnostic-metrics.util.js +6 -0
- package/dist/call-diagnostic/call-diagnostic-metrics.util.js.map +1 -1
- package/dist/call-diagnostic/config.js +32 -3
- package/dist/call-diagnostic/config.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/metrics.js +1 -1
- package/dist/metrics.types.js.map +1 -1
- package/dist/new-metrics.js +58 -5
- package/dist/new-metrics.js.map +1 -1
- package/dist/types/call-diagnostic/call-diagnostic-metrics-latencies.d.ts +15 -0
- package/dist/types/call-diagnostic/call-diagnostic-metrics.d.ts +154 -24
- package/dist/types/call-diagnostic/config.d.ts +14 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/metrics.types.d.ts +28 -7
- package/dist/types/new-metrics.d.ts +28 -4
- package/package.json +12 -12
- package/src/call-diagnostic/call-diagnostic-metrics-latencies.ts +58 -0
- package/src/call-diagnostic/call-diagnostic-metrics.ts +294 -66
- package/src/call-diagnostic/call-diagnostic-metrics.util.ts +6 -0
- package/src/call-diagnostic/config.ts +31 -0
- package/src/index.ts +4 -0
- package/src/metrics.types.ts +36 -6
- package/src/new-metrics.ts +73 -5
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics-batcher.ts +20 -1
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics-latencies.ts +167 -0
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.ts +1054 -153
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.util.ts +6 -0
- package/test/unit/spec/new-metrics.ts +94 -5
- package/test/unit/spec/prelogin-metrics-batcher.ts +1 -0
- package/dist/call-diagnostic-events-batcher.js +0 -59
- package/dist/call-diagnostic-events-batcher.js.map +0 -1
|
@@ -3,7 +3,7 @@ import CallDiagnosticMetrics from './call-diagnostic/call-diagnostic-metrics';
|
|
|
3
3
|
import BehavioralMetrics from './behavioral-metrics';
|
|
4
4
|
import OperationalMetrics from './operational-metrics';
|
|
5
5
|
import BusinessMetrics from './business-metrics';
|
|
6
|
-
import { RecursivePartial, MetricEventProduct, MetricEventAgent, MetricEventVerb, ClientEvent, FeatureEvent, EventPayload, MediaQualityEvent, InternalEvent, SubmitClientEventOptions, Table } from './metrics.types';
|
|
6
|
+
import { RecursivePartial, MetricEventProduct, MetricEventAgent, MetricEventVerb, ClientEvent, FeatureEvent, EventPayload, MediaQualityEvent, InternalEvent, SubmitClientEventOptions, Table, DelayedClientEvent, DelayedClientFeatureEvent } from './metrics.types';
|
|
7
7
|
import CallDiagnosticLatencies from './call-diagnostic/call-diagnostic-metrics-latencies';
|
|
8
8
|
/**
|
|
9
9
|
* Metrics plugin to centralize all types of metrics.
|
|
@@ -22,6 +22,15 @@ declare class Metrics extends WebexPlugin {
|
|
|
22
22
|
* Whether or not to delay the submission of client events.
|
|
23
23
|
*/
|
|
24
24
|
delaySubmitClientEvents: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether or not to delay the submission of feature events.
|
|
27
|
+
*/
|
|
28
|
+
delaySubmitClientFeatureEvents: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Overrides for delayed client events. E.g. if you want to override the correlationId for all delayed client events, you can set this to { correlationId: 'newCorrelationId' }
|
|
31
|
+
*/
|
|
32
|
+
delayedClientEventsOverrides: Partial<DelayedClientEvent['options']>;
|
|
33
|
+
delayedClientFeatureEventsOverrides: Partial<DelayedClientFeatureEvent['options']>;
|
|
25
34
|
/**
|
|
26
35
|
* Constructor
|
|
27
36
|
* @param args
|
|
@@ -115,7 +124,7 @@ declare class Metrics extends WebexPlugin {
|
|
|
115
124
|
name: FeatureEvent['name'];
|
|
116
125
|
payload?: RecursivePartial<FeatureEvent['payload']>;
|
|
117
126
|
options: any;
|
|
118
|
-
}):
|
|
127
|
+
}): Promise<any>;
|
|
119
128
|
/**
|
|
120
129
|
* Call Analyzer: Client Event
|
|
121
130
|
* @public
|
|
@@ -178,8 +187,23 @@ declare class Metrics extends WebexPlugin {
|
|
|
178
187
|
* Sets the value of delaySubmitClientEvents. If set to true, client events will be delayed until submitDelayedClientEvents is called. If
|
|
179
188
|
* set to false, delayed client events will be submitted.
|
|
180
189
|
*
|
|
181
|
-
* @param {
|
|
190
|
+
* @param {object} options - {shouldDelay: A boolean value indicating whether to delay the submission of client events, overrides: An object containing overrides for the client events}
|
|
191
|
+
*/
|
|
192
|
+
setDelaySubmitClientEvents({ shouldDelay, overrides, }: {
|
|
193
|
+
shouldDelay: boolean;
|
|
194
|
+
overrides?: Partial<DelayedClientEvent['options']>;
|
|
195
|
+
}): Promise<any[]> | Promise<void>;
|
|
196
|
+
/**
|
|
197
|
+
* Sets the value of setDelaySubmitClientFeatureEvents.
|
|
198
|
+
* If set to true, feature events will be delayed until submitDelayedClientFeatureEvents is called.
|
|
199
|
+
* If set to false, delayed feature events will be submitted.
|
|
200
|
+
*
|
|
201
|
+
* @param {object} options - {shouldDelay: A boolean value indicating whether to delay the submission of feature events,
|
|
202
|
+
* overrides: An object containing overrides for the feature events}
|
|
182
203
|
*/
|
|
183
|
-
|
|
204
|
+
setDelaySubmitClientFeatureEvents({ shouldDelay, overrides, }: {
|
|
205
|
+
shouldDelay: boolean;
|
|
206
|
+
overrides?: Partial<DelayedClientFeatureEvent['options']>;
|
|
207
|
+
}): Promise<any[]> | Promise<void>;
|
|
184
208
|
}
|
|
185
209
|
export default Metrics;
|
package/package.json
CHANGED
|
@@ -26,22 +26,22 @@
|
|
|
26
26
|
"@webex/eslint-config-legacy": "0.0.0",
|
|
27
27
|
"@webex/jest-config-legacy": "0.0.0",
|
|
28
28
|
"@webex/legacy-tools": "0.0.0",
|
|
29
|
-
"@webex/test-helper-chai": "3.8.
|
|
30
|
-
"@webex/test-helper-mocha": "3.8.
|
|
31
|
-
"@webex/test-helper-mock-webex": "3.8.
|
|
32
|
-
"@webex/test-helper-test-users": "3.8.
|
|
29
|
+
"@webex/test-helper-chai": "3.8.1-next.10",
|
|
30
|
+
"@webex/test-helper-mocha": "3.8.1-next.10",
|
|
31
|
+
"@webex/test-helper-mock-webex": "3.8.1-next.10",
|
|
32
|
+
"@webex/test-helper-test-users": "3.8.1-next.10",
|
|
33
33
|
"eslint": "^8.24.0",
|
|
34
34
|
"prettier": "^2.7.1",
|
|
35
35
|
"sinon": "^9.2.4"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@webex/common": "3.8.
|
|
39
|
-
"@webex/common-timers": "3.8.
|
|
40
|
-
"@webex/event-dictionary-ts": "^1.0.
|
|
41
|
-
"@webex/internal-plugin-metrics": "3.8.
|
|
42
|
-
"@webex/test-helper-chai": "3.8.
|
|
43
|
-
"@webex/test-helper-mock-webex": "3.8.
|
|
44
|
-
"@webex/webex-core": "3.8.
|
|
38
|
+
"@webex/common": "3.8.1-next.10",
|
|
39
|
+
"@webex/common-timers": "3.8.1-next.10",
|
|
40
|
+
"@webex/event-dictionary-ts": "^1.0.1819",
|
|
41
|
+
"@webex/internal-plugin-metrics": "3.8.1-next.10",
|
|
42
|
+
"@webex/test-helper-chai": "3.8.1-next.10",
|
|
43
|
+
"@webex/test-helper-mock-webex": "3.8.1-next.10",
|
|
44
|
+
"@webex/webex-core": "3.8.1-next.10",
|
|
45
45
|
"ip-anonymize": "^0.1.0",
|
|
46
46
|
"lodash": "^4.17.21",
|
|
47
47
|
"uuid": "^3.3.2"
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"test:style": "eslint ./src/**/*.*",
|
|
55
55
|
"test:unit": "webex-legacy-tools test --unit --runner mocha"
|
|
56
56
|
},
|
|
57
|
-
"version": "3.8.
|
|
57
|
+
"version": "3.8.1-next.10"
|
|
58
58
|
}
|
|
@@ -336,6 +336,30 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
|
|
|
336
336
|
return undefined;
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
+
/**
|
|
340
|
+
* Click To Interstitial With User Delay
|
|
341
|
+
* @returns - latency
|
|
342
|
+
*/
|
|
343
|
+
public getClickToInterstitialWithUserDelay() {
|
|
344
|
+
// for normal join (where green join button exists before interstitial, i.e reminder, space list etc)
|
|
345
|
+
if (this.latencyTimestamps.get('internal.client.meeting.click.joinbutton')) {
|
|
346
|
+
return this.getDiffBetweenTimestamps(
|
|
347
|
+
'internal.client.meeting.click.joinbutton',
|
|
348
|
+
'internal.client.meeting.interstitial-window.showed'
|
|
349
|
+
);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
const clickToInterstitialWithUserDelayLatency = this.precomputedLatencies.get(
|
|
353
|
+
'internal.click.to.interstitial.with.user.delay'
|
|
354
|
+
);
|
|
355
|
+
|
|
356
|
+
if (typeof clickToInterstitialWithUserDelayLatency === 'number') {
|
|
357
|
+
return clickToInterstitialWithUserDelayLatency;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
return undefined;
|
|
361
|
+
}
|
|
362
|
+
|
|
339
363
|
/**
|
|
340
364
|
* Interstitial To Join Ok
|
|
341
365
|
* @returns - latency
|
|
@@ -395,6 +419,24 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
|
|
|
395
419
|
return undefined;
|
|
396
420
|
}
|
|
397
421
|
|
|
422
|
+
/**
|
|
423
|
+
* Total JMT With User Delay
|
|
424
|
+
* @returns - latency
|
|
425
|
+
*/
|
|
426
|
+
public getTotalJMTWithUserDelay() {
|
|
427
|
+
const clickToInterstitialWithUserDelay = this.getClickToInterstitialWithUserDelay();
|
|
428
|
+
const interstitialToJoinOk = this.getInterstitialToJoinOK();
|
|
429
|
+
|
|
430
|
+
if (
|
|
431
|
+
typeof clickToInterstitialWithUserDelay === 'number' &&
|
|
432
|
+
typeof interstitialToJoinOk === 'number'
|
|
433
|
+
) {
|
|
434
|
+
return clickToInterstitialWithUserDelay + interstitialToJoinOk;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
return undefined;
|
|
438
|
+
}
|
|
439
|
+
|
|
398
440
|
/**
|
|
399
441
|
* Join Conf JMT
|
|
400
442
|
* @returns - latency
|
|
@@ -432,6 +474,22 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
|
|
|
432
474
|
return undefined;
|
|
433
475
|
}
|
|
434
476
|
|
|
477
|
+
/**
|
|
478
|
+
* Total Media JMT With User Delay
|
|
479
|
+
* @returns - latency
|
|
480
|
+
*/
|
|
481
|
+
public getTotalMediaJMTWithUserDelay() {
|
|
482
|
+
const clickToInterstitialWithUserDelay = this.getClickToInterstitialWithUserDelay();
|
|
483
|
+
const interstitialToJoinOk = this.getInterstitialToJoinOK();
|
|
484
|
+
const joinConfJMT = this.getJoinConfJMT();
|
|
485
|
+
|
|
486
|
+
if (clickToInterstitialWithUserDelay && interstitialToJoinOk && joinConfJMT) {
|
|
487
|
+
return clickToInterstitialWithUserDelay + interstitialToJoinOk + joinConfJMT;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
return undefined;
|
|
491
|
+
}
|
|
492
|
+
|
|
435
493
|
/**
|
|
436
494
|
* Client JMT
|
|
437
495
|
* @returns - latency
|