@webex/internal-plugin-metrics 3.12.0-next.4 → 3.12.0-next.40
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/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 +638 -65
- package/dist/call-diagnostic/call-diagnostic-metrics-latencies.js.map +1 -1
- package/dist/call-diagnostic/call-diagnostic-metrics.js +167 -76
- 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 +1 -0
- package/dist/config.js.map +1 -1
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/dist/metrics.js +1 -1
- package/dist/metrics.types.js +4 -0
- package/dist/metrics.types.js.map +1 -1
- package/dist/new-metrics.js +16 -6
- package/dist/new-metrics.js.map +1 -1
- 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 +67 -14
- package/dist/types/call-diagnostic/config.d.ts +4 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/index.d.ts +5 -3
- package/dist/types/metrics.types.d.ts +4 -2
- package/dist/types/new-metrics.d.ts +4 -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 +800 -73
- package/src/call-diagnostic/call-diagnostic-metrics.ts +101 -15
- package/src/call-diagnostic/call-diagnostic-metrics.util.ts +5 -0
- package/src/call-diagnostic/config.ts +14 -0
- package/src/config.js +1 -0
- package/src/index.ts +5 -0
- package/src/metrics.types.ts +16 -3
- package/src/new-metrics.ts +12 -4
- 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 +1434 -303
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.ts +852 -159
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.util.ts +27 -0
- package/test/unit/spec/new-metrics.ts +39 -2
- package/test/unit/spec/prelogin-metrics-batcher.ts +71 -36
|
@@ -27,7 +27,7 @@ type GetIdentifiersOptions = {
|
|
|
27
27
|
export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
28
28
|
private callDiagnosticEventsBatcher;
|
|
29
29
|
private preLoginMetricsBatcher;
|
|
30
|
-
private logger;
|
|
30
|
+
private get logger();
|
|
31
31
|
private hasLoggedBrowserSerial;
|
|
32
32
|
private device;
|
|
33
33
|
private delayedClientEvents;
|
|
@@ -36,6 +36,8 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
36
36
|
private isMercuryConnected;
|
|
37
37
|
private eventLimitTracker;
|
|
38
38
|
private eventLimitWarningsLogged;
|
|
39
|
+
private isTelemetryOptOutManual;
|
|
40
|
+
private isTelemetryOptOutAutomatic;
|
|
39
41
|
validator: (options: {
|
|
40
42
|
type: 'mqe' | 'ce';
|
|
41
43
|
event: Event;
|
|
@@ -53,6 +55,29 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
53
55
|
* @returns one of 'login-ci','unverified-guest', null
|
|
54
56
|
*/
|
|
55
57
|
getCurLoginType(): "unverified-guest" | "login-ci";
|
|
58
|
+
/**
|
|
59
|
+
* Returns the user activation state reported from the browser's navigator.userActivation API
|
|
60
|
+
* @returns object with hasBeenActive and isActive booleans, or undefined if unavailable
|
|
61
|
+
*/
|
|
62
|
+
getUserActivation(): {
|
|
63
|
+
hasBeenActive: boolean;
|
|
64
|
+
isActive: boolean;
|
|
65
|
+
} | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Returns the telemetryOptOut value of the current user
|
|
68
|
+
* @returns one of 'manual', 'automatic', undefined
|
|
69
|
+
*/
|
|
70
|
+
getTelemetryOptOut(): "manual" | "automatic";
|
|
71
|
+
/**
|
|
72
|
+
* Sets the manual telemetry opt-out status for the current user
|
|
73
|
+
* @param value - boolean value indicating manual telemetry opt-out status
|
|
74
|
+
*/
|
|
75
|
+
setIsTelemetryOptOutManual(value: boolean): void;
|
|
76
|
+
/**
|
|
77
|
+
* Sets the automatic telemetry opt-out status for the current user
|
|
78
|
+
* @param value - boolean value indicating automatic telemetry opt-out status
|
|
79
|
+
*/
|
|
80
|
+
setIsTelemetryOptOutAutomatic(value: boolean): void;
|
|
56
81
|
/**
|
|
57
82
|
* Returns if the meeting has converged architecture enabled
|
|
58
83
|
* @param options.meetingId
|
|
@@ -84,6 +109,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
84
109
|
userAgent: string;
|
|
85
110
|
buildType?: "debug" | "test" | "prod" | "tap" | "analyzer-test";
|
|
86
111
|
upgradeChannel?: string;
|
|
112
|
+
upgradeSource?: string;
|
|
87
113
|
instanceId?: string;
|
|
88
114
|
networkType: "wifi" | "ethernet" | "cellular" | "unknown";
|
|
89
115
|
localIP?: string;
|
|
@@ -106,6 +132,8 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
106
132
|
urlProtocolLaunchMethod?: "manual" | "auto" | "extension-fallback";
|
|
107
133
|
browser?: string;
|
|
108
134
|
browserVersion?: string;
|
|
135
|
+
isSupportedBrowserFamily?: boolean;
|
|
136
|
+
isOutdatedBrowserVersion?: boolean;
|
|
109
137
|
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" | "WEBEX_RELAY";
|
|
110
138
|
subClientType?: "TEAMS_DEVICE" | "SIP" | "AUTOMOTIVE_APP" | "BROWSER_EXTENSION" | "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" | "SIP_PSTN";
|
|
111
139
|
schedulingClientType?: "TEAMS_CLIENT" | "GOOGLE_ADDON" | "PT" | "PUBLIC_API" | "UNIFIED_PAGE" | "WEBEX_PAGE" | "GOOGLE_NOTIFICATION_CALENDAR" | "MSFT_NOTIFICATION_ADDIN" | "MSFT_NOTIFICATION_CALENDAR" | "OUTLOOK_ADDIN";
|
|
@@ -113,6 +141,10 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
113
141
|
clientVersionStatus?: "CURRENT" | "LEGACY" | "UNSUPPORTED";
|
|
114
142
|
localClientVersion?: string;
|
|
115
143
|
launcherVersion?: string;
|
|
144
|
+
installerVersion?: string;
|
|
145
|
+
installerMajorVersion?: number;
|
|
146
|
+
installerMinorVersion?: number;
|
|
147
|
+
installerRevision?: number;
|
|
116
148
|
modelNumber?: string;
|
|
117
149
|
joinFirstUpdateLater?: "ep-enabled" | "sp-enabled" | "not-enabled";
|
|
118
150
|
standbyUsed?: boolean;
|
|
@@ -137,11 +169,12 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
137
169
|
architecture: "unknown" | "intel32" | "intel64" | "amd32" | "amd64" | "arm32" | "arm64" | "armv9" | "armv8" | "armv7" | "armv6" | "x86_64" | "x86_32";
|
|
138
170
|
staticPerformance?: string;
|
|
139
171
|
clockSpeedGigaHertz?: number;
|
|
140
|
-
additionalProperties?:
|
|
172
|
+
additionalProperties?: never;
|
|
141
173
|
};
|
|
142
174
|
shareType?: "cb-normal-share" | "ce-airplay-share" | "ce-direct-share" | "ce-gui-loopback-share" | "ce-input-source-share" | "ce-input-source-share-hdmi" | "ce-input-source-share-usbc" | "ce-jpg-share" | "ce-miracast-share" | "mcs-normal-share" | "mcs-normal-audio-share" | "mcs-hfps-share" | "mcs-hfps-audio-share";
|
|
143
175
|
videoDisplayMode?: "grid-view" | "active-speaker-view";
|
|
144
|
-
videoLayoutType?: "stack" | "stackWithShare" | "sideBySide" | "sideBySideWithShare" | "grid" | "floatingActive" | "floatingThumbnail" | "floatingGrid" | "overlay" | "focus" | "prominent" | "focusWithShare" | "prominentWithShare" | "equal" | "equalWithShare" | "largeGallery";
|
|
176
|
+
videoLayoutType?: "auto" | "stack" | "stackWithShare" | "sideBySide" | "sideBySideWithShare" | "grid" | "floatingActive" | "floatingThumbnail" | "floatingGrid" | "overlay" | "focus" | "prominent" | "focusWithShare" | "prominentWithShare" | "equal" | "equalWithShare" | "largeGallery" | "autoWithShare";
|
|
177
|
+
appliedLayout?: "auto" | "stack" | "stackWithShare" | "sideBySide" | "sideBySideWithShare" | "grid" | "floatingActive" | "floatingThumbnail" | "floatingGrid" | "overlay" | "focus" | "prominent" | "focusWithShare" | "prominentWithShare" | "equal" | "equalWithShare" | "largeGallery" | "autoWithShare";
|
|
145
178
|
videoRenderType?: "wme" | "client_d3d" | "client_gdi";
|
|
146
179
|
vdiInfo?: {};
|
|
147
180
|
is64BitsClient?: boolean;
|
|
@@ -153,13 +186,24 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
153
186
|
vendorId?: string;
|
|
154
187
|
staticPerformanceLevel?: string;
|
|
155
188
|
staticPerformanceScore?: number;
|
|
156
|
-
|
|
189
|
+
preInstalledTime?: string;
|
|
190
|
+
preInstalledType?: "installer" | "launcher" | "app";
|
|
191
|
+
preInstalledVersion?: string;
|
|
192
|
+
additionalProperties?: never;
|
|
193
|
+
};
|
|
194
|
+
installerInfo?: {
|
|
195
|
+
packageSuffix?: string;
|
|
196
|
+
packageArch?: string;
|
|
197
|
+
launchId?: string;
|
|
198
|
+
packageCount?: number;
|
|
199
|
+
totalSize?: number;
|
|
200
|
+
additionalProperties?: never;
|
|
157
201
|
};
|
|
158
202
|
emmVendorId?: string;
|
|
159
203
|
isHybridMedia?: boolean;
|
|
160
204
|
originData?: {};
|
|
161
205
|
serviceVersion?: string;
|
|
162
|
-
additionalProperties?:
|
|
206
|
+
additionalProperties?: never;
|
|
163
207
|
};
|
|
164
208
|
/**
|
|
165
209
|
* Gather identifier details for call diagnostic payload.
|
|
@@ -172,6 +216,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
172
216
|
participantId?: string;
|
|
173
217
|
breakoutGroupId?: string;
|
|
174
218
|
breakoutMoveId?: string;
|
|
219
|
+
breakoutTrackingId?: string;
|
|
175
220
|
breakoutSessionId?: string;
|
|
176
221
|
browserId?: string;
|
|
177
222
|
ciExchangeTokenUrl?: string;
|
|
@@ -183,7 +228,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
183
228
|
imiAppId: string;
|
|
184
229
|
sessionId: string;
|
|
185
230
|
sessionInstanceId: string;
|
|
186
|
-
additionalProperties?:
|
|
231
|
+
additionalProperties?: never;
|
|
187
232
|
};
|
|
188
233
|
csdmDeviceUrl?: string;
|
|
189
234
|
destinationBreakoutSessionId?: string;
|
|
@@ -200,6 +245,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
200
245
|
callId?: string;
|
|
201
246
|
pairCallId?: string;
|
|
202
247
|
llmWebsocketUrl?: string;
|
|
248
|
+
locusCluster?: string;
|
|
203
249
|
locusId?: string;
|
|
204
250
|
locusJoinUrl?: string;
|
|
205
251
|
locusSessionId?: string;
|
|
@@ -217,6 +263,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
217
263
|
msteamsTenantGuid?: string;
|
|
218
264
|
msteamsConferenceId?: string;
|
|
219
265
|
msteamsMeetingId?: string;
|
|
266
|
+
mtid?: string;
|
|
220
267
|
oauth2ClientId?: string;
|
|
221
268
|
orgId?: string;
|
|
222
269
|
provisionalCorrelationId?: string;
|
|
@@ -227,7 +274,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
227
274
|
sipSessionId?: {
|
|
228
275
|
local?: string;
|
|
229
276
|
remote?: string;
|
|
230
|
-
additionalProperties?:
|
|
277
|
+
additionalProperties?: never;
|
|
231
278
|
};
|
|
232
279
|
sipUri?: string;
|
|
233
280
|
subConfId?: string;
|
|
@@ -255,13 +302,14 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
255
302
|
idForEndpointAB?: string;
|
|
256
303
|
customerOrgId?: string;
|
|
257
304
|
correlationId: string;
|
|
258
|
-
additionalProperties?:
|
|
305
|
+
additionalProperties?: never;
|
|
259
306
|
} | {
|
|
260
307
|
aggregatedBreakoutMoveId?: string;
|
|
261
308
|
attendeeId?: string;
|
|
262
309
|
participantId?: string;
|
|
263
310
|
breakoutGroupId?: string;
|
|
264
311
|
breakoutMoveId?: string;
|
|
312
|
+
breakoutTrackingId?: string;
|
|
265
313
|
breakoutSessionId?: string;
|
|
266
314
|
browserId?: string;
|
|
267
315
|
ciExchangeTokenUrl?: string;
|
|
@@ -273,7 +321,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
273
321
|
imiAppId: string;
|
|
274
322
|
sessionId: string;
|
|
275
323
|
sessionInstanceId: string;
|
|
276
|
-
additionalProperties?:
|
|
324
|
+
additionalProperties?: never;
|
|
277
325
|
};
|
|
278
326
|
csdmDeviceUrl?: string;
|
|
279
327
|
destinationBreakoutSessionId?: string;
|
|
@@ -290,6 +338,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
290
338
|
callId?: string;
|
|
291
339
|
pairCallId?: string;
|
|
292
340
|
llmWebsocketUrl?: string;
|
|
341
|
+
locusCluster?: string;
|
|
293
342
|
locusId?: string;
|
|
294
343
|
locusJoinUrl?: string;
|
|
295
344
|
locusSessionId?: string;
|
|
@@ -307,6 +356,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
307
356
|
msteamsTenantGuid?: string;
|
|
308
357
|
msteamsConferenceId?: string;
|
|
309
358
|
msteamsMeetingId?: string;
|
|
359
|
+
mtid?: string;
|
|
310
360
|
oauth2ClientId?: string;
|
|
311
361
|
orgId?: string;
|
|
312
362
|
provisionalCorrelationId?: string;
|
|
@@ -317,7 +367,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
317
367
|
sipSessionId?: {
|
|
318
368
|
local?: string;
|
|
319
369
|
remote?: string;
|
|
320
|
-
additionalProperties?:
|
|
370
|
+
additionalProperties?: never;
|
|
321
371
|
};
|
|
322
372
|
sipUri?: string;
|
|
323
373
|
subConfId?: string;
|
|
@@ -345,13 +395,14 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
345
395
|
idForEndpointAB?: string;
|
|
346
396
|
customerOrgId?: string;
|
|
347
397
|
correlationId: string;
|
|
348
|
-
additionalProperties?:
|
|
398
|
+
additionalProperties?: never;
|
|
349
399
|
} | {
|
|
350
400
|
aggregatedBreakoutMoveId?: string;
|
|
351
401
|
attendeeId?: string;
|
|
352
402
|
participantId?: string;
|
|
353
403
|
breakoutGroupId?: string;
|
|
354
404
|
breakoutMoveId?: string;
|
|
405
|
+
breakoutTrackingId?: string;
|
|
355
406
|
breakoutSessionId?: string;
|
|
356
407
|
browserId?: string;
|
|
357
408
|
ciExchangeTokenUrl?: string;
|
|
@@ -363,7 +414,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
363
414
|
imiAppId: string;
|
|
364
415
|
sessionId: string;
|
|
365
416
|
sessionInstanceId: string;
|
|
366
|
-
additionalProperties?:
|
|
417
|
+
additionalProperties?: never;
|
|
367
418
|
};
|
|
368
419
|
csdmDeviceUrl?: string;
|
|
369
420
|
destinationBreakoutSessionId?: string;
|
|
@@ -380,6 +431,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
380
431
|
callId?: string;
|
|
381
432
|
pairCallId?: string;
|
|
382
433
|
llmWebsocketUrl?: string;
|
|
434
|
+
locusCluster?: string;
|
|
383
435
|
locusId?: string;
|
|
384
436
|
locusJoinUrl?: string;
|
|
385
437
|
locusSessionId?: string;
|
|
@@ -397,6 +449,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
397
449
|
msteamsTenantGuid?: string;
|
|
398
450
|
msteamsConferenceId?: string;
|
|
399
451
|
msteamsMeetingId?: string;
|
|
452
|
+
mtid?: string;
|
|
400
453
|
oauth2ClientId?: string;
|
|
401
454
|
orgId?: string;
|
|
402
455
|
provisionalCorrelationId?: string;
|
|
@@ -407,7 +460,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
407
460
|
sipSessionId?: {
|
|
408
461
|
local?: string;
|
|
409
462
|
remote?: string;
|
|
410
|
-
additionalProperties?:
|
|
463
|
+
additionalProperties?: never;
|
|
411
464
|
};
|
|
412
465
|
sipUri?: string;
|
|
413
466
|
subConfId?: string;
|
|
@@ -435,7 +488,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
|
435
488
|
idForEndpointAB?: string;
|
|
436
489
|
customerOrgId?: string;
|
|
437
490
|
correlationId: string;
|
|
438
|
-
additionalProperties?:
|
|
491
|
+
additionalProperties?: never;
|
|
439
492
|
};
|
|
440
493
|
/**
|
|
441
494
|
* Create diagnostic event, which can hold client event, feature event or MQE event data.
|
|
@@ -102,11 +102,13 @@ export declare const ERROR_DESCRIPTIONS: {
|
|
|
102
102
|
WEBRTC_API_NOT_AVAILABLE: string;
|
|
103
103
|
WDM_RESTRICTED_REGION: string;
|
|
104
104
|
USER_NOT_ALLOWED_JOIN_WEBINAR: string;
|
|
105
|
+
INVALID_MEETING_INFO: string;
|
|
105
106
|
};
|
|
106
107
|
export declare const SERVICE_ERROR_CODES_TO_CLIENT_ERROR_CODES_MAP: {
|
|
107
108
|
58400: number;
|
|
108
109
|
99002: number;
|
|
109
110
|
99009: number;
|
|
111
|
+
99019: number;
|
|
110
112
|
58500: number;
|
|
111
113
|
400001: number;
|
|
112
114
|
403004: number;
|
|
@@ -134,6 +136,7 @@ export declare const SERVICE_ERROR_CODES_TO_CLIENT_ERROR_CODES_MAP: {
|
|
|
134
136
|
423001: number;
|
|
135
137
|
423005: number;
|
|
136
138
|
423006: number;
|
|
139
|
+
423008: number;
|
|
137
140
|
423010: number;
|
|
138
141
|
423012: number;
|
|
139
142
|
423013: number;
|
|
@@ -147,6 +150,7 @@ export declare const SERVICE_ERROR_CODES_TO_CLIENT_ERROR_CODES_MAP: {
|
|
|
147
150
|
403037: number;
|
|
148
151
|
403003: number;
|
|
149
152
|
403030: number;
|
|
153
|
+
403106: number;
|
|
150
154
|
2403001: number;
|
|
151
155
|
2403002: number;
|
|
152
156
|
2403003: number;
|
package/dist/types/config.d.ts
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
import config from './config';
|
|
5
5
|
import NewMetrics from './new-metrics';
|
|
6
6
|
import * as Utils from './utils';
|
|
7
|
-
import
|
|
7
|
+
import * as AutomatedUserUtils from './automated-user';
|
|
8
|
+
import { ClientEvent, ClientEventLeaveReason, SubmitBehavioralEvent, SubmitClientEvent, SubmitInternalEvent, SubmitOperationalEvent, SubmitBusinessEvent, SubmitMQE, PreComputedLatencies, SubmitFeatureEvent, LocusSyncLatencyEventName } from './metrics.types';
|
|
8
9
|
import * as CALL_DIAGNOSTIC_CONFIG from './call-diagnostic/config';
|
|
9
10
|
import * as CallDiagnosticUtils from './call-diagnostic/call-diagnostic-metrics.util';
|
|
10
11
|
import CallDiagnosticMetrics from './call-diagnostic/call-diagnostic-metrics';
|
|
@@ -15,5 +16,6 @@ import BusinessMetrics from './business-metrics';
|
|
|
15
16
|
import RtcMetrics from './rtcMetrics';
|
|
16
17
|
import PreLoginMetrics from './prelogin-metrics';
|
|
17
18
|
export { default, getOSNameInternal } from './metrics';
|
|
18
|
-
export { config, CALL_DIAGNOSTIC_CONFIG, NewMetrics, Utils, CallDiagnosticUtils, CallDiagnosticLatencies, CallDiagnosticMetrics, BehavioralMetrics, OperationalMetrics, BusinessMetrics, RtcMetrics, PreLoginMetrics, };
|
|
19
|
-
export
|
|
19
|
+
export { config, CALL_DIAGNOSTIC_CONFIG, AutomatedUserUtils, NewMetrics, Utils, CallDiagnosticUtils, CallDiagnosticLatencies, CallDiagnosticMetrics, BehavioralMetrics, OperationalMetrics, BusinessMetrics, RtcMetrics, PreLoginMetrics, };
|
|
20
|
+
export { isAutomatedUser, isAutomatedUserAgent } from './automated-user';
|
|
21
|
+
export type { ClientEvent, ClientEventLeaveReason, SubmitBehavioralEvent, SubmitClientEvent, SubmitInternalEvent, SubmitMQE, SubmitOperationalEvent, SubmitBusinessEvent, PreComputedLatencies, SubmitFeatureEvent, LocusSyncLatencyEventName, };
|
|
@@ -41,8 +41,10 @@ export type SubmitMQEOptions = {
|
|
|
41
41
|
webexConferenceIdStr?: string;
|
|
42
42
|
globalMeetingId?: string;
|
|
43
43
|
};
|
|
44
|
+
export declare const LOCUS_SYNC_LATENCY_EVENT_NAMES: readonly ["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"];
|
|
45
|
+
export type LocusSyncLatencyEventName = (typeof LOCUS_SYNC_LATENCY_EVENT_NAMES)[number];
|
|
44
46
|
export type InternalEvent = {
|
|
45
|
-
name: 'internal.client.meetinginfo.request' | 'internal.client.meetinginfo.response' | 'internal.register.device.request' | 'internal.register.device.response' | 'internal.reset.join.latencies' | 'internal.
|
|
47
|
+
name: 'internal.client.meetinginfo.request' | 'internal.client.meetinginfo.response' | 'internal.register.device.request' | 'internal.register.device.response' | 'internal.reset.join.latencies' | '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' | LocusSyncLatencyEventName;
|
|
46
48
|
payload?: never;
|
|
47
49
|
options?: never;
|
|
48
50
|
};
|
|
@@ -154,7 +156,7 @@ export type BuildClientEventFetchRequestOptions = (args: {
|
|
|
154
156
|
payload?: RecursivePartial<ClientEvent['payload']>;
|
|
155
157
|
options?: SubmitClientEventOptions;
|
|
156
158
|
}) => Promise<any>;
|
|
157
|
-
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';
|
|
159
|
+
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.click.to.interstitial.for.client.jmt' | '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' | 'internal.client.locus.sync.random.backoff';
|
|
158
160
|
export interface IdType {
|
|
159
161
|
meetingId?: string;
|
|
160
162
|
callId?: string;
|
|
@@ -78,6 +78,10 @@ declare class Metrics extends WebexPlugin {
|
|
|
78
78
|
* @returns true once we have the deviceId we need to submit business events
|
|
79
79
|
*/
|
|
80
80
|
isReadyToSubmitBusinessEvents(): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* @returns whether the current user agent belongs to an automated user
|
|
83
|
+
*/
|
|
84
|
+
isAutomatedUser(): boolean;
|
|
81
85
|
/**
|
|
82
86
|
* Behavioral event
|
|
83
87
|
* @param args
|
package/package.json
CHANGED
|
@@ -24,24 +24,25 @@
|
|
|
24
24
|
"@sinonjs/fake-timers": "^6.0.1",
|
|
25
25
|
"@webex/babel-config-legacy": "0.0.0",
|
|
26
26
|
"@webex/eslint-config-legacy": "0.0.0",
|
|
27
|
-
"@webex/event-dictionary-ts": "^1.0.2073",
|
|
28
27
|
"@webex/jest-config-legacy": "0.0.0",
|
|
29
28
|
"@webex/legacy-tools": "0.0.0",
|
|
30
|
-
"@webex/test-helper-chai": "3.
|
|
31
|
-
"@webex/test-helper-mocha": "3.
|
|
32
|
-
"@webex/test-helper-mock-webex": "3.
|
|
33
|
-
"@webex/test-helper-test-users": "3.
|
|
29
|
+
"@webex/test-helper-chai": "3.12.0-next.5",
|
|
30
|
+
"@webex/test-helper-mocha": "3.12.0-next.5",
|
|
31
|
+
"@webex/test-helper-mock-webex": "3.12.0-next.5",
|
|
32
|
+
"@webex/test-helper-test-users": "3.12.0-next.5",
|
|
34
33
|
"eslint": "^8.24.0",
|
|
35
34
|
"prettier": "^2.7.1",
|
|
36
35
|
"sinon": "^9.2.4"
|
|
37
36
|
},
|
|
38
37
|
"dependencies": {
|
|
39
|
-
"@webex/common": "3.
|
|
40
|
-
"@webex/common-timers": "3.
|
|
41
|
-
"@webex/
|
|
42
|
-
"@webex/test-helper-
|
|
43
|
-
"@webex/webex
|
|
38
|
+
"@webex/common": "3.12.0-next.5",
|
|
39
|
+
"@webex/common-timers": "3.12.0-next.5",
|
|
40
|
+
"@webex/event-dictionary-ts": "^1.0.2220",
|
|
41
|
+
"@webex/test-helper-chai": "3.12.0-next.5",
|
|
42
|
+
"@webex/test-helper-mock-webex": "3.12.0-next.5",
|
|
43
|
+
"@webex/webex-core": "3.12.0-next.40",
|
|
44
44
|
"ip-anonymize": "^0.1.0",
|
|
45
|
+
"isbot": "5.2.1",
|
|
45
46
|
"lodash": "^4.17.21",
|
|
46
47
|
"uuid": "^3.3.2"
|
|
47
48
|
},
|
|
@@ -53,5 +54,5 @@
|
|
|
53
54
|
"test:style": "eslint ./src/**/*.*",
|
|
54
55
|
"test:unit": "webex-legacy-tools test --unit --runner mocha"
|
|
55
56
|
},
|
|
56
|
-
"version": "3.12.0-next.
|
|
57
|
+
"version": "3.12.0-next.40"
|
|
57
58
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {isBot} from 'isbot';
|
|
2
|
+
|
|
3
|
+
export const isAutomatedUserAgent = (userAgent?: string | null): boolean => isBot(userAgent);
|
|
4
|
+
|
|
5
|
+
let automatedUser: boolean | undefined;
|
|
6
|
+
|
|
7
|
+
export const isAutomatedUser = (): boolean => {
|
|
8
|
+
if (automatedUser === undefined) {
|
|
9
|
+
automatedUser =
|
|
10
|
+
typeof window !== 'undefined' &&
|
|
11
|
+
typeof navigator !== 'undefined' &&
|
|
12
|
+
(Boolean(navigator.webdriver) || isAutomatedUserAgent(navigator.userAgent));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return automatedUser;
|
|
16
|
+
};
|
package/src/batcher.js
CHANGED
|
@@ -75,6 +75,10 @@ const MetricsBatcher = Batcher.extend({
|
|
|
75
75
|
*/
|
|
76
76
|
handleHttpError(reason) {
|
|
77
77
|
if (reason instanceof WebexHttpError.NetworkOrCORSError) {
|
|
78
|
+
if (!this.config.batcherRetryOnNetworkError) {
|
|
79
|
+
return Reflect.apply(Batcher.prototype.handleHttpError, this, [reason]);
|
|
80
|
+
}
|
|
81
|
+
|
|
78
82
|
this.logger.warn(
|
|
79
83
|
'metrics-batcher: received network error submitting metrics, reenqueuing payload'
|
|
80
84
|
);
|