@webex/internal-plugin-metrics 3.8.1 → 3.9.0
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 +92 -14
- package/dist/call-diagnostic/call-diagnostic-metrics-latencies.js.map +1 -1
- package/dist/call-diagnostic/call-diagnostic-metrics.js +348 -48
- package/dist/call-diagnostic/call-diagnostic-metrics.js.map +1 -1
- package/dist/call-diagnostic/call-diagnostic-metrics.util.js +21 -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 +23 -1
- package/dist/types/call-diagnostic/call-diagnostic-metrics.d.ts +176 -10
- 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 +18 -7
- package/dist/types/new-metrics.d.ts +19 -2
- package/package.json +11 -12
- package/src/call-diagnostic/call-diagnostic-metrics-latencies.ts +104 -14
- package/src/call-diagnostic/call-diagnostic-metrics.ts +363 -25
- package/src/call-diagnostic/call-diagnostic-metrics.util.ts +20 -0
- package/src/call-diagnostic/config.ts +3 -0
- package/src/index.ts +2 -0
- package/src/metrics.types.ts +25 -6
- 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 +255 -0
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.ts +829 -39
- 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 +72 -3
- package/dist/call-diagnostic-events-batcher.js +0 -60
- package/dist/call-diagnostic-events-batcher.js.map +0 -1
|
@@ -73,7 +73,10 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
|
|
|
73
73
|
* @param b end
|
|
74
74
|
* @returns latency
|
|
75
75
|
*/
|
|
76
|
-
getDiffBetweenTimestamps(a: MetricEventNames, b: MetricEventNames
|
|
76
|
+
getDiffBetweenTimestamps(a: MetricEventNames, b: MetricEventNames, clampValues?: {
|
|
77
|
+
minimum?: number;
|
|
78
|
+
maximum?: number;
|
|
79
|
+
}): number;
|
|
77
80
|
/**
|
|
78
81
|
* Meeting Info Request
|
|
79
82
|
* @note Meeting Info request happen not just in the join phase. CA requires
|
|
@@ -160,6 +163,11 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
|
|
|
160
163
|
* @returns - latency
|
|
161
164
|
*/
|
|
162
165
|
getClickToInterstitial(): number;
|
|
166
|
+
/**
|
|
167
|
+
* Click To Interstitial With User Delay
|
|
168
|
+
* @returns - latency
|
|
169
|
+
*/
|
|
170
|
+
getClickToInterstitialWithUserDelay(): number;
|
|
163
171
|
/**
|
|
164
172
|
* Interstitial To Join Ok
|
|
165
173
|
* @returns - latency
|
|
@@ -180,6 +188,11 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
|
|
|
180
188
|
* @returns - latency
|
|
181
189
|
*/
|
|
182
190
|
getTotalJMT(): number;
|
|
191
|
+
/**
|
|
192
|
+
* Total JMT With User Delay
|
|
193
|
+
* @returns - latency
|
|
194
|
+
*/
|
|
195
|
+
getTotalJMTWithUserDelay(): number;
|
|
183
196
|
/**
|
|
184
197
|
* Join Conf JMT
|
|
185
198
|
* @returns - latency
|
|
@@ -190,6 +203,11 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
|
|
|
190
203
|
* @returns - latency
|
|
191
204
|
*/
|
|
192
205
|
getTotalMediaJMT(): number;
|
|
206
|
+
/**
|
|
207
|
+
* Total Media JMT With User Delay
|
|
208
|
+
* @returns - latency
|
|
209
|
+
*/
|
|
210
|
+
getTotalMediaJMTWithUserDelay(): number;
|
|
193
211
|
/**
|
|
194
212
|
* Client JMT
|
|
195
213
|
* @returns - latency
|
|
@@ -215,6 +233,10 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
|
|
|
215
233
|
* Video setup delay transmit
|
|
216
234
|
*/
|
|
217
235
|
getVideoJoinRespTxStart(): number;
|
|
236
|
+
/**
|
|
237
|
+
* Time from share initiation to share stop (ms).
|
|
238
|
+
*/
|
|
239
|
+
getShareDuration(): number;
|
|
218
240
|
/**
|
|
219
241
|
* Total latency for all exchange ci token.
|
|
220
242
|
*/
|
|
@@ -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,7 +30,11 @@ 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;
|
|
35
|
+
private isMercuryConnected;
|
|
36
|
+
private eventLimitTracker;
|
|
37
|
+
private eventLimitWarningsLogged;
|
|
34
38
|
validator: (options: {
|
|
35
39
|
type: 'mqe' | 'ce';
|
|
36
40
|
event: Event;
|
|
@@ -55,6 +59,13 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
55
59
|
getIsConvergedArchitectureEnabled({ meetingId }: {
|
|
56
60
|
meetingId?: string;
|
|
57
61
|
}): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Sets mercury connected status for event data object in CA events
|
|
64
|
+
* @public
|
|
65
|
+
* @param status - boolean value indicating mercury connection status
|
|
66
|
+
* @return {void}
|
|
67
|
+
*/
|
|
68
|
+
setMercuryConnectedStatus(status: boolean): void;
|
|
58
69
|
/**
|
|
59
70
|
* Returns meeting's subServiceType
|
|
60
71
|
* @param meeting
|
|
@@ -68,7 +79,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
68
79
|
* @returns
|
|
69
80
|
*/
|
|
70
81
|
getOrigin(options: GetOriginOptions, meetingId?: string): {
|
|
71
|
-
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";
|
|
82
|
+
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";
|
|
72
83
|
userAgent: string;
|
|
73
84
|
buildType?: "debug" | "test" | "prod" | "tap" | "analyzer-test";
|
|
74
85
|
upgradeChannel?: string;
|
|
@@ -88,23 +99,26 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
88
99
|
localNetworkPrefix?: string;
|
|
89
100
|
publicNetworkPrefix?: string;
|
|
90
101
|
browserLaunchMethod?: "url-handler" | "activex" | "npapi" | "extension" | "cwsapi" | "java" | "tfs" | "webacd" | "thinclient" | "switch-to-web" | "switch-to-native";
|
|
91
|
-
clientLaunchMethod?: "url-handler" | "universal-link" | "voice-command" | "notification" | "manual" | "teams-cross-launch" | "mc-cross-launch" | "cws" | "launcher" | "cws-launcher";
|
|
102
|
+
clientLaunchMethod?: "url-handler" | "universal-link" | "voice-command" | "notification" | "manual" | "teams-cross-launch" | "mc-cross-launch" | "cws" | "installer" | "installer-launcher" | "launcher" | "cws-launcher";
|
|
92
103
|
browser?: string;
|
|
93
104
|
browserVersion?: string;
|
|
94
|
-
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";
|
|
95
|
-
* Constructor
|
|
96
|
-
* @param args
|
|
97
|
-
*/
|
|
105
|
+
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";
|
|
98
106
|
subClientType?: "TEAMS_DEVICE" | "AUTOMOTIVE_APP" | "DESKTOP_APP" | "DESKTOP_APP_VDI" | "DEVICE_CURRENT" | "DEVICE_LEGACY_2020" | "HOLOGRAM_HEADSET_APP" | "HVDI_APP" | "MIXED" | "MOBILE_APP" | "MOBILE_NETWORK" | "PAGE" | "VDI_APP" | "WEB_APP" | "PHONE_NOVUM" | "PHONE_ESPRESSO" | "PHONE_BUMBLEBEE";
|
|
99
107
|
schedulingClientType?: "TEAMS_CLIENT" | "GOOGLE_ADDON" | "PT" | "PUBLIC_API" | "UNIFIED_PAGE" | "WEBEX_PAGE" | "GOOGLE_NOTIFICATION_CALENDAR" | "MSFT_NOTIFICATION_ADDIN" | "MSFT_NOTIFICATION_CALENDAR" | "OUTLOOK_ADDIN";
|
|
100
108
|
clientVersion?: string;
|
|
101
109
|
clientVersionStatus?: "CURRENT" | "LEGACY" | "UNSUPPORTED";
|
|
102
110
|
localClientVersion?: string;
|
|
111
|
+
launcherVersion?: string;
|
|
103
112
|
modelNumber?: string;
|
|
104
113
|
joinFirstUpdateLater?: "ep-enabled" | "sp-enabled" | "not-enabled";
|
|
105
114
|
standbyUsed?: boolean;
|
|
106
115
|
prefetchDocShowUsed?: boolean;
|
|
107
|
-
fastJoinUsed?: boolean;
|
|
116
|
+
fastJoinUsed?: boolean; /**
|
|
117
|
+
* Sets mercury connected status for event data object in CA events
|
|
118
|
+
* @public
|
|
119
|
+
* @param status - boolean value indicating mercury connection status
|
|
120
|
+
* @return {void}
|
|
121
|
+
*/
|
|
108
122
|
clientDownloadSize?: number;
|
|
109
123
|
clientDownloadFileCount?: number;
|
|
110
124
|
nodeId?: number;
|
|
@@ -181,6 +195,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
181
195
|
ivrDialogId?: string;
|
|
182
196
|
ivrId?: string;
|
|
183
197
|
callId?: string;
|
|
198
|
+
pairCallId?: string;
|
|
184
199
|
locusId?: string;
|
|
185
200
|
locusJoinUrl?: string;
|
|
186
201
|
locusSessionId?: string;
|
|
@@ -232,6 +247,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
232
247
|
webexWebDomain?: string;
|
|
233
248
|
recordingId?: string;
|
|
234
249
|
clientCorrelationId?: string;
|
|
250
|
+
idForEndpointAB?: string;
|
|
235
251
|
correlationId: string;
|
|
236
252
|
additionalProperties?: false;
|
|
237
253
|
} | {
|
|
@@ -265,6 +281,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
265
281
|
ivrDialogId?: string;
|
|
266
282
|
ivrId?: string;
|
|
267
283
|
callId?: string;
|
|
284
|
+
pairCallId?: string;
|
|
268
285
|
locusId?: string;
|
|
269
286
|
locusJoinUrl?: string;
|
|
270
287
|
locusSessionId?: string;
|
|
@@ -316,6 +333,93 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
316
333
|
webexWebDomain?: string;
|
|
317
334
|
recordingId?: string;
|
|
318
335
|
clientCorrelationId?: string;
|
|
336
|
+
idForEndpointAB?: string;
|
|
337
|
+
correlationId: string;
|
|
338
|
+
additionalProperties?: false;
|
|
339
|
+
} | {
|
|
340
|
+
aggregatedBreakoutMoveId?: string;
|
|
341
|
+
attendeeId?: string;
|
|
342
|
+
participantId?: string;
|
|
343
|
+
breakoutGroupId?: string;
|
|
344
|
+
breakoutMoveId?: string;
|
|
345
|
+
breakoutSessionId?: string;
|
|
346
|
+
ciExchangeTokenUrl?: string;
|
|
347
|
+
confluenceId?: string;
|
|
348
|
+
cpaasIdentifiers?: {
|
|
349
|
+
imiTenantId: string;
|
|
350
|
+
devClientId: string;
|
|
351
|
+
imiServiceId: string;
|
|
352
|
+
imiAppId: string;
|
|
353
|
+
sessionId: string;
|
|
354
|
+
sessionInstanceId: string;
|
|
355
|
+
additionalProperties?: false;
|
|
356
|
+
};
|
|
357
|
+
csdmDeviceUrl?: string;
|
|
358
|
+
destinationBreakoutSessionId?: string;
|
|
359
|
+
destinationLocusSessionId?: string;
|
|
360
|
+
destinationLocusUrl?: string;
|
|
361
|
+
destinationVenueId?: string;
|
|
362
|
+
deviceId?: string;
|
|
363
|
+
globalMeetingId?: string;
|
|
364
|
+
installationId?: string;
|
|
365
|
+
webexMeetingUUID?: string;
|
|
366
|
+
ivrCallId?: string;
|
|
367
|
+
ivrDialogId?: string;
|
|
368
|
+
ivrId?: string;
|
|
369
|
+
callId?: string;
|
|
370
|
+
pairCallId?: string;
|
|
371
|
+
locusId?: string;
|
|
372
|
+
locusJoinUrl?: string;
|
|
373
|
+
locusSessionId?: string;
|
|
374
|
+
locusStartTime?: string;
|
|
375
|
+
locusUrl?: string;
|
|
376
|
+
machineId?: string;
|
|
377
|
+
mediaAgentAlias?: string;
|
|
378
|
+
mediaAgentGroupId?: string;
|
|
379
|
+
meetClusterName?: string;
|
|
380
|
+
meetingInstanceId?: string;
|
|
381
|
+
meetingLookupUrl?: string;
|
|
382
|
+
meetingOrgId?: string;
|
|
383
|
+
metricServiceUrl?: string;
|
|
384
|
+
msteamsTenantGuid?: string;
|
|
385
|
+
msteamsConferenceId?: string;
|
|
386
|
+
msteamsMeetingId?: string;
|
|
387
|
+
oauth2ClientId?: string;
|
|
388
|
+
orgId?: string;
|
|
389
|
+
provisionalCorrelationId?: string;
|
|
390
|
+
roomId?: string;
|
|
391
|
+
sessionCorrelationId?: string;
|
|
392
|
+
sharedMediaId?: string;
|
|
393
|
+
sipCallId?: string;
|
|
394
|
+
sipSessionId?: {
|
|
395
|
+
local?: string;
|
|
396
|
+
remote?: string;
|
|
397
|
+
additionalProperties?: false;
|
|
398
|
+
};
|
|
399
|
+
sipUri?: string;
|
|
400
|
+
subConfId?: string;
|
|
401
|
+
tenantId?: string;
|
|
402
|
+
trackingId?: string;
|
|
403
|
+
userId?: string;
|
|
404
|
+
venueId?: string;
|
|
405
|
+
venueUrl?: string;
|
|
406
|
+
whiteboardUrl?: string;
|
|
407
|
+
wdmDeviceRegistrationUrl?: string;
|
|
408
|
+
webexConferenceId?: number;
|
|
409
|
+
webexClusterName?: string;
|
|
410
|
+
webexConferenceIdStr?: string;
|
|
411
|
+
webexDataCenter?: string;
|
|
412
|
+
webexGuestId?: number;
|
|
413
|
+
webexMeetingId?: number;
|
|
414
|
+
webexNodeId?: number;
|
|
415
|
+
webexSiteId?: number;
|
|
416
|
+
webexSiteName?: string;
|
|
417
|
+
webexSiteUuid?: string;
|
|
418
|
+
webexUserId?: number;
|
|
419
|
+
webexWebDomain?: string;
|
|
420
|
+
recordingId?: string;
|
|
421
|
+
clientCorrelationId?: string;
|
|
422
|
+
idForEndpointAB?: string;
|
|
319
423
|
correlationId: string;
|
|
320
424
|
additionalProperties?: false;
|
|
321
425
|
};
|
|
@@ -328,11 +432,30 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
328
432
|
*/
|
|
329
433
|
prepareDiagnosticEvent(eventData: Event['event'], options: any): Event;
|
|
330
434
|
/**
|
|
331
|
-
*
|
|
435
|
+
* Create feature event
|
|
436
|
+
* @param name
|
|
437
|
+
* @param payload
|
|
438
|
+
* @param options
|
|
439
|
+
* @returns
|
|
440
|
+
*/
|
|
441
|
+
private prepareClientFeatureEvent;
|
|
442
|
+
/**
|
|
332
443
|
* Submit Feature Event
|
|
444
|
+
* submit to business_ucf
|
|
333
445
|
* @returns
|
|
334
446
|
*/
|
|
335
|
-
submitFeatureEvent(
|
|
447
|
+
submitFeatureEvent({ name, payload, options, delaySubmitEvent, }: {
|
|
448
|
+
name: FeatureEvent['name'];
|
|
449
|
+
payload?: ClientFeatureEventPayload;
|
|
450
|
+
options?: SubmitClientEventOptions;
|
|
451
|
+
delaySubmitEvent?: boolean;
|
|
452
|
+
}): Promise<any>;
|
|
453
|
+
/**
|
|
454
|
+
* Submit Feature Event
|
|
455
|
+
* type is business
|
|
456
|
+
* @param event
|
|
457
|
+
*/
|
|
458
|
+
submitToCallFeatures(event: Event): Promise<any>;
|
|
336
459
|
/**
|
|
337
460
|
* Submit Media Quality Event
|
|
338
461
|
* @param args - submit params
|
|
@@ -366,11 +489,43 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
366
489
|
* Clear the error cache
|
|
367
490
|
*/
|
|
368
491
|
clearErrorCache(): void;
|
|
492
|
+
/**
|
|
493
|
+
* Checks if an event should be limited based on criteria defined in the event dictionary.
|
|
494
|
+
* Returns true if the event should be sent, false if it has reached its limit.
|
|
495
|
+
* @param event - The diagnostic event object
|
|
496
|
+
* @returns boolean indicating whether the event should be sent
|
|
497
|
+
*/
|
|
498
|
+
private shouldSendEvent;
|
|
499
|
+
/**
|
|
500
|
+
* Checks the current count for a limit key and increments if under limit.
|
|
501
|
+
* @param limitKey - The unique key for this limit combination
|
|
502
|
+
* @param maxCount - Maximum allowed count
|
|
503
|
+
* @param eventDescription - Description for logging
|
|
504
|
+
* @returns true if under limit and incremented, false if at/over limit
|
|
505
|
+
*/
|
|
506
|
+
private checkAndIncrementEventCount;
|
|
507
|
+
/**
|
|
508
|
+
* Clears event limit tracking
|
|
509
|
+
*/
|
|
510
|
+
clearEventLimits(): void;
|
|
511
|
+
/**
|
|
512
|
+
* Clears event limit tracking for a specific correlationId only.
|
|
513
|
+
* Keeps limits for other meetings intact.
|
|
514
|
+
*/
|
|
515
|
+
clearEventLimitsForCorrelationId(correlationId: string): void;
|
|
369
516
|
/**
|
|
370
517
|
* Generate error payload for Client Event
|
|
371
518
|
* @param rawError
|
|
372
519
|
*/
|
|
373
520
|
generateClientEventErrorPayload(rawError: any): any[];
|
|
521
|
+
/**
|
|
522
|
+
* Create common object for in meeting events
|
|
523
|
+
* @param name
|
|
524
|
+
* @param options
|
|
525
|
+
* @param eventType - 'client' | 'feature'
|
|
526
|
+
* @returns object
|
|
527
|
+
*/
|
|
528
|
+
private createCommonEventObjectInMeeting;
|
|
374
529
|
/**
|
|
375
530
|
* Create client event object for in meeting events
|
|
376
531
|
* @param arg - create args
|
|
@@ -379,6 +534,13 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
379
534
|
* @returns object
|
|
380
535
|
*/
|
|
381
536
|
private createClientEventObjectInMeeting;
|
|
537
|
+
/**
|
|
538
|
+
* Create feature event object for in meeting function event
|
|
539
|
+
* @param name
|
|
540
|
+
* @param options
|
|
541
|
+
* @returns object
|
|
542
|
+
*/
|
|
543
|
+
private createFeatureEventObjectInMeeting;
|
|
382
544
|
/**
|
|
383
545
|
* Create client event object for pre meeting events
|
|
384
546
|
* @param arg - create args
|
|
@@ -416,6 +578,10 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
416
578
|
* Submit Delayed Client Event CA events. Clears delayedClientEvents array after submission.
|
|
417
579
|
*/
|
|
418
580
|
submitDelayedClientEvents(overrides?: Partial<DelayedClientEvent['options']>): Promise<any[]> | Promise<void>;
|
|
581
|
+
/**
|
|
582
|
+
* Submit Delayed feature Event CA events. Clears submitDelayedClientFeatureEvents array after submission.
|
|
583
|
+
*/
|
|
584
|
+
submitDelayedClientFeatureEvents(overrides?: Partial<DelayedClientEvent['options']>): Promise<any[]> | Promise<void>;
|
|
419
585
|
/**
|
|
420
586
|
* Prepare the event and send the request to metrics-a service.
|
|
421
587
|
* @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']>;
|
|
@@ -41,7 +41,7 @@ export type SubmitMQEOptions = {
|
|
|
41
41
|
globalMeetingId?: string;
|
|
42
42
|
};
|
|
43
43
|
export type InternalEvent = {
|
|
44
|
-
name: 'internal.client.meetinginfo.request' | 'internal.client.meetinginfo.response' | 'internal.register.device.request' | 'internal.register.device.response' | 'internal.reset.join.latencies' | 'internal.client.meeting.click.joinbutton' | 'internal.host.meeting.participant.admitted' | 'internal.client.meeting.interstitial-window.showed' | 'internal.client.interstitial-window.click.joinbutton' | 'internal.client.add-media.turn-discovery.start' | 'internal.client.add-media.turn-discovery.end';
|
|
44
|
+
name: 'internal.client.meetinginfo.request' | 'internal.client.meetinginfo.response' | 'internal.register.device.request' | 'internal.register.device.response' | 'internal.reset.join.latencies' | 'internal.client.meeting.click.joinbutton' | 'internal.host.meeting.participant.admitted' | 'internal.client.meeting.interstitial-window.showed' | 'internal.client.interstitial-window.click.joinbutton' | 'internal.client.add-media.turn-discovery.start' | 'internal.client.add-media.turn-discovery.end' | 'internal.client.share.initiated' | 'internal.client.share.stopped';
|
|
45
45
|
payload?: never;
|
|
46
46
|
options?: never;
|
|
47
47
|
};
|
|
@@ -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,21 @@
|
|
|
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.
|
|
30
|
-
"@webex/test-helper-mocha": "3.
|
|
31
|
-
"@webex/test-helper-mock-webex": "3.
|
|
32
|
-
"@webex/test-helper-test-users": "3.
|
|
29
|
+
"@webex/test-helper-chai": "3.9.0",
|
|
30
|
+
"@webex/test-helper-mocha": "3.9.0",
|
|
31
|
+
"@webex/test-helper-mock-webex": "3.9.0",
|
|
32
|
+
"@webex/test-helper-test-users": "3.9.0",
|
|
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.
|
|
39
|
-
"@webex/common-timers": "3.
|
|
40
|
-
"@webex/event-dictionary-ts": "^1.0.
|
|
41
|
-
"@webex/
|
|
42
|
-
"@webex/test-helper-
|
|
43
|
-
"@webex/
|
|
44
|
-
"@webex/webex-core": "3.8.1",
|
|
38
|
+
"@webex/common": "3.9.0",
|
|
39
|
+
"@webex/common-timers": "3.9.0",
|
|
40
|
+
"@webex/event-dictionary-ts": "^1.0.1819",
|
|
41
|
+
"@webex/test-helper-chai": "3.9.0",
|
|
42
|
+
"@webex/test-helper-mock-webex": "3.9.0",
|
|
43
|
+
"@webex/webex-core": "3.9.0",
|
|
45
44
|
"ip-anonymize": "^0.1.0",
|
|
46
45
|
"lodash": "^4.17.21",
|
|
47
46
|
"uuid": "^3.3.2"
|
|
@@ -54,5 +53,5 @@
|
|
|
54
53
|
"test:style": "eslint ./src/**/*.*",
|
|
55
54
|
"test:unit": "webex-legacy-tools test --unit --runner mocha"
|
|
56
55
|
},
|
|
57
|
-
"version": "3.
|
|
56
|
+
"version": "3.9.0"
|
|
58
57
|
}
|