@webex/internal-plugin-metrics 3.12.0-next.13 → 3.12.0-next.15
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.js +3 -2
- package/dist/call-diagnostic/call-diagnostic-metrics.js.map +1 -1
- package/dist/metrics.js +1 -1
- package/package.json +2 -2
- package/src/call-diagnostic/call-diagnostic-metrics.ts +1 -0
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.ts +394 -157
|
@@ -912,6 +912,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
912
912
|
isConvergedArchitectureEnabled: undefined,
|
|
913
913
|
webexSubServiceType: undefined,
|
|
914
914
|
webClientPreload: undefined,
|
|
915
|
+
isVipMeeting: false,
|
|
915
916
|
},
|
|
916
917
|
options
|
|
917
918
|
);
|
|
@@ -940,6 +941,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
940
941
|
isConvergedArchitectureEnabled: undefined,
|
|
941
942
|
webexSubServiceType: undefined,
|
|
942
943
|
webClientPreload: undefined,
|
|
944
|
+
isVipMeeting: false,
|
|
943
945
|
},
|
|
944
946
|
eventId: 'my-fake-id',
|
|
945
947
|
origin: {
|
|
@@ -979,6 +981,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
979
981
|
isConvergedArchitectureEnabled: undefined,
|
|
980
982
|
webexSubServiceType: undefined,
|
|
981
983
|
webClientPreload: undefined,
|
|
984
|
+
isVipMeeting: false,
|
|
982
985
|
},
|
|
983
986
|
eventId: 'my-fake-id',
|
|
984
987
|
origin: {
|
|
@@ -1054,6 +1057,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1054
1057
|
isConvergedArchitectureEnabled: undefined,
|
|
1055
1058
|
webexSubServiceType: undefined,
|
|
1056
1059
|
webClientPreload: undefined,
|
|
1060
|
+
isVipMeeting: false,
|
|
1057
1061
|
},
|
|
1058
1062
|
options
|
|
1059
1063
|
);
|
|
@@ -1082,6 +1086,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1082
1086
|
isConvergedArchitectureEnabled: undefined,
|
|
1083
1087
|
webexSubServiceType: undefined,
|
|
1084
1088
|
webClientPreload: undefined,
|
|
1089
|
+
isVipMeeting: false,
|
|
1085
1090
|
},
|
|
1086
1091
|
eventId: 'my-fake-id',
|
|
1087
1092
|
origin: {
|
|
@@ -1121,6 +1126,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1121
1126
|
isConvergedArchitectureEnabled: undefined,
|
|
1122
1127
|
webexSubServiceType: undefined,
|
|
1123
1128
|
webClientPreload: undefined,
|
|
1129
|
+
isVipMeeting: false,
|
|
1124
1130
|
},
|
|
1125
1131
|
eventId: 'my-fake-id',
|
|
1126
1132
|
origin: {
|
|
@@ -1197,6 +1203,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1197
1203
|
isConvergedArchitectureEnabled: undefined,
|
|
1198
1204
|
webexSubServiceType: undefined,
|
|
1199
1205
|
webClientPreload: undefined,
|
|
1206
|
+
isVipMeeting: false,
|
|
1200
1207
|
},
|
|
1201
1208
|
options
|
|
1202
1209
|
);
|
|
@@ -1226,6 +1233,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1226
1233
|
isConvergedArchitectureEnabled: undefined,
|
|
1227
1234
|
webexSubServiceType: undefined,
|
|
1228
1235
|
webClientPreload: undefined,
|
|
1236
|
+
isVipMeeting: false,
|
|
1229
1237
|
},
|
|
1230
1238
|
eventId: 'my-fake-id',
|
|
1231
1239
|
origin: {
|
|
@@ -1266,6 +1274,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1266
1274
|
isConvergedArchitectureEnabled: undefined,
|
|
1267
1275
|
webexSubServiceType: undefined,
|
|
1268
1276
|
webClientPreload: undefined,
|
|
1277
|
+
isVipMeeting: false,
|
|
1269
1278
|
},
|
|
1270
1279
|
eventId: 'my-fake-id',
|
|
1271
1280
|
origin: {
|
|
@@ -1341,6 +1350,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1341
1350
|
userType: 'host',
|
|
1342
1351
|
isConvergedArchitectureEnabled: undefined,
|
|
1343
1352
|
webexSubServiceType: undefined,
|
|
1353
|
+
isVipMeeting: false,
|
|
1344
1354
|
},
|
|
1345
1355
|
options
|
|
1346
1356
|
);
|
|
@@ -1370,6 +1380,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1370
1380
|
userType: 'host',
|
|
1371
1381
|
isConvergedArchitectureEnabled: undefined,
|
|
1372
1382
|
webexSubServiceType: undefined,
|
|
1383
|
+
isVipMeeting: false,
|
|
1373
1384
|
},
|
|
1374
1385
|
eventId: 'my-fake-id',
|
|
1375
1386
|
origin: {
|
|
@@ -1410,6 +1421,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1410
1421
|
userType: 'host',
|
|
1411
1422
|
isConvergedArchitectureEnabled: undefined,
|
|
1412
1423
|
webexSubServiceType: undefined,
|
|
1424
|
+
isVipMeeting: false,
|
|
1413
1425
|
},
|
|
1414
1426
|
eventId: 'my-fake-id',
|
|
1415
1427
|
origin: {
|
|
@@ -1487,6 +1499,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1487
1499
|
isConvergedArchitectureEnabled: undefined,
|
|
1488
1500
|
webexSubServiceType: undefined,
|
|
1489
1501
|
webClientPreload: undefined,
|
|
1502
|
+
isVipMeeting: false,
|
|
1490
1503
|
},
|
|
1491
1504
|
options
|
|
1492
1505
|
);
|
|
@@ -1518,6 +1531,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1518
1531
|
isConvergedArchitectureEnabled: undefined,
|
|
1519
1532
|
webexSubServiceType: undefined,
|
|
1520
1533
|
webClientPreload: undefined,
|
|
1534
|
+
isVipMeeting: false,
|
|
1521
1535
|
},
|
|
1522
1536
|
eventId: 'my-fake-id',
|
|
1523
1537
|
origin: {
|
|
@@ -1560,6 +1574,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1560
1574
|
isConvergedArchitectureEnabled: undefined,
|
|
1561
1575
|
webexSubServiceType: undefined,
|
|
1562
1576
|
webClientPreload: undefined,
|
|
1577
|
+
isVipMeeting: false,
|
|
1563
1578
|
},
|
|
1564
1579
|
eventId: 'my-fake-id',
|
|
1565
1580
|
origin: {
|
|
@@ -1950,6 +1965,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1950
1965
|
isConvergedArchitectureEnabled: undefined,
|
|
1951
1966
|
webexSubServiceType: undefined,
|
|
1952
1967
|
webClientPreload: undefined,
|
|
1968
|
+
isVipMeeting: false,
|
|
1953
1969
|
},
|
|
1954
1970
|
eventId: 'my-fake-id',
|
|
1955
1971
|
origin: {
|
|
@@ -2005,6 +2021,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
2005
2021
|
isConvergedArchitectureEnabled: undefined,
|
|
2006
2022
|
webexSubServiceType: undefined,
|
|
2007
2023
|
webClientPreload: undefined,
|
|
2024
|
+
isVipMeeting: false,
|
|
2008
2025
|
},
|
|
2009
2026
|
eventId: 'my-fake-id',
|
|
2010
2027
|
origin: {
|
|
@@ -2098,6 +2115,204 @@ describe('internal-plugin-metrics', () => {
|
|
|
2098
2115
|
});
|
|
2099
2116
|
});
|
|
2100
2117
|
|
|
2118
|
+
it('should submit client event with isVipMeeting: false when vipMeeting is false', () => {
|
|
2119
|
+
const prepareDiagnosticEventSpy = sinon.spy(cd, 'prepareDiagnosticEvent');
|
|
2120
|
+
const submitToCallDiagnosticsSpy = sinon.spy(cd, 'submitToCallDiagnostics');
|
|
2121
|
+
const generateClientEventErrorPayloadSpy = sinon.spy(cd, 'generateClientEventErrorPayload');
|
|
2122
|
+
sinon.stub(cd, 'getOrigin').returns({origin: 'fake-origin'});
|
|
2123
|
+
|
|
2124
|
+
webex.meetings.getBasicMeetingInformation = sinon.stub().returns({
|
|
2125
|
+
...fakeMeeting,
|
|
2126
|
+
meetingInfo: {
|
|
2127
|
+
vipmeeting: false,
|
|
2128
|
+
},
|
|
2129
|
+
});
|
|
2130
|
+
|
|
2131
|
+
const options = {
|
|
2132
|
+
correlationId: 'correlationId',
|
|
2133
|
+
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
2134
|
+
globalMeetingId: 'globalMeetingId1',
|
|
2135
|
+
sessionCorrelationId: 'sessionCorrelationId1',
|
|
2136
|
+
meetingId: fakeMeeting.id,
|
|
2137
|
+
};
|
|
2138
|
+
cd.setMercuryConnectedStatus(true);
|
|
2139
|
+
cd.submitClientEvent({
|
|
2140
|
+
name: 'client.alert.displayed',
|
|
2141
|
+
options,
|
|
2142
|
+
});
|
|
2143
|
+
|
|
2144
|
+
assert.notCalled(generateClientEventErrorPayloadSpy);
|
|
2145
|
+
assert.calledWith(
|
|
2146
|
+
prepareDiagnosticEventSpy,
|
|
2147
|
+
{
|
|
2148
|
+
canProceed: true,
|
|
2149
|
+
eventData: {
|
|
2150
|
+
webClientDomain: 'whatever',
|
|
2151
|
+
isMercuryConnected: true,
|
|
2152
|
+
},
|
|
2153
|
+
identifiers: {
|
|
2154
|
+
correlationId: 'correlationId',
|
|
2155
|
+
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
2156
|
+
globalMeetingId: 'globalMeetingId1',
|
|
2157
|
+
sessionCorrelationId: 'sessionCorrelationId1',
|
|
2158
|
+
deviceId: 'deviceUrl',
|
|
2159
|
+
locusId: 'url',
|
|
2160
|
+
locusSessionId: 'locusSessionId',
|
|
2161
|
+
locusStartTime: 'lastActive',
|
|
2162
|
+
locusUrl: 'locus/url',
|
|
2163
|
+
orgId: 'orgId',
|
|
2164
|
+
userId: 'userId',
|
|
2165
|
+
},
|
|
2166
|
+
loginType: 'login-ci',
|
|
2167
|
+
name: 'client.alert.displayed',
|
|
2168
|
+
userType: 'host',
|
|
2169
|
+
isConvergedArchitectureEnabled: undefined,
|
|
2170
|
+
webexSubServiceType: undefined,
|
|
2171
|
+
webClientPreload: undefined,
|
|
2172
|
+
isVipMeeting: false,
|
|
2173
|
+
},
|
|
2174
|
+
options
|
|
2175
|
+
);
|
|
2176
|
+
assert.calledWith(submitToCallDiagnosticsSpy, {
|
|
2177
|
+
event: {
|
|
2178
|
+
canProceed: true,
|
|
2179
|
+
eventData: {
|
|
2180
|
+
webClientDomain: 'whatever',
|
|
2181
|
+
isMercuryConnected: true,
|
|
2182
|
+
},
|
|
2183
|
+
identifiers: {
|
|
2184
|
+
correlationId: 'correlationId',
|
|
2185
|
+
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
2186
|
+
globalMeetingId: 'globalMeetingId1',
|
|
2187
|
+
sessionCorrelationId: 'sessionCorrelationId1',
|
|
2188
|
+
deviceId: 'deviceUrl',
|
|
2189
|
+
locusId: 'url',
|
|
2190
|
+
locusSessionId: 'locusSessionId',
|
|
2191
|
+
locusStartTime: 'lastActive',
|
|
2192
|
+
locusUrl: 'locus/url',
|
|
2193
|
+
orgId: 'orgId',
|
|
2194
|
+
userId: 'userId',
|
|
2195
|
+
},
|
|
2196
|
+
loginType: 'login-ci',
|
|
2197
|
+
name: 'client.alert.displayed',
|
|
2198
|
+
userType: 'host',
|
|
2199
|
+
isConvergedArchitectureEnabled: undefined,
|
|
2200
|
+
webexSubServiceType: undefined,
|
|
2201
|
+
webClientPreload: undefined,
|
|
2202
|
+
isVipMeeting: false,
|
|
2203
|
+
},
|
|
2204
|
+
eventId: 'my-fake-id',
|
|
2205
|
+
origin: {
|
|
2206
|
+
origin: 'fake-origin',
|
|
2207
|
+
},
|
|
2208
|
+
originTime: {
|
|
2209
|
+
sent: 'not_defined_yet',
|
|
2210
|
+
triggered: now.toISOString(),
|
|
2211
|
+
},
|
|
2212
|
+
senderCountryCode: 'UK',
|
|
2213
|
+
version: 1,
|
|
2214
|
+
});
|
|
2215
|
+
});
|
|
2216
|
+
|
|
2217
|
+
it('should submit client event with isVipMeeting: true when vipMeeting is true', () => {
|
|
2218
|
+
const prepareDiagnosticEventSpy = sinon.spy(cd, 'prepareDiagnosticEvent');
|
|
2219
|
+
const submitToCallDiagnosticsSpy = sinon.spy(cd, 'submitToCallDiagnostics');
|
|
2220
|
+
const generateClientEventErrorPayloadSpy = sinon.spy(cd, 'generateClientEventErrorPayload');
|
|
2221
|
+
sinon.stub(cd, 'getOrigin').returns({origin: 'fake-origin'});
|
|
2222
|
+
|
|
2223
|
+
webex.meetings.getBasicMeetingInformation = sinon.stub().returns({
|
|
2224
|
+
...fakeMeeting,
|
|
2225
|
+
meetingInfo: {
|
|
2226
|
+
vipmeeting: true,
|
|
2227
|
+
},
|
|
2228
|
+
});
|
|
2229
|
+
|
|
2230
|
+
const options = {
|
|
2231
|
+
correlationId: 'correlationId',
|
|
2232
|
+
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
2233
|
+
globalMeetingId: 'globalMeetingId1',
|
|
2234
|
+
sessionCorrelationId: 'sessionCorrelationId1',
|
|
2235
|
+
meetingId: fakeMeeting.id,
|
|
2236
|
+
};
|
|
2237
|
+
cd.setMercuryConnectedStatus(true);
|
|
2238
|
+
cd.submitClientEvent({
|
|
2239
|
+
name: 'client.alert.displayed',
|
|
2240
|
+
options,
|
|
2241
|
+
});
|
|
2242
|
+
|
|
2243
|
+
assert.notCalled(generateClientEventErrorPayloadSpy);
|
|
2244
|
+
assert.calledWith(
|
|
2245
|
+
prepareDiagnosticEventSpy,
|
|
2246
|
+
{
|
|
2247
|
+
canProceed: true,
|
|
2248
|
+
eventData: {
|
|
2249
|
+
webClientDomain: 'whatever',
|
|
2250
|
+
isMercuryConnected: true,
|
|
2251
|
+
},
|
|
2252
|
+
identifiers: {
|
|
2253
|
+
correlationId: 'correlationId',
|
|
2254
|
+
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
2255
|
+
globalMeetingId: 'globalMeetingId1',
|
|
2256
|
+
sessionCorrelationId: 'sessionCorrelationId1',
|
|
2257
|
+
deviceId: 'deviceUrl',
|
|
2258
|
+
locusId: 'url',
|
|
2259
|
+
locusSessionId: 'locusSessionId',
|
|
2260
|
+
locusStartTime: 'lastActive',
|
|
2261
|
+
locusUrl: 'locus/url',
|
|
2262
|
+
orgId: 'orgId',
|
|
2263
|
+
userId: 'userId',
|
|
2264
|
+
},
|
|
2265
|
+
loginType: 'login-ci',
|
|
2266
|
+
name: 'client.alert.displayed',
|
|
2267
|
+
userType: 'host',
|
|
2268
|
+
isConvergedArchitectureEnabled: undefined,
|
|
2269
|
+
webexSubServiceType: undefined,
|
|
2270
|
+
webClientPreload: undefined,
|
|
2271
|
+
isVipMeeting: true,
|
|
2272
|
+
},
|
|
2273
|
+
options
|
|
2274
|
+
);
|
|
2275
|
+
assert.calledWith(submitToCallDiagnosticsSpy, {
|
|
2276
|
+
event: {
|
|
2277
|
+
canProceed: true,
|
|
2278
|
+
eventData: {
|
|
2279
|
+
webClientDomain: 'whatever',
|
|
2280
|
+
isMercuryConnected: true,
|
|
2281
|
+
},
|
|
2282
|
+
identifiers: {
|
|
2283
|
+
correlationId: 'correlationId',
|
|
2284
|
+
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
2285
|
+
globalMeetingId: 'globalMeetingId1',
|
|
2286
|
+
sessionCorrelationId: 'sessionCorrelationId1',
|
|
2287
|
+
deviceId: 'deviceUrl',
|
|
2288
|
+
locusId: 'url',
|
|
2289
|
+
locusSessionId: 'locusSessionId',
|
|
2290
|
+
locusStartTime: 'lastActive',
|
|
2291
|
+
locusUrl: 'locus/url',
|
|
2292
|
+
orgId: 'orgId',
|
|
2293
|
+
userId: 'userId',
|
|
2294
|
+
},
|
|
2295
|
+
loginType: 'login-ci',
|
|
2296
|
+
name: 'client.alert.displayed',
|
|
2297
|
+
userType: 'host',
|
|
2298
|
+
isConvergedArchitectureEnabled: undefined,
|
|
2299
|
+
webexSubServiceType: undefined,
|
|
2300
|
+
webClientPreload: undefined,
|
|
2301
|
+
isVipMeeting: true,
|
|
2302
|
+
},
|
|
2303
|
+
eventId: 'my-fake-id',
|
|
2304
|
+
origin: {
|
|
2305
|
+
origin: 'fake-origin',
|
|
2306
|
+
},
|
|
2307
|
+
originTime: {
|
|
2308
|
+
sent: 'not_defined_yet',
|
|
2309
|
+
triggered: now.toISOString(),
|
|
2310
|
+
},
|
|
2311
|
+
senderCountryCode: 'UK',
|
|
2312
|
+
version: 1,
|
|
2313
|
+
});
|
|
2314
|
+
});
|
|
2315
|
+
|
|
2101
2316
|
it('it should include errors if provided with meetingId', () => {
|
|
2102
2317
|
sinon.stub(cd, 'getOrigin').returns({origin: 'fake-origin'});
|
|
2103
2318
|
const submitToCallDiagnosticsSpy = sinon.spy(cd, 'submitToCallDiagnostics');
|
|
@@ -2158,6 +2373,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
2158
2373
|
isConvergedArchitectureEnabled: undefined,
|
|
2159
2374
|
webexSubServiceType: undefined,
|
|
2160
2375
|
webClientPreload: undefined,
|
|
2376
|
+
isVipMeeting: false,
|
|
2161
2377
|
},
|
|
2162
2378
|
eventId: 'my-fake-id',
|
|
2163
2379
|
origin: {
|
|
@@ -2240,6 +2456,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
2240
2456
|
isConvergedArchitectureEnabled: undefined,
|
|
2241
2457
|
webexSubServiceType: undefined,
|
|
2242
2458
|
webClientPreload: undefined,
|
|
2459
|
+
isVipMeeting: false,
|
|
2243
2460
|
},
|
|
2244
2461
|
eventId: 'my-fake-id',
|
|
2245
2462
|
origin: {
|
|
@@ -2473,6 +2690,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
2473
2690
|
isConvergedArchitectureEnabled: undefined,
|
|
2474
2691
|
webexSubServiceType: undefined,
|
|
2475
2692
|
webClientPreload: undefined,
|
|
2693
|
+
isVipMeeting: false,
|
|
2476
2694
|
},
|
|
2477
2695
|
eventId: 'my-fake-id',
|
|
2478
2696
|
origin: {
|
|
@@ -2563,16 +2781,18 @@ describe('internal-plugin-metrics', () => {
|
|
|
2563
2781
|
});
|
|
2564
2782
|
|
|
2565
2783
|
assert.calledThrice(submitToCallDiagnosticsStub);
|
|
2566
|
-
|
|
2784
|
+
});
|
|
2567
2785
|
|
|
2568
|
-
(
|
|
2569
|
-
[
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2786
|
+
(
|
|
2787
|
+
[
|
|
2788
|
+
['client.media.render.start'],
|
|
2789
|
+
['client.media.render.stop'],
|
|
2790
|
+
['client.media.rx.start'],
|
|
2791
|
+
['client.media.rx.stop'],
|
|
2792
|
+
['client.media.tx.start'],
|
|
2793
|
+
['client.media.tx.stop'],
|
|
2794
|
+
] as const
|
|
2795
|
+
).forEach(([name]) => {
|
|
2576
2796
|
it(`should only send ${name} once per mediaType`, () => {
|
|
2577
2797
|
const options = {
|
|
2578
2798
|
meetingId: fakeMeeting.id,
|
|
@@ -2616,7 +2836,8 @@ describe('internal-plugin-metrics', () => {
|
|
|
2616
2836
|
});
|
|
2617
2837
|
|
|
2618
2838
|
assert.notCalled(submitToCallDiagnosticsStub);
|
|
2619
|
-
assert.neverCalledWithMatch(
|
|
2839
|
+
assert.neverCalledWithMatch(
|
|
2840
|
+
webex.logger.log,
|
|
2620
2841
|
'call-diagnostic-events -> ',
|
|
2621
2842
|
sinon.match(createEventLimitRegex(name, 'mediaType video'))
|
|
2622
2843
|
);
|
|
@@ -2659,7 +2880,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
2659
2880
|
// Send event with different shareInstanceId
|
|
2660
2881
|
cd.submitClientEvent({
|
|
2661
2882
|
name,
|
|
2662
|
-
payload: {
|
|
2883
|
+
payload: {...payload, shareInstanceId: 'instance-2'},
|
|
2663
2884
|
options,
|
|
2664
2885
|
});
|
|
2665
2886
|
|
|
@@ -2667,89 +2888,88 @@ describe('internal-plugin-metrics', () => {
|
|
|
2667
2888
|
});
|
|
2668
2889
|
});
|
|
2669
2890
|
|
|
2670
|
-
([
|
|
2671
|
-
[
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2891
|
+
([['client.roap-message.received'], ['client.roap-message.sent']] as const).forEach(
|
|
2892
|
+
([name]) => {
|
|
2893
|
+
it(`should not send third event of same type and not log warning again for ${name}`, () => {
|
|
2894
|
+
const options = {
|
|
2895
|
+
meetingId: fakeMeeting.id,
|
|
2896
|
+
};
|
|
2897
|
+
const payload = {
|
|
2898
|
+
roap: {
|
|
2899
|
+
messageType: 'OFFER' as const,
|
|
2900
|
+
},
|
|
2901
|
+
};
|
|
2902
|
+
const submitToCallDiagnosticsStub = sinon.stub(cd, 'submitToCallDiagnostics');
|
|
2903
|
+
|
|
2904
|
+
// Clear any existing call history to get accurate counts
|
|
2905
|
+
webex.logger.log.resetHistory();
|
|
2906
|
+
|
|
2907
|
+
// Send first event
|
|
2908
|
+
cd.submitClientEvent({
|
|
2909
|
+
name,
|
|
2910
|
+
payload,
|
|
2911
|
+
options,
|
|
2912
|
+
});
|
|
2913
|
+
|
|
2914
|
+
assert.calledOnce(submitToCallDiagnosticsStub);
|
|
2915
|
+
submitToCallDiagnosticsStub.resetHistory();
|
|
2916
|
+
|
|
2917
|
+
// Send second event (should trigger warning)
|
|
2918
|
+
cd.submitClientEvent({
|
|
2919
|
+
name,
|
|
2920
|
+
payload,
|
|
2921
|
+
options,
|
|
2922
|
+
});
|
|
2923
|
+
|
|
2924
|
+
assert.notCalled(submitToCallDiagnosticsStub);
|
|
2925
|
+
assert.calledWith(
|
|
2926
|
+
webex.logger.log,
|
|
2927
|
+
'call-diagnostic-events -> ',
|
|
2928
|
+
sinon.match(createEventLimitRegex(name, 'ROAP type OFFER'))
|
|
2929
|
+
);
|
|
2930
|
+
webex.logger.log.resetHistory();
|
|
2931
|
+
|
|
2932
|
+
cd.submitClientEvent({
|
|
2933
|
+
name,
|
|
2934
|
+
payload,
|
|
2935
|
+
options,
|
|
2936
|
+
});
|
|
2937
|
+
|
|
2938
|
+
assert.notCalled(submitToCallDiagnosticsStub);
|
|
2939
|
+
assert.neverCalledWithMatch(
|
|
2940
|
+
webex.logger.log,
|
|
2941
|
+
'call-diagnostic-events -> ',
|
|
2942
|
+
sinon.match(createEventLimitRegex(name, 'ROAP type OFFER'))
|
|
2943
|
+
);
|
|
2717
2944
|
});
|
|
2718
2945
|
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2946
|
+
it(`should handle roap.type instead of roap.messageType for ${name}`, () => {
|
|
2947
|
+
const options = {
|
|
2948
|
+
meetingId: fakeMeeting.id,
|
|
2949
|
+
};
|
|
2950
|
+
const payload = {
|
|
2951
|
+
roap: {
|
|
2952
|
+
type: 'ANSWER' as const,
|
|
2953
|
+
},
|
|
2954
|
+
};
|
|
2955
|
+
const submitToCallDiagnosticsStub = sinon.stub(cd, 'submitToCallDiagnostics');
|
|
2726
2956
|
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
roap: {
|
|
2733
|
-
type: 'ANSWER' as const,
|
|
2734
|
-
},
|
|
2735
|
-
};
|
|
2736
|
-
const submitToCallDiagnosticsStub = sinon.stub(cd, 'submitToCallDiagnostics');
|
|
2957
|
+
cd.submitClientEvent({
|
|
2958
|
+
name,
|
|
2959
|
+
payload,
|
|
2960
|
+
options,
|
|
2961
|
+
});
|
|
2737
2962
|
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2963
|
+
cd.submitClientEvent({
|
|
2964
|
+
name,
|
|
2965
|
+
payload,
|
|
2966
|
+
options,
|
|
2967
|
+
});
|
|
2743
2968
|
|
|
2744
|
-
|
|
2745
|
-
name,
|
|
2746
|
-
payload,
|
|
2747
|
-
options,
|
|
2969
|
+
assert.calledOnce(submitToCallDiagnosticsStub);
|
|
2748
2970
|
});
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
});
|
|
2752
|
-
});
|
|
2971
|
+
}
|
|
2972
|
+
);
|
|
2753
2973
|
});
|
|
2754
2974
|
});
|
|
2755
2975
|
|
|
@@ -3755,6 +3975,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
3755
3975
|
isConvergedArchitectureEnabled: undefined,
|
|
3756
3976
|
webexSubServiceType: undefined,
|
|
3757
3977
|
webClientPreload: undefined,
|
|
3978
|
+
isVipMeeting: false,
|
|
3758
3979
|
},
|
|
3759
3980
|
eventId: 'my-fake-id',
|
|
3760
3981
|
origin: {
|
|
@@ -4123,12 +4344,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
4123
4344
|
payload: {
|
|
4124
4345
|
meetingSummaryInfo: {
|
|
4125
4346
|
featureName: 'syncSystemMuteStatus',
|
|
4126
|
-
featureActions: [
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4347
|
+
featureActions: [
|
|
4348
|
+
{
|
|
4349
|
+
actionName: 'syncMeetingMicUnmuteStatusToSystem',
|
|
4350
|
+
actionId: '14200',
|
|
4351
|
+
isInitialValue: false,
|
|
4352
|
+
clickCount: '1',
|
|
4353
|
+
},
|
|
4354
|
+
],
|
|
4132
4355
|
},
|
|
4133
4356
|
},
|
|
4134
4357
|
options,
|
|
@@ -4149,22 +4372,25 @@ describe('internal-plugin-metrics', () => {
|
|
|
4149
4372
|
locusSessionId: 'locusSessionId',
|
|
4150
4373
|
locusStartTime: 'lastActive',
|
|
4151
4374
|
},
|
|
4152
|
-
eventData: {
|
|
4375
|
+
eventData: {webClientDomain: 'whatever'},
|
|
4153
4376
|
userType: 'host',
|
|
4154
4377
|
loginType: 'login-ci',
|
|
4155
4378
|
isConvergedArchitectureEnabled: undefined,
|
|
4156
4379
|
webexSubServiceType: undefined,
|
|
4157
4380
|
webClientPreload: undefined,
|
|
4381
|
+
isVipMeeting: false,
|
|
4158
4382
|
meetingSummaryInfo: {
|
|
4159
4383
|
featureName: 'syncSystemMuteStatus',
|
|
4160
|
-
featureActions: [
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4384
|
+
featureActions: [
|
|
4385
|
+
{
|
|
4386
|
+
actionName: 'syncMeetingMicUnmuteStatusToSystem',
|
|
4387
|
+
actionId: '14200',
|
|
4388
|
+
isInitialValue: false,
|
|
4389
|
+
clickCount: '1',
|
|
4390
|
+
},
|
|
4391
|
+
],
|
|
4166
4392
|
},
|
|
4167
|
-
key:
|
|
4393
|
+
key: 'UcfFeatureUsage',
|
|
4168
4394
|
},
|
|
4169
4395
|
options
|
|
4170
4396
|
);
|
|
@@ -4177,7 +4403,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
4177
4403
|
},
|
|
4178
4404
|
event: {
|
|
4179
4405
|
canProceed: true,
|
|
4180
|
-
eventData: {
|
|
4406
|
+
eventData: {webClientDomain: 'whatever'},
|
|
4181
4407
|
identifiers: {
|
|
4182
4408
|
correlationId: 'correlationId',
|
|
4183
4409
|
deviceId: 'deviceUrl',
|
|
@@ -4194,16 +4420,19 @@ describe('internal-plugin-metrics', () => {
|
|
|
4194
4420
|
isConvergedArchitectureEnabled: undefined,
|
|
4195
4421
|
webexSubServiceType: undefined,
|
|
4196
4422
|
webClientPreload: undefined,
|
|
4423
|
+
isVipMeeting: false,
|
|
4197
4424
|
meetingSummaryInfo: {
|
|
4198
4425
|
featureName: 'syncSystemMuteStatus',
|
|
4199
|
-
featureActions: [
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4426
|
+
featureActions: [
|
|
4427
|
+
{
|
|
4428
|
+
actionName: 'syncMeetingMicUnmuteStatusToSystem',
|
|
4429
|
+
actionId: '14200',
|
|
4430
|
+
isInitialValue: false,
|
|
4431
|
+
clickCount: '1',
|
|
4432
|
+
},
|
|
4433
|
+
],
|
|
4205
4434
|
},
|
|
4206
|
-
key:
|
|
4435
|
+
key: 'UcfFeatureUsage',
|
|
4207
4436
|
},
|
|
4208
4437
|
originTime: {
|
|
4209
4438
|
sent: 'not_defined_yet',
|
|
@@ -4244,12 +4473,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
4244
4473
|
payload: {
|
|
4245
4474
|
meetingSummaryInfo: {
|
|
4246
4475
|
featureName: 'syncSystemMuteStatus',
|
|
4247
|
-
featureActions: [
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4476
|
+
featureActions: [
|
|
4477
|
+
{
|
|
4478
|
+
actionName: 'syncMeetingMicUnmuteStatusToSystem',
|
|
4479
|
+
actionId: '14200',
|
|
4480
|
+
isInitialValue: false,
|
|
4481
|
+
clickCount: '1',
|
|
4482
|
+
},
|
|
4483
|
+
],
|
|
4253
4484
|
},
|
|
4254
4485
|
},
|
|
4255
4486
|
delaySubmitEvent: true,
|
|
@@ -4261,12 +4492,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
4261
4492
|
payload: {
|
|
4262
4493
|
meetingSummaryInfo: {
|
|
4263
4494
|
featureName: 'syncSystemVideoStatus',
|
|
4264
|
-
featureActions: [
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4495
|
+
featureActions: [
|
|
4496
|
+
{
|
|
4497
|
+
actionName: 'syncMeetingVideoUnmuteStatusToSystem',
|
|
4498
|
+
actionId: '13400',
|
|
4499
|
+
isInitialValue: false,
|
|
4500
|
+
clickCount: '1',
|
|
4501
|
+
},
|
|
4502
|
+
],
|
|
4270
4503
|
},
|
|
4271
4504
|
},
|
|
4272
4505
|
delaySubmitEvent: true,
|
|
@@ -4284,12 +4517,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
4284
4517
|
payload: {
|
|
4285
4518
|
meetingSummaryInfo: {
|
|
4286
4519
|
featureName: 'syncSystemMuteStatus',
|
|
4287
|
-
featureActions: [
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4520
|
+
featureActions: [
|
|
4521
|
+
{
|
|
4522
|
+
actionName: 'syncMeetingMicUnmuteStatusToSystem',
|
|
4523
|
+
actionId: '14200',
|
|
4524
|
+
isInitialValue: false,
|
|
4525
|
+
clickCount: '1',
|
|
4526
|
+
},
|
|
4527
|
+
],
|
|
4293
4528
|
},
|
|
4294
4529
|
},
|
|
4295
4530
|
options: {
|
|
@@ -4302,12 +4537,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
4302
4537
|
payload: {
|
|
4303
4538
|
meetingSummaryInfo: {
|
|
4304
4539
|
featureName: 'syncSystemVideoStatus',
|
|
4305
|
-
featureActions: [
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4540
|
+
featureActions: [
|
|
4541
|
+
{
|
|
4542
|
+
actionName: 'syncMeetingVideoUnmuteStatusToSystem',
|
|
4543
|
+
actionId: '13400',
|
|
4544
|
+
isInitialValue: false,
|
|
4545
|
+
clickCount: '1',
|
|
4546
|
+
},
|
|
4547
|
+
],
|
|
4311
4548
|
},
|
|
4312
4549
|
},
|
|
4313
4550
|
options: {
|
|
@@ -4331,17 +4568,17 @@ describe('internal-plugin-metrics', () => {
|
|
|
4331
4568
|
|
|
4332
4569
|
it('should clear event limits for specific correlationId only', () => {
|
|
4333
4570
|
// Use the actual correlationIds from our fakeMeeting fixtures
|
|
4334
|
-
const correlationId1 = fakeMeeting.correlationId;
|
|
4335
|
-
const correlationId2 = fakeMeeting2.correlationId;
|
|
4336
|
-
const options1 = {
|
|
4337
|
-
const options2 = {
|
|
4338
|
-
const payload = {
|
|
4571
|
+
const correlationId1 = fakeMeeting.correlationId; // e.g. 'correlationId1'
|
|
4572
|
+
const correlationId2 = fakeMeeting2.correlationId; // e.g. 'correlationId2'
|
|
4573
|
+
const options1 = {meetingId: fakeMeeting.id};
|
|
4574
|
+
const options2 = {meetingId: fakeMeeting2.id};
|
|
4575
|
+
const payload = {mediaType: 'video' as const};
|
|
4339
4576
|
|
|
4340
4577
|
// Set up events for both correlations to trigger limits
|
|
4341
|
-
cd.submitClientEvent({
|
|
4342
|
-
cd.submitClientEvent({
|
|
4343
|
-
cd.submitClientEvent({
|
|
4344
|
-
cd.submitClientEvent({
|
|
4578
|
+
cd.submitClientEvent({name: 'client.media.render.start', payload, options: options1});
|
|
4579
|
+
cd.submitClientEvent({name: 'client.media.render.start', payload, options: options2});
|
|
4580
|
+
cd.submitClientEvent({name: 'client.media.render.start', payload, options: options1});
|
|
4581
|
+
cd.submitClientEvent({name: 'client.media.render.start', payload, options: options2});
|
|
4345
4582
|
assert.isTrue(cd.eventLimitTracker.size > 0);
|
|
4346
4583
|
assert.isTrue(cd.eventLimitWarningsLogged.size > 0);
|
|
4347
4584
|
|
|
@@ -4352,17 +4589,17 @@ describe('internal-plugin-metrics', () => {
|
|
|
4352
4589
|
const remainingWarningKeys = Array.from(cd.eventLimitWarningsLogged.keys());
|
|
4353
4590
|
|
|
4354
4591
|
// Should have no keys with correlationId1
|
|
4355
|
-
assert.isFalse(remainingTrackerKeys.some(key => key.split(':')[1] === correlationId1));
|
|
4356
|
-
assert.isFalse(remainingWarningKeys.some(key => key.split(':')[1] === correlationId1));
|
|
4592
|
+
assert.isFalse(remainingTrackerKeys.some((key) => key.split(':')[1] === correlationId1));
|
|
4593
|
+
assert.isFalse(remainingWarningKeys.some((key) => key.split(':')[1] === correlationId1));
|
|
4357
4594
|
|
|
4358
4595
|
// Should still have keys with correlationId2
|
|
4359
|
-
assert.isTrue(remainingTrackerKeys.some(key => key.split(':')[1] === correlationId2));
|
|
4360
|
-
assert.isTrue(remainingWarningKeys.some(key => key.split(':')[1] === correlationId2));
|
|
4596
|
+
assert.isTrue(remainingTrackerKeys.some((key) => key.split(':')[1] === correlationId2));
|
|
4597
|
+
assert.isTrue(remainingWarningKeys.some((key) => key.split(':')[1] === correlationId2));
|
|
4361
4598
|
});
|
|
4362
4599
|
|
|
4363
4600
|
it('should handle empty correlationId gracefully', () => {
|
|
4364
|
-
const options = {
|
|
4365
|
-
const payload = {
|
|
4601
|
+
const options = {meetingId: fakeMeeting.id};
|
|
4602
|
+
const payload = {mediaType: 'video' as const};
|
|
4366
4603
|
|
|
4367
4604
|
// Set up some tracking data
|
|
4368
4605
|
cd.submitClientEvent({
|
|
@@ -4390,8 +4627,8 @@ describe('internal-plugin-metrics', () => {
|
|
|
4390
4627
|
});
|
|
4391
4628
|
|
|
4392
4629
|
it('should handle non-existent correlationId gracefully', () => {
|
|
4393
|
-
const options = {
|
|
4394
|
-
const payload = {
|
|
4630
|
+
const options = {meetingId: fakeMeeting.id};
|
|
4631
|
+
const payload = {mediaType: 'video' as const};
|
|
4395
4632
|
|
|
4396
4633
|
// Set up some tracking data
|
|
4397
4634
|
cd.submitClientEvent({
|
|
@@ -4412,10 +4649,10 @@ describe('internal-plugin-metrics', () => {
|
|
|
4412
4649
|
|
|
4413
4650
|
it('should clear multiple event types for the same correlationId', () => {
|
|
4414
4651
|
const correlationId = fakeMeeting.correlationId;
|
|
4415
|
-
const options = {
|
|
4416
|
-
const videoPayload = {
|
|
4417
|
-
const audioPayload = {
|
|
4418
|
-
const roapPayload = {
|
|
4652
|
+
const options = {meetingId: fakeMeeting.id};
|
|
4653
|
+
const videoPayload = {mediaType: 'video' as const};
|
|
4654
|
+
const audioPayload = {mediaType: 'audio' as const};
|
|
4655
|
+
const roapPayload = {roap: {messageType: 'OFFER' as const}};
|
|
4419
4656
|
|
|
4420
4657
|
// Set up multiple event types for the same correlation
|
|
4421
4658
|
cd.submitClientEvent({
|
|
@@ -4468,8 +4705,8 @@ describe('internal-plugin-metrics', () => {
|
|
|
4468
4705
|
|
|
4469
4706
|
it('should allow events to be sent again after clearing limits for correlationId', () => {
|
|
4470
4707
|
const correlationId = fakeMeeting.correlationId;
|
|
4471
|
-
const options = {
|
|
4472
|
-
const payload = {
|
|
4708
|
+
const options = {meetingId: fakeMeeting.id};
|
|
4709
|
+
const payload = {mediaType: 'video' as const};
|
|
4473
4710
|
const submitToCallDiagnosticsStub = sinon.stub(cd, 'submitToCallDiagnostics');
|
|
4474
4711
|
|
|
4475
4712
|
// Send first event (should succeed)
|