@webex/internal-plugin-metrics 3.4.0 → 3.5.0-next.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/behavioral-metrics.js +63 -0
- package/dist/behavioral-metrics.js.map +1 -0
- package/dist/business-metrics.js +62 -0
- package/dist/business-metrics.js.map +1 -0
- package/dist/call-diagnostic/call-diagnostic-metrics.js +15 -5
- package/dist/call-diagnostic/call-diagnostic-metrics.js.map +1 -1
- package/dist/call-diagnostic/call-diagnostic-metrics.util.js +8 -3
- package/dist/call-diagnostic/call-diagnostic-metrics.util.js.map +1 -1
- package/dist/{behavioral/behavioral-metrics.js → generic-metrics.js} +77 -92
- package/dist/generic-metrics.js.map +1 -0
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/dist/metrics.js +1 -1
- package/dist/metrics.types.js.map +1 -1
- package/dist/new-metrics.js +122 -24
- package/dist/new-metrics.js.map +1 -1
- package/dist/operational-metrics.js +56 -0
- package/dist/operational-metrics.js.map +1 -0
- package/dist/types/behavioral-metrics.d.ts +25 -0
- package/dist/types/business-metrics.d.ts +19 -0
- package/dist/types/call-diagnostic/call-diagnostic-metrics.d.ts +21 -5
- package/dist/types/call-diagnostic/call-diagnostic-metrics.util.d.ts +2 -1
- package/dist/types/generic-metrics.d.ts +63 -0
- package/dist/types/index.d.ts +4 -2
- package/dist/types/metrics.types.d.ts +26 -14
- package/dist/types/new-metrics.d.ts +41 -9
- package/dist/types/operational-metrics.d.ts +19 -0
- package/package.json +12 -12
- package/src/behavioral-metrics.ts +40 -0
- package/src/business-metrics.ts +30 -0
- package/src/call-diagnostic/call-diagnostic-metrics.ts +19 -2
- package/src/call-diagnostic/call-diagnostic-metrics.util.ts +7 -0
- package/src/generic-metrics.ts +146 -0
- package/src/index.ts +5 -1
- package/src/metrics.types.ts +30 -16
- package/src/new-metrics.ts +95 -17
- package/src/operational-metrics.ts +24 -0
- package/test/unit/spec/behavioral/behavioral-metrics.ts +51 -10
- package/test/unit/spec/business/business-metrics.ts +120 -0
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.ts +166 -1
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.util.ts +15 -5
- package/test/unit/spec/new-metrics.ts +14 -0
- package/test/unit/spec/operational/operational-metrics.ts +115 -0
- package/dist/behavioral/behavioral-metrics.js.map +0 -1
- package/dist/behavioral/config.js +0 -11
- package/dist/behavioral/config.js.map +0 -1
- package/dist/types/behavioral/behavioral-metrics.d.ts +0 -63
- package/dist/types/behavioral/config.d.ts +0 -1
- package/src/behavioral/behavioral-metrics.ts +0 -179
- package/src/behavioral/config.ts +0 -3
|
@@ -30,6 +30,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
30
30
|
const fakeMeeting = {
|
|
31
31
|
id: '1',
|
|
32
32
|
correlationId: 'correlationId',
|
|
33
|
+
sessionCorrelationId: undefined,
|
|
33
34
|
callStateForMetrics: {},
|
|
34
35
|
environment: 'meeting_evn',
|
|
35
36
|
locusUrl: 'locus/url',
|
|
@@ -354,6 +355,36 @@ describe('internal-plugin-metrics', () => {
|
|
|
354
355
|
|
|
355
356
|
assert.deepEqual(res, {
|
|
356
357
|
correlationId: 'correlationId',
|
|
358
|
+
sessionCorrelationId: undefined,
|
|
359
|
+
deviceId: 'deviceUrl',
|
|
360
|
+
locusId: 'url',
|
|
361
|
+
locusStartTime: 'lastActive',
|
|
362
|
+
locusUrl: 'locus/url',
|
|
363
|
+
machineId: 'installationId',
|
|
364
|
+
mediaAgentAlias: 'mediaAgentAlias',
|
|
365
|
+
mediaAgentGroupId: 'mediaAgentGroupId',
|
|
366
|
+
orgId: 'orgId',
|
|
367
|
+
userId: 'userId',
|
|
368
|
+
});
|
|
369
|
+
});
|
|
370
|
+
|
|
371
|
+
it('should build identifiers correctly', () => {
|
|
372
|
+
cd.device = {
|
|
373
|
+
...cd.device,
|
|
374
|
+
config: {installationId: 'installationId'},
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
const res = cd.getIdentifiers({
|
|
378
|
+
mediaConnections: [
|
|
379
|
+
{mediaAgentAlias: 'mediaAgentAlias', mediaAgentGroupId: 'mediaAgentGroupId'},
|
|
380
|
+
],
|
|
381
|
+
meeting: fakeMeeting,
|
|
382
|
+
sessionCorrelationId: 'sessionCorrelationId',
|
|
383
|
+
});
|
|
384
|
+
|
|
385
|
+
assert.deepEqual(res, {
|
|
386
|
+
correlationId: 'correlationId',
|
|
387
|
+
sessionCorrelationId: 'sessionCorrelationId',
|
|
357
388
|
deviceId: 'deviceUrl',
|
|
358
389
|
locusId: 'url',
|
|
359
390
|
locusStartTime: 'lastActive',
|
|
@@ -372,6 +403,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
372
403
|
{mediaAgentAlias: 'mediaAgentAlias', mediaAgentGroupId: 'mediaAgentGroupId'},
|
|
373
404
|
],
|
|
374
405
|
webexConferenceIdStr: 'webexConferenceIdStr',
|
|
406
|
+
sessionCorrelationId: 'sessionCorrelationId',
|
|
375
407
|
globalMeetingId: 'globalMeetingId',
|
|
376
408
|
meeting: {
|
|
377
409
|
...fakeMeeting,
|
|
@@ -386,6 +418,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
386
418
|
assert.deepEqual(res, {
|
|
387
419
|
correlationId: 'correlationId',
|
|
388
420
|
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
421
|
+
sessionCorrelationId: 'sessionCorrelationId',
|
|
389
422
|
globalMeetingId: 'globalMeetingId1',
|
|
390
423
|
deviceId: 'deviceUrl',
|
|
391
424
|
locusId: 'url',
|
|
@@ -417,6 +450,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
417
450
|
|
|
418
451
|
assert.deepEqual(res, {
|
|
419
452
|
correlationId: 'correlationId',
|
|
453
|
+
sessionCorrelationId: undefined,
|
|
420
454
|
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
421
455
|
globalMeetingId: 'globalMeetingId1',
|
|
422
456
|
deviceId: 'deviceUrl',
|
|
@@ -450,6 +484,43 @@ describe('internal-plugin-metrics', () => {
|
|
|
450
484
|
|
|
451
485
|
assert.deepEqual(res, {
|
|
452
486
|
correlationId: 'correlationId',
|
|
487
|
+
sessionCorrelationId: undefined,
|
|
488
|
+
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
489
|
+
globalMeetingId: 'globalMeetingId1',
|
|
490
|
+
deviceId: 'deviceUrl',
|
|
491
|
+
locusId: 'url',
|
|
492
|
+
locusStartTime: 'lastActive',
|
|
493
|
+
locusUrl: 'locus/url',
|
|
494
|
+
mediaAgentAlias: 'mediaAgentAlias',
|
|
495
|
+
mediaAgentGroupId: 'mediaAgentGroupId',
|
|
496
|
+
orgId: 'orgId',
|
|
497
|
+
userId: 'userId',
|
|
498
|
+
webexSiteName: 'siteName1',
|
|
499
|
+
});
|
|
500
|
+
});
|
|
501
|
+
|
|
502
|
+
it('should build identifiers correctly with a meeting that has sessionCorrelationId', () => {
|
|
503
|
+
const res = cd.getIdentifiers({
|
|
504
|
+
mediaConnections: [
|
|
505
|
+
{mediaAgentAlias: 'mediaAgentAlias', mediaAgentGroupId: 'mediaAgentGroupId'},
|
|
506
|
+
],
|
|
507
|
+
webexConferenceIdStr: 'webexConferenceIdStr',
|
|
508
|
+
globalMeetingId: 'globalMeetingId',
|
|
509
|
+
meeting: {
|
|
510
|
+
...fakeMeeting,
|
|
511
|
+
sessionCorrelationId: 'sessionCorrelationId1',
|
|
512
|
+
meetingInfo: {
|
|
513
|
+
...fakeMeeting.meetingInfo,
|
|
514
|
+
confIdStr: 'webexConferenceIdStr1',
|
|
515
|
+
meetingId: 'globalMeetingId1',
|
|
516
|
+
siteName: 'siteName1',
|
|
517
|
+
},
|
|
518
|
+
},
|
|
519
|
+
});
|
|
520
|
+
|
|
521
|
+
assert.deepEqual(res, {
|
|
522
|
+
correlationId: 'correlationId',
|
|
523
|
+
sessionCorrelationId: 'sessionCorrelationId1',
|
|
453
524
|
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
454
525
|
globalMeetingId: 'globalMeetingId1',
|
|
455
526
|
deviceId: 'deviceUrl',
|
|
@@ -472,6 +543,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
472
543
|
|
|
473
544
|
assert.deepEqual(res, {
|
|
474
545
|
correlationId: 'correlationId',
|
|
546
|
+
sessionCorrelationId: 'unknown',
|
|
475
547
|
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
476
548
|
deviceId: 'deviceUrl',
|
|
477
549
|
locusUrl: 'locus-url',
|
|
@@ -488,6 +560,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
488
560
|
|
|
489
561
|
assert.deepEqual(res, {
|
|
490
562
|
correlationId: 'correlationId',
|
|
563
|
+
sessionCorrelationId: 'unknown',
|
|
491
564
|
globalMeetingId: 'globalMeetingId1',
|
|
492
565
|
deviceId: 'deviceUrl',
|
|
493
566
|
locusUrl: 'locus-url',
|
|
@@ -503,6 +576,23 @@ describe('internal-plugin-metrics', () => {
|
|
|
503
576
|
|
|
504
577
|
assert.deepEqual(res, {
|
|
505
578
|
correlationId: 'correlationId',
|
|
579
|
+
sessionCorrelationId: 'unknown',
|
|
580
|
+
deviceId: 'deviceUrl',
|
|
581
|
+
locusUrl: 'locus-url',
|
|
582
|
+
orgId: 'orgId',
|
|
583
|
+
userId: 'userId',
|
|
584
|
+
});
|
|
585
|
+
});
|
|
586
|
+
|
|
587
|
+
it('should build identifiers correctly given sessionCorrelationId', () => {
|
|
588
|
+
const res = cd.getIdentifiers({
|
|
589
|
+
correlationId: 'correlationId',
|
|
590
|
+
sessionCorrelationId: 'sessionCorrelationId',
|
|
591
|
+
});
|
|
592
|
+
|
|
593
|
+
assert.deepEqual(res, {
|
|
594
|
+
correlationId: 'correlationId',
|
|
595
|
+
sessionCorrelationId: 'sessionCorrelationId',
|
|
506
596
|
deviceId: 'deviceUrl',
|
|
507
597
|
locusUrl: 'locus-url',
|
|
508
598
|
orgId: 'orgId',
|
|
@@ -531,6 +621,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
531
621
|
|
|
532
622
|
assert.deepEqual(res, {
|
|
533
623
|
correlationId: 'correlationId',
|
|
624
|
+
sessionCorrelationId: 'unknown',
|
|
534
625
|
locusUrl: 'locus-url',
|
|
535
626
|
deviceId: 'deviceUrl',
|
|
536
627
|
orgId: 'orgId',
|
|
@@ -608,6 +699,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
608
699
|
meeting: fakeMeeting,
|
|
609
700
|
mediaConnections: [{mediaAgentAlias: 'alias', mediaAgentGroupId: '1'}],
|
|
610
701
|
webexConferenceIdStr: undefined,
|
|
702
|
+
sessionCorrelationId: undefined,
|
|
611
703
|
globalMeetingId: undefined,
|
|
612
704
|
});
|
|
613
705
|
assert.notCalled(generateClientEventErrorPayloadSpy);
|
|
@@ -620,6 +712,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
620
712
|
},
|
|
621
713
|
identifiers: {
|
|
622
714
|
correlationId: 'correlationId',
|
|
715
|
+
sessionCorrelationId: undefined,
|
|
623
716
|
deviceId: 'deviceUrl',
|
|
624
717
|
locusId: 'url',
|
|
625
718
|
locusStartTime: 'lastActive',
|
|
@@ -645,6 +738,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
645
738
|
},
|
|
646
739
|
identifiers: {
|
|
647
740
|
correlationId: 'correlationId',
|
|
741
|
+
sessionCorrelationId: undefined,
|
|
648
742
|
deviceId: 'deviceUrl',
|
|
649
743
|
locusId: 'url',
|
|
650
744
|
locusStartTime: 'lastActive',
|
|
@@ -681,6 +775,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
681
775
|
},
|
|
682
776
|
identifiers: {
|
|
683
777
|
correlationId: 'correlationId',
|
|
778
|
+
sessionCorrelationId: undefined,
|
|
684
779
|
deviceId: 'deviceUrl',
|
|
685
780
|
locusId: 'url',
|
|
686
781
|
locusStartTime: 'lastActive',
|
|
@@ -762,7 +857,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
762
857
|
]);
|
|
763
858
|
});
|
|
764
859
|
|
|
765
|
-
it('should submit client event successfully with correlationId, webexConferenceIdStr and globalMeetingId', () => {
|
|
860
|
+
it('should submit client event successfully with correlationId, webexConferenceIdStr, sessionCorrelationId, and globalMeetingId', () => {
|
|
766
861
|
const prepareDiagnosticEventSpy = sinon.spy(cd, 'prepareDiagnosticEvent');
|
|
767
862
|
const submitToCallDiagnosticsSpy = sinon.spy(cd, 'submitToCallDiagnostics');
|
|
768
863
|
const generateClientEventErrorPayloadSpy = sinon.spy(cd, 'generateClientEventErrorPayload');
|
|
@@ -773,6 +868,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
773
868
|
correlationId: 'correlationId',
|
|
774
869
|
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
775
870
|
globalMeetingId: 'globalMeetingId1',
|
|
871
|
+
sessionCorrelationId: 'sessionCorrelationId1'
|
|
776
872
|
};
|
|
777
873
|
|
|
778
874
|
cd.submitClientEvent({
|
|
@@ -784,6 +880,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
784
880
|
correlationId: 'correlationId',
|
|
785
881
|
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
786
882
|
globalMeetingId: 'globalMeetingId1',
|
|
883
|
+
sessionCorrelationId: 'sessionCorrelationId1',
|
|
787
884
|
preLoginId: undefined,
|
|
788
885
|
});
|
|
789
886
|
|
|
@@ -798,6 +895,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
798
895
|
identifiers: {
|
|
799
896
|
correlationId: 'correlationId',
|
|
800
897
|
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
898
|
+
sessionCorrelationId: 'sessionCorrelationId1',
|
|
801
899
|
globalMeetingId: 'globalMeetingId1',
|
|
802
900
|
deviceId: 'deviceUrl',
|
|
803
901
|
locusUrl: 'locus-url',
|
|
@@ -818,6 +916,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
818
916
|
identifiers: {
|
|
819
917
|
correlationId: 'correlationId',
|
|
820
918
|
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
919
|
+
sessionCorrelationId: 'sessionCorrelationId1',
|
|
821
920
|
globalMeetingId: 'globalMeetingId1',
|
|
822
921
|
deviceId: 'deviceUrl',
|
|
823
922
|
locusUrl: 'locus-url',
|
|
@@ -863,6 +962,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
863
962
|
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
864
963
|
globalMeetingId: 'globalMeetingId1',
|
|
865
964
|
preLoginId: 'myPreLoginId',
|
|
965
|
+
sessionCorrelationId: 'sessionCorrelationId1'
|
|
866
966
|
};
|
|
867
967
|
|
|
868
968
|
cd.submitClientEvent({
|
|
@@ -875,6 +975,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
875
975
|
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
876
976
|
globalMeetingId: 'globalMeetingId1',
|
|
877
977
|
preLoginId: 'myPreLoginId',
|
|
978
|
+
sessionCorrelationId: 'sessionCorrelationId1'
|
|
878
979
|
});
|
|
879
980
|
|
|
880
981
|
assert.notCalled(generateClientEventErrorPayloadSpy);
|
|
@@ -887,6 +988,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
887
988
|
},
|
|
888
989
|
identifiers: {
|
|
889
990
|
correlationId: 'correlationId',
|
|
991
|
+
sessionCorrelationId: 'sessionCorrelationId1',
|
|
890
992
|
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
891
993
|
globalMeetingId: 'globalMeetingId1',
|
|
892
994
|
deviceId: 'deviceUrl',
|
|
@@ -913,6 +1015,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
913
1015
|
canProceed: true,
|
|
914
1016
|
identifiers: {
|
|
915
1017
|
correlationId: 'correlationId',
|
|
1018
|
+
sessionCorrelationId: 'sessionCorrelationId1',
|
|
916
1019
|
userId: 'myPreLoginId',
|
|
917
1020
|
deviceId: 'deviceUrl',
|
|
918
1021
|
orgId: 'orgId',
|
|
@@ -949,6 +1052,58 @@ describe('internal-plugin-metrics', () => {
|
|
|
949
1052
|
},
|
|
950
1053
|
identifiers: {
|
|
951
1054
|
correlationId: 'correlationId2',
|
|
1055
|
+
sessionCorrelationId: undefined,
|
|
1056
|
+
deviceId: 'deviceUrl',
|
|
1057
|
+
locusId: 'url',
|
|
1058
|
+
locusStartTime: 'lastActive',
|
|
1059
|
+
locusUrl: 'locus/url',
|
|
1060
|
+
mediaAgentAlias: 'alias',
|
|
1061
|
+
mediaAgentGroupId: '1',
|
|
1062
|
+
orgId: 'orgId',
|
|
1063
|
+
userId: 'userId',
|
|
1064
|
+
},
|
|
1065
|
+
loginType: 'fakeLoginType',
|
|
1066
|
+
name: 'client.alert.displayed',
|
|
1067
|
+
userType: 'host',
|
|
1068
|
+
isConvergedArchitectureEnabled: undefined,
|
|
1069
|
+
webexSubServiceType: undefined,
|
|
1070
|
+
},
|
|
1071
|
+
eventId: 'my-fake-id',
|
|
1072
|
+
origin: {
|
|
1073
|
+
origin: 'fake-origin',
|
|
1074
|
+
},
|
|
1075
|
+
originTime: {
|
|
1076
|
+
sent: 'not_defined_yet',
|
|
1077
|
+
triggered: now.toISOString(),
|
|
1078
|
+
},
|
|
1079
|
+
senderCountryCode: 'UK',
|
|
1080
|
+
version: 1,
|
|
1081
|
+
});
|
|
1082
|
+
});
|
|
1083
|
+
|
|
1084
|
+
it('should use meeting loginType if present and meetingId provided, with sessionCorrelationId', () => {
|
|
1085
|
+
const submitToCallDiagnosticsSpy = sinon.spy(cd, 'submitToCallDiagnostics');
|
|
1086
|
+
sinon.stub(cd, 'getOrigin').returns({origin: 'fake-origin'});
|
|
1087
|
+
const options = {
|
|
1088
|
+
meetingId: fakeMeeting2.id,
|
|
1089
|
+
mediaConnections: [{mediaAgentAlias: 'alias', mediaAgentGroupId: '1'}],
|
|
1090
|
+
sessionCorrelationId: 'sessionCorrelationId1'
|
|
1091
|
+
};
|
|
1092
|
+
|
|
1093
|
+
cd.submitClientEvent({
|
|
1094
|
+
name: 'client.alert.displayed',
|
|
1095
|
+
options,
|
|
1096
|
+
});
|
|
1097
|
+
|
|
1098
|
+
assert.calledWith(submitToCallDiagnosticsSpy, {
|
|
1099
|
+
event: {
|
|
1100
|
+
canProceed: true,
|
|
1101
|
+
eventData: {
|
|
1102
|
+
webClientDomain: 'whatever',
|
|
1103
|
+
},
|
|
1104
|
+
identifiers: {
|
|
1105
|
+
correlationId: 'correlationId2',
|
|
1106
|
+
sessionCorrelationId: 'sessionCorrelationId1',
|
|
952
1107
|
deviceId: 'deviceUrl',
|
|
953
1108
|
locusId: 'url',
|
|
954
1109
|
locusStartTime: 'lastActive',
|
|
@@ -1006,6 +1161,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1006
1161
|
},
|
|
1007
1162
|
identifiers: {
|
|
1008
1163
|
correlationId: 'correlationId',
|
|
1164
|
+
sessionCorrelationId: undefined,
|
|
1009
1165
|
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
1010
1166
|
globalMeetingId: 'globalMeetingId1',
|
|
1011
1167
|
deviceId: 'deviceUrl',
|
|
@@ -1084,6 +1240,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1084
1240
|
},
|
|
1085
1241
|
identifiers: {
|
|
1086
1242
|
correlationId: 'correlationId',
|
|
1243
|
+
sessionCorrelationId: undefined,
|
|
1087
1244
|
deviceId: 'deviceUrl',
|
|
1088
1245
|
locusId: 'url',
|
|
1089
1246
|
locusStartTime: 'lastActive',
|
|
@@ -1159,6 +1316,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1159
1316
|
},
|
|
1160
1317
|
identifiers: {
|
|
1161
1318
|
correlationId: 'correlationId',
|
|
1319
|
+
sessionCorrelationId: 'unknown',
|
|
1162
1320
|
deviceId: 'deviceUrl',
|
|
1163
1321
|
locusUrl: 'locus-url',
|
|
1164
1322
|
orgId: 'orgId',
|
|
@@ -1232,6 +1390,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1232
1390
|
},
|
|
1233
1391
|
identifiers: {
|
|
1234
1392
|
correlationId: 'correlationId',
|
|
1393
|
+
sessionCorrelationId: 'unknown',
|
|
1235
1394
|
deviceId: 'deviceUrl',
|
|
1236
1395
|
locusUrl: 'locus-url',
|
|
1237
1396
|
orgId: 'orgId',
|
|
@@ -1311,6 +1470,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1311
1470
|
},
|
|
1312
1471
|
identifiers: {
|
|
1313
1472
|
correlationId: 'correlationId',
|
|
1473
|
+
sessionCorrelationId: undefined,
|
|
1314
1474
|
deviceId: 'deviceUrl',
|
|
1315
1475
|
locusId: 'url',
|
|
1316
1476
|
locusStartTime: 'lastActive',
|
|
@@ -1417,6 +1577,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1417
1577
|
meetingId: fakeMeeting.id,
|
|
1418
1578
|
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
1419
1579
|
globalMeetingId: 'globalMeetingId1',
|
|
1580
|
+
sessionCorrelationId: 'sessionCorrelationId1'
|
|
1420
1581
|
};
|
|
1421
1582
|
|
|
1422
1583
|
cd.submitMQE({
|
|
@@ -1442,6 +1603,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1442
1603
|
canProceed: true,
|
|
1443
1604
|
identifiers: {
|
|
1444
1605
|
correlationId: 'correlationId',
|
|
1606
|
+
sessionCorrelationId: undefined,
|
|
1445
1607
|
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
1446
1608
|
globalMeetingId: 'globalMeetingId1',
|
|
1447
1609
|
userId: 'userId',
|
|
@@ -1481,6 +1643,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1481
1643
|
canProceed: true,
|
|
1482
1644
|
identifiers: {
|
|
1483
1645
|
correlationId: 'correlationId',
|
|
1646
|
+
sessionCorrelationId: undefined,
|
|
1484
1647
|
webexConferenceIdStr: 'webexConferenceIdStr1',
|
|
1485
1648
|
globalMeetingId: 'globalMeetingId1',
|
|
1486
1649
|
userId: 'userId',
|
|
@@ -1526,6 +1689,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
1526
1689
|
locusUrl: 'locus/url',
|
|
1527
1690
|
locusId: 'url',
|
|
1528
1691
|
locusStartTime: 'lastActive',
|
|
1692
|
+
sessionCorrelationId: undefined,
|
|
1529
1693
|
},
|
|
1530
1694
|
eventData: {webClientDomain: 'whatever'},
|
|
1531
1695
|
intervals: [{}],
|
|
@@ -2279,6 +2443,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
2279
2443
|
locusUrl: 'locus/url',
|
|
2280
2444
|
orgId: 'orgId',
|
|
2281
2445
|
userId: 'userId',
|
|
2446
|
+
sessionCorrelationId: undefined,
|
|
2282
2447
|
},
|
|
2283
2448
|
loginType: 'login-ci',
|
|
2284
2449
|
name: 'client.exit.app',
|
|
@@ -235,6 +235,8 @@ describe('internal-plugin-metrics', () => {
|
|
|
235
235
|
});
|
|
236
236
|
|
|
237
237
|
describe('getBuildType', () => {
|
|
238
|
+
const webex = {internal: {metrics: {config: {}}}};
|
|
239
|
+
|
|
238
240
|
beforeEach(() => {
|
|
239
241
|
process.env.NODE_ENV = 'production';
|
|
240
242
|
});
|
|
@@ -246,18 +248,26 @@ describe('internal-plugin-metrics', () => {
|
|
|
246
248
|
['https://web.webex.com', true, 'test'],
|
|
247
249
|
].forEach(([webClientDomain, markAsTestEvent, expected]) => {
|
|
248
250
|
it(`returns expected result for ${webClientDomain}`, () => {
|
|
249
|
-
assert.deepEqual(getBuildType(webClientDomain, markAsTestEvent as any), expected);
|
|
251
|
+
assert.deepEqual(getBuildType(webex, webClientDomain, markAsTestEvent as any), expected);
|
|
250
252
|
});
|
|
251
253
|
});
|
|
252
254
|
|
|
253
255
|
it('returns "test" for NODE_ENV "foo"', () => {
|
|
254
256
|
process.env.NODE_ENV = 'foo';
|
|
255
|
-
assert.deepEqual(getBuildType('production'), 'test');
|
|
257
|
+
assert.deepEqual(getBuildType(webex, 'production'), 'test');
|
|
256
258
|
});
|
|
257
259
|
|
|
258
260
|
it('returns "test" for NODE_ENV "production" and markAsTestEvent = true', () => {
|
|
259
261
|
process.env.NODE_ENV = 'production';
|
|
260
|
-
assert.deepEqual(getBuildType('my.domain', true), 'test');
|
|
262
|
+
assert.deepEqual(getBuildType(webex, 'my.domain', true), 'test');
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
it('returns "test" for NODE_ENV "production" when webex.caBuildType = "test"', () => {
|
|
266
|
+
process.env.NODE_ENV = 'production';
|
|
267
|
+
assert.deepEqual(
|
|
268
|
+
getBuildType({internal: {metrics: {config: {caBuildType: 'test'}}}}, 'my.domain'),
|
|
269
|
+
'test'
|
|
270
|
+
);
|
|
261
271
|
});
|
|
262
272
|
});
|
|
263
273
|
|
|
@@ -418,8 +428,8 @@ describe('internal-plugin-metrics', () => {
|
|
|
418
428
|
name: 'client.exit.app',
|
|
419
429
|
eventData: {
|
|
420
430
|
markAsTestEvent: true,
|
|
421
|
-
webClientDomain: 'https://web.webex.com'
|
|
422
|
-
}
|
|
431
|
+
webClientDomain: 'https://web.webex.com',
|
|
432
|
+
},
|
|
423
433
|
},
|
|
424
434
|
},
|
|
425
435
|
type: ['diagnostic-event'],
|
|
@@ -73,6 +73,20 @@ describe('internal-plugin-metrics', () => {
|
|
|
73
73
|
sinon.restore();
|
|
74
74
|
})
|
|
75
75
|
|
|
76
|
+
it('lazy metrics backend initialization when checking if backend ready', () => {
|
|
77
|
+
assert.isUndefined(webex.internal.newMetrics.behavioralMetrics);
|
|
78
|
+
webex.internal.newMetrics.isReadyToSubmitBehavioralEvents();
|
|
79
|
+
assert.isDefined(webex.internal.newMetrics.behavioralMetrics);
|
|
80
|
+
|
|
81
|
+
assert.isUndefined(webex.internal.newMetrics.operationalMetrics);
|
|
82
|
+
webex.internal.newMetrics.isReadyToSubmitOperationalEvents();
|
|
83
|
+
assert.isDefined(webex.internal.newMetrics.operationalMetrics);
|
|
84
|
+
|
|
85
|
+
assert.isUndefined(webex.internal.newMetrics.businessMetrics)
|
|
86
|
+
webex.internal.newMetrics.isReadyToSubmitBusinessEvents();
|
|
87
|
+
assert.isDefined(webex.internal.newMetrics.businessMetrics);
|
|
88
|
+
})
|
|
89
|
+
|
|
76
90
|
it('submits Client Event successfully', () => {
|
|
77
91
|
webex.internal.newMetrics.submitClientEvent({
|
|
78
92
|
name: 'client.alert.displayed',
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import {assert} from '@webex/test-helper-chai';
|
|
3
|
+
import {BrowserDetection} from '@webex/common';
|
|
4
|
+
import {OperationalMetrics, config, getOSNameInternal} from '@webex/internal-plugin-metrics';
|
|
5
|
+
import uuid from 'uuid';
|
|
6
|
+
|
|
7
|
+
//@ts-ignore
|
|
8
|
+
global.window = {location: {hostname: 'whatever'}, navigator: {language: 'language'}};
|
|
9
|
+
process.env.NODE_ENV = 'test';
|
|
10
|
+
|
|
11
|
+
const {getOSVersion, getBrowserName, getBrowserVersion} = BrowserDetection();
|
|
12
|
+
|
|
13
|
+
describe('internal-plugin-metrics', () => {
|
|
14
|
+
describe('OperationalMetrics', () => {
|
|
15
|
+
let webex;
|
|
16
|
+
let now;
|
|
17
|
+
let operationalMetrics: OperationalMetrics;
|
|
18
|
+
|
|
19
|
+
const tags = {key: 'val'};
|
|
20
|
+
|
|
21
|
+
beforeEach(() => {
|
|
22
|
+
now = new Date();
|
|
23
|
+
|
|
24
|
+
webex = {
|
|
25
|
+
canAuthorize: true,
|
|
26
|
+
version: 'webex-version',
|
|
27
|
+
internal: {
|
|
28
|
+
services: {
|
|
29
|
+
get: () => 'locus-url',
|
|
30
|
+
},
|
|
31
|
+
metrics: {
|
|
32
|
+
submitClientMetrics: sinon.stub(),
|
|
33
|
+
config: {...config.metrics},
|
|
34
|
+
},
|
|
35
|
+
newMetrics: {},
|
|
36
|
+
device: {
|
|
37
|
+
userId: 'userId',
|
|
38
|
+
url: 'https://wdm-intb.ciscospark.com/wdm/api/v1/devices/deviceId',
|
|
39
|
+
orgId: 'orgId',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
meetings: {
|
|
43
|
+
config: {
|
|
44
|
+
metrics: {
|
|
45
|
+
clientType: 'TEAMS_CLIENT',
|
|
46
|
+
subClientType: 'WEB_APP',
|
|
47
|
+
clientName: 'Cantina',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
geoHintInfo: {
|
|
51
|
+
clientAddress: '1.3.4.5',
|
|
52
|
+
countryCode: 'UK',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
credentials: {
|
|
56
|
+
isUnverifiedGuest: false,
|
|
57
|
+
},
|
|
58
|
+
prepareFetchOptions: sinon.stub().callsFake((opts: any) => ({...opts, foo: 'bar'})),
|
|
59
|
+
request: sinon.stub().resolves({body: {}}),
|
|
60
|
+
logger: {
|
|
61
|
+
log: sinon.stub(),
|
|
62
|
+
error: sinon.stub(),
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
sinon.createSandbox();
|
|
67
|
+
sinon.useFakeTimers(now.getTime());
|
|
68
|
+
operationalMetrics = new OperationalMetrics({}, {parent: webex});
|
|
69
|
+
sinon.stub(uuid, 'v4').returns('my-fake-id');
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
afterEach(() => {
|
|
73
|
+
sinon.restore();
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
describe('#sendEvent', () => {
|
|
77
|
+
it('should send correctly shaped operational event (check name building and internal tagged event building)', () => {
|
|
78
|
+
// For some reasons `jest` isn't available when testing form build server - so can't use `jest.fn()` here...
|
|
79
|
+
const requestCalls = [];
|
|
80
|
+
const request = function(arg) { requestCalls.push(arg) }
|
|
81
|
+
|
|
82
|
+
operationalMetrics.clientMetricsBatcher.request = request;
|
|
83
|
+
|
|
84
|
+
assert.equal(requestCalls.length, 0)
|
|
85
|
+
operationalMetrics.submitOperationalEvent({ name: "foobar", payload: {bar:"gee"} })
|
|
86
|
+
assert.equal(requestCalls.length, 1)
|
|
87
|
+
assert.deepEqual(requestCalls[0], {
|
|
88
|
+
context: {
|
|
89
|
+
app: {version: 'webex-version'},
|
|
90
|
+
device: {id: 'deviceId'},
|
|
91
|
+
locale: 'language',
|
|
92
|
+
os: {
|
|
93
|
+
name: getOSNameInternal(),
|
|
94
|
+
version: getOSVersion(),
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
metricName: 'foobar',
|
|
98
|
+
tags: {
|
|
99
|
+
browser: getBrowserName(),
|
|
100
|
+
browserHeight: window.innerHeight,
|
|
101
|
+
browserVersion: getBrowserVersion(),
|
|
102
|
+
browserWidth: window.innerWidth,
|
|
103
|
+
domain: window.location.hostname,
|
|
104
|
+
inIframe: false,
|
|
105
|
+
locale: window.navigator.language,
|
|
106
|
+
os: getOSNameInternal(),
|
|
107
|
+
bar: "gee"
|
|
108
|
+
},
|
|
109
|
+
timestamp: requestCalls[0].timestamp, // This is to bypass time check, which is correctly tested in behavioral-metrics tests.
|
|
110
|
+
type: ['operational'],
|
|
111
|
+
});
|
|
112
|
+
})
|
|
113
|
+
})
|
|
114
|
+
});
|
|
115
|
+
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_lodash","require","_common","_webexCore","_metrics","_config","_clientMetricsBatcher","_interopRequireDefault","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","e","_BrowserDetection","BrowserDetection","getOSVersion","getBrowserName","getBrowserVersion","BehavioralMetrics","exports","_StatelessWebexPlugin","_inherits2","_super","_this","_classCallCheck2","_len","length","args","Array","_key","concat","_defineProperty2","_assertThisInitialized2","logger","webex","device","internal","version","clientMetricsBatcher","ClientMetricsBatcher","parent","_createClass2","key","value","getDeviceId","url","n","lastIndexOf","substring","getContext","context","app","id","locale","window","navigator","language","os","name","getOSNameInternal","getDefaultTags","tags","browser","browserHeight","innerHeight","browserVersion","browserWidth","innerWidth","domain","location","hostname","inIframe","self","top","createEventObject","_ref","product","agent","target","verb","payload","metricName","allTags","merge","event","timestamp","_now","type","isReadyToSubmitBehavioralEvents","deviceId","submitBehavioralEvent","_ref2","log","BEHAVIORAL_LOG_IDENTIFIER","behavioralEvent","request","StatelessWebexPlugin"],"sources":["behavioral-metrics.ts"],"sourcesContent":["import {merge} from 'lodash';\nimport {BrowserDetection} from '@webex/common';\nimport {StatelessWebexPlugin} from '@webex/webex-core';\nimport {getOSNameInternal} from '../metrics';\nimport {BEHAVIORAL_LOG_IDENTIFIER} from './config';\nimport {\n MetricEventProduct,\n MetricEventAgent,\n MetricEventVerb,\n BehavioralEventContext,\n BehavioralEvent,\n BehavioralEventPayload,\n} from '../metrics.types';\nimport ClientMetricsBatcher from '../client-metrics-batcher';\n\nconst {getOSVersion, getBrowserName, getBrowserVersion} = BrowserDetection();\n\n/**\n * @description Util class to handle Behavioral Metrics\n * @export\n * @class BehavioralMetrics\n */\nexport default class BehavioralMetrics extends StatelessWebexPlugin {\n // @ts-ignore\n private clientMetricsBatcher: ClientMetricsBatcher;\n private logger: any; // to avoid adding @ts-ignore everywhere\n private device: any;\n private version: string;\n\n /**\n * Constructor\n * @param {any[]} args\n */\n constructor(...args) {\n super(...args);\n // @ts-ignore\n this.logger = this.webex.logger;\n // @ts-ignore\n this.device = this.webex.internal.device;\n // @ts-ignore\n this.version = this.webex.version;\n // @ts-ignore\n this.clientMetricsBatcher = new ClientMetricsBatcher({}, {parent: this.webex});\n }\n\n /**\n * Returns the deviceId from our registration with WDM.\n * @returns {string} deviceId or empty string\n */\n private getDeviceId(): string {\n const {url} = this.device;\n if (url && url.length !== 0) {\n const n = url.lastIndexOf('/');\n if (n !== -1) {\n return url.substring(n + 1);\n }\n }\n\n return '';\n }\n\n /**\n * Returns the context object to be submitted with all behavioral metrics.\n * @returns {BehavioralEventContext}\n */\n private getContext(): BehavioralEventContext {\n const context: BehavioralEventContext = {\n app: {\n version: this.version,\n },\n device: {\n id: this.getDeviceId(),\n },\n locale: window.navigator.language,\n os: {\n name: getOSNameInternal(),\n version: getOSVersion(),\n },\n };\n\n return context;\n }\n\n /**\n * Returns the default tags to be included with all behavioral metrics.\n * @returns {BehavioralEventPayload}\n */\n private getDefaultTags(): BehavioralEventPayload {\n const tags = {\n browser: getBrowserName(),\n browserHeight: window.innerHeight,\n browserVersion: getBrowserVersion(),\n browserWidth: window.innerWidth,\n domain: window.location.hostname,\n inIframe: window.self !== window.top,\n locale: window.navigator.language,\n os: getOSNameInternal(),\n };\n\n return tags;\n }\n\n /**\n * Creates the object to send to our metrics endpoint for a behavioral event\n * @param {MetricEventProduct} product\n * @param {MetricEventAgent} agent\n * @param {string} target\n * @param {MetricEventVerb} verb\n * @returns {BehavioralEventPayload}\n */\n private createEventObject({\n product,\n agent,\n target,\n verb,\n payload,\n }: {\n product: MetricEventProduct;\n agent: MetricEventAgent;\n target: string;\n verb: MetricEventVerb;\n payload?: BehavioralEventPayload;\n }): BehavioralEvent {\n const metricName = `${product}.${agent}.${target}.${verb}`;\n let allTags: BehavioralEventPayload = payload;\n allTags = merge(allTags, this.getDefaultTags());\n\n const event: BehavioralEvent = {\n context: this.getContext(),\n metricName,\n tags: allTags,\n timestamp: Date.now(),\n type: ['behavioral'],\n };\n\n return event;\n }\n\n /**\n * Returns true once we're ready to submit behavioral metrics, after startup.\n * @returns {boolean} true when deviceId is defined and non-empty\n */\n public isReadyToSubmitBehavioralEvents(): boolean {\n const deviceId = this.getDeviceId();\n\n return deviceId && deviceId.length !== 0;\n }\n\n /**\n * Submit a behavioral metric to our metrics endpoint.\n * @param {MetricEventProduct} product the product from which the metric is being submitted, e.g. 'webex' web client, 'wxcc_desktop'\n * @param {MetricEventAgent} agent the source of the action for this metric\n * @param {string} target the 'thing' that this metric includes information about\n * @param {MetricEventVerb} verb the action that this metric includes information about\n * @param {BehavioralEventPayload} payload information specific to this event. This should be flat, i.e. it should not include nested objects.\n * @returns {Promise<any>}\n */\n public submitBehavioralEvent({\n product,\n agent,\n target,\n verb,\n payload,\n }: {\n product: MetricEventProduct;\n agent: MetricEventAgent;\n target: string;\n verb: MetricEventVerb;\n payload?: BehavioralEventPayload;\n }) {\n this.logger.log(\n BEHAVIORAL_LOG_IDENTIFIER,\n `BehavioralMetrics: @submitBehavioralEvent. Submit Behavioral event: ${product}.${agent}.${target}.${verb}`\n );\n const behavioralEvent = this.createEventObject({product, agent, target, verb, payload});\n\n return this.clientMetricsBatcher.request(behavioralEvent);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AASA,IAAAK,qBAAA,GAAAC,sBAAA,CAAAN,OAAA;AAA6D,SAAAO,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,CAAAC,OAAA,EAAAN,OAAA,GAAAO,MAAA,MAAAN,yBAAA,QAAAO,SAAA,OAAAH,gBAAA,CAAAC,OAAA,QAAAG,WAAA,EAAAF,MAAA,GAAAG,kBAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAH,SAAA,YAAAD,MAAA,GAAAH,KAAA,CAAAQ,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,CAAAP,OAAA,QAAAC,MAAA;AAAA,SAAAL,0BAAA,eAAAY,OAAA,qBAAAJ,kBAAA,oBAAAA,kBAAA,CAAAK,IAAA,2BAAAC,KAAA,oCAAAC,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAV,kBAAA,CAAAO,OAAA,8CAAAI,CAAA;AAE7D,IAAAC,iBAAA,GAA0D,IAAAC,wBAAgB,EAAC,CAAC;EAArEC,YAAY,GAAAF,iBAAA,CAAZE,YAAY;EAAEC,cAAc,GAAAH,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A;IAAAC,KAAA,EAIA,SAAA6C,gCAAA,EAAkD;MAChD,IAAMC,QAAQ,GAAG,IAAI,CAAC7C,WAAW,CAAC,CAAC;MAEnC,OAAO6C,QAAQ,IAAIA,QAAQ,CAAC/D,MAAM,KAAK,CAAC;IAC1C;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EARE;IAAAgB,GAAA;IAAAC,KAAA,EASA,SAAA+C,sBAAAC,KAAA,EAYG;MAAA,IAXDf,OAAO,GAAAe,KAAA,CAAPf,OAAO;QACPC,KAAK,GAAAc,KAAA,CAALd,KAAK;QACLC,MAAM,GAAAa,KAAA,CAANb,MAAM;QACNC,IAAI,GAAAY,KAAA,CAAJZ,IAAI;QACJC,OAAO,GAAAW,KAAA,CAAPX,OAAO;MAQP,IAAI,CAAC/C,MAAM,CAAC2D,GAAG,CACbC,iCAAyB,yEAAA/D,MAAA,CAC8C8C,OAAO,OAAA9C,MAAA,CAAI+C,KAAK,OAAA/C,MAAA,CAAIgD,MAAM,OAAAhD,MAAA,CAAIiD,IAAI,CAC3G,CAAC;MACD,IAAMe,eAAe,GAAG,IAAI,CAACpB,iBAAiB,CAAC;QAACE,OAAO,EAAPA,OAAO;QAAEC,KAAK,EAALA,KAAK;QAAEC,MAAM,EAANA,MAAM;QAAEC,IAAI,EAAJA,IAAI;QAAEC,OAAO,EAAPA;MAAO,CAAC,CAAC;MAEvF,OAAO,IAAI,CAAC1C,oBAAoB,CAACyD,OAAO,CAACD,eAAe,CAAC;IAC3D;EAAC;EAAA,OAAA5E,iBAAA;AAAA,EA3J4C8E,+BAAoB"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.BEHAVIORAL_LOG_IDENTIFIER = void 0;
|
|
8
|
-
/* eslint-disable import/prefer-default-export */
|
|
9
|
-
|
|
10
|
-
var BEHAVIORAL_LOG_IDENTIFIER = exports.BEHAVIORAL_LOG_IDENTIFIER = 'behavioral-events -> ';
|
|
11
|
-
//# sourceMappingURL=config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["BEHAVIORAL_LOG_IDENTIFIER","exports"],"sources":["config.ts"],"sourcesContent":["/* eslint-disable import/prefer-default-export */\n\nexport const BEHAVIORAL_LOG_IDENTIFIER = 'behavioral-events -> ';\n"],"mappings":";;;;;;;AAAA;;AAEO,IAAMA,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAG,uBAAuB"}
|