@webex/internal-plugin-metrics 3.12.0-task-refactor.1 → 3.12.0-webex-services-ready.1
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/batcher.js +3 -0
- package/dist/batcher.js.map +1 -1
- package/dist/call-diagnostic/call-diagnostic-metrics-batcher.js +23 -0
- package/dist/call-diagnostic/call-diagnostic-metrics-batcher.js.map +1 -1
- package/dist/call-diagnostic/call-diagnostic-metrics-latencies.js +68 -50
- package/dist/call-diagnostic/call-diagnostic-metrics-latencies.js.map +1 -1
- package/dist/call-diagnostic/call-diagnostic-metrics.js +60 -8
- package/dist/call-diagnostic/call-diagnostic-metrics.js.map +1 -1
- package/dist/call-diagnostic/call-diagnostic-metrics.util.js +44 -4
- package/dist/call-diagnostic/call-diagnostic-metrics.util.js.map +1 -1
- package/dist/call-diagnostic/config.js +17 -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/generic-metrics.js +8 -6
- package/dist/generic-metrics.js.map +1 -1
- package/dist/index.js +7 -0
- 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 +56 -20
- package/dist/new-metrics.js.map +1 -1
- package/dist/prelogin-metrics-batcher.js +23 -0
- package/dist/prelogin-metrics-batcher.js.map +1 -1
- package/dist/prelogin-metrics.js +106 -0
- package/dist/prelogin-metrics.js.map +1 -0
- package/dist/types/call-diagnostic/call-diagnostic-metrics-latencies.d.ts +9 -0
- package/dist/types/call-diagnostic/call-diagnostic-metrics.d.ts +57 -20
- package/dist/types/call-diagnostic/call-diagnostic-metrics.util.d.ts +23 -2
- package/dist/types/call-diagnostic/config.d.ts +6 -19
- package/dist/types/config.d.ts +16 -15
- package/dist/types/index.d.ts +2 -1
- package/dist/types/metrics.types.d.ts +4 -4
- package/dist/types/new-metrics.d.ts +12 -0
- package/dist/types/prelogin-metrics.d.ts +47 -0
- package/package.json +11 -11
- package/src/batcher.js +4 -0
- package/src/call-diagnostic/call-diagnostic-metrics-batcher.ts +26 -0
- package/src/call-diagnostic/call-diagnostic-metrics-latencies.ts +139 -70
- package/src/call-diagnostic/call-diagnostic-metrics.ts +52 -1
- package/src/call-diagnostic/call-diagnostic-metrics.util.ts +49 -2
- package/src/call-diagnostic/config.ts +15 -0
- package/src/config.js +1 -0
- package/src/generic-metrics.ts +6 -6
- package/src/index.ts +2 -0
- package/src/metrics.types.ts +3 -3
- package/src/new-metrics.ts +42 -0
- package/src/prelogin-metrics-batcher.ts +26 -0
- package/src/prelogin-metrics.ts +94 -0
- package/test/unit/spec/batcher.js +43 -0
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics-batcher.ts +183 -11
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics-latencies.ts +324 -366
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.ts +724 -159
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.util.ts +92 -3
- package/test/unit/spec/prelogin-metrics-batcher.ts +190 -36
- package/test/unit/spec/prelogin-metrics.ts +132 -0
|
@@ -44,6 +44,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
44
44
|
locusInfo: {
|
|
45
45
|
fullState: {
|
|
46
46
|
lastActive: 'lastActive',
|
|
47
|
+
sessionId: 'locusSessionId',
|
|
47
48
|
},
|
|
48
49
|
},
|
|
49
50
|
meetingInfo: {},
|
|
@@ -431,6 +432,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
431
432
|
correlationId: 'correlationId',
|
|
432
433
|
deviceId: 'deviceUrl',
|
|
433
434
|
locusId: 'url',
|
|
435
|
+
locusSessionId: 'locusSessionId',
|
|
434
436
|
locusStartTime: 'lastActive',
|
|
435
437
|
locusUrl: 'locus/url',
|
|
436
438
|
machineId: 'installationId',
|
|
@@ -460,6 +462,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
460
462
|
correlationId: 'correlationId',
|
|
461
463
|
deviceId: 'deviceUrl',
|
|
462
464
|
locusId: 'url',
|
|
465
|
+
locusSessionId: 'locusSessionId',
|
|
463
466
|
locusStartTime: 'lastActive',
|
|
464
467
|
locusUrl: 'locus/url',
|
|
465
468
|
machineId: 'installationId',
|
|
@@ -490,6 +493,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
490
493
|
sessionCorrelationId: 'sessionCorrelationId',
|
|
491
494
|
deviceId: 'deviceUrl',
|
|
492
495
|
locusId: 'url',
|
|
496
|
+
locusSessionId: 'locusSessionId',
|
|
493
497
|
locusStartTime: 'lastActive',
|
|
494
498
|
locusUrl: 'locus/url',
|
|
495
499
|
machineId: 'installationId',
|
|
@@ -519,6 +523,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
519
523
|
sessionCorrelationId: 'sessionCorrelationId',
|
|
520
524
|
deviceId: 'deviceUrl',
|
|
521
525
|
locusId: 'url',
|
|
526
|
+
locusSessionId: 'locusSessionId',
|
|
522
527
|
locusStartTime: 'lastActive',
|
|
523
528
|
locusUrl: 'locus/url',
|
|
524
529
|
machineId: 'installationId',
|
|
@@ -554,6 +559,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
554
559
|
globalMeetingId: 'globalMeetingId1',
|
|
555
560
|
deviceId: 'deviceUrl',
|
|
556
561
|
locusId: 'url',
|
|
562
|
+
locusSessionId: 'locusSessionId',
|
|
557
563
|
locusStartTime: 'lastActive',
|
|
558
564
|
locusUrl: 'locus/url',
|
|
559
565
|
mediaAgentAlias: 'mediaAgentAlias',
|
|
@@ -586,6 +592,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
586
592
|
globalMeetingId: 'globalMeetingId1',
|
|
587
593
|
deviceId: 'deviceUrl',
|
|
588
594
|
locusId: 'url',
|
|
595
|
+
locusSessionId: 'locusSessionId',
|
|
589
596
|
locusStartTime: 'lastActive',
|
|
590
597
|
locusUrl: 'locus/url',
|
|
591
598
|
mediaAgentAlias: 'mediaAgentAlias',
|
|
@@ -620,6 +627,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
620
627
|
deviceId: 'deviceUrl',
|
|
621
628
|
locusId: 'url',
|
|
622
629
|
locusStartTime: 'lastActive',
|
|
630
|
+
locusSessionId: 'locusSessionId',
|
|
623
631
|
locusUrl: 'locus/url',
|
|
624
632
|
mediaAgentAlias: 'mediaAgentAlias',
|
|
625
633
|
mediaAgentGroupId: 'mediaAgentGroupId',
|
|
@@ -655,6 +663,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
655
663
|
globalMeetingId: 'globalMeetingId1',
|
|
656
664
|
deviceId: 'deviceUrl',
|
|
657
665
|
locusId: 'url',
|
|
666
|
+
locusSessionId: 'locusSessionId',
|
|
658
667
|
locusStartTime: 'lastActive',
|
|
659
668
|
locusUrl: 'locus/url',
|
|
660
669
|
mediaAgentAlias: 'mediaAgentAlias',
|
|
@@ -848,6 +857,77 @@ describe('internal-plugin-metrics', () => {
|
|
|
848
857
|
});
|
|
849
858
|
});
|
|
850
859
|
|
|
860
|
+
describe('#prepareDiagnosticEvent isAutomatedUser field', () => {
|
|
861
|
+
it('should set isAutomatedUser to false when window is not defined', () => {
|
|
862
|
+
const options = {meetingId: fakeMeeting.id};
|
|
863
|
+
sinon.stub(cd, 'getOrigin').returns({origin: 'fake-origin'});
|
|
864
|
+
|
|
865
|
+
const res = cd.prepareDiagnosticEvent(
|
|
866
|
+
{
|
|
867
|
+
canProceed: true,
|
|
868
|
+
identifiers: {correlationId: 'test-id'},
|
|
869
|
+
name: 'client.alert.displayed',
|
|
870
|
+
isAutomatedUser: false,
|
|
871
|
+
},
|
|
872
|
+
options
|
|
873
|
+
);
|
|
874
|
+
|
|
875
|
+
// In the test environment, isAutomatedUser should be false since we're not in a webdriver environment
|
|
876
|
+
assert.isFalse(
|
|
877
|
+
res.event.isAutomatedUser,
|
|
878
|
+
'isAutomatedUser should be false in non-webdriver test environment'
|
|
879
|
+
);
|
|
880
|
+
});
|
|
881
|
+
|
|
882
|
+
it('should include isAutomatedUser field in the returned event', () => {
|
|
883
|
+
const options = {meetingId: fakeMeeting.id};
|
|
884
|
+
sinon.stub(cd, 'getOrigin').returns({origin: 'fake-origin'});
|
|
885
|
+
|
|
886
|
+
const res = cd.prepareDiagnosticEvent(
|
|
887
|
+
{
|
|
888
|
+
canProceed: true,
|
|
889
|
+
identifiers: {correlationId: 'test-id'},
|
|
890
|
+
name: 'client.alert.displayed',
|
|
891
|
+
isAutomatedUser: false,
|
|
892
|
+
},
|
|
893
|
+
options
|
|
894
|
+
);
|
|
895
|
+
|
|
896
|
+
// Verify the isAutomatedUser field is present in the event
|
|
897
|
+
assert.isDefined(res.event.isAutomatedUser, 'isAutomatedUser field should be defined');
|
|
898
|
+
assert.isBoolean(res.event.isAutomatedUser, 'isAutomatedUser should be a boolean');
|
|
899
|
+
});
|
|
900
|
+
|
|
901
|
+
it('should set isAutomatedUser to true when navigator.webdriver is true', () => {
|
|
902
|
+
const originalDescriptor = Object.getOwnPropertyDescriptor(global, 'navigator');
|
|
903
|
+
Object.defineProperty(global, 'navigator', {
|
|
904
|
+
value: {webdriver: true},
|
|
905
|
+
configurable: true,
|
|
906
|
+
writable: true,
|
|
907
|
+
});
|
|
908
|
+
|
|
909
|
+
const prepareDiagnosticEventSpy = sinon.spy(cd, 'prepareDiagnosticEvent');
|
|
910
|
+
sinon.stub(cd, 'getOrigin').returns({origin: 'fake-origin'});
|
|
911
|
+
cd.setMercuryConnectedStatus(true);
|
|
912
|
+
|
|
913
|
+
cd.submitClientEvent({
|
|
914
|
+
name: 'client.alert.displayed',
|
|
915
|
+
options: {correlationId: 'correlationId'},
|
|
916
|
+
});
|
|
917
|
+
|
|
918
|
+
assert.isTrue(
|
|
919
|
+
prepareDiagnosticEventSpy.firstCall.args[0].isAutomatedUser,
|
|
920
|
+
'isAutomatedUser should be true when navigator.webdriver is set'
|
|
921
|
+
);
|
|
922
|
+
|
|
923
|
+
if (originalDescriptor) {
|
|
924
|
+
Object.defineProperty(global, 'navigator', originalDescriptor);
|
|
925
|
+
} else {
|
|
926
|
+
delete (global as any).navigator;
|
|
927
|
+
}
|
|
928
|
+
});
|
|
929
|
+
});
|
|
930
|
+
|
|
851
931
|
describe('#submitClientEvent', () => {
|
|
852
932
|
it('should submit client event successfully with meetingId', () => {
|
|
853
933
|
const prepareDiagnosticEventSpy = sinon.spy(cd, 'prepareDiagnosticEvent');
|
|
@@ -889,6 +969,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
889
969
|
correlationId: 'correlationId',
|
|
890
970
|
deviceId: 'deviceUrl',
|
|
891
971
|
locusId: 'url',
|
|
972
|
+
locusSessionId: 'locusSessionId',
|
|
892
973
|
locusStartTime: 'lastActive',
|
|
893
974
|
locusUrl: 'locus/url',
|
|
894
975
|
mediaAgentAlias: 'alias',
|
|
@@ -897,11 +978,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
897
978
|
userId: 'userId',
|
|
898
979
|
},
|
|
899
980
|
loginType: 'login-ci',
|
|
981
|
+
telemetryOptOut: undefined,
|
|
900
982
|
name: 'client.alert.displayed',
|
|
901
983
|
userType: 'host',
|
|
902
984
|
isConvergedArchitectureEnabled: undefined,
|
|
903
985
|
webexSubServiceType: undefined,
|
|
904
986
|
webClientPreload: undefined,
|
|
987
|
+
isVipMeeting: false,
|
|
988
|
+
isAutomatedUser: false,
|
|
905
989
|
},
|
|
906
990
|
options
|
|
907
991
|
);
|
|
@@ -916,6 +1000,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
916
1000
|
correlationId: 'correlationId',
|
|
917
1001
|
deviceId: 'deviceUrl',
|
|
918
1002
|
locusId: 'url',
|
|
1003
|
+
locusSessionId: 'locusSessionId',
|
|
919
1004
|
locusStartTime: 'lastActive',
|
|
920
1005
|
locusUrl: 'locus/url',
|
|
921
1006
|
mediaAgentAlias: 'alias',
|
|
@@ -924,11 +1009,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
924
1009
|
userId: 'userId',
|
|
925
1010
|
},
|
|
926
1011
|
loginType: 'login-ci',
|
|
1012
|
+
telemetryOptOut: undefined,
|
|
927
1013
|
name: 'client.alert.displayed',
|
|
928
1014
|
userType: 'host',
|
|
929
1015
|
isConvergedArchitectureEnabled: undefined,
|
|
930
1016
|
webexSubServiceType: undefined,
|
|
931
1017
|
webClientPreload: undefined,
|
|
1018
|
+
isVipMeeting: false,
|
|
1019
|
+
isAutomatedUser: false,
|
|
932
1020
|
},
|
|
933
1021
|
eventId: 'my-fake-id',
|
|
934
1022
|
origin: {
|
|
@@ -954,6 +1042,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
954
1042
|
correlationId: 'correlationId',
|
|
955
1043
|
deviceId: 'deviceUrl',
|
|
956
1044
|
locusId: 'url',
|
|
1045
|
+
locusSessionId: 'locusSessionId',
|
|
957
1046
|
locusStartTime: 'lastActive',
|
|
958
1047
|
locusUrl: 'locus/url',
|
|
959
1048
|
mediaAgentAlias: 'alias',
|
|
@@ -962,11 +1051,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
962
1051
|
userId: 'userId',
|
|
963
1052
|
},
|
|
964
1053
|
loginType: 'login-ci',
|
|
1054
|
+
telemetryOptOut: undefined,
|
|
965
1055
|
name: 'client.alert.displayed',
|
|
966
1056
|
userType: 'host',
|
|
967
1057
|
isConvergedArchitectureEnabled: undefined,
|
|
968
1058
|
webexSubServiceType: undefined,
|
|
969
1059
|
webClientPreload: undefined,
|
|
1060
|
+
isVipMeeting: false,
|
|
1061
|
+
isAutomatedUser: false,
|
|
970
1062
|
},
|
|
971
1063
|
eventId: 'my-fake-id',
|
|
972
1064
|
origin: {
|
|
@@ -1028,6 +1120,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1028
1120
|
correlationId: 'correlationId',
|
|
1029
1121
|
deviceId: 'deviceUrl',
|
|
1030
1122
|
locusId: 'url',
|
|
1123
|
+
locusSessionId: 'locusSessionId',
|
|
1031
1124
|
locusStartTime: 'lastActive',
|
|
1032
1125
|
locusUrl: 'locus/url',
|
|
1033
1126
|
mediaAgentAlias: 'alias',
|
|
@@ -1036,11 +1129,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
1036
1129
|
userId: 'userId',
|
|
1037
1130
|
},
|
|
1038
1131
|
loginType: 'login-ci',
|
|
1132
|
+
telemetryOptOut: undefined,
|
|
1039
1133
|
name: 'client.alert.displayed',
|
|
1040
1134
|
userType: 'host',
|
|
1041
1135
|
isConvergedArchitectureEnabled: undefined,
|
|
1042
1136
|
webexSubServiceType: undefined,
|
|
1043
1137
|
webClientPreload: undefined,
|
|
1138
|
+
isVipMeeting: false,
|
|
1139
|
+
isAutomatedUser: false,
|
|
1044
1140
|
},
|
|
1045
1141
|
options
|
|
1046
1142
|
);
|
|
@@ -1055,6 +1151,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1055
1151
|
correlationId: 'correlationId',
|
|
1056
1152
|
deviceId: 'deviceUrl',
|
|
1057
1153
|
locusId: 'url',
|
|
1154
|
+
locusSessionId: 'locusSessionId',
|
|
1058
1155
|
locusStartTime: 'lastActive',
|
|
1059
1156
|
locusUrl: 'locus/url',
|
|
1060
1157
|
mediaAgentAlias: 'alias',
|
|
@@ -1063,11 +1160,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
1063
1160
|
userId: 'userId',
|
|
1064
1161
|
},
|
|
1065
1162
|
loginType: 'login-ci',
|
|
1163
|
+
telemetryOptOut: undefined,
|
|
1066
1164
|
name: 'client.alert.displayed',
|
|
1067
1165
|
userType: 'host',
|
|
1068
1166
|
isConvergedArchitectureEnabled: undefined,
|
|
1069
1167
|
webexSubServiceType: undefined,
|
|
1070
1168
|
webClientPreload: undefined,
|
|
1169
|
+
isVipMeeting: false,
|
|
1170
|
+
isAutomatedUser: false,
|
|
1071
1171
|
},
|
|
1072
1172
|
eventId: 'my-fake-id',
|
|
1073
1173
|
origin: {
|
|
@@ -1093,6 +1193,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1093
1193
|
correlationId: 'correlationId',
|
|
1094
1194
|
deviceId: 'deviceUrl',
|
|
1095
1195
|
locusId: 'url',
|
|
1196
|
+
locusSessionId: 'locusSessionId',
|
|
1096
1197
|
locusStartTime: 'lastActive',
|
|
1097
1198
|
locusUrl: 'locus/url',
|
|
1098
1199
|
mediaAgentAlias: 'alias',
|
|
@@ -1101,11 +1202,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
1101
1202
|
userId: 'userId',
|
|
1102
1203
|
},
|
|
1103
1204
|
loginType: 'login-ci',
|
|
1205
|
+
telemetryOptOut: undefined,
|
|
1104
1206
|
name: 'client.alert.displayed',
|
|
1105
1207
|
userType: 'host',
|
|
1106
1208
|
isConvergedArchitectureEnabled: undefined,
|
|
1107
1209
|
webexSubServiceType: undefined,
|
|
1108
1210
|
webClientPreload: undefined,
|
|
1211
|
+
isVipMeeting: false,
|
|
1212
|
+
isAutomatedUser: false,
|
|
1109
1213
|
},
|
|
1110
1214
|
eventId: 'my-fake-id',
|
|
1111
1215
|
origin: {
|
|
@@ -1168,6 +1272,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1168
1272
|
sessionCorrelationId: 'sessionCorrelationId3',
|
|
1169
1273
|
deviceId: 'deviceUrl',
|
|
1170
1274
|
locusId: 'url',
|
|
1275
|
+
locusSessionId: 'locusSessionId',
|
|
1171
1276
|
locusStartTime: 'lastActive',
|
|
1172
1277
|
locusUrl: 'locus/url',
|
|
1173
1278
|
mediaAgentAlias: 'alias',
|
|
@@ -1176,11 +1281,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
1176
1281
|
userId: 'userId',
|
|
1177
1282
|
},
|
|
1178
1283
|
loginType: 'login-ci',
|
|
1284
|
+
telemetryOptOut: undefined,
|
|
1179
1285
|
name: 'client.alert.displayed',
|
|
1180
1286
|
userType: 'host',
|
|
1181
1287
|
isConvergedArchitectureEnabled: undefined,
|
|
1182
1288
|
webexSubServiceType: undefined,
|
|
1183
1289
|
webClientPreload: undefined,
|
|
1290
|
+
isVipMeeting: false,
|
|
1291
|
+
isAutomatedUser: false,
|
|
1184
1292
|
},
|
|
1185
1293
|
options
|
|
1186
1294
|
);
|
|
@@ -1196,6 +1304,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1196
1304
|
sessionCorrelationId: 'sessionCorrelationId3',
|
|
1197
1305
|
deviceId: 'deviceUrl',
|
|
1198
1306
|
locusId: 'url',
|
|
1307
|
+
locusSessionId: 'locusSessionId',
|
|
1199
1308
|
locusStartTime: 'lastActive',
|
|
1200
1309
|
locusUrl: 'locus/url',
|
|
1201
1310
|
mediaAgentAlias: 'alias',
|
|
@@ -1204,11 +1313,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
1204
1313
|
userId: 'userId',
|
|
1205
1314
|
},
|
|
1206
1315
|
loginType: 'login-ci',
|
|
1316
|
+
telemetryOptOut: undefined,
|
|
1207
1317
|
name: 'client.alert.displayed',
|
|
1208
1318
|
userType: 'host',
|
|
1209
1319
|
isConvergedArchitectureEnabled: undefined,
|
|
1210
1320
|
webexSubServiceType: undefined,
|
|
1211
1321
|
webClientPreload: undefined,
|
|
1322
|
+
isVipMeeting: false,
|
|
1323
|
+
isAutomatedUser: false,
|
|
1212
1324
|
},
|
|
1213
1325
|
eventId: 'my-fake-id',
|
|
1214
1326
|
origin: {
|
|
@@ -1235,6 +1347,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1235
1347
|
sessionCorrelationId: 'sessionCorrelationId3',
|
|
1236
1348
|
deviceId: 'deviceUrl',
|
|
1237
1349
|
locusId: 'url',
|
|
1350
|
+
locusSessionId: 'locusSessionId',
|
|
1238
1351
|
locusStartTime: 'lastActive',
|
|
1239
1352
|
locusUrl: 'locus/url',
|
|
1240
1353
|
mediaAgentAlias: 'alias',
|
|
@@ -1243,11 +1356,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
1243
1356
|
userId: 'userId',
|
|
1244
1357
|
},
|
|
1245
1358
|
loginType: 'login-ci',
|
|
1359
|
+
telemetryOptOut: undefined,
|
|
1246
1360
|
name: 'client.alert.displayed',
|
|
1247
1361
|
userType: 'host',
|
|
1248
1362
|
isConvergedArchitectureEnabled: undefined,
|
|
1249
1363
|
webexSubServiceType: undefined,
|
|
1250
1364
|
webClientPreload: undefined,
|
|
1365
|
+
isVipMeeting: false,
|
|
1366
|
+
isAutomatedUser: false,
|
|
1251
1367
|
},
|
|
1252
1368
|
eventId: 'my-fake-id',
|
|
1253
1369
|
origin: {
|
|
@@ -1309,6 +1425,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1309
1425
|
correlationId: 'correlationId',
|
|
1310
1426
|
deviceId: 'deviceUrl',
|
|
1311
1427
|
locusId: 'url',
|
|
1428
|
+
locusSessionId: 'locusSessionId',
|
|
1312
1429
|
locusStartTime: 'lastActive',
|
|
1313
1430
|
locusUrl: 'locus/url',
|
|
1314
1431
|
mediaAgentAlias: 'alias',
|
|
@@ -1317,11 +1434,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
1317
1434
|
userId: 'userId',
|
|
1318
1435
|
},
|
|
1319
1436
|
loginType: 'login-ci',
|
|
1437
|
+
telemetryOptOut: undefined,
|
|
1320
1438
|
webClientPreload: undefined,
|
|
1321
1439
|
name: 'client.alert.displayed',
|
|
1322
1440
|
userType: 'host',
|
|
1323
1441
|
isConvergedArchitectureEnabled: undefined,
|
|
1324
1442
|
webexSubServiceType: undefined,
|
|
1443
|
+
isVipMeeting: false,
|
|
1444
|
+
isAutomatedUser: false,
|
|
1325
1445
|
},
|
|
1326
1446
|
options
|
|
1327
1447
|
);
|
|
@@ -1337,6 +1457,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1337
1457
|
correlationId: 'correlationId',
|
|
1338
1458
|
deviceId: 'deviceUrl',
|
|
1339
1459
|
locusId: 'url',
|
|
1460
|
+
locusSessionId: 'locusSessionId',
|
|
1340
1461
|
locusStartTime: 'lastActive',
|
|
1341
1462
|
locusUrl: 'locus/url',
|
|
1342
1463
|
mediaAgentAlias: 'alias',
|
|
@@ -1345,11 +1466,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
1345
1466
|
userId: 'userId',
|
|
1346
1467
|
},
|
|
1347
1468
|
loginType: 'login-ci',
|
|
1469
|
+
telemetryOptOut: undefined,
|
|
1348
1470
|
webClientPreload: undefined,
|
|
1349
1471
|
name: 'client.alert.displayed',
|
|
1350
1472
|
userType: 'host',
|
|
1351
1473
|
isConvergedArchitectureEnabled: undefined,
|
|
1352
1474
|
webexSubServiceType: undefined,
|
|
1475
|
+
isVipMeeting: false,
|
|
1476
|
+
isAutomatedUser: false,
|
|
1353
1477
|
},
|
|
1354
1478
|
eventId: 'my-fake-id',
|
|
1355
1479
|
origin: {
|
|
@@ -1376,6 +1500,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1376
1500
|
correlationId: 'correlationId',
|
|
1377
1501
|
deviceId: 'deviceUrl',
|
|
1378
1502
|
locusId: 'url',
|
|
1503
|
+
locusSessionId: 'locusSessionId',
|
|
1379
1504
|
locusStartTime: 'lastActive',
|
|
1380
1505
|
locusUrl: 'locus/url',
|
|
1381
1506
|
mediaAgentAlias: 'alias',
|
|
@@ -1384,11 +1509,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
1384
1509
|
userId: 'userId',
|
|
1385
1510
|
},
|
|
1386
1511
|
loginType: 'login-ci',
|
|
1512
|
+
telemetryOptOut: undefined,
|
|
1387
1513
|
webClientPreload: undefined,
|
|
1388
1514
|
name: 'client.alert.displayed',
|
|
1389
1515
|
userType: 'host',
|
|
1390
1516
|
isConvergedArchitectureEnabled: undefined,
|
|
1391
1517
|
webexSubServiceType: undefined,
|
|
1518
|
+
isVipMeeting: false,
|
|
1519
|
+
isAutomatedUser: false,
|
|
1392
1520
|
},
|
|
1393
1521
|
eventId: 'my-fake-id',
|
|
1394
1522
|
origin: {
|
|
@@ -1450,6 +1578,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1450
1578
|
sessionCorrelationId: 'sessionCorrelationId5',
|
|
1451
1579
|
deviceId: 'deviceUrl',
|
|
1452
1580
|
locusId: 'url',
|
|
1581
|
+
locusSessionId: 'locusSessionId',
|
|
1453
1582
|
locusStartTime: 'lastActive',
|
|
1454
1583
|
locusUrl: 'locus/url',
|
|
1455
1584
|
mediaAgentAlias: 'alias',
|
|
@@ -1458,6 +1587,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1458
1587
|
userId: 'userId',
|
|
1459
1588
|
},
|
|
1460
1589
|
loginType: 'login-ci',
|
|
1590
|
+
telemetryOptOut: undefined,
|
|
1461
1591
|
name: 'client.alert.displayed',
|
|
1462
1592
|
userType: 'host',
|
|
1463
1593
|
userNameInput: 'test',
|
|
@@ -1465,6 +1595,8 @@ describe('internal-plugin-metrics', () => {
|
|
|
1465
1595
|
isConvergedArchitectureEnabled: undefined,
|
|
1466
1596
|
webexSubServiceType: undefined,
|
|
1467
1597
|
webClientPreload: undefined,
|
|
1598
|
+
isVipMeeting: false,
|
|
1599
|
+
isAutomatedUser: false,
|
|
1468
1600
|
},
|
|
1469
1601
|
options
|
|
1470
1602
|
);
|
|
@@ -1480,6 +1612,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1480
1612
|
sessionCorrelationId: 'sessionCorrelationId5',
|
|
1481
1613
|
deviceId: 'deviceUrl',
|
|
1482
1614
|
locusId: 'url',
|
|
1615
|
+
locusSessionId: 'locusSessionId',
|
|
1483
1616
|
locusStartTime: 'lastActive',
|
|
1484
1617
|
locusUrl: 'locus/url',
|
|
1485
1618
|
mediaAgentAlias: 'alias',
|
|
@@ -1488,6 +1621,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1488
1621
|
userId: 'userId',
|
|
1489
1622
|
},
|
|
1490
1623
|
loginType: 'login-ci',
|
|
1624
|
+
telemetryOptOut: undefined,
|
|
1491
1625
|
name: 'client.alert.displayed',
|
|
1492
1626
|
userType: 'host',
|
|
1493
1627
|
userNameInput: 'test',
|
|
@@ -1495,6 +1629,8 @@ describe('internal-plugin-metrics', () => {
|
|
|
1495
1629
|
isConvergedArchitectureEnabled: undefined,
|
|
1496
1630
|
webexSubServiceType: undefined,
|
|
1497
1631
|
webClientPreload: undefined,
|
|
1632
|
+
isVipMeeting: false,
|
|
1633
|
+
isAutomatedUser: false,
|
|
1498
1634
|
},
|
|
1499
1635
|
eventId: 'my-fake-id',
|
|
1500
1636
|
origin: {
|
|
@@ -1521,6 +1657,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1521
1657
|
sessionCorrelationId: 'sessionCorrelationId5',
|
|
1522
1658
|
deviceId: 'deviceUrl',
|
|
1523
1659
|
locusId: 'url',
|
|
1660
|
+
locusSessionId: 'locusSessionId',
|
|
1524
1661
|
locusStartTime: 'lastActive',
|
|
1525
1662
|
locusUrl: 'locus/url',
|
|
1526
1663
|
mediaAgentAlias: 'alias',
|
|
@@ -1529,6 +1666,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1529
1666
|
userId: 'userId',
|
|
1530
1667
|
},
|
|
1531
1668
|
loginType: 'login-ci',
|
|
1669
|
+
telemetryOptOut: undefined,
|
|
1532
1670
|
name: 'client.alert.displayed',
|
|
1533
1671
|
userType: 'host',
|
|
1534
1672
|
userNameInput: 'test',
|
|
@@ -1536,6 +1674,8 @@ describe('internal-plugin-metrics', () => {
|
|
|
1536
1674
|
isConvergedArchitectureEnabled: undefined,
|
|
1537
1675
|
webexSubServiceType: undefined,
|
|
1538
1676
|
webClientPreload: undefined,
|
|
1677
|
+
isVipMeeting: false,
|
|
1678
|
+
isAutomatedUser: false,
|
|
1539
1679
|
},
|
|
1540
1680
|
eventId: 'my-fake-id',
|
|
1541
1681
|
origin: {
|
|
@@ -1660,8 +1800,10 @@ describe('internal-plugin-metrics', () => {
|
|
|
1660
1800
|
userId: 'userId',
|
|
1661
1801
|
},
|
|
1662
1802
|
loginType: 'login-ci',
|
|
1803
|
+
telemetryOptOut: undefined,
|
|
1663
1804
|
name: 'client.alert.displayed',
|
|
1664
1805
|
webClientPreload: undefined,
|
|
1806
|
+
isAutomatedUser: false,
|
|
1665
1807
|
},
|
|
1666
1808
|
options
|
|
1667
1809
|
);
|
|
@@ -1683,8 +1825,10 @@ describe('internal-plugin-metrics', () => {
|
|
|
1683
1825
|
userId: 'userId',
|
|
1684
1826
|
},
|
|
1685
1827
|
loginType: 'login-ci',
|
|
1828
|
+
telemetryOptOut: undefined,
|
|
1686
1829
|
name: 'client.alert.displayed',
|
|
1687
1830
|
webClientPreload: undefined,
|
|
1831
|
+
isAutomatedUser: false,
|
|
1688
1832
|
},
|
|
1689
1833
|
eventId: 'my-fake-id',
|
|
1690
1834
|
origin: {
|
|
@@ -1758,8 +1902,10 @@ describe('internal-plugin-metrics', () => {
|
|
|
1758
1902
|
userId: 'myPreLoginId',
|
|
1759
1903
|
},
|
|
1760
1904
|
loginType: 'login-ci',
|
|
1905
|
+
telemetryOptOut: undefined,
|
|
1761
1906
|
name: 'client.alert.displayed',
|
|
1762
1907
|
webClientPreload: undefined,
|
|
1908
|
+
isAutomatedUser: false,
|
|
1763
1909
|
},
|
|
1764
1910
|
options
|
|
1765
1911
|
);
|
|
@@ -1787,7 +1933,9 @@ describe('internal-plugin-metrics', () => {
|
|
|
1787
1933
|
},
|
|
1788
1934
|
eventData: {webClientDomain: 'whatever', isMercuryConnected: true},
|
|
1789
1935
|
loginType: 'login-ci',
|
|
1936
|
+
telemetryOptOut: undefined,
|
|
1790
1937
|
webClientPreload: undefined,
|
|
1938
|
+
isAutomatedUser: false,
|
|
1791
1939
|
},
|
|
1792
1940
|
},
|
|
1793
1941
|
options.preLoginId
|
|
@@ -1849,8 +1997,10 @@ describe('internal-plugin-metrics', () => {
|
|
|
1849
1997
|
userNameInput: 'current',
|
|
1850
1998
|
emailInput: 'current',
|
|
1851
1999
|
loginType: 'login-ci',
|
|
2000
|
+
telemetryOptOut: undefined,
|
|
1852
2001
|
name: 'client.alert.displayed',
|
|
1853
2002
|
webClientPreload: undefined,
|
|
2003
|
+
isAutomatedUser: false,
|
|
1854
2004
|
},
|
|
1855
2005
|
options
|
|
1856
2006
|
);
|
|
@@ -1878,9 +2028,11 @@ describe('internal-plugin-metrics', () => {
|
|
|
1878
2028
|
},
|
|
1879
2029
|
eventData: {webClientDomain: 'whatever', isMercuryConnected: true},
|
|
1880
2030
|
loginType: 'login-ci',
|
|
2031
|
+
telemetryOptOut: undefined,
|
|
1881
2032
|
userNameInput: 'current',
|
|
1882
2033
|
emailInput: 'current',
|
|
1883
2034
|
webClientPreload: undefined,
|
|
2035
|
+
isAutomatedUser: false,
|
|
1884
2036
|
},
|
|
1885
2037
|
},
|
|
1886
2038
|
options.preLoginId
|
|
@@ -1911,6 +2063,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1911
2063
|
correlationId: 'correlationId2',
|
|
1912
2064
|
deviceId: 'deviceUrl',
|
|
1913
2065
|
locusId: 'url',
|
|
2066
|
+
locusSessionId: 'locusSessionId',
|
|
1914
2067
|
locusStartTime: 'lastActive',
|
|
1915
2068
|
locusUrl: 'locus/url',
|
|
1916
2069
|
mediaAgentAlias: 'alias',
|
|
@@ -1919,12 +2072,15 @@ describe('internal-plugin-metrics', () => {
|
|
|
1919
2072
|
userId: 'userId',
|
|
1920
2073
|
},
|
|
1921
2074
|
loginType: 'fakeLoginType',
|
|
2075
|
+
telemetryOptOut: undefined,
|
|
1922
2076
|
name: 'client.alert.displayed',
|
|
1923
2077
|
userType: 'host',
|
|
1924
2078
|
joinFlowVersion: 'Other',
|
|
1925
2079
|
isConvergedArchitectureEnabled: undefined,
|
|
1926
2080
|
webexSubServiceType: undefined,
|
|
1927
2081
|
webClientPreload: undefined,
|
|
2082
|
+
isVipMeeting: false,
|
|
2083
|
+
isAutomatedUser: false,
|
|
1928
2084
|
},
|
|
1929
2085
|
eventId: 'my-fake-id',
|
|
1930
2086
|
origin: {
|
|
@@ -1965,6 +2121,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1965
2121
|
sessionCorrelationId: 'sessionCorrelationId1',
|
|
1966
2122
|
deviceId: 'deviceUrl',
|
|
1967
2123
|
locusId: 'url',
|
|
2124
|
+
locusSessionId: 'locusSessionId',
|
|
1968
2125
|
locusStartTime: 'lastActive',
|
|
1969
2126
|
locusUrl: 'locus/url',
|
|
1970
2127
|
mediaAgentAlias: 'alias',
|
|
@@ -1973,12 +2130,15 @@ describe('internal-plugin-metrics', () => {
|
|
|
1973
2130
|
userId: 'userId',
|
|
1974
2131
|
},
|
|
1975
2132
|
loginType: 'fakeLoginType',
|
|
2133
|
+
telemetryOptOut: undefined,
|
|
1976
2134
|
name: 'client.alert.displayed',
|
|
1977
2135
|
userType: 'host',
|
|
1978
2136
|
joinFlowVersion: 'Other',
|
|
1979
2137
|
isConvergedArchitectureEnabled: undefined,
|
|
1980
2138
|
webexSubServiceType: undefined,
|
|
1981
2139
|
webClientPreload: undefined,
|
|
2140
|
+
isVipMeeting: false,
|
|
2141
|
+
isAutomatedUser: false,
|
|
1982
2142
|
},
|
|
1983
2143
|
eventId: 'my-fake-id',
|
|
1984
2144
|
origin: {
|
|
@@ -2033,8 +2193,10 @@ describe('internal-plugin-metrics', () => {
|
|
|
2033
2193
|
userId: 'userId',
|
|
2034
2194
|
},
|
|
2035
2195
|
loginType: 'login-ci',
|
|
2196
|
+
telemetryOptOut: undefined,
|
|
2036
2197
|
name: 'client.alert.displayed',
|
|
2037
2198
|
webClientPreload: true,
|
|
2199
|
+
isAutomatedUser: false,
|
|
2038
2200
|
},
|
|
2039
2201
|
options
|
|
2040
2202
|
);
|
|
@@ -2056,8 +2218,216 @@ describe('internal-plugin-metrics', () => {
|
|
|
2056
2218
|
userId: 'userId',
|
|
2057
2219
|
},
|
|
2058
2220
|
loginType: 'login-ci',
|
|
2221
|
+
telemetryOptOut: undefined,
|
|
2059
2222
|
name: 'client.alert.displayed',
|
|
2060
2223
|
webClientPreload: true,
|
|
2224
|
+
isAutomatedUser: false,
|
|
2225
|
+
},
|
|
2226
|
+
eventId: 'my-fake-id',
|
|
2227
|
+
origin: {
|
|
2228
|
+
origin: 'fake-origin',
|
|
2229
|
+
},
|
|
2230
|
+
originTime: {
|
|
2231
|
+
sent: 'not_defined_yet',
|
|
2232
|
+
triggered: now.toISOString(),
|
|
2233
|
+
},
|
|
2234
|
+
senderCountryCode: 'UK',
|
|
2235
|
+
version: 1,
|
|
2236
|
+
});
|
|
2237
|
+
});
|
|
2238
|
+
|
|
2239
|
+
it('should submit client event with isVipMeeting: false when vipMeeting is false', () => {
|
|
2240
|
+
const prepareDiagnosticEventSpy = sinon.spy(cd, 'prepareDiagnosticEvent');
|
|
2241
|
+
const submitToCallDiagnosticsSpy = sinon.spy(cd, 'submitToCallDiagnostics');
|
|
2242
|
+
const generateClientEventErrorPayloadSpy = sinon.spy(cd, 'generateClientEventErrorPayload');
|
|
2243
|
+
sinon.stub(cd, 'getOrigin').returns({origin: 'fake-origin'});
|
|
2244
|
+
|
|
2245
|
+
webex.meetings.getBasicMeetingInformation = sinon.stub().returns({
|
|
2246
|
+
...fakeMeeting,
|
|
2247
|
+
meetingInfo: {
|
|
2248
|
+
vipmeeting: false,
|
|
2249
|
+
},
|
|
2250
|
+
});
|
|
2251
|
+
|
|
2252
|
+
const options = {
|
|
2253
|
+
correlationId: 'correlationId',
|
|
2254
|
+
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
2255
|
+
globalMeetingId: 'globalMeetingId1',
|
|
2256
|
+
sessionCorrelationId: 'sessionCorrelationId1',
|
|
2257
|
+
meetingId: fakeMeeting.id,
|
|
2258
|
+
};
|
|
2259
|
+
cd.setMercuryConnectedStatus(true);
|
|
2260
|
+
cd.submitClientEvent({
|
|
2261
|
+
name: 'client.alert.displayed',
|
|
2262
|
+
options,
|
|
2263
|
+
});
|
|
2264
|
+
|
|
2265
|
+
assert.notCalled(generateClientEventErrorPayloadSpy);
|
|
2266
|
+
assert.calledWith(
|
|
2267
|
+
prepareDiagnosticEventSpy,
|
|
2268
|
+
{
|
|
2269
|
+
canProceed: true,
|
|
2270
|
+
eventData: {
|
|
2271
|
+
webClientDomain: 'whatever',
|
|
2272
|
+
isMercuryConnected: true,
|
|
2273
|
+
},
|
|
2274
|
+
identifiers: {
|
|
2275
|
+
correlationId: 'correlationId',
|
|
2276
|
+
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
2277
|
+
globalMeetingId: 'globalMeetingId1',
|
|
2278
|
+
sessionCorrelationId: 'sessionCorrelationId1',
|
|
2279
|
+
deviceId: 'deviceUrl',
|
|
2280
|
+
locusId: 'url',
|
|
2281
|
+
locusSessionId: 'locusSessionId',
|
|
2282
|
+
locusStartTime: 'lastActive',
|
|
2283
|
+
locusUrl: 'locus/url',
|
|
2284
|
+
orgId: 'orgId',
|
|
2285
|
+
userId: 'userId',
|
|
2286
|
+
},
|
|
2287
|
+
loginType: 'login-ci',
|
|
2288
|
+
telemetryOptOut: undefined,
|
|
2289
|
+
name: 'client.alert.displayed',
|
|
2290
|
+
userType: 'host',
|
|
2291
|
+
isConvergedArchitectureEnabled: undefined,
|
|
2292
|
+
webexSubServiceType: undefined,
|
|
2293
|
+
webClientPreload: undefined,
|
|
2294
|
+
isVipMeeting: false,
|
|
2295
|
+
isAutomatedUser: false,
|
|
2296
|
+
},
|
|
2297
|
+
options
|
|
2298
|
+
);
|
|
2299
|
+
assert.calledWith(submitToCallDiagnosticsSpy, {
|
|
2300
|
+
event: {
|
|
2301
|
+
canProceed: true,
|
|
2302
|
+
eventData: {
|
|
2303
|
+
webClientDomain: 'whatever',
|
|
2304
|
+
isMercuryConnected: true,
|
|
2305
|
+
},
|
|
2306
|
+
identifiers: {
|
|
2307
|
+
correlationId: 'correlationId',
|
|
2308
|
+
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
2309
|
+
globalMeetingId: 'globalMeetingId1',
|
|
2310
|
+
sessionCorrelationId: 'sessionCorrelationId1',
|
|
2311
|
+
deviceId: 'deviceUrl',
|
|
2312
|
+
locusId: 'url',
|
|
2313
|
+
locusSessionId: 'locusSessionId',
|
|
2314
|
+
locusStartTime: 'lastActive',
|
|
2315
|
+
locusUrl: 'locus/url',
|
|
2316
|
+
orgId: 'orgId',
|
|
2317
|
+
userId: 'userId',
|
|
2318
|
+
},
|
|
2319
|
+
loginType: 'login-ci',
|
|
2320
|
+
telemetryOptOut: undefined,
|
|
2321
|
+
name: 'client.alert.displayed',
|
|
2322
|
+
userType: 'host',
|
|
2323
|
+
isConvergedArchitectureEnabled: undefined,
|
|
2324
|
+
webexSubServiceType: undefined,
|
|
2325
|
+
webClientPreload: undefined,
|
|
2326
|
+
isVipMeeting: false,
|
|
2327
|
+
isAutomatedUser: false,
|
|
2328
|
+
},
|
|
2329
|
+
eventId: 'my-fake-id',
|
|
2330
|
+
origin: {
|
|
2331
|
+
origin: 'fake-origin',
|
|
2332
|
+
},
|
|
2333
|
+
originTime: {
|
|
2334
|
+
sent: 'not_defined_yet',
|
|
2335
|
+
triggered: now.toISOString(),
|
|
2336
|
+
},
|
|
2337
|
+
senderCountryCode: 'UK',
|
|
2338
|
+
version: 1,
|
|
2339
|
+
});
|
|
2340
|
+
});
|
|
2341
|
+
|
|
2342
|
+
it('should submit client event with isVipMeeting: true when vipMeeting is true', () => {
|
|
2343
|
+
const prepareDiagnosticEventSpy = sinon.spy(cd, 'prepareDiagnosticEvent');
|
|
2344
|
+
const submitToCallDiagnosticsSpy = sinon.spy(cd, 'submitToCallDiagnostics');
|
|
2345
|
+
const generateClientEventErrorPayloadSpy = sinon.spy(cd, 'generateClientEventErrorPayload');
|
|
2346
|
+
sinon.stub(cd, 'getOrigin').returns({origin: 'fake-origin'});
|
|
2347
|
+
|
|
2348
|
+
webex.meetings.getBasicMeetingInformation = sinon.stub().returns({
|
|
2349
|
+
...fakeMeeting,
|
|
2350
|
+
meetingInfo: {
|
|
2351
|
+
vipmeeting: true,
|
|
2352
|
+
},
|
|
2353
|
+
});
|
|
2354
|
+
|
|
2355
|
+
const options = {
|
|
2356
|
+
correlationId: 'correlationId',
|
|
2357
|
+
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
2358
|
+
globalMeetingId: 'globalMeetingId1',
|
|
2359
|
+
sessionCorrelationId: 'sessionCorrelationId1',
|
|
2360
|
+
meetingId: fakeMeeting.id,
|
|
2361
|
+
};
|
|
2362
|
+
cd.setMercuryConnectedStatus(true);
|
|
2363
|
+
cd.submitClientEvent({
|
|
2364
|
+
name: 'client.alert.displayed',
|
|
2365
|
+
options,
|
|
2366
|
+
});
|
|
2367
|
+
|
|
2368
|
+
assert.notCalled(generateClientEventErrorPayloadSpy);
|
|
2369
|
+
assert.calledWith(
|
|
2370
|
+
prepareDiagnosticEventSpy,
|
|
2371
|
+
{
|
|
2372
|
+
canProceed: true,
|
|
2373
|
+
eventData: {
|
|
2374
|
+
webClientDomain: 'whatever',
|
|
2375
|
+
isMercuryConnected: true,
|
|
2376
|
+
},
|
|
2377
|
+
identifiers: {
|
|
2378
|
+
correlationId: 'correlationId',
|
|
2379
|
+
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
2380
|
+
globalMeetingId: 'globalMeetingId1',
|
|
2381
|
+
sessionCorrelationId: 'sessionCorrelationId1',
|
|
2382
|
+
deviceId: 'deviceUrl',
|
|
2383
|
+
locusId: 'url',
|
|
2384
|
+
locusSessionId: 'locusSessionId',
|
|
2385
|
+
locusStartTime: 'lastActive',
|
|
2386
|
+
locusUrl: 'locus/url',
|
|
2387
|
+
orgId: 'orgId',
|
|
2388
|
+
userId: 'userId',
|
|
2389
|
+
},
|
|
2390
|
+
loginType: 'login-ci',
|
|
2391
|
+
telemetryOptOut: undefined,
|
|
2392
|
+
name: 'client.alert.displayed',
|
|
2393
|
+
userType: 'host',
|
|
2394
|
+
isConvergedArchitectureEnabled: undefined,
|
|
2395
|
+
webexSubServiceType: undefined,
|
|
2396
|
+
webClientPreload: undefined,
|
|
2397
|
+
isVipMeeting: true,
|
|
2398
|
+
isAutomatedUser: false,
|
|
2399
|
+
},
|
|
2400
|
+
options
|
|
2401
|
+
);
|
|
2402
|
+
assert.calledWith(submitToCallDiagnosticsSpy, {
|
|
2403
|
+
event: {
|
|
2404
|
+
canProceed: true,
|
|
2405
|
+
eventData: {
|
|
2406
|
+
webClientDomain: 'whatever',
|
|
2407
|
+
isMercuryConnected: true,
|
|
2408
|
+
},
|
|
2409
|
+
identifiers: {
|
|
2410
|
+
correlationId: 'correlationId',
|
|
2411
|
+
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
2412
|
+
globalMeetingId: 'globalMeetingId1',
|
|
2413
|
+
sessionCorrelationId: 'sessionCorrelationId1',
|
|
2414
|
+
deviceId: 'deviceUrl',
|
|
2415
|
+
locusId: 'url',
|
|
2416
|
+
locusSessionId: 'locusSessionId',
|
|
2417
|
+
locusStartTime: 'lastActive',
|
|
2418
|
+
locusUrl: 'locus/url',
|
|
2419
|
+
orgId: 'orgId',
|
|
2420
|
+
userId: 'userId',
|
|
2421
|
+
},
|
|
2422
|
+
loginType: 'login-ci',
|
|
2423
|
+
telemetryOptOut: undefined,
|
|
2424
|
+
name: 'client.alert.displayed',
|
|
2425
|
+
userType: 'host',
|
|
2426
|
+
isConvergedArchitectureEnabled: undefined,
|
|
2427
|
+
webexSubServiceType: undefined,
|
|
2428
|
+
webClientPreload: undefined,
|
|
2429
|
+
isVipMeeting: true,
|
|
2430
|
+
isAutomatedUser: false,
|
|
2061
2431
|
},
|
|
2062
2432
|
eventId: 'my-fake-id',
|
|
2063
2433
|
origin: {
|
|
@@ -2106,6 +2476,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
2106
2476
|
globalMeetingId: 'globalMeetingId1',
|
|
2107
2477
|
deviceId: 'deviceUrl',
|
|
2108
2478
|
locusId: 'url',
|
|
2479
|
+
locusSessionId: 'locusSessionId',
|
|
2109
2480
|
locusStartTime: 'lastActive',
|
|
2110
2481
|
locusUrl: 'locus/url',
|
|
2111
2482
|
mediaAgentAlias: 'alias',
|
|
@@ -2126,11 +2497,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
2126
2497
|
},
|
|
2127
2498
|
],
|
|
2128
2499
|
loginType: 'login-ci',
|
|
2500
|
+
telemetryOptOut: undefined,
|
|
2129
2501
|
name: 'client.alert.displayed',
|
|
2130
2502
|
userType: 'host',
|
|
2131
2503
|
isConvergedArchitectureEnabled: undefined,
|
|
2132
2504
|
webexSubServiceType: undefined,
|
|
2133
2505
|
webClientPreload: undefined,
|
|
2506
|
+
isVipMeeting: false,
|
|
2507
|
+
isAutomatedUser: false,
|
|
2134
2508
|
},
|
|
2135
2509
|
eventId: 'my-fake-id',
|
|
2136
2510
|
origin: {
|
|
@@ -2184,6 +2558,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
2184
2558
|
correlationId: 'correlationId',
|
|
2185
2559
|
deviceId: 'deviceUrl',
|
|
2186
2560
|
locusId: 'url',
|
|
2561
|
+
locusSessionId: 'locusSessionId',
|
|
2187
2562
|
locusStartTime: 'lastActive',
|
|
2188
2563
|
locusUrl: 'locus/url',
|
|
2189
2564
|
mediaAgentAlias: 'alias',
|
|
@@ -2207,11 +2582,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
2207
2582
|
},
|
|
2208
2583
|
],
|
|
2209
2584
|
loginType: 'login-ci',
|
|
2585
|
+
telemetryOptOut: undefined,
|
|
2210
2586
|
name: 'client.alert.displayed',
|
|
2211
2587
|
userType: 'host',
|
|
2212
2588
|
isConvergedArchitectureEnabled: undefined,
|
|
2213
2589
|
webexSubServiceType: undefined,
|
|
2214
2590
|
webClientPreload: undefined,
|
|
2591
|
+
isVipMeeting: false,
|
|
2592
|
+
isAutomatedUser: false,
|
|
2215
2593
|
},
|
|
2216
2594
|
eventId: 'my-fake-id',
|
|
2217
2595
|
origin: {
|
|
@@ -2283,8 +2661,10 @@ describe('internal-plugin-metrics', () => {
|
|
|
2283
2661
|
},
|
|
2284
2662
|
],
|
|
2285
2663
|
loginType: 'login-ci',
|
|
2664
|
+
telemetryOptOut: undefined,
|
|
2286
2665
|
name: 'client.alert.displayed',
|
|
2287
2666
|
webClientPreload: undefined,
|
|
2667
|
+
isAutomatedUser: false,
|
|
2288
2668
|
},
|
|
2289
2669
|
eventId: 'my-fake-id',
|
|
2290
2670
|
origin: {
|
|
@@ -2358,8 +2738,10 @@ describe('internal-plugin-metrics', () => {
|
|
|
2358
2738
|
},
|
|
2359
2739
|
],
|
|
2360
2740
|
loginType: 'login-ci',
|
|
2741
|
+
telemetryOptOut: undefined,
|
|
2361
2742
|
name: 'client.alert.displayed',
|
|
2362
2743
|
webClientPreload: undefined,
|
|
2744
|
+
isAutomatedUser: false,
|
|
2363
2745
|
},
|
|
2364
2746
|
eventId: 'my-fake-id',
|
|
2365
2747
|
origin: {
|
|
@@ -2423,6 +2805,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
2423
2805
|
correlationId: 'correlationId',
|
|
2424
2806
|
deviceId: 'deviceUrl',
|
|
2425
2807
|
locusId: 'url',
|
|
2808
|
+
locusSessionId: 'locusSessionId',
|
|
2426
2809
|
locusStartTime: 'lastActive',
|
|
2427
2810
|
locusUrl: 'locus/url',
|
|
2428
2811
|
mediaAgentAlias: 'alias',
|
|
@@ -2439,11 +2822,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
2439
2822
|
},
|
|
2440
2823
|
],
|
|
2441
2824
|
loginType: 'login-ci',
|
|
2825
|
+
telemetryOptOut: undefined,
|
|
2442
2826
|
name: 'client.alert.displayed',
|
|
2443
2827
|
userType: 'host',
|
|
2444
2828
|
isConvergedArchitectureEnabled: undefined,
|
|
2445
2829
|
webexSubServiceType: undefined,
|
|
2446
2830
|
webClientPreload: undefined,
|
|
2831
|
+
isVipMeeting: false,
|
|
2832
|
+
isAutomatedUser: false,
|
|
2447
2833
|
},
|
|
2448
2834
|
eventId: 'my-fake-id',
|
|
2449
2835
|
origin: {
|
|
@@ -2534,16 +2920,18 @@ describe('internal-plugin-metrics', () => {
|
|
|
2534
2920
|
});
|
|
2535
2921
|
|
|
2536
2922
|
assert.calledThrice(submitToCallDiagnosticsStub);
|
|
2537
|
-
|
|
2923
|
+
});
|
|
2538
2924
|
|
|
2539
|
-
(
|
|
2540
|
-
[
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2925
|
+
(
|
|
2926
|
+
[
|
|
2927
|
+
['client.media.render.start'],
|
|
2928
|
+
['client.media.render.stop'],
|
|
2929
|
+
['client.media.rx.start'],
|
|
2930
|
+
['client.media.rx.stop'],
|
|
2931
|
+
['client.media.tx.start'],
|
|
2932
|
+
['client.media.tx.stop'],
|
|
2933
|
+
] as const
|
|
2934
|
+
).forEach(([name]) => {
|
|
2547
2935
|
it(`should only send ${name} once per mediaType`, () => {
|
|
2548
2936
|
const options = {
|
|
2549
2937
|
meetingId: fakeMeeting.id,
|
|
@@ -2587,7 +2975,8 @@ describe('internal-plugin-metrics', () => {
|
|
|
2587
2975
|
});
|
|
2588
2976
|
|
|
2589
2977
|
assert.notCalled(submitToCallDiagnosticsStub);
|
|
2590
|
-
assert.neverCalledWithMatch(
|
|
2978
|
+
assert.neverCalledWithMatch(
|
|
2979
|
+
webex.logger.log,
|
|
2591
2980
|
'call-diagnostic-events -> ',
|
|
2592
2981
|
sinon.match(createEventLimitRegex(name, 'mediaType video'))
|
|
2593
2982
|
);
|
|
@@ -2630,7 +3019,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
2630
3019
|
// Send event with different shareInstanceId
|
|
2631
3020
|
cd.submitClientEvent({
|
|
2632
3021
|
name,
|
|
2633
|
-
payload: {
|
|
3022
|
+
payload: {...payload, shareInstanceId: 'instance-2'},
|
|
2634
3023
|
options,
|
|
2635
3024
|
});
|
|
2636
3025
|
|
|
@@ -2638,89 +3027,88 @@ describe('internal-plugin-metrics', () => {
|
|
|
2638
3027
|
});
|
|
2639
3028
|
});
|
|
2640
3029
|
|
|
2641
|
-
([
|
|
2642
|
-
[
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
3030
|
+
([['client.roap-message.received'], ['client.roap-message.sent']] as const).forEach(
|
|
3031
|
+
([name]) => {
|
|
3032
|
+
it(`should not send third event of same type and not log warning again for ${name}`, () => {
|
|
3033
|
+
const options = {
|
|
3034
|
+
meetingId: fakeMeeting.id,
|
|
3035
|
+
};
|
|
3036
|
+
const payload = {
|
|
3037
|
+
roap: {
|
|
3038
|
+
messageType: 'OFFER' as const,
|
|
3039
|
+
},
|
|
3040
|
+
};
|
|
3041
|
+
const submitToCallDiagnosticsStub = sinon.stub(cd, 'submitToCallDiagnostics');
|
|
3042
|
+
|
|
3043
|
+
// Clear any existing call history to get accurate counts
|
|
3044
|
+
webex.logger.log.resetHistory();
|
|
3045
|
+
|
|
3046
|
+
// Send first event
|
|
3047
|
+
cd.submitClientEvent({
|
|
3048
|
+
name,
|
|
3049
|
+
payload,
|
|
3050
|
+
options,
|
|
3051
|
+
});
|
|
3052
|
+
|
|
3053
|
+
assert.calledOnce(submitToCallDiagnosticsStub);
|
|
3054
|
+
submitToCallDiagnosticsStub.resetHistory();
|
|
3055
|
+
|
|
3056
|
+
// Send second event (should trigger warning)
|
|
3057
|
+
cd.submitClientEvent({
|
|
3058
|
+
name,
|
|
3059
|
+
payload,
|
|
3060
|
+
options,
|
|
3061
|
+
});
|
|
3062
|
+
|
|
3063
|
+
assert.notCalled(submitToCallDiagnosticsStub);
|
|
3064
|
+
assert.calledWith(
|
|
3065
|
+
webex.logger.log,
|
|
3066
|
+
'call-diagnostic-events -> ',
|
|
3067
|
+
sinon.match(createEventLimitRegex(name, 'ROAP type OFFER'))
|
|
3068
|
+
);
|
|
3069
|
+
webex.logger.log.resetHistory();
|
|
3070
|
+
|
|
3071
|
+
cd.submitClientEvent({
|
|
3072
|
+
name,
|
|
3073
|
+
payload,
|
|
3074
|
+
options,
|
|
3075
|
+
});
|
|
3076
|
+
|
|
3077
|
+
assert.notCalled(submitToCallDiagnosticsStub);
|
|
3078
|
+
assert.neverCalledWithMatch(
|
|
3079
|
+
webex.logger.log,
|
|
3080
|
+
'call-diagnostic-events -> ',
|
|
3081
|
+
sinon.match(createEventLimitRegex(name, 'ROAP type OFFER'))
|
|
3082
|
+
);
|
|
2674
3083
|
});
|
|
2675
3084
|
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
payload,
|
|
2687
|
-
options,
|
|
2688
|
-
});
|
|
3085
|
+
it(`should handle roap.type instead of roap.messageType for ${name}`, () => {
|
|
3086
|
+
const options = {
|
|
3087
|
+
meetingId: fakeMeeting.id,
|
|
3088
|
+
};
|
|
3089
|
+
const payload = {
|
|
3090
|
+
roap: {
|
|
3091
|
+
type: 'ANSWER' as const,
|
|
3092
|
+
},
|
|
3093
|
+
};
|
|
3094
|
+
const submitToCallDiagnosticsStub = sinon.stub(cd, 'submitToCallDiagnostics');
|
|
2689
3095
|
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
);
|
|
2696
|
-
});
|
|
3096
|
+
cd.submitClientEvent({
|
|
3097
|
+
name,
|
|
3098
|
+
payload,
|
|
3099
|
+
options,
|
|
3100
|
+
});
|
|
2697
3101
|
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
roap: {
|
|
2704
|
-
type: 'ANSWER' as const,
|
|
2705
|
-
},
|
|
2706
|
-
};
|
|
2707
|
-
const submitToCallDiagnosticsStub = sinon.stub(cd, 'submitToCallDiagnostics');
|
|
3102
|
+
cd.submitClientEvent({
|
|
3103
|
+
name,
|
|
3104
|
+
payload,
|
|
3105
|
+
options,
|
|
3106
|
+
});
|
|
2708
3107
|
|
|
2709
|
-
|
|
2710
|
-
name,
|
|
2711
|
-
payload,
|
|
2712
|
-
options,
|
|
2713
|
-
});
|
|
2714
|
-
|
|
2715
|
-
cd.submitClientEvent({
|
|
2716
|
-
name,
|
|
2717
|
-
payload,
|
|
2718
|
-
options,
|
|
3108
|
+
assert.calledOnce(submitToCallDiagnosticsStub);
|
|
2719
3109
|
});
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
});
|
|
2723
|
-
});
|
|
3110
|
+
}
|
|
3111
|
+
);
|
|
2724
3112
|
});
|
|
2725
3113
|
});
|
|
2726
3114
|
|
|
@@ -2731,7 +3119,11 @@ describe('internal-plugin-metrics', () => {
|
|
|
2731
3119
|
cd.callDiagnosticEventsBatcher = {request: requestStub};
|
|
2732
3120
|
//@ts-ignore
|
|
2733
3121
|
cd.submitToCallDiagnostics({event: 'test'});
|
|
2734
|
-
assert.calledWith(requestStub, {
|
|
3122
|
+
assert.calledWith(requestStub, {
|
|
3123
|
+
eventPayload: {event: 'test'},
|
|
3124
|
+
type: ['diagnostic-event'],
|
|
3125
|
+
markTelemetryOptOutOnResponse: true,
|
|
3126
|
+
});
|
|
2735
3127
|
});
|
|
2736
3128
|
});
|
|
2737
3129
|
|
|
@@ -2784,6 +3176,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
2784
3176
|
orgId: 'orgId',
|
|
2785
3177
|
locusUrl: 'locus/url',
|
|
2786
3178
|
locusId: 'url',
|
|
3179
|
+
locusSessionId: 'locusSessionId',
|
|
2787
3180
|
locusStartTime: 'lastActive',
|
|
2788
3181
|
},
|
|
2789
3182
|
eventData: {webClientDomain: 'whatever'},
|
|
@@ -2799,6 +3192,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
2799
3192
|
mediaEngineSoftwareVersion: getOSVersion() || 'unknown',
|
|
2800
3193
|
startTime: now.toISOString(),
|
|
2801
3194
|
},
|
|
3195
|
+
webexSubServiceType: undefined,
|
|
2802
3196
|
},
|
|
2803
3197
|
options
|
|
2804
3198
|
);
|
|
@@ -2823,6 +3217,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
2823
3217
|
orgId: 'orgId',
|
|
2824
3218
|
locusUrl: 'locus/url',
|
|
2825
3219
|
locusId: 'url',
|
|
3220
|
+
locusSessionId: 'locusSessionId',
|
|
2826
3221
|
locusStartTime: 'lastActive',
|
|
2827
3222
|
},
|
|
2828
3223
|
eventData: {webClientDomain: 'whatever'},
|
|
@@ -2838,6 +3233,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
2838
3233
|
mediaEngineSoftwareVersion: getOSVersion() || 'unknown',
|
|
2839
3234
|
startTime: now.toISOString(),
|
|
2840
3235
|
},
|
|
3236
|
+
webexSubServiceType: undefined,
|
|
2841
3237
|
},
|
|
2842
3238
|
},
|
|
2843
3239
|
});
|
|
@@ -2860,6 +3256,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
2860
3256
|
orgId: 'orgId',
|
|
2861
3257
|
locusUrl: 'locus/url',
|
|
2862
3258
|
locusId: 'url',
|
|
3259
|
+
locusSessionId: 'locusSessionId',
|
|
2863
3260
|
locusStartTime: 'lastActive',
|
|
2864
3261
|
},
|
|
2865
3262
|
eventData: {webClientDomain: 'whatever'},
|
|
@@ -2875,10 +3272,48 @@ describe('internal-plugin-metrics', () => {
|
|
|
2875
3272
|
mediaEngineSoftwareVersion: getOSVersion() || 'unknown',
|
|
2876
3273
|
startTime: now.toISOString(),
|
|
2877
3274
|
},
|
|
3275
|
+
webexSubServiceType: undefined,
|
|
2878
3276
|
},
|
|
2879
3277
|
});
|
|
2880
3278
|
});
|
|
2881
3279
|
|
|
3280
|
+
it('includes webexSubServiceType in the media quality event payload', () => {
|
|
3281
|
+
const meeting = {
|
|
3282
|
+
...fakeMeeting,
|
|
3283
|
+
meetingInfo: {
|
|
3284
|
+
enableConvergedArchitecture: true,
|
|
3285
|
+
enableEvent: true,
|
|
3286
|
+
enableConvergedWebinarLargeScale: true,
|
|
3287
|
+
},
|
|
3288
|
+
};
|
|
3289
|
+
const prepareDiagnosticEventSpy = sinon.spy(cd, 'prepareDiagnosticEvent');
|
|
3290
|
+
sinon.stub(cd, 'getOrigin').returns({origin: 'fake-origin'});
|
|
3291
|
+
webex.meetings.getBasicMeetingInformation = sinon.stub().returns(meeting);
|
|
3292
|
+
|
|
3293
|
+
const options = {
|
|
3294
|
+
networkType: 'wifi' as const,
|
|
3295
|
+
meetingId: fakeMeeting.id,
|
|
3296
|
+
};
|
|
3297
|
+
|
|
3298
|
+
cd.submitMQE({
|
|
3299
|
+
name: 'client.mediaquality.event',
|
|
3300
|
+
payload: {
|
|
3301
|
+
//@ts-ignore
|
|
3302
|
+
intervals: [{}],
|
|
3303
|
+
},
|
|
3304
|
+
options,
|
|
3305
|
+
});
|
|
3306
|
+
|
|
3307
|
+
assert.calledOnceWithExactly(
|
|
3308
|
+
prepareDiagnosticEventSpy,
|
|
3309
|
+
sinon.match({
|
|
3310
|
+
name: 'client.mediaquality.event',
|
|
3311
|
+
webexSubServiceType: 'LargeScaleWebinar',
|
|
3312
|
+
}),
|
|
3313
|
+
options
|
|
3314
|
+
);
|
|
3315
|
+
});
|
|
3316
|
+
|
|
2882
3317
|
it('throws if meeting id not provided', () => {
|
|
2883
3318
|
assert.throws(() =>
|
|
2884
3319
|
cd.submitMQE({
|
|
@@ -3599,6 +4034,97 @@ describe('internal-plugin-metrics', () => {
|
|
|
3599
4034
|
});
|
|
3600
4035
|
});
|
|
3601
4036
|
|
|
4037
|
+
describe('#getTelemetryOptOut', () => {
|
|
4038
|
+
it('returns "manual" when manual telemetry opt-out is enabled', () => {
|
|
4039
|
+
cd.setIsTelemetryOptOutManual(true);
|
|
4040
|
+
assert.equal(cd.getTelemetryOptOut(), 'manual');
|
|
4041
|
+
});
|
|
4042
|
+
|
|
4043
|
+
it('returns "automatic" when automatic telemetry opt-out is enabled', () => {
|
|
4044
|
+
cd.setIsTelemetryOptOutAutomatic(true);
|
|
4045
|
+
assert.equal(cd.getTelemetryOptOut(), 'automatic');
|
|
4046
|
+
});
|
|
4047
|
+
|
|
4048
|
+
it('returns "manual" when manual opt-out takes precedence over automatic', () => {
|
|
4049
|
+
cd.setIsTelemetryOptOutManual(true);
|
|
4050
|
+
cd.setIsTelemetryOptOutAutomatic(true);
|
|
4051
|
+
assert.equal(cd.getTelemetryOptOut(), 'manual');
|
|
4052
|
+
});
|
|
4053
|
+
|
|
4054
|
+
it('returns undefined when neither manual nor automatic opt-out is set', () => {
|
|
4055
|
+
assert.isUndefined(cd.getTelemetryOptOut());
|
|
4056
|
+
});
|
|
4057
|
+
|
|
4058
|
+
it('returns undefined after disabling manual opt-out', () => {
|
|
4059
|
+
cd.setIsTelemetryOptOutManual(true);
|
|
4060
|
+
cd.setIsTelemetryOptOutManual(false);
|
|
4061
|
+
assert.isUndefined(cd.getTelemetryOptOut());
|
|
4062
|
+
});
|
|
4063
|
+
});
|
|
4064
|
+
|
|
4065
|
+
describe('#setIsTelemetryOptOutManual', () => {
|
|
4066
|
+
it('sets manual telemetry opt-out to true', () => {
|
|
4067
|
+
cd.setIsTelemetryOptOutManual(true);
|
|
4068
|
+
assert.equal(cd.getTelemetryOptOut(), 'manual');
|
|
4069
|
+
});
|
|
4070
|
+
|
|
4071
|
+
it('sets manual telemetry opt-out to false', () => {
|
|
4072
|
+
cd.setIsTelemetryOptOutManual(true);
|
|
4073
|
+
cd.setIsTelemetryOptOutManual(false);
|
|
4074
|
+
assert.isUndefined(cd.getTelemetryOptOut());
|
|
4075
|
+
});
|
|
4076
|
+
|
|
4077
|
+
it('can toggle manual telemetry opt-out multiple times', () => {
|
|
4078
|
+
cd.setIsTelemetryOptOutManual(true);
|
|
4079
|
+
assert.equal(cd.getTelemetryOptOut(), 'manual');
|
|
4080
|
+
|
|
4081
|
+
cd.setIsTelemetryOptOutManual(false);
|
|
4082
|
+
assert.isUndefined(cd.getTelemetryOptOut());
|
|
4083
|
+
|
|
4084
|
+
cd.setIsTelemetryOptOutManual(true);
|
|
4085
|
+
assert.equal(cd.getTelemetryOptOut(), 'manual');
|
|
4086
|
+
});
|
|
4087
|
+
|
|
4088
|
+
it('manual opt-out takes precedence when automatic is also set', () => {
|
|
4089
|
+
cd.setIsTelemetryOptOutAutomatic(true);
|
|
4090
|
+
cd.setIsTelemetryOptOutManual(true);
|
|
4091
|
+
assert.equal(cd.getTelemetryOptOut(), 'manual');
|
|
4092
|
+
});
|
|
4093
|
+
});
|
|
4094
|
+
|
|
4095
|
+
describe('#setIsTelemetryOptOutAutomatic', () => {
|
|
4096
|
+
it('sets automatic telemetry opt-out to true', () => {
|
|
4097
|
+
cd.setIsTelemetryOptOutAutomatic(true);
|
|
4098
|
+
assert.equal(cd.getTelemetryOptOut(), 'automatic');
|
|
4099
|
+
});
|
|
4100
|
+
|
|
4101
|
+
it('sets automatic telemetry opt-out to false', () => {
|
|
4102
|
+
cd.setIsTelemetryOptOutAutomatic(true);
|
|
4103
|
+
cd.setIsTelemetryOptOutAutomatic(false);
|
|
4104
|
+
assert.isUndefined(cd.getTelemetryOptOut());
|
|
4105
|
+
});
|
|
4106
|
+
|
|
4107
|
+
it('can toggle automatic telemetry opt-out multiple times', () => {
|
|
4108
|
+
cd.setIsTelemetryOptOutAutomatic(true);
|
|
4109
|
+
assert.equal(cd.getTelemetryOptOut(), 'automatic');
|
|
4110
|
+
|
|
4111
|
+
cd.setIsTelemetryOptOutAutomatic(false);
|
|
4112
|
+
assert.isUndefined(cd.getTelemetryOptOut());
|
|
4113
|
+
|
|
4114
|
+
cd.setIsTelemetryOptOutAutomatic(true);
|
|
4115
|
+
assert.equal(cd.getTelemetryOptOut(), 'automatic');
|
|
4116
|
+
});
|
|
4117
|
+
|
|
4118
|
+
it('does not override manual opt-out', () => {
|
|
4119
|
+
cd.setIsTelemetryOptOutManual(true);
|
|
4120
|
+
cd.setIsTelemetryOptOutAutomatic(true);
|
|
4121
|
+
assert.equal(cd.getTelemetryOptOut(), 'manual');
|
|
4122
|
+
|
|
4123
|
+
cd.setIsTelemetryOptOutAutomatic(false);
|
|
4124
|
+
assert.equal(cd.getTelemetryOptOut(), 'manual');
|
|
4125
|
+
});
|
|
4126
|
+
});
|
|
4127
|
+
|
|
3602
4128
|
describe('#getSubServiceType', () => {
|
|
3603
4129
|
it('returns subServicetype as PMR when PMR meeting', () => {
|
|
3604
4130
|
fakeMeeting.meetingInfo = {
|
|
@@ -3648,6 +4174,15 @@ describe('internal-plugin-metrics', () => {
|
|
|
3648
4174
|
assert.deepEqual(cd.getSubServiceType(fakeMeeting), 'Webcast');
|
|
3649
4175
|
});
|
|
3650
4176
|
|
|
4177
|
+
it('returns subServicetype as LargeScaleWebinar when meeting is converged Webinar and enable large scale', () => {
|
|
4178
|
+
fakeMeeting.meetingInfo = {
|
|
4179
|
+
enableEvent: true,
|
|
4180
|
+
enableConvergedArchitecture: true,
|
|
4181
|
+
enableConvergedWebinarLargeScale: true,
|
|
4182
|
+
};
|
|
4183
|
+
assert.deepEqual(cd.getSubServiceType(fakeMeeting), 'LargeScaleWebinar');
|
|
4184
|
+
});
|
|
4185
|
+
|
|
3651
4186
|
it('returns subServicetype as undefined when correct parameters are not found', () => {
|
|
3652
4187
|
fakeMeeting.meetingInfo = {};
|
|
3653
4188
|
assert.deepEqual(cd.getSubServiceType(fakeMeeting), undefined);
|
|
@@ -3701,18 +4236,22 @@ describe('internal-plugin-metrics', () => {
|
|
|
3701
4236
|
correlationId: 'correlationId',
|
|
3702
4237
|
deviceId: 'deviceUrl',
|
|
3703
4238
|
locusId: 'url',
|
|
4239
|
+
locusSessionId: 'locusSessionId',
|
|
3704
4240
|
locusStartTime: 'lastActive',
|
|
3705
4241
|
locusUrl: 'locus/url',
|
|
3706
4242
|
orgId: 'orgId',
|
|
3707
4243
|
userId: 'userId',
|
|
3708
4244
|
},
|
|
3709
4245
|
loginType: 'login-ci',
|
|
4246
|
+
telemetryOptOut: undefined,
|
|
3710
4247
|
name: 'client.exit.app',
|
|
3711
4248
|
trigger: 'user-interaction',
|
|
3712
4249
|
userType: 'host',
|
|
3713
4250
|
isConvergedArchitectureEnabled: undefined,
|
|
3714
4251
|
webexSubServiceType: undefined,
|
|
3715
4252
|
webClientPreload: undefined,
|
|
4253
|
+
isVipMeeting: false,
|
|
4254
|
+
isAutomatedUser: false,
|
|
3716
4255
|
},
|
|
3717
4256
|
eventId: 'my-fake-id',
|
|
3718
4257
|
origin: {
|
|
@@ -3880,7 +4419,11 @@ describe('internal-plugin-metrics', () => {
|
|
|
3880
4419
|
cd.submitToCallDiagnosticsPreLogin({event: 'test'}, preLoginId);
|
|
3881
4420
|
//@ts-ignore
|
|
3882
4421
|
assert.calledWith(cd.preLoginMetricsBatcher.savePreLoginId, preLoginId);
|
|
3883
|
-
assert.calledWith(requestStub, {
|
|
4422
|
+
assert.calledWith(requestStub, {
|
|
4423
|
+
eventPayload: {event: 'test'},
|
|
4424
|
+
type: ['diagnostic-event'],
|
|
4425
|
+
markTelemetryOptOutOnResponse: true,
|
|
4426
|
+
});
|
|
3884
4427
|
});
|
|
3885
4428
|
});
|
|
3886
4429
|
|
|
@@ -4081,12 +4624,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
4081
4624
|
payload: {
|
|
4082
4625
|
meetingSummaryInfo: {
|
|
4083
4626
|
featureName: 'syncSystemMuteStatus',
|
|
4084
|
-
featureActions: [
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4627
|
+
featureActions: [
|
|
4628
|
+
{
|
|
4629
|
+
actionName: 'syncMeetingMicUnmuteStatusToSystem',
|
|
4630
|
+
actionId: '14200',
|
|
4631
|
+
isInitialValue: false,
|
|
4632
|
+
clickCount: '1',
|
|
4633
|
+
},
|
|
4634
|
+
],
|
|
4090
4635
|
},
|
|
4091
4636
|
},
|
|
4092
4637
|
options,
|
|
@@ -4104,24 +4649,30 @@ describe('internal-plugin-metrics', () => {
|
|
|
4104
4649
|
orgId: 'orgId',
|
|
4105
4650
|
locusUrl: 'locus/url',
|
|
4106
4651
|
locusId: 'url',
|
|
4652
|
+
locusSessionId: 'locusSessionId',
|
|
4107
4653
|
locusStartTime: 'lastActive',
|
|
4108
4654
|
},
|
|
4109
|
-
eventData: {
|
|
4655
|
+
eventData: {webClientDomain: 'whatever'},
|
|
4110
4656
|
userType: 'host',
|
|
4111
4657
|
loginType: 'login-ci',
|
|
4658
|
+
telemetryOptOut: undefined,
|
|
4112
4659
|
isConvergedArchitectureEnabled: undefined,
|
|
4113
4660
|
webexSubServiceType: undefined,
|
|
4114
4661
|
webClientPreload: undefined,
|
|
4662
|
+
isVipMeeting: false,
|
|
4663
|
+
isAutomatedUser: false,
|
|
4115
4664
|
meetingSummaryInfo: {
|
|
4116
4665
|
featureName: 'syncSystemMuteStatus',
|
|
4117
|
-
featureActions: [
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4666
|
+
featureActions: [
|
|
4667
|
+
{
|
|
4668
|
+
actionName: 'syncMeetingMicUnmuteStatusToSystem',
|
|
4669
|
+
actionId: '14200',
|
|
4670
|
+
isInitialValue: false,
|
|
4671
|
+
clickCount: '1',
|
|
4672
|
+
},
|
|
4673
|
+
],
|
|
4123
4674
|
},
|
|
4124
|
-
key:
|
|
4675
|
+
key: 'UcfFeatureUsage',
|
|
4125
4676
|
},
|
|
4126
4677
|
options
|
|
4127
4678
|
);
|
|
@@ -4134,32 +4685,38 @@ describe('internal-plugin-metrics', () => {
|
|
|
4134
4685
|
},
|
|
4135
4686
|
event: {
|
|
4136
4687
|
canProceed: true,
|
|
4137
|
-
eventData: {
|
|
4688
|
+
eventData: {webClientDomain: 'whatever'},
|
|
4138
4689
|
identifiers: {
|
|
4139
4690
|
correlationId: 'correlationId',
|
|
4140
4691
|
deviceId: 'deviceUrl',
|
|
4141
4692
|
locusId: 'url',
|
|
4142
4693
|
locusStartTime: 'lastActive',
|
|
4143
4694
|
locusUrl: 'locus/url',
|
|
4695
|
+
locusSessionId: 'locusSessionId',
|
|
4144
4696
|
orgId: 'orgId',
|
|
4145
4697
|
userId: 'userId',
|
|
4146
4698
|
},
|
|
4147
4699
|
loginType: 'login-ci',
|
|
4700
|
+
telemetryOptOut: undefined,
|
|
4148
4701
|
name: 'client.feature.meeting.summary',
|
|
4149
4702
|
userType: 'host',
|
|
4150
4703
|
isConvergedArchitectureEnabled: undefined,
|
|
4151
4704
|
webexSubServiceType: undefined,
|
|
4152
4705
|
webClientPreload: undefined,
|
|
4706
|
+
isVipMeeting: false,
|
|
4707
|
+
isAutomatedUser: false,
|
|
4153
4708
|
meetingSummaryInfo: {
|
|
4154
4709
|
featureName: 'syncSystemMuteStatus',
|
|
4155
|
-
featureActions: [
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4710
|
+
featureActions: [
|
|
4711
|
+
{
|
|
4712
|
+
actionName: 'syncMeetingMicUnmuteStatusToSystem',
|
|
4713
|
+
actionId: '14200',
|
|
4714
|
+
isInitialValue: false,
|
|
4715
|
+
clickCount: '1',
|
|
4716
|
+
},
|
|
4717
|
+
],
|
|
4161
4718
|
},
|
|
4162
|
-
key:
|
|
4719
|
+
key: 'UcfFeatureUsage',
|
|
4163
4720
|
},
|
|
4164
4721
|
originTime: {
|
|
4165
4722
|
sent: 'not_defined_yet',
|
|
@@ -4200,12 +4757,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
4200
4757
|
payload: {
|
|
4201
4758
|
meetingSummaryInfo: {
|
|
4202
4759
|
featureName: 'syncSystemMuteStatus',
|
|
4203
|
-
featureActions: [
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4760
|
+
featureActions: [
|
|
4761
|
+
{
|
|
4762
|
+
actionName: 'syncMeetingMicUnmuteStatusToSystem',
|
|
4763
|
+
actionId: '14200',
|
|
4764
|
+
isInitialValue: false,
|
|
4765
|
+
clickCount: '1',
|
|
4766
|
+
},
|
|
4767
|
+
],
|
|
4209
4768
|
},
|
|
4210
4769
|
},
|
|
4211
4770
|
delaySubmitEvent: true,
|
|
@@ -4217,12 +4776,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
4217
4776
|
payload: {
|
|
4218
4777
|
meetingSummaryInfo: {
|
|
4219
4778
|
featureName: 'syncSystemVideoStatus',
|
|
4220
|
-
featureActions: [
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4779
|
+
featureActions: [
|
|
4780
|
+
{
|
|
4781
|
+
actionName: 'syncMeetingVideoUnmuteStatusToSystem',
|
|
4782
|
+
actionId: '13400',
|
|
4783
|
+
isInitialValue: false,
|
|
4784
|
+
clickCount: '1',
|
|
4785
|
+
},
|
|
4786
|
+
],
|
|
4226
4787
|
},
|
|
4227
4788
|
},
|
|
4228
4789
|
delaySubmitEvent: true,
|
|
@@ -4240,12 +4801,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
4240
4801
|
payload: {
|
|
4241
4802
|
meetingSummaryInfo: {
|
|
4242
4803
|
featureName: 'syncSystemMuteStatus',
|
|
4243
|
-
featureActions: [
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4804
|
+
featureActions: [
|
|
4805
|
+
{
|
|
4806
|
+
actionName: 'syncMeetingMicUnmuteStatusToSystem',
|
|
4807
|
+
actionId: '14200',
|
|
4808
|
+
isInitialValue: false,
|
|
4809
|
+
clickCount: '1',
|
|
4810
|
+
},
|
|
4811
|
+
],
|
|
4249
4812
|
},
|
|
4250
4813
|
},
|
|
4251
4814
|
options: {
|
|
@@ -4258,12 +4821,14 @@ describe('internal-plugin-metrics', () => {
|
|
|
4258
4821
|
payload: {
|
|
4259
4822
|
meetingSummaryInfo: {
|
|
4260
4823
|
featureName: 'syncSystemVideoStatus',
|
|
4261
|
-
featureActions: [
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4824
|
+
featureActions: [
|
|
4825
|
+
{
|
|
4826
|
+
actionName: 'syncMeetingVideoUnmuteStatusToSystem',
|
|
4827
|
+
actionId: '13400',
|
|
4828
|
+
isInitialValue: false,
|
|
4829
|
+
clickCount: '1',
|
|
4830
|
+
},
|
|
4831
|
+
],
|
|
4267
4832
|
},
|
|
4268
4833
|
},
|
|
4269
4834
|
options: {
|
|
@@ -4287,17 +4852,17 @@ describe('internal-plugin-metrics', () => {
|
|
|
4287
4852
|
|
|
4288
4853
|
it('should clear event limits for specific correlationId only', () => {
|
|
4289
4854
|
// Use the actual correlationIds from our fakeMeeting fixtures
|
|
4290
|
-
const correlationId1 = fakeMeeting.correlationId;
|
|
4291
|
-
const correlationId2 = fakeMeeting2.correlationId;
|
|
4292
|
-
const options1 = {
|
|
4293
|
-
const options2 = {
|
|
4294
|
-
const payload = {
|
|
4855
|
+
const correlationId1 = fakeMeeting.correlationId; // e.g. 'correlationId1'
|
|
4856
|
+
const correlationId2 = fakeMeeting2.correlationId; // e.g. 'correlationId2'
|
|
4857
|
+
const options1 = {meetingId: fakeMeeting.id};
|
|
4858
|
+
const options2 = {meetingId: fakeMeeting2.id};
|
|
4859
|
+
const payload = {mediaType: 'video' as const};
|
|
4295
4860
|
|
|
4296
4861
|
// Set up events for both correlations to trigger limits
|
|
4297
|
-
cd.submitClientEvent({
|
|
4298
|
-
cd.submitClientEvent({
|
|
4299
|
-
cd.submitClientEvent({
|
|
4300
|
-
cd.submitClientEvent({
|
|
4862
|
+
cd.submitClientEvent({name: 'client.media.render.start', payload, options: options1});
|
|
4863
|
+
cd.submitClientEvent({name: 'client.media.render.start', payload, options: options2});
|
|
4864
|
+
cd.submitClientEvent({name: 'client.media.render.start', payload, options: options1});
|
|
4865
|
+
cd.submitClientEvent({name: 'client.media.render.start', payload, options: options2});
|
|
4301
4866
|
assert.isTrue(cd.eventLimitTracker.size > 0);
|
|
4302
4867
|
assert.isTrue(cd.eventLimitWarningsLogged.size > 0);
|
|
4303
4868
|
|
|
@@ -4308,17 +4873,17 @@ describe('internal-plugin-metrics', () => {
|
|
|
4308
4873
|
const remainingWarningKeys = Array.from(cd.eventLimitWarningsLogged.keys());
|
|
4309
4874
|
|
|
4310
4875
|
// Should have no keys with correlationId1
|
|
4311
|
-
assert.isFalse(remainingTrackerKeys.some(key => key.split(':')[1] === correlationId1));
|
|
4312
|
-
assert.isFalse(remainingWarningKeys.some(key => key.split(':')[1] === correlationId1));
|
|
4876
|
+
assert.isFalse(remainingTrackerKeys.some((key) => key.split(':')[1] === correlationId1));
|
|
4877
|
+
assert.isFalse(remainingWarningKeys.some((key) => key.split(':')[1] === correlationId1));
|
|
4313
4878
|
|
|
4314
4879
|
// Should still have keys with correlationId2
|
|
4315
|
-
assert.isTrue(remainingTrackerKeys.some(key => key.split(':')[1] === correlationId2));
|
|
4316
|
-
assert.isTrue(remainingWarningKeys.some(key => key.split(':')[1] === correlationId2));
|
|
4880
|
+
assert.isTrue(remainingTrackerKeys.some((key) => key.split(':')[1] === correlationId2));
|
|
4881
|
+
assert.isTrue(remainingWarningKeys.some((key) => key.split(':')[1] === correlationId2));
|
|
4317
4882
|
});
|
|
4318
4883
|
|
|
4319
4884
|
it('should handle empty correlationId gracefully', () => {
|
|
4320
|
-
const options = {
|
|
4321
|
-
const payload = {
|
|
4885
|
+
const options = {meetingId: fakeMeeting.id};
|
|
4886
|
+
const payload = {mediaType: 'video' as const};
|
|
4322
4887
|
|
|
4323
4888
|
// Set up some tracking data
|
|
4324
4889
|
cd.submitClientEvent({
|
|
@@ -4346,8 +4911,8 @@ describe('internal-plugin-metrics', () => {
|
|
|
4346
4911
|
});
|
|
4347
4912
|
|
|
4348
4913
|
it('should handle non-existent correlationId gracefully', () => {
|
|
4349
|
-
const options = {
|
|
4350
|
-
const payload = {
|
|
4914
|
+
const options = {meetingId: fakeMeeting.id};
|
|
4915
|
+
const payload = {mediaType: 'video' as const};
|
|
4351
4916
|
|
|
4352
4917
|
// Set up some tracking data
|
|
4353
4918
|
cd.submitClientEvent({
|
|
@@ -4368,10 +4933,10 @@ describe('internal-plugin-metrics', () => {
|
|
|
4368
4933
|
|
|
4369
4934
|
it('should clear multiple event types for the same correlationId', () => {
|
|
4370
4935
|
const correlationId = fakeMeeting.correlationId;
|
|
4371
|
-
const options = {
|
|
4372
|
-
const videoPayload = {
|
|
4373
|
-
const audioPayload = {
|
|
4374
|
-
const roapPayload = {
|
|
4936
|
+
const options = {meetingId: fakeMeeting.id};
|
|
4937
|
+
const videoPayload = {mediaType: 'video' as const};
|
|
4938
|
+
const audioPayload = {mediaType: 'audio' as const};
|
|
4939
|
+
const roapPayload = {roap: {messageType: 'OFFER' as const}};
|
|
4375
4940
|
|
|
4376
4941
|
// Set up multiple event types for the same correlation
|
|
4377
4942
|
cd.submitClientEvent({
|
|
@@ -4424,8 +4989,8 @@ describe('internal-plugin-metrics', () => {
|
|
|
4424
4989
|
|
|
4425
4990
|
it('should allow events to be sent again after clearing limits for correlationId', () => {
|
|
4426
4991
|
const correlationId = fakeMeeting.correlationId;
|
|
4427
|
-
const options = {
|
|
4428
|
-
const payload = {
|
|
4992
|
+
const options = {meetingId: fakeMeeting.id};
|
|
4993
|
+
const payload = {mediaType: 'video' as const};
|
|
4429
4994
|
const submitToCallDiagnosticsStub = sinon.stub(cd, 'submitToCallDiagnostics');
|
|
4430
4995
|
|
|
4431
4996
|
// Send first event (should succeed)
|