@webex/plugin-meetings 1.153.4 → 1.154.0

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.
@@ -56,7 +56,7 @@ import {
56
56
  MEETING_STATE,
57
57
  MEETINGS,
58
58
  METRICS_JOIN_TIMES_MAX_DURATION,
59
- METRICS_OPERATIONAL_MEASURES,
59
+ BEHAVIORAL_METRICS,
60
60
  MQA_STATS,
61
61
  NETWORK_STATUS,
62
62
  ONLINE,
@@ -1057,8 +1057,8 @@ export default class Meeting extends StatelessWebexPlugin {
1057
1057
  // https:// jira-eng-gpk2.cisco.com/jira/browse/SPARK-240520
1058
1058
  // TODO: send custom parameter explaining why the inactivity happened
1059
1059
  // refresh , no media or network got dsconnected or something else
1060
- Metrics.sendOperationalMetric(
1061
- METRICS_OPERATIONAL_MEASURES.DISCONNECT_DUE_TO_INACTIVITY,
1060
+ Metrics.sendBehavioralMetric(
1061
+ BEHAVIORAL_METRICS.DISCONNECT_DUE_TO_INACTIVITY,
1062
1062
  {
1063
1063
  correlation_id: this.correlationId,
1064
1064
  locus_id: this.locusId
@@ -1950,8 +1950,8 @@ export default class Meeting extends StatelessWebexPlugin {
1950
1950
  });
1951
1951
 
1952
1952
  this.locusInfo.on(LOCUSINFO.EVENTS.MEDIA_INACTIVITY, () => {
1953
- Metrics.sendOperationalMetric(
1954
- METRICS_OPERATIONAL_MEASURES.MEETING_MEDIA_INACTIVE,
1953
+ Metrics.sendBehavioralMetric(
1954
+ BEHAVIORAL_METRICS.MEETING_MEDIA_INACTIVE,
1955
1955
  {
1956
1956
  correlation_id: this.correlationId,
1957
1957
  locus_id: this.locusId
@@ -2495,8 +2495,8 @@ export default class Meeting extends StatelessWebexPlugin {
2495
2495
  }
2496
2496
  else {
2497
2497
  trackMediaID = null;
2498
- Metrics.sendOperationalMetric(
2499
- METRICS_OPERATIONAL_MEASURES.MUTE_AUDIO_FAILURE,
2498
+ Metrics.sendBehavioralMetric(
2499
+ BEHAVIORAL_METRICS.MUTE_AUDIO_FAILURE,
2500
2500
  {
2501
2501
  correlation_id: this.correlationId,
2502
2502
  locus_id: this.locusUrl.split('/').pop()
@@ -2905,6 +2905,12 @@ export default class Meeting extends StatelessWebexPlugin {
2905
2905
  event: eventType.MERCURY_CONNECTION_RESTORED,
2906
2906
  meeting: this
2907
2907
  });
2908
+ Metrics.sendBehavioralMetric(
2909
+ BEHAVIORAL_METRICS.MERCURY_CONNECTION_RESTORED,
2910
+ {
2911
+ correlation_id: this.correlationId
2912
+ }
2913
+ );
2908
2914
  }
2909
2915
  this.hasWebsocketConnected = true;
2910
2916
  });
@@ -2915,8 +2921,8 @@ export default class Meeting extends StatelessWebexPlugin {
2915
2921
  event: eventType.MERCURY_CONNECTION_LOST,
2916
2922
  meeting: this
2917
2923
  });
2918
- Metrics.sendOperationalMetric(
2919
- METRICS_OPERATIONAL_MEASURES.MERCURY_CONNECTION_FAILURE,
2924
+ Metrics.sendBehavioralMetric(
2925
+ BEHAVIORAL_METRICS.MERCURY_CONNECTION_FAILURE,
2920
2926
  {
2921
2927
  correlation_id: this.correlationId
2922
2928
  }
@@ -2993,8 +2999,8 @@ export default class Meeting extends StatelessWebexPlugin {
2993
2999
  data: {trigger: trigger.USER_INTERACTION, mediaType: mediaType.AUDIO}
2994
3000
  });
2995
3001
  }).catch((error) => {
2996
- Metrics.sendOperationalMetric(
2997
- METRICS_OPERATIONAL_MEASURES.MUTE_AUDIO_FAILURE,
3002
+ Metrics.sendBehavioralMetric(
3003
+ BEHAVIORAL_METRICS.MUTE_AUDIO_FAILURE,
2998
3004
  {
2999
3005
  correlation_id: this.correlationId,
3000
3006
  locus_id: this.locusUrl.split('/').pop(),
@@ -3044,8 +3050,8 @@ export default class Meeting extends StatelessWebexPlugin {
3044
3050
  data: {trigger: trigger.USER_INTERACTION, mediaType: mediaType.AUDIO}
3045
3051
  });
3046
3052
  }).catch((error) => {
3047
- Metrics.sendOperationalMetric(
3048
- METRICS_OPERATIONAL_MEASURES.UNMUTE_AUDIO_FAILURE,
3053
+ Metrics.sendBehavioralMetric(
3054
+ BEHAVIORAL_METRICS.UNMUTE_AUDIO_FAILURE,
3049
3055
  {
3050
3056
  correlation_id: this.correlationId,
3051
3057
  locus_id: this.locusUrl.split('/').pop(),
@@ -3094,8 +3100,8 @@ export default class Meeting extends StatelessWebexPlugin {
3094
3100
  data: {trigger: trigger.USER_INTERACTION, mediaType: mediaType.VIDEO}
3095
3101
  });
3096
3102
  }).catch((error) => {
3097
- Metrics.sendOperationalMetric(
3098
- METRICS_OPERATIONAL_MEASURES.MUTE_VIDEO_FAILURE,
3103
+ Metrics.sendBehavioralMetric(
3104
+ BEHAVIORAL_METRICS.MUTE_VIDEO_FAILURE,
3099
3105
  {
3100
3106
  correlation_id: this.correlationId,
3101
3107
  locus_id: this.locusUrl.split('/').pop(),
@@ -3144,8 +3150,8 @@ export default class Meeting extends StatelessWebexPlugin {
3144
3150
  data: {trigger: trigger.USER_INTERACTION, mediaType: mediaType.VIDEO}
3145
3151
  });
3146
3152
  }).catch((error) => {
3147
- Metrics.sendOperationalMetric(
3148
- METRICS_OPERATIONAL_MEASURES.UNMUTE_VIDEO_FAILURE,
3153
+ Metrics.sendBehavioralMetric(
3154
+ BEHAVIORAL_METRICS.UNMUTE_VIDEO_FAILURE,
3149
3155
  {
3150
3156
  correlation_id: this.correlationId,
3151
3157
  locus_id: this.locusUrl.split('/').pop(),
@@ -3207,8 +3213,8 @@ export default class Meeting extends StatelessWebexPlugin {
3207
3213
  .catch((error) => {
3208
3214
  LoggerProxy.logger.error('Meeting:index#joinWithMedia --> ', error);
3209
3215
 
3210
- Metrics.sendOperationalMetric(
3211
- METRICS_OPERATIONAL_MEASURES.JOIN_WITH_MEDIA_FAILURE,
3216
+ Metrics.sendBehavioralMetric(
3217
+ BEHAVIORAL_METRICS.JOIN_WITH_MEDIA_FAILURE,
3212
3218
  {
3213
3219
  correlation_id: this.correlationId,
3214
3220
  locus_id: this.locusUrl.split('/').pop(),
@@ -3297,8 +3303,8 @@ export default class Meeting extends StatelessWebexPlugin {
3297
3303
 
3298
3304
  LoggerProxy.logger.error('Meeting:index#reconnect --> Meeting reconnect failed', error);
3299
3305
 
3300
- Metrics.sendOperationalMetric(
3301
- METRICS_OPERATIONAL_MEASURES.MEETING_RECONNECT_FAILURE,
3306
+ Metrics.sendBehavioralMetric(
3307
+ BEHAVIORAL_METRICS.MEETING_RECONNECT_FAILURE,
3302
3308
  {
3303
3309
  correlation_id: this.correlationId,
3304
3310
  locus_id: this.locusUrl.split('/').pop(),
@@ -3363,8 +3369,8 @@ export default class Meeting extends StatelessWebexPlugin {
3363
3369
 
3364
3370
  this.triggerStopReceivingTranscriptionEvent();
3365
3371
 
3366
- Metrics.sendOperationalMetric(
3367
- METRICS_OPERATIONAL_MEASURES.RECEIVE_TRANSCRIPTION_FAILURE,
3372
+ Metrics.sendBehavioralMetric(
3373
+ BEHAVIORAL_METRICS.RECEIVE_TRANSCRIPTION_FAILURE,
3368
3374
  {
3369
3375
  correlation_id: this.correlationId,
3370
3376
  reason: 'unexpected error: transcription LLM web socket connection error had occured.',
@@ -3427,8 +3433,8 @@ export default class Meeting extends StatelessWebexPlugin {
3427
3433
  }
3428
3434
  catch (error) {
3429
3435
  LoggerProxy.logger.error(`Meeting:index#receiveTranscription --> ${error}`);
3430
- Metrics.sendOperationalMetric(
3431
- METRICS_OPERATIONAL_MEASURES.RECEIVE_TRANSCRIPTION_FAILURE,
3436
+ Metrics.sendBehavioralMetric(
3437
+ BEHAVIORAL_METRICS.RECEIVE_TRANSCRIPTION_FAILURE,
3432
3438
  {
3433
3439
  correlation_id: this.correlationId,
3434
3440
  reason: error.message,
@@ -3520,13 +3526,6 @@ export default class Meeting extends StatelessWebexPlugin {
3520
3526
  data: {trigger: trigger.USER_INTERACTION}
3521
3527
  });
3522
3528
 
3523
- Metrics.sendOperationalMetric(
3524
- METRICS_OPERATIONAL_MEASURES.JOIN_ATTEMPT,
3525
- {
3526
- correlation_id: this.correlationId
3527
- }
3528
- );
3529
-
3530
3529
  LoggerProxy.logger.log('Meeting:index#join --> Joining a meeting');
3531
3530
 
3532
3531
  if (this.meetingFiniteStateMachine.state === MEETING_STATE_MACHINE.STATES.ENDED) {
@@ -3597,6 +3596,12 @@ export default class Meeting extends StatelessWebexPlugin {
3597
3596
  .then((join) => {
3598
3597
  joinSuccess(join);
3599
3598
  this.deferJoin = undefined;
3599
+ Metrics.sendBehavioralMetric(
3600
+ BEHAVIORAL_METRICS.JOIN_SUCCESS,
3601
+ {
3602
+ correlation_id: this.correlationId
3603
+ }
3604
+ );
3600
3605
 
3601
3606
  return join;
3602
3607
  }).then(async (join) => {
@@ -3620,8 +3625,8 @@ export default class Meeting extends StatelessWebexPlugin {
3620
3625
  LoggerProxy.logger.error('Meeting:index#join --> Failed', error);
3621
3626
 
3622
3627
  // TODO: change this to error codes and pre defined dictionary
3623
- Metrics.sendOperationalMetric(
3624
- METRICS_OPERATIONAL_MEASURES.JOIN_FAILURE,
3628
+ Metrics.sendBehavioralMetric(
3629
+ BEHAVIORAL_METRICS.JOIN_FAILURE,
3625
3630
  {
3626
3631
  correlation_id: this.correlationId,
3627
3632
  reason: error.error?.message,
@@ -3694,8 +3699,8 @@ export default class Meeting extends StatelessWebexPlugin {
3694
3699
  }).then((res) => {
3695
3700
  this.locusInfo.onFullLocus(res.body.locus);
3696
3701
  }).catch((error) => {
3697
- Metrics.sendOperationalMetric(
3698
- METRICS_OPERATIONAL_MEASURES.ADD_DIAL_IN_FAILURE,
3702
+ Metrics.sendBehavioralMetric(
3703
+ BEHAVIORAL_METRICS.ADD_DIAL_IN_FAILURE,
3699
3704
  {
3700
3705
  correlation_id: this.correlationId,
3701
3706
  dial_in_url: this.dialInUrl,
@@ -3733,8 +3738,8 @@ export default class Meeting extends StatelessWebexPlugin {
3733
3738
  }).then((res) => {
3734
3739
  this.locusInfo.onFullLocus(res.body.locus);
3735
3740
  }).catch((error) => {
3736
- Metrics.sendOperationalMetric(
3737
- METRICS_OPERATIONAL_MEASURES.ADD_DIAL_OUT_FAILURE,
3741
+ Metrics.sendBehavioralMetric(
3742
+ BEHAVIORAL_METRICS.ADD_DIAL_OUT_FAILURE,
3738
3743
  {
3739
3744
  correlation_id: this.correlationId,
3740
3745
  dial_out_url: this.dialOutUrl,
@@ -3960,10 +3965,10 @@ export default class Meeting extends StatelessWebexPlugin {
3960
3965
  )
3961
3966
  .catch((error) => {
3962
3967
  // Whenever there is a failure when trying to access a user's device
3963
- // report it as an operational metric
3968
+ // report it as an Behavioral metric
3964
3969
  // This gives visibility into common errors and can help
3965
3970
  // with further troubleshooting
3966
- const metricName = METRICS_OPERATIONAL_MEASURES.GET_USER_MEDIA_FAILURE;
3971
+ const metricName = BEHAVIORAL_METRICS.GET_USER_MEDIA_FAILURE;
3967
3972
  const data = {
3968
3973
  correlation_id: this.correlationId,
3969
3974
  locus_id: this.locusUrl?.split('/').pop(),
@@ -3974,7 +3979,7 @@ export default class Meeting extends StatelessWebexPlugin {
3974
3979
  type: error.name
3975
3980
  };
3976
3981
 
3977
- Metrics.sendOperationalMetric(metricName, data, metadata);
3982
+ Metrics.sendBehavioralMetric(metricName, data, metadata);
3978
3983
  throw new MediaError('Unable to retrieve media streams', error);
3979
3984
  }));
3980
3985
  }
@@ -4102,8 +4107,8 @@ export default class Meeting extends StatelessWebexPlugin {
4102
4107
  .catch((error) => {
4103
4108
  LoggerProxy.logger.error(`${LOG_HEADER} Error adding media , setting up peerconnection, `, error);
4104
4109
 
4105
- Metrics.sendOperationalMetric(
4106
- METRICS_OPERATIONAL_MEASURES.ADD_MEDIA_FAILURE,
4110
+ Metrics.sendBehavioralMetric(
4111
+ BEHAVIORAL_METRICS.ADD_MEDIA_FAILURE,
4107
4112
  {
4108
4113
  correlation_id: this.correlationId,
4109
4114
  locus_id: this.locusUrl.split('/').pop(),
@@ -4186,6 +4191,14 @@ export default class Meeting extends StatelessWebexPlugin {
4186
4191
  this.floorGrantPending = true;
4187
4192
  }
4188
4193
 
4194
+ Metrics.sendBehavioralMetric(
4195
+ BEHAVIORAL_METRICS.ADD_MEDIA_SUCCESS,
4196
+ {
4197
+ correlation_id: this.correlationId,
4198
+ locus_id: this.locusUrl.split('/').pop()
4199
+ }
4200
+ );
4201
+
4189
4202
  return Promise.resolve();
4190
4203
  }))
4191
4204
  .catch((error) => {
@@ -4201,8 +4214,8 @@ export default class Meeting extends StatelessWebexPlugin {
4201
4214
 
4202
4215
  LoggerProxy.logger.error(`${LOG_HEADER} Error adding media failed to initiate PC and send request, `, error);
4203
4216
 
4204
- Metrics.sendOperationalMetric(
4205
- METRICS_OPERATIONAL_MEASURES.ADD_MEDIA_FAILURE,
4217
+ Metrics.sendBehavioralMetric(
4218
+ BEHAVIORAL_METRICS.ADD_MEDIA_FAILURE,
4206
4219
  {
4207
4220
  correlation_id: this.correlationId,
4208
4221
  locus_id: this.locusUrl.split('/').pop(),
@@ -4355,8 +4368,8 @@ export default class Meeting extends StatelessWebexPlugin {
4355
4368
  .catch((error) => {
4356
4369
  LoggerProxy.logger.error(`${LOG_HEADER} Error updatedMedia, `, error);
4357
4370
 
4358
- Metrics.sendOperationalMetric(
4359
- METRICS_OPERATIONAL_MEASURES.UPDATE_MEDIA_FAILURE,
4371
+ Metrics.sendBehavioralMetric(
4372
+ BEHAVIORAL_METRICS.UPDATE_MEDIA_FAILURE,
4360
4373
  {
4361
4374
  correlation_id: this.correlationId,
4362
4375
  locus_id: this.locusUrl.split('/').pop(),
@@ -4754,8 +4767,8 @@ export default class Meeting extends StatelessWebexPlugin {
4754
4767
  EVENTS.REQUEST_UPLOAD_LOGS,
4755
4768
  this
4756
4769
  );
4757
- Metrics.sendOperationalMetric(
4758
- METRICS_OPERATIONAL_MEASURES.MEETING_LEAVE_FAILURE,
4770
+ Metrics.sendBehavioralMetric(
4771
+ BEHAVIORAL_METRICS.MEETING_LEAVE_FAILURE,
4759
4772
  {
4760
4773
  correlation_id: this.correlationId,
4761
4774
  locus_id: this.locusUrl.split('/').pop(),
@@ -4808,8 +4821,8 @@ export default class Meeting extends StatelessWebexPlugin {
4808
4821
  .catch((error) => {
4809
4822
  LoggerProxy.logger.error('Meeting:index#startWhiteboardShare --> Error ', error);
4810
4823
 
4811
- Metrics.sendOperationalMetric(
4812
- METRICS_OPERATIONAL_MEASURES.MEETING_START_WHITEBOARD_SHARE_FAILURE,
4824
+ Metrics.sendBehavioralMetric(
4825
+ BEHAVIORAL_METRICS.MEETING_START_WHITEBOARD_SHARE_FAILURE,
4813
4826
  {
4814
4827
  correlation_id: this.correlationId,
4815
4828
  locus_id: this.locusUrl.split('/').pop(),
@@ -4848,8 +4861,8 @@ export default class Meeting extends StatelessWebexPlugin {
4848
4861
  .catch((error) => {
4849
4862
  LoggerProxy.logger.error('Meeting:index#stopWhiteboardShare --> Error ', error);
4850
4863
 
4851
- Metrics.sendOperationalMetric(
4852
- METRICS_OPERATIONAL_MEASURES.STOP_WHITEBOARD_SHARE_FAILURE,
4864
+ Metrics.sendBehavioralMetric(
4865
+ BEHAVIORAL_METRICS.STOP_WHITEBOARD_SHARE_FAILURE,
4853
4866
  {
4854
4867
  correlation_id: this.correlationId,
4855
4868
  locus_id: this.locusUrl.split('/').pop(),
@@ -4895,8 +4908,8 @@ export default class Meeting extends StatelessWebexPlugin {
4895
4908
  .catch((error) => {
4896
4909
  LoggerProxy.logger.error('Meeting:index#share --> Error ', error);
4897
4910
 
4898
- Metrics.sendOperationalMetric(
4899
- METRICS_OPERATIONAL_MEASURES.MEETING_SHARE_FAILURE,
4911
+ Metrics.sendBehavioralMetric(
4912
+ BEHAVIORAL_METRICS.MEETING_SHARE_FAILURE,
4900
4913
  {
4901
4914
  correlation_id: this.correlationId,
4902
4915
  locus_id: this.locusUrl.split('/').pop(),
@@ -4958,8 +4971,8 @@ export default class Meeting extends StatelessWebexPlugin {
4958
4971
  .catch((error) => {
4959
4972
  LoggerProxy.logger.error('Meeting:index#stopFloorRequest --> Error ', error);
4960
4973
 
4961
- Metrics.sendOperationalMetric(
4962
- METRICS_OPERATIONAL_MEASURES.STOP_FLOOR_REQUEST_FAILURE,
4974
+ Metrics.sendBehavioralMetric(
4975
+ BEHAVIORAL_METRICS.STOP_FLOOR_REQUEST_FAILURE,
4963
4976
  {
4964
4977
  correlation_id: this.correlationId,
4965
4978
  locus_id: this.locusUrl.split('/').pop(),
@@ -5277,8 +5290,8 @@ export default class Meeting extends StatelessWebexPlugin {
5277
5290
 
5278
5291
  LoggerProxy.logger.error(`Meeting:index#setMeetingQuality --> ${error.message}`);
5279
5292
 
5280
- Metrics.sendOperationalMetric(
5281
- METRICS_OPERATIONAL_MEASURES.SET_MEETING_QUALITY_FAILURE,
5293
+ Metrics.sendBehavioralMetric(
5294
+ BEHAVIORAL_METRICS.SET_MEETING_QUALITY_FAILURE,
5282
5295
  {
5283
5296
  correlation_id: this.correlationId,
5284
5297
  locus_id: this.locusUrl.split('/').pop(),
@@ -5321,13 +5334,13 @@ export default class Meeting extends StatelessWebexPlugin {
5321
5334
  }))
5322
5335
  .catch((error) => {
5323
5336
  // Whenever there is a failure when trying to access a user's display
5324
- // report it as an operational metric
5337
+ // report it as an Behavioral metric
5325
5338
  // This gives visibility into common errors and can help
5326
5339
  // with further troubleshooting
5327
5340
 
5328
5341
  // This metrics will get erros for getDisplayMedia and share errors for now
5329
5342
  // TODO: The getDisplayMedia errors need to be moved inside `media.getDisplayMedia`
5330
- const metricName = METRICS_OPERATIONAL_MEASURES.GET_DISPLAY_MEDIA_FAILURE;
5343
+ const metricName = BEHAVIORAL_METRICS.GET_DISPLAY_MEDIA_FAILURE;
5331
5344
  const data = {
5332
5345
  correlation_id: this.correlationId,
5333
5346
  locus_id: this.locusUrl.split('/').pop(),
@@ -5338,7 +5351,7 @@ export default class Meeting extends StatelessWebexPlugin {
5338
5351
  type: error.name
5339
5352
  };
5340
5353
 
5341
- Metrics.sendOperationalMetric(metricName, data, metadata);
5354
+ Metrics.sendBehavioralMetric(metricName, data, metadata);
5342
5355
  throw new MediaError('Unable to retrieve display media stream', error);
5343
5356
  });
5344
5357
  }
@@ -38,7 +38,7 @@ import {
38
38
  MEETING_REMOVED_REASON,
39
39
  _CONVERSATION_URL_,
40
40
  CONVERSATION_URL,
41
- METRICS_OPERATIONAL_MEASURES
41
+ BEHAVIORAL_METRICS
42
42
  } from '../constants';
43
43
  import MeetingInfo from '../meeting-info';
44
44
  import MeetingInfoV2 from '../meeting-info/meeting-info-v2';
@@ -456,10 +456,21 @@ export default class Meetings extends WebexPlugin {
456
456
  EVENT_TRIGGERS.MEETINGS_REGISTERED
457
457
  );
458
458
  this.registered = true;
459
+ Metrics.sendBehavioralMetric(
460
+ BEHAVIORAL_METRICS.MEETINGS_REGISTRATION_SUCCESS,
461
+ );
459
462
  })
460
463
  .catch((error) => {
461
464
  LoggerProxy.logger.error(`Meetings:index#register --> ERROR, Unable to register, ${error.message}`);
462
465
 
466
+ Metrics.sendBehavioralMetric(
467
+ BEHAVIORAL_METRICS.MEETINGS_REGISTRATION_FAILED,
468
+ {
469
+ reason: error.message,
470
+ stack: error.stack
471
+ }
472
+ );
473
+
463
474
  return Promise.reject(error);
464
475
  });
465
476
  }
@@ -542,8 +553,8 @@ export default class Meetings extends WebexPlugin {
542
553
  }
543
554
  );
544
555
 
545
- Metrics.sendOperationalMetric(
546
- METRICS_OPERATIONAL_MEASURES.UPLOAD_LOGS_FAILURE,
556
+ Metrics.sendBehavioralMetric(
557
+ BEHAVIORAL_METRICS.UPLOAD_LOGS_FAILURE,
547
558
  {
548
559
  meetingId: options.meetingsId,
549
560
  reason: uploadError.message,
@@ -320,3 +320,4 @@ export const OS_NAME = {
320
320
  };
321
321
 
322
322
  export const CLIENT_NAME = 'webex-js-sdk';
323
+ export const PLATFORM = 'Web';
@@ -14,7 +14,7 @@ import BrowserDetection from '../common/browser-detection';
14
14
 
15
15
  import {
16
16
  error, eventType, errorCodes as ERROR_CODE, OS_NAME, UNKNOWN, CLIENT_NAME,
17
- mediaType
17
+ mediaType, PLATFORM
18
18
  } from './config';
19
19
 
20
20
  const OSMap = {
@@ -489,11 +489,11 @@ class Metrics {
489
489
  }
490
490
 
491
491
  /**
492
- * Uploads given metric to the Metrics service as an operational metric.
492
+ * Uploads given metric to the Metrics service as an Behavioral metric.
493
493
  * Metadata about the environment such as browser, OS, SDK and their versions
494
494
  * are automatically added when the metric is sent.
495
495
  *
496
- * The Metrics service will send an operational metric to InfluxDB for
496
+ * The Metrics service will send an Behavioral metric to InfluxDB for
497
497
  * aggregation.
498
498
  * See https://confluence-eng-gpk2.cisco.com/conf/display/WBXT/Getting+started+with+Metrics+Service.
499
499
  *
@@ -503,12 +503,24 @@ class Metrics {
503
503
  *
504
504
  * @returns {void}
505
505
  */
506
- sendOperationalMetric(metricName, metricFields = {}, metricTags = {}) {
506
+ sendBehavioralMetric(metricName, metricFields = {}, metricTags = {}) {
507
507
  const fields = {
508
508
  ...metricFields,
509
509
  browser_version: getBrowserVersion(),
510
510
  os_version: getOSVersion(),
511
- sdk_version: this.webex.version
511
+ sdk_version: this.webex.version,
512
+ platform: PLATFORM
513
+ };
514
+
515
+ const context = {
516
+ app: {
517
+ version: this.webex.version
518
+ },
519
+ locale: 'en-US',
520
+ os: {
521
+ name: getOSName(),
522
+ version: getOSVersion()
523
+ }
512
524
  };
513
525
 
514
526
  const tags = {
@@ -517,17 +529,19 @@ class Metrics {
517
529
  org_id: this.webex.credentials.getOrgId(),
518
530
  os: getOSName(),
519
531
  domain: window.location.hostname,
520
- client_id: this.webex.credentials.config.client_id
532
+ client_id: this.webex.credentials.config.client_id,
533
+ user_id: this.webex.internal.device.userId
521
534
  };
522
535
 
523
536
  if (!metricName) {
524
- throw Error('Missing operational metric name. Please provide one');
537
+ throw Error('Missing behavioral metric name. Please provide one');
525
538
  }
526
539
 
527
540
  this.webex.internal.metrics.submitClientMetrics(metricName, {
528
- type: ['operational'],
541
+ type: ['behavioral', 'operational'],
529
542
  fields,
530
- tags
543
+ tags,
544
+ context
531
545
  });
532
546
  }
533
547
  }
@@ -21,7 +21,7 @@ import {
21
21
  OFFER,
22
22
  QUALITY_LEVELS,
23
23
  MAX_FRAMESIZES,
24
- METRICS_OPERATIONAL_MEASURES
24
+ BEHAVIORAL_METRICS
25
25
  } from '../constants';
26
26
  import {error, eventType} from '../metrics/config';
27
27
  import MediaError from '../common/errors/media';
@@ -342,7 +342,7 @@ pc.setRemoteSessionDetails = (
342
342
  LoggerProxy.logger.error(`Peer-connection-manager:index#setRemoteDescription --> ${error} missing remotesdp`);
343
343
 
344
344
 
345
- const metricName = METRICS_OPERATIONAL_MEASURES.PEERCONNECTION_FAILURE;
345
+ const metricName = BEHAVIORAL_METRICS.PEERCONNECTION_FAILURE;
346
346
  const data = {
347
347
  correlation_id: meetingId,
348
348
  reason: error.message,
@@ -352,7 +352,7 @@ pc.setRemoteSessionDetails = (
352
352
  type: error.name
353
353
  };
354
354
 
355
- Metrics.sendOperationalMetric(metricName, data, metadata);
355
+ Metrics.sendBehavioralMetric(metricName, data, metadata);
356
356
 
357
357
  return Metrics.postEvent({
358
358
  event: eventType.REMOTE_SDP_RECEIVED,
@@ -423,8 +423,8 @@ pc.createOffer = (peerConnection, {
423
423
  .catch((error) => {
424
424
  LoggerProxy.logger.error(`Peer-connection-manager:index#createOffer --> ${error}`);
425
425
  if (error instanceof InvalidSdpError) {
426
- Metrics.sendOperationalMetric(
427
- METRICS_OPERATIONAL_MEASURES.INVALID_ICE_CANDIDATE,
426
+ Metrics.sendBehavioralMetric(
427
+ BEHAVIORAL_METRICS.INVALID_ICE_CANDIDATE,
428
428
  {
429
429
  correlation_id: meetingId,
430
430
  code: error.code,
@@ -433,7 +433,7 @@ pc.createOffer = (peerConnection, {
433
433
  );
434
434
  }
435
435
  else {
436
- const metricName = METRICS_OPERATIONAL_MEASURES.PEERCONNECTION_FAILURE;
436
+ const metricName = BEHAVIORAL_METRICS.PEERCONNECTION_FAILURE;
437
437
  const data = {
438
438
  correlation_id: meetingId,
439
439
  reason: error.message,
@@ -443,7 +443,7 @@ pc.createOffer = (peerConnection, {
443
443
  type: error.name
444
444
  };
445
445
 
446
- Metrics.sendOperationalMetric(metricName, data, metadata);
446
+ Metrics.sendBehavioralMetric(metricName, data, metadata);
447
447
  }
448
448
 
449
449
  Metrics.postEvent({
@@ -538,15 +538,15 @@ pc.createAnswer = (params, {meetingId, remoteQualityLevel}) => {
538
538
  })
539
539
  .catch((error) => {
540
540
  if (error instanceof InvalidSdpError) {
541
- Metrics.sendOperationalMetric(
542
- METRICS_OPERATIONAL_MEASURES.INVALID_ICE_CANDIDATE,
541
+ Metrics.sendBehavioralMetric(
542
+ BEHAVIORAL_METRICS.INVALID_ICE_CANDIDATE,
543
543
  {
544
544
  correlation_id: meetingId
545
545
  }
546
546
  );
547
547
  }
548
548
  else {
549
- const metricName = METRICS_OPERATIONAL_MEASURES.PEERCONNECTION_FAILURE;
549
+ const metricName = BEHAVIORAL_METRICS.PEERCONNECTION_FAILURE;
550
550
  const data = {
551
551
  correlation_id: meetingId,
552
552
  reason: error.message,
@@ -556,7 +556,7 @@ pc.createAnswer = (params, {meetingId, remoteQualityLevel}) => {
556
556
  type: error.name
557
557
  };
558
558
 
559
- Metrics.sendOperationalMetric(metricName, data, metadata);
559
+ Metrics.sendBehavioralMetric(metricName, data, metadata);
560
560
  }
561
561
 
562
562
  LoggerProxy.logger.error(`PeerConnectionManager:index#setRemoteSessionDetails --> Error creating remote session, error: ${error}`);
@@ -619,8 +619,8 @@ pc.setPeerConnectionEvents = (meeting) => {
619
619
  function: 'connectionFailed'
620
620
  });
621
621
 
622
- Metrics.sendOperationalMetric(
623
- METRICS_OPERATIONAL_MEASURES.CONNECTION_FAILURE,
622
+ Metrics.sendBehavioralMetric(
623
+ BEHAVIORAL_METRICS.CONNECTION_FAILURE,
624
624
  {
625
625
  correlation_id: meeting.correlationId,
626
626
  locus_id: meeting.locusId
@@ -642,6 +642,13 @@ pc.setPeerConnectionEvents = (meeting) => {
642
642
  // Ice connection state goes to connected when both client and server sends STUN packets and
643
643
  // Established connected between them. Firefox does not trigger COMPLETED and only trigger CONNECTED
644
644
  Metrics.postEvent({event: eventType.ICE_END, meeting});
645
+ Metrics.sendBehavioralMetric(
646
+ BEHAVIORAL_METRICS.CONNECTION_SUCCESS,
647
+ {
648
+ correlation_id: meeting.correlationId,
649
+ locus_id: meeting.locusId
650
+ }
651
+ );
645
652
  meeting.setNetworkStatus(NETWORK_STATUS.CONNECTED);
646
653
  meeting.reconnectionManager.iceReconnected();
647
654
  LoggerProxy.logger.info('PeerConnectionManager:index#setPeerConnectionEvents --> ICE STATE CONNECTED.');
@@ -8,7 +8,7 @@ import LoggerProxy from '../common/logs/logger-proxy';
8
8
  import Trigger from '../common/events/trigger-proxy';
9
9
  import {
10
10
  EVENT_TRIGGERS,
11
- METRICS_OPERATIONAL_MEASURES,
11
+ BEHAVIORAL_METRICS,
12
12
  RECONNECTION,
13
13
  SHARE_STATUS,
14
14
  SHARE_STOPPED_REASON,
@@ -424,8 +424,8 @@ export default class ReconnectionManager {
424
424
  }
425
425
  else {
426
426
  LoggerProxy.logger.error('ReconnectionManager:index#rejoinMeeting --> Unable to rejoin meeting after max attempts.', joinError);
427
- Metrics.sendOperationalMetric(
428
- METRICS_OPERATIONAL_MEASURES.MEETING_MAX_REJOIN_FAILURE,
427
+ Metrics.sendBehavioralMetric(
428
+ BEHAVIORAL_METRICS.MEETING_MAX_REJOIN_FAILURE,
429
429
  {
430
430
  locus_id: this.meeting.locusUrl.split('/').pop(),
431
431
  reason: joinError.message,
@@ -2,7 +2,7 @@
2
2
  import {StatelessWebexPlugin} from '@webex/webex-core';
3
3
 
4
4
  import LoggerProxy from '../common/logs/logger-proxy';
5
- import {ROAP, _OFFER_, METRICS_OPERATIONAL_MEASURES} from '../constants';
5
+ import {ROAP, _OFFER_, BEHAVIORAL_METRICS} from '../constants';
6
6
  import Metrics from '../metrics';
7
7
 
8
8
  import RoapUtil from './util';
@@ -44,14 +44,14 @@ const handleSessionStep = ({
44
44
  if (session.OFFER && messageType === _OFFER_) {
45
45
  session.GLARE_OFFER = roap.msg;
46
46
  session.GLARE_OFFER.remote = !!roap.remote;
47
- const metricName = METRICS_OPERATIONAL_MEASURES.ROAP_GLARE_CONDITION;
47
+ const metricName = BEHAVIORAL_METRICS.ROAP_GLARE_CONDITION;
48
48
  const data = {
49
49
  correlation_id: correlationId,
50
50
  locus_id: locusUrl.split('/').pop(),
51
51
  sequence: sequenceId
52
52
  };
53
53
 
54
- Metrics.sendOperationalMetric(metricName, data);
54
+ Metrics.sendBehavioralMetric(metricName, data);
55
55
 
56
56
  LoggerProxy.logger.warn(`Roap:handler#handleSessionStep --> Glare condition occurred with new mercury event, sequenceId: ${sequenceId}`);
57
57
  }
@@ -112,7 +112,7 @@ export default class RoapHandler extends StatelessWebexPlugin {
112
112
  });
113
113
  })
114
114
  .catch((error) => {
115
- const metricName = METRICS_OPERATIONAL_MEASURES.ROAP_ANSWER_FAILURE;
115
+ const metricName = BEHAVIORAL_METRICS.ROAP_ANSWER_FAILURE;
116
116
  const data = {
117
117
  correlation_id: meeting.correlationId,
118
118
  locus_id: meeting.locusUrl.split('/').pop(),
@@ -123,7 +123,7 @@ export default class RoapHandler extends StatelessWebexPlugin {
123
123
  type: error.name
124
124
  };
125
125
 
126
- Metrics.sendOperationalMetric(metricName, data, metadata);
126
+ Metrics.sendBehavioralMetric(metricName, data, metadata);
127
127
  LoggerProxy.logger.error(`Roap:handler#perform --> Error occured during wait receive answer, continuing, ${error}`);
128
128
  });
129
129
  }