@webex/internal-plugin-metrics 3.12.0-mobius-socket.2 → 3.12.0-mobius-socket.4
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 +68 -51
- package/dist/call-diagnostic/call-diagnostic-metrics-latencies.js.map +1 -1
- package/dist/call-diagnostic/call-diagnostic-metrics.js +7 -2
- package/dist/call-diagnostic/call-diagnostic-metrics.js.map +1 -1
- package/dist/call-diagnostic/call-diagnostic-metrics.util.js +2 -2
- package/dist/call-diagnostic/call-diagnostic-metrics.util.js.map +1 -1
- package/dist/call-diagnostic/config.js +2 -1
- package/dist/call-diagnostic/config.js.map +1 -1
- package/dist/metrics.js +1 -1
- package/dist/metrics.types.js.map +1 -1
- package/dist/types/call-diagnostic/call-diagnostic-metrics-latencies.d.ts +9 -0
- package/dist/types/call-diagnostic/call-diagnostic-metrics.d.ts +16 -13
- package/dist/types/metrics.types.d.ts +2 -2
- package/package.json +11 -11
- package/src/call-diagnostic/call-diagnostic-metrics-latencies.ts +140 -69
- package/src/call-diagnostic/call-diagnostic-metrics.ts +6 -0
- package/src/call-diagnostic/call-diagnostic-metrics.util.ts +2 -1
- package/src/call-diagnostic/config.ts +1 -0
- package/src/metrics.types.ts +1 -1
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics-batcher.ts +14 -2
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics-latencies.ts +243 -288
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.ts +403 -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
|
|
|
@@ -3680,6 +3900,15 @@ describe('internal-plugin-metrics', () => {
|
|
|
3680
3900
|
assert.deepEqual(cd.getSubServiceType(fakeMeeting), 'Webcast');
|
|
3681
3901
|
});
|
|
3682
3902
|
|
|
3903
|
+
it('returns subServicetype as LargeScaleWebinar when meeting is converged Webinar and enable large scale', () => {
|
|
3904
|
+
fakeMeeting.meetingInfo = {
|
|
3905
|
+
enableEvent: true,
|
|
3906
|
+
enableConvergedArchitecture: true,
|
|
3907
|
+
enableConvergedWebinarLargeScale: true,
|
|
3908
|
+
};
|
|
3909
|
+
assert.deepEqual(cd.getSubServiceType(fakeMeeting), 'LargeScaleWebinar');
|
|
3910
|
+
});
|
|
3911
|
+
|
|
3683
3912
|
it('returns subServicetype as undefined when correct parameters are not found', () => {
|
|
3684
3913
|
fakeMeeting.meetingInfo = {};
|
|
3685
3914
|
assert.deepEqual(cd.getSubServiceType(fakeMeeting), undefined);
|
|
@@ -3746,6 +3975,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
3746
3975
|
isConvergedArchitectureEnabled: undefined,
|
|
3747
3976
|
webexSubServiceType: undefined,
|
|
3748
3977
|
webClientPreload: undefined,
|
|
3978
|
+
isVipMeeting: false,
|
|
3749
3979
|
},
|
|
3750
3980
|
eventId: 'my-fake-id',
|
|
3751
3981
|
origin: {
|
|
@@ -4114,12 +4344,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
4114
4344
|
payload: {
|
|
4115
4345
|
meetingSummaryInfo: {
|
|
4116
4346
|
featureName: 'syncSystemMuteStatus',
|
|
4117
|
-
featureActions: [
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4347
|
+
featureActions: [
|
|
4348
|
+
{
|
|
4349
|
+
actionName: 'syncMeetingMicUnmuteStatusToSystem',
|
|
4350
|
+
actionId: '14200',
|
|
4351
|
+
isInitialValue: false,
|
|
4352
|
+
clickCount: '1',
|
|
4353
|
+
},
|
|
4354
|
+
],
|
|
4123
4355
|
},
|
|
4124
4356
|
},
|
|
4125
4357
|
options,
|
|
@@ -4140,22 +4372,25 @@ describe('internal-plugin-metrics', () => {
|
|
|
4140
4372
|
locusSessionId: 'locusSessionId',
|
|
4141
4373
|
locusStartTime: 'lastActive',
|
|
4142
4374
|
},
|
|
4143
|
-
eventData: {
|
|
4375
|
+
eventData: {webClientDomain: 'whatever'},
|
|
4144
4376
|
userType: 'host',
|
|
4145
4377
|
loginType: 'login-ci',
|
|
4146
4378
|
isConvergedArchitectureEnabled: undefined,
|
|
4147
4379
|
webexSubServiceType: undefined,
|
|
4148
4380
|
webClientPreload: undefined,
|
|
4381
|
+
isVipMeeting: false,
|
|
4149
4382
|
meetingSummaryInfo: {
|
|
4150
4383
|
featureName: 'syncSystemMuteStatus',
|
|
4151
|
-
featureActions: [
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4384
|
+
featureActions: [
|
|
4385
|
+
{
|
|
4386
|
+
actionName: 'syncMeetingMicUnmuteStatusToSystem',
|
|
4387
|
+
actionId: '14200',
|
|
4388
|
+
isInitialValue: false,
|
|
4389
|
+
clickCount: '1',
|
|
4390
|
+
},
|
|
4391
|
+
],
|
|
4157
4392
|
},
|
|
4158
|
-
key:
|
|
4393
|
+
key: 'UcfFeatureUsage',
|
|
4159
4394
|
},
|
|
4160
4395
|
options
|
|
4161
4396
|
);
|
|
@@ -4168,7 +4403,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
4168
4403
|
},
|
|
4169
4404
|
event: {
|
|
4170
4405
|
canProceed: true,
|
|
4171
|
-
eventData: {
|
|
4406
|
+
eventData: {webClientDomain: 'whatever'},
|
|
4172
4407
|
identifiers: {
|
|
4173
4408
|
correlationId: 'correlationId',
|
|
4174
4409
|
deviceId: 'deviceUrl',
|
|
@@ -4185,16 +4420,19 @@ describe('internal-plugin-metrics', () => {
|
|
|
4185
4420
|
isConvergedArchitectureEnabled: undefined,
|
|
4186
4421
|
webexSubServiceType: undefined,
|
|
4187
4422
|
webClientPreload: undefined,
|
|
4423
|
+
isVipMeeting: false,
|
|
4188
4424
|
meetingSummaryInfo: {
|
|
4189
4425
|
featureName: 'syncSystemMuteStatus',
|
|
4190
|
-
featureActions: [
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4426
|
+
featureActions: [
|
|
4427
|
+
{
|
|
4428
|
+
actionName: 'syncMeetingMicUnmuteStatusToSystem',
|
|
4429
|
+
actionId: '14200',
|
|
4430
|
+
isInitialValue: false,
|
|
4431
|
+
clickCount: '1',
|
|
4432
|
+
},
|
|
4433
|
+
],
|
|
4196
4434
|
},
|
|
4197
|
-
key:
|
|
4435
|
+
key: 'UcfFeatureUsage',
|
|
4198
4436
|
},
|
|
4199
4437
|
originTime: {
|
|
4200
4438
|
sent: 'not_defined_yet',
|
|
@@ -4235,12 +4473,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
4235
4473
|
payload: {
|
|
4236
4474
|
meetingSummaryInfo: {
|
|
4237
4475
|
featureName: 'syncSystemMuteStatus',
|
|
4238
|
-
featureActions: [
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4476
|
+
featureActions: [
|
|
4477
|
+
{
|
|
4478
|
+
actionName: 'syncMeetingMicUnmuteStatusToSystem',
|
|
4479
|
+
actionId: '14200',
|
|
4480
|
+
isInitialValue: false,
|
|
4481
|
+
clickCount: '1',
|
|
4482
|
+
},
|
|
4483
|
+
],
|
|
4244
4484
|
},
|
|
4245
4485
|
},
|
|
4246
4486
|
delaySubmitEvent: true,
|
|
@@ -4252,12 +4492,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
4252
4492
|
payload: {
|
|
4253
4493
|
meetingSummaryInfo: {
|
|
4254
4494
|
featureName: 'syncSystemVideoStatus',
|
|
4255
|
-
featureActions: [
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4495
|
+
featureActions: [
|
|
4496
|
+
{
|
|
4497
|
+
actionName: 'syncMeetingVideoUnmuteStatusToSystem',
|
|
4498
|
+
actionId: '13400',
|
|
4499
|
+
isInitialValue: false,
|
|
4500
|
+
clickCount: '1',
|
|
4501
|
+
},
|
|
4502
|
+
],
|
|
4261
4503
|
},
|
|
4262
4504
|
},
|
|
4263
4505
|
delaySubmitEvent: true,
|
|
@@ -4275,12 +4517,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
4275
4517
|
payload: {
|
|
4276
4518
|
meetingSummaryInfo: {
|
|
4277
4519
|
featureName: 'syncSystemMuteStatus',
|
|
4278
|
-
featureActions: [
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4520
|
+
featureActions: [
|
|
4521
|
+
{
|
|
4522
|
+
actionName: 'syncMeetingMicUnmuteStatusToSystem',
|
|
4523
|
+
actionId: '14200',
|
|
4524
|
+
isInitialValue: false,
|
|
4525
|
+
clickCount: '1',
|
|
4526
|
+
},
|
|
4527
|
+
],
|
|
4284
4528
|
},
|
|
4285
4529
|
},
|
|
4286
4530
|
options: {
|
|
@@ -4293,12 +4537,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
4293
4537
|
payload: {
|
|
4294
4538
|
meetingSummaryInfo: {
|
|
4295
4539
|
featureName: 'syncSystemVideoStatus',
|
|
4296
|
-
featureActions: [
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4540
|
+
featureActions: [
|
|
4541
|
+
{
|
|
4542
|
+
actionName: 'syncMeetingVideoUnmuteStatusToSystem',
|
|
4543
|
+
actionId: '13400',
|
|
4544
|
+
isInitialValue: false,
|
|
4545
|
+
clickCount: '1',
|
|
4546
|
+
},
|
|
4547
|
+
],
|
|
4302
4548
|
},
|
|
4303
4549
|
},
|
|
4304
4550
|
options: {
|
|
@@ -4322,17 +4568,17 @@ describe('internal-plugin-metrics', () => {
|
|
|
4322
4568
|
|
|
4323
4569
|
it('should clear event limits for specific correlationId only', () => {
|
|
4324
4570
|
// Use the actual correlationIds from our fakeMeeting fixtures
|
|
4325
|
-
const correlationId1 = fakeMeeting.correlationId;
|
|
4326
|
-
const correlationId2 = fakeMeeting2.correlationId;
|
|
4327
|
-
const options1 = {
|
|
4328
|
-
const options2 = {
|
|
4329
|
-
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};
|
|
4330
4576
|
|
|
4331
4577
|
// Set up events for both correlations to trigger limits
|
|
4332
|
-
cd.submitClientEvent({
|
|
4333
|
-
cd.submitClientEvent({
|
|
4334
|
-
cd.submitClientEvent({
|
|
4335
|
-
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});
|
|
4336
4582
|
assert.isTrue(cd.eventLimitTracker.size > 0);
|
|
4337
4583
|
assert.isTrue(cd.eventLimitWarningsLogged.size > 0);
|
|
4338
4584
|
|
|
@@ -4343,17 +4589,17 @@ describe('internal-plugin-metrics', () => {
|
|
|
4343
4589
|
const remainingWarningKeys = Array.from(cd.eventLimitWarningsLogged.keys());
|
|
4344
4590
|
|
|
4345
4591
|
// Should have no keys with correlationId1
|
|
4346
|
-
assert.isFalse(remainingTrackerKeys.some(key => key.split(':')[1] === correlationId1));
|
|
4347
|
-
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));
|
|
4348
4594
|
|
|
4349
4595
|
// Should still have keys with correlationId2
|
|
4350
|
-
assert.isTrue(remainingTrackerKeys.some(key => key.split(':')[1] === correlationId2));
|
|
4351
|
-
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));
|
|
4352
4598
|
});
|
|
4353
4599
|
|
|
4354
4600
|
it('should handle empty correlationId gracefully', () => {
|
|
4355
|
-
const options = {
|
|
4356
|
-
const payload = {
|
|
4601
|
+
const options = {meetingId: fakeMeeting.id};
|
|
4602
|
+
const payload = {mediaType: 'video' as const};
|
|
4357
4603
|
|
|
4358
4604
|
// Set up some tracking data
|
|
4359
4605
|
cd.submitClientEvent({
|
|
@@ -4381,8 +4627,8 @@ describe('internal-plugin-metrics', () => {
|
|
|
4381
4627
|
});
|
|
4382
4628
|
|
|
4383
4629
|
it('should handle non-existent correlationId gracefully', () => {
|
|
4384
|
-
const options = {
|
|
4385
|
-
const payload = {
|
|
4630
|
+
const options = {meetingId: fakeMeeting.id};
|
|
4631
|
+
const payload = {mediaType: 'video' as const};
|
|
4386
4632
|
|
|
4387
4633
|
// Set up some tracking data
|
|
4388
4634
|
cd.submitClientEvent({
|
|
@@ -4403,10 +4649,10 @@ describe('internal-plugin-metrics', () => {
|
|
|
4403
4649
|
|
|
4404
4650
|
it('should clear multiple event types for the same correlationId', () => {
|
|
4405
4651
|
const correlationId = fakeMeeting.correlationId;
|
|
4406
|
-
const options = {
|
|
4407
|
-
const videoPayload = {
|
|
4408
|
-
const audioPayload = {
|
|
4409
|
-
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}};
|
|
4410
4656
|
|
|
4411
4657
|
// Set up multiple event types for the same correlation
|
|
4412
4658
|
cd.submitClientEvent({
|
|
@@ -4459,8 +4705,8 @@ describe('internal-plugin-metrics', () => {
|
|
|
4459
4705
|
|
|
4460
4706
|
it('should allow events to be sent again after clearing limits for correlationId', () => {
|
|
4461
4707
|
const correlationId = fakeMeeting.correlationId;
|
|
4462
|
-
const options = {
|
|
4463
|
-
const payload = {
|
|
4708
|
+
const options = {meetingId: fakeMeeting.id};
|
|
4709
|
+
const payload = {mediaType: 'video' as const};
|
|
4464
4710
|
const submitToCallDiagnosticsStub = sinon.stub(cd, 'submitToCallDiagnostics');
|
|
4465
4711
|
|
|
4466
4712
|
// Send first event (should succeed)
|