@webex/internal-plugin-metrics 3.8.1-next.1 → 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 +204 -49
- 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 +3 -1
- 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 +43 -1
- 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 +135 -5
- package/dist/types/call-diagnostic/config.d.ts +2 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/metrics.types.d.ts +17 -6
- package/dist/types/new-metrics.d.ts +19 -2
- package/package.json +12 -12
- package/src/call-diagnostic/call-diagnostic-metrics-latencies.ts +58 -0
- package/src/call-diagnostic/call-diagnostic-metrics.ts +207 -26
- package/src/call-diagnostic/call-diagnostic-metrics.util.ts +6 -0
- package/src/call-diagnostic/config.ts +3 -0
- package/src/index.ts +2 -0
- package/src/metrics.types.ts +22 -5
- package/src/new-metrics.ts +52 -1
- 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 +226 -11
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.util.ts +6 -0
- package/test/unit/spec/new-metrics.ts +67 -2
- package/test/unit/spec/prelogin-metrics-batcher.ts +1 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StatelessWebexPlugin } from '@webex/webex-core';
|
|
2
|
-
import { Event, ClientType, SubClientType, NetworkType, EnvironmentType, NewEnvironmentType, ClientEvent, SubmitClientEventOptions, MediaQualityEvent, SubmitMQEOptions, SubmitMQEPayload, ClientLaunchMethodType, ClientEventError, ClientEventPayload, ClientSubServiceType, BrowserLaunchMethodType, DelayedClientEvent } from '../metrics.types';
|
|
2
|
+
import { Event, ClientType, SubClientType, NetworkType, EnvironmentType, NewEnvironmentType, ClientEvent, SubmitClientEventOptions, MediaQualityEvent, SubmitMQEOptions, SubmitMQEPayload, ClientLaunchMethodType, ClientEventError, ClientEventPayload, ClientSubServiceType, BrowserLaunchMethodType, DelayedClientEvent, FeatureEvent, ClientFeatureEventPayload } from '../metrics.types';
|
|
3
3
|
type GetOriginOptions = {
|
|
4
4
|
clientType: ClientType;
|
|
5
5
|
subClientType: SubClientType;
|
|
@@ -30,6 +30,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
30
30
|
private hasLoggedBrowserSerial;
|
|
31
31
|
private device;
|
|
32
32
|
private delayedClientEvents;
|
|
33
|
+
private delayedClientFeatureEvents;
|
|
33
34
|
private eventErrorCache;
|
|
34
35
|
private isMercuryConnected;
|
|
35
36
|
validator: (options: {
|
|
@@ -76,7 +77,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
76
77
|
* @returns
|
|
77
78
|
*/
|
|
78
79
|
getOrigin(options: GetOriginOptions, meetingId?: string): {
|
|
79
|
-
name: "endpoint" | "addin" | "antares" | "appapi" | "beech" | "breakout" | "calendar" | "cb" | "cca" | "ccc" | "cloudproxy" | "crc" | "edonus" | "givr" | "hecate" | "hedge" | "hesiod" | "homer" | "idbroker" | "superhomer" | "l2sip" | "linus" | "locus" | "mbs" | "mcc" | "mcs" | "mercury" | "mes" | "mjs" | "mmp" | "mygdon" | "ngservice" | "orpheus" | "page" | "poros" | "publicapi" | "rhesos" | "terminus" | "tpgw" | "ucc" | "wdm" | "webexivr" | "meetingcontainer";
|
|
80
|
+
name: "endpoint" | "addin" | "antares" | "appapi" | "beech" | "breakout" | "calendar" | "cb" | "cca" | "ccc" | "cloudproxy" | "crc" | "edonus" | "givr" | "hecate" | "hedge" | "hesiod" | "homer" | "idbroker" | "superhomer" | "l2sip" | "linus" | "locus" | "mbs" | "mcc" | "mcs" | "mercury" | "mes" | "mjs" | "mmp" | "mrs" | "mygdon" | "ngpage" | "ngservice" | "oauth" | "orpheus" | "page" | "poros" | "publicapi" | "rhesos" | "terminus" | "tpgw" | "ucc" | "wdm" | "webexivr" | "meetingcontainer";
|
|
80
81
|
userAgent: string;
|
|
81
82
|
buildType?: "debug" | "test" | "prod" | "tap" | "analyzer-test";
|
|
82
83
|
upgradeChannel?: string;
|
|
@@ -96,7 +97,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
96
97
|
localNetworkPrefix?: string;
|
|
97
98
|
publicNetworkPrefix?: string;
|
|
98
99
|
browserLaunchMethod?: "url-handler" | "activex" | "npapi" | "extension" | "cwsapi" | "java" | "tfs" | "webacd" | "thinclient" | "switch-to-web" | "switch-to-native";
|
|
99
|
-
clientLaunchMethod?: "url-handler" | "universal-link" | "voice-command" | "notification" | "manual" | "teams-cross-launch" | "mc-cross-launch" | "cws" | "launcher" | "cws-launcher";
|
|
100
|
+
clientLaunchMethod?: "url-handler" | "universal-link" | "voice-command" | "notification" | "manual" | "teams-cross-launch" | "mc-cross-launch" | "cws" | "installer" | "installer-launcher" | "launcher" | "cws-launcher";
|
|
100
101
|
browser?: string;
|
|
101
102
|
browserVersion?: string;
|
|
102
103
|
clientType?: "MEETING_CENTER" | "EVENT_CENTER" | "TRAINING_CENTER" | "TEAMS_CLIENT" | "TEAMS_DEVICE" | "TEAMS_SHARE" | "SIP" | "RECORDING" | "CLOUD_AWARE_SIP" | "TEAMS_WXC_CLIENT" | "WXC_CLIENT" | "WXC_DEVICE" | "WEBEX_JS_SDK" | "VOICEA_CLIENT" | "CISCO_SIP_GW" | "WEBEX_SDK" | "CPAAS_THIRD_PARTY_SDK" | "WXC_THIRD_PARTY" | "WXCC" | "TEAMS_PHONE";
|
|
@@ -105,6 +106,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
105
106
|
clientVersion?: string;
|
|
106
107
|
clientVersionStatus?: "CURRENT" | "LEGACY" | "UNSUPPORTED";
|
|
107
108
|
localClientVersion?: string;
|
|
109
|
+
launcherVersion?: string;
|
|
108
110
|
modelNumber?: string;
|
|
109
111
|
joinFirstUpdateLater?: "ep-enabled" | "sp-enabled" | "not-enabled";
|
|
110
112
|
standbyUsed?: boolean;
|
|
@@ -186,6 +188,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
186
188
|
ivrDialogId?: string;
|
|
187
189
|
ivrId?: string;
|
|
188
190
|
callId?: string;
|
|
191
|
+
pairCallId?: string;
|
|
189
192
|
locusId?: string;
|
|
190
193
|
locusJoinUrl?: string;
|
|
191
194
|
locusSessionId?: string;
|
|
@@ -237,6 +240,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
237
240
|
webexWebDomain?: string;
|
|
238
241
|
recordingId?: string;
|
|
239
242
|
clientCorrelationId?: string;
|
|
243
|
+
idForEndpointAB?: string;
|
|
240
244
|
correlationId: string;
|
|
241
245
|
additionalProperties?: false;
|
|
242
246
|
} | {
|
|
@@ -270,6 +274,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
270
274
|
ivrDialogId?: string;
|
|
271
275
|
ivrId?: string;
|
|
272
276
|
callId?: string;
|
|
277
|
+
pairCallId?: string;
|
|
273
278
|
locusId?: string;
|
|
274
279
|
locusJoinUrl?: string;
|
|
275
280
|
locusSessionId?: string;
|
|
@@ -321,6 +326,93 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
321
326
|
webexWebDomain?: string;
|
|
322
327
|
recordingId?: string;
|
|
323
328
|
clientCorrelationId?: string;
|
|
329
|
+
idForEndpointAB?: string;
|
|
330
|
+
correlationId: string;
|
|
331
|
+
additionalProperties?: false;
|
|
332
|
+
} | {
|
|
333
|
+
aggregatedBreakoutMoveId?: string;
|
|
334
|
+
attendeeId?: string;
|
|
335
|
+
participantId?: string;
|
|
336
|
+
breakoutGroupId?: string;
|
|
337
|
+
breakoutMoveId?: string;
|
|
338
|
+
breakoutSessionId?: string;
|
|
339
|
+
ciExchangeTokenUrl?: string;
|
|
340
|
+
confluenceId?: string;
|
|
341
|
+
cpaasIdentifiers?: {
|
|
342
|
+
imiTenantId: string;
|
|
343
|
+
devClientId: string;
|
|
344
|
+
imiServiceId: string;
|
|
345
|
+
imiAppId: string;
|
|
346
|
+
sessionId: string;
|
|
347
|
+
sessionInstanceId: string;
|
|
348
|
+
additionalProperties?: false;
|
|
349
|
+
};
|
|
350
|
+
csdmDeviceUrl?: string;
|
|
351
|
+
destinationBreakoutSessionId?: string;
|
|
352
|
+
destinationLocusSessionId?: string;
|
|
353
|
+
destinationLocusUrl?: string;
|
|
354
|
+
destinationVenueId?: string;
|
|
355
|
+
deviceId?: string;
|
|
356
|
+
globalMeetingId?: string;
|
|
357
|
+
installationId?: string;
|
|
358
|
+
webexMeetingUUID?: string;
|
|
359
|
+
ivrCallId?: string;
|
|
360
|
+
ivrDialogId?: string;
|
|
361
|
+
ivrId?: string;
|
|
362
|
+
callId?: string;
|
|
363
|
+
pairCallId?: string;
|
|
364
|
+
locusId?: string;
|
|
365
|
+
locusJoinUrl?: string;
|
|
366
|
+
locusSessionId?: string;
|
|
367
|
+
locusStartTime?: string;
|
|
368
|
+
locusUrl?: string;
|
|
369
|
+
machineId?: string;
|
|
370
|
+
mediaAgentAlias?: string;
|
|
371
|
+
mediaAgentGroupId?: string;
|
|
372
|
+
meetClusterName?: string;
|
|
373
|
+
meetingInstanceId?: string;
|
|
374
|
+
meetingLookupUrl?: string;
|
|
375
|
+
meetingOrgId?: string;
|
|
376
|
+
metricServiceUrl?: string;
|
|
377
|
+
msteamsTenantGuid?: string;
|
|
378
|
+
msteamsConferenceId?: string;
|
|
379
|
+
msteamsMeetingId?: string;
|
|
380
|
+
oauth2ClientId?: string;
|
|
381
|
+
orgId?: string;
|
|
382
|
+
provisionalCorrelationId?: string;
|
|
383
|
+
roomId?: string;
|
|
384
|
+
sessionCorrelationId?: string;
|
|
385
|
+
sharedMediaId?: string;
|
|
386
|
+
sipCallId?: string;
|
|
387
|
+
sipSessionId?: {
|
|
388
|
+
local?: string;
|
|
389
|
+
remote?: string;
|
|
390
|
+
additionalProperties?: false;
|
|
391
|
+
};
|
|
392
|
+
sipUri?: string;
|
|
393
|
+
subConfId?: string;
|
|
394
|
+
tenantId?: string;
|
|
395
|
+
trackingId?: string;
|
|
396
|
+
userId?: string;
|
|
397
|
+
venueId?: string;
|
|
398
|
+
venueUrl?: string;
|
|
399
|
+
whiteboardUrl?: string;
|
|
400
|
+
wdmDeviceRegistrationUrl?: string;
|
|
401
|
+
webexConferenceId?: number;
|
|
402
|
+
webexClusterName?: string;
|
|
403
|
+
webexConferenceIdStr?: string;
|
|
404
|
+
webexDataCenter?: string;
|
|
405
|
+
webexGuestId?: number;
|
|
406
|
+
webexMeetingId?: number;
|
|
407
|
+
webexNodeId?: number;
|
|
408
|
+
webexSiteId?: number;
|
|
409
|
+
webexSiteName?: string;
|
|
410
|
+
webexSiteUuid?: string;
|
|
411
|
+
webexUserId?: number;
|
|
412
|
+
webexWebDomain?: string;
|
|
413
|
+
recordingId?: string;
|
|
414
|
+
clientCorrelationId?: string;
|
|
415
|
+
idForEndpointAB?: string;
|
|
324
416
|
correlationId: string;
|
|
325
417
|
additionalProperties?: false;
|
|
326
418
|
};
|
|
@@ -333,11 +425,30 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
333
425
|
*/
|
|
334
426
|
prepareDiagnosticEvent(eventData: Event['event'], options: any): Event;
|
|
335
427
|
/**
|
|
336
|
-
*
|
|
428
|
+
* Create feature event
|
|
429
|
+
* @param name
|
|
430
|
+
* @param payload
|
|
431
|
+
* @param options
|
|
432
|
+
* @returns
|
|
433
|
+
*/
|
|
434
|
+
private prepareClientFeatureEvent;
|
|
435
|
+
/**
|
|
337
436
|
* Submit Feature Event
|
|
437
|
+
* submit to business_ucf
|
|
338
438
|
* @returns
|
|
339
439
|
*/
|
|
340
|
-
submitFeatureEvent(
|
|
440
|
+
submitFeatureEvent({ name, payload, options, delaySubmitEvent, }: {
|
|
441
|
+
name: FeatureEvent['name'];
|
|
442
|
+
payload?: ClientFeatureEventPayload;
|
|
443
|
+
options?: SubmitClientEventOptions;
|
|
444
|
+
delaySubmitEvent?: boolean;
|
|
445
|
+
}): Promise<any>;
|
|
446
|
+
/**
|
|
447
|
+
* Submit Feature Event
|
|
448
|
+
* type is business
|
|
449
|
+
* @param event
|
|
450
|
+
*/
|
|
451
|
+
submitToCallFeatures(event: Event): Promise<any>;
|
|
341
452
|
/**
|
|
342
453
|
* Submit Media Quality Event
|
|
343
454
|
* @param args - submit params
|
|
@@ -376,6 +487,14 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
376
487
|
* @param rawError
|
|
377
488
|
*/
|
|
378
489
|
generateClientEventErrorPayload(rawError: any): any[];
|
|
490
|
+
/**
|
|
491
|
+
* Create common object for in meeting events
|
|
492
|
+
* @param name
|
|
493
|
+
* @param options
|
|
494
|
+
* @param eventType - 'client' | 'feature'
|
|
495
|
+
* @returns object
|
|
496
|
+
*/
|
|
497
|
+
private createCommonEventObjectInMeeting;
|
|
379
498
|
/**
|
|
380
499
|
* Create client event object for in meeting events
|
|
381
500
|
* @param arg - create args
|
|
@@ -384,6 +503,13 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
384
503
|
* @returns object
|
|
385
504
|
*/
|
|
386
505
|
private createClientEventObjectInMeeting;
|
|
506
|
+
/**
|
|
507
|
+
* Create feature event object for in meeting function event
|
|
508
|
+
* @param name
|
|
509
|
+
* @param options
|
|
510
|
+
* @returns object
|
|
511
|
+
*/
|
|
512
|
+
private createFeatureEventObjectInMeeting;
|
|
387
513
|
/**
|
|
388
514
|
* Create client event object for pre meeting events
|
|
389
515
|
* @param arg - create args
|
|
@@ -421,6 +547,10 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
421
547
|
* Submit Delayed Client Event CA events. Clears delayedClientEvents array after submission.
|
|
422
548
|
*/
|
|
423
549
|
submitDelayedClientEvents(overrides?: Partial<DelayedClientEvent['options']>): Promise<any[]> | Promise<void>;
|
|
550
|
+
/**
|
|
551
|
+
* Submit Delayed feature Event CA events. Clears submitDelayedClientFeatureEvents array after submission.
|
|
552
|
+
*/
|
|
553
|
+
submitDelayedClientFeatureEvents(overrides?: Partial<DelayedClientEvent['options']>): Promise<any[]> | Promise<void>;
|
|
424
554
|
/**
|
|
425
555
|
* Prepare the event and send the request to metrics-a service.
|
|
426
556
|
* @param event
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ClientEventError, ClientSubServiceType } from '../metrics.types';
|
|
2
2
|
export declare const CALL_DIAGNOSTIC_LOG_IDENTIFIER = "call-diagnostic-events -> ";
|
|
3
|
+
export declare const CALL_FEATURE_LOG_IDENTIFIER = "call-diagnostic-events-feature -> ";
|
|
3
4
|
export declare const AUTHENTICATION_FAILED_CODE = 1010;
|
|
4
5
|
export declare const NETWORK_ERROR = 1026;
|
|
5
6
|
export declare const NEW_LOCUS_ERROR_CLIENT_CODE = 4008;
|
|
@@ -195,3 +196,4 @@ export declare const SERVICE_ERROR_CODES_TO_CLIENT_ERROR_CODES_MAP: {
|
|
|
195
196
|
};
|
|
196
197
|
export declare const CLIENT_ERROR_CODE_TO_ERROR_PAYLOAD: Record<number, Partial<ClientEventError>>;
|
|
197
198
|
export declare const CALL_DIAGNOSTIC_EVENT_FAILED_TO_SEND = "js_sdk_call_diagnostic_event_failed_to_send";
|
|
199
|
+
export declare const CALL_FEATURE_EVENT_FAILED_TO_SEND = "js_sdk_call_feature_event_failed_to_send";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import config from './config';
|
|
5
5
|
import NewMetrics from './new-metrics';
|
|
6
6
|
import * as Utils from './utils';
|
|
7
|
-
import { ClientEvent, ClientEventLeaveReason, SubmitBehavioralEvent, SubmitClientEvent, SubmitInternalEvent, SubmitOperationalEvent, SubmitBusinessEvent, SubmitMQE, PreComputedLatencies } from './metrics.types';
|
|
7
|
+
import { ClientEvent, ClientEventLeaveReason, SubmitBehavioralEvent, SubmitClientEvent, SubmitInternalEvent, SubmitOperationalEvent, SubmitBusinessEvent, SubmitMQE, PreComputedLatencies, SubmitFeatureEvent } from './metrics.types';
|
|
8
8
|
import * as CALL_DIAGNOSTIC_CONFIG from './call-diagnostic/config';
|
|
9
9
|
import * as CallDiagnosticUtils from './call-diagnostic/call-diagnostic-metrics.util';
|
|
10
10
|
import CallDiagnosticMetrics from './call-diagnostic/call-diagnostic-metrics';
|
|
@@ -15,4 +15,4 @@ import BusinessMetrics from './business-metrics';
|
|
|
15
15
|
import RtcMetrics from './rtcMetrics';
|
|
16
16
|
export { default, getOSNameInternal } from './metrics';
|
|
17
17
|
export { config, CALL_DIAGNOSTIC_CONFIG, NewMetrics, Utils, CallDiagnosticUtils, CallDiagnosticLatencies, CallDiagnosticMetrics, BehavioralMetrics, OperationalMetrics, BusinessMetrics, RtcMetrics, };
|
|
18
|
-
export type { ClientEvent, ClientEventLeaveReason, SubmitBehavioralEvent, SubmitClientEvent, SubmitInternalEvent, SubmitMQE, SubmitOperationalEvent, SubmitBusinessEvent, PreComputedLatencies, };
|
|
18
|
+
export type { ClientEvent, ClientEventLeaveReason, SubmitBehavioralEvent, SubmitClientEvent, SubmitInternalEvent, SubmitMQE, SubmitOperationalEvent, SubmitBusinessEvent, PreComputedLatencies, SubmitFeatureEvent, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ClientEvent as RawClientEvent, Event as RawEvent, MediaQualityEvent as RawMediaQualityEvent } from '@webex/event-dictionary-ts';
|
|
1
|
+
import { ClientEvent as RawClientEvent, Event as RawEvent, MediaQualityEvent as RawMediaQualityEvent, FeatureEvent as RawFeatureEvent } from '@webex/event-dictionary-ts';
|
|
2
2
|
export type Event = Omit<RawEvent, 'event'> & {
|
|
3
|
-
event: RawClientEvent | RawMediaQualityEvent;
|
|
3
|
+
event: RawClientEvent | RawMediaQualityEvent | RawFeatureEvent;
|
|
4
4
|
};
|
|
5
5
|
export type ClientEventError = NonNullable<RawClientEvent['errors']>[0];
|
|
6
6
|
export type EnvironmentType = NonNullable<RawEvent['origin']['environment']>;
|
|
@@ -89,9 +89,9 @@ export interface TaggedEvent {
|
|
|
89
89
|
export type BehavioralEvent = TaggedEvent;
|
|
90
90
|
export type OperationalEvent = TaggedEvent;
|
|
91
91
|
export interface FeatureEvent {
|
|
92
|
-
name:
|
|
93
|
-
payload?:
|
|
94
|
-
options?:
|
|
92
|
+
name: RawFeatureEvent['name'];
|
|
93
|
+
payload?: RawFeatureEvent;
|
|
94
|
+
options?: SubmitClientEventOptions;
|
|
95
95
|
}
|
|
96
96
|
export interface MediaQualityEvent {
|
|
97
97
|
name: RawMediaQualityEvent['name'];
|
|
@@ -110,6 +110,7 @@ export type ClientSubServiceType = ClientEvent['payload']['webexSubServiceType']
|
|
|
110
110
|
export type ClientEventPayload = RecursivePartial<ClientEvent['payload']>;
|
|
111
111
|
export type ClientEventLeaveReason = ClientEvent['payload']['leaveReason'];
|
|
112
112
|
export type ClientEventPayloadError = ClientEvent['payload']['errors'];
|
|
113
|
+
export type ClientFeatureEventPayload = RecursivePartial<FeatureEvent['payload']>;
|
|
113
114
|
export type MediaQualityEventAudioSetupDelayPayload = NonNullable<MediaQualityEvent['payload']>['audioSetupDelay'];
|
|
114
115
|
export type MediaQualityEventVideoSetupDelayPayload = NonNullable<MediaQualityEvent['payload']>['videoSetupDelay'];
|
|
115
116
|
export type SubmitMQEPayload = RecursivePartial<MediaQualityEvent['payload']> & {
|
|
@@ -152,7 +153,7 @@ export type BuildClientEventFetchRequestOptions = (args: {
|
|
|
152
153
|
payload?: RecursivePartial<ClientEvent['payload']>;
|
|
153
154
|
options?: SubmitClientEventOptions;
|
|
154
155
|
}) => Promise<any>;
|
|
155
|
-
export type PreComputedLatencies = 'internal.client.pageJMT' | 'internal.download.time' | 'internal.get.cluster.time' | 'internal.click.to.interstitial' | 'internal.refresh.captcha.time' | 'internal.exchange.ci.token.time' | 'internal.get.u2c.time' | 'internal.call.init.join.req' | 'internal.other.app.api.time' | 'internal.api.fetch.intelligence.models';
|
|
156
|
+
export type PreComputedLatencies = 'internal.client.pageJMT' | 'internal.download.time' | 'internal.get.cluster.time' | 'internal.click.to.interstitial' | 'internal.click.to.interstitial.with.user.delay' | 'internal.refresh.captcha.time' | 'internal.exchange.ci.token.time' | 'internal.get.u2c.time' | 'internal.call.init.join.req' | 'internal.other.app.api.time' | 'internal.api.fetch.intelligence.models';
|
|
156
157
|
export interface IdType {
|
|
157
158
|
meetingId?: string;
|
|
158
159
|
callId?: string;
|
|
@@ -172,4 +173,14 @@ export interface DelayedClientEvent {
|
|
|
172
173
|
payload?: RecursivePartial<ClientEvent['payload']>;
|
|
173
174
|
options?: SubmitClientEventOptions;
|
|
174
175
|
}
|
|
176
|
+
export type SubmitFeatureEvent = (args: {
|
|
177
|
+
name: FeatureEvent['name'];
|
|
178
|
+
payload?: RecursivePartial<FeatureEvent['payload']>;
|
|
179
|
+
options?: SubmitClientEventOptions;
|
|
180
|
+
}) => Promise<any>;
|
|
181
|
+
export interface DelayedClientFeatureEvent {
|
|
182
|
+
name: FeatureEvent['name'];
|
|
183
|
+
payload?: RecursivePartial<FeatureEvent['payload']>;
|
|
184
|
+
options?: SubmitClientEventOptions;
|
|
185
|
+
}
|
|
175
186
|
export {};
|
|
@@ -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, DelayedClientEvent } 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,10 +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;
|
|
25
29
|
/**
|
|
26
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' }
|
|
27
31
|
*/
|
|
28
32
|
delayedClientEventsOverrides: Partial<DelayedClientEvent['options']>;
|
|
33
|
+
delayedClientFeatureEventsOverrides: Partial<DelayedClientFeatureEvent['options']>;
|
|
29
34
|
/**
|
|
30
35
|
* Constructor
|
|
31
36
|
* @param args
|
|
@@ -119,7 +124,7 @@ declare class Metrics extends WebexPlugin {
|
|
|
119
124
|
name: FeatureEvent['name'];
|
|
120
125
|
payload?: RecursivePartial<FeatureEvent['payload']>;
|
|
121
126
|
options: any;
|
|
122
|
-
}):
|
|
127
|
+
}): Promise<any>;
|
|
123
128
|
/**
|
|
124
129
|
* Call Analyzer: Client Event
|
|
125
130
|
* @public
|
|
@@ -188,5 +193,17 @@ declare class Metrics extends WebexPlugin {
|
|
|
188
193
|
shouldDelay: boolean;
|
|
189
194
|
overrides?: Partial<DelayedClientEvent['options']>;
|
|
190
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}
|
|
203
|
+
*/
|
|
204
|
+
setDelaySubmitClientFeatureEvents({ shouldDelay, overrides, }: {
|
|
205
|
+
shouldDelay: boolean;
|
|
206
|
+
overrides?: Partial<DelayedClientFeatureEvent['options']>;
|
|
207
|
+
}): Promise<any[]> | Promise<void>;
|
|
191
208
|
}
|
|
192
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.1-next.
|
|
30
|
-
"@webex/test-helper-mocha": "3.8.1-next.
|
|
31
|
-
"@webex/test-helper-mock-webex": "3.8.1-next.
|
|
32
|
-
"@webex/test-helper-test-users": "3.8.1-next.
|
|
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.1-next.
|
|
39
|
-
"@webex/common-timers": "3.8.1-next.
|
|
40
|
-
"@webex/event-dictionary-ts": "^1.0.
|
|
41
|
-
"@webex/internal-plugin-metrics": "3.8.1-next.
|
|
42
|
-
"@webex/test-helper-chai": "3.8.1-next.
|
|
43
|
-
"@webex/test-helper-mock-webex": "3.8.1-next.
|
|
44
|
-
"@webex/webex-core": "3.8.1-next.
|
|
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.1-next.
|
|
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
|