From eeffc6ced0e0fe6e2d7de80f40e97ccb1ab659d0 Mon Sep 17 00:00:00 2001 From: arungane Date: Mon, 5 Oct 2020 01:55:59 +0530 Subject: [PATCH] fix(plugin-meetings): remove media inactive metrics --- .../@webex/plugin-meetings/src/constants.js | 4 +++- .../plugin-meetings/src/meeting/index.js | 22 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/packages/node_modules/@webex/plugin-meetings/src/constants.js b/packages/node_modules/@webex/plugin-meetings/src/constants.js index de2653fc36e..b7031d862d4 100644 --- a/packages/node_modules/@webex/plugin-meetings/src/constants.js +++ b/packages/node_modules/@webex/plugin-meetings/src/constants.js @@ -1140,13 +1140,15 @@ export const MQA_INTEVAL = 60000; // mqa analyzer interval its fixed to 60000 // Metrics constants ---------------------------------------------------------- export const METRICS_OPERATIONAL_MEASURES = { + JOIN_ATTEMPT: 'js_sdk_join_attempt', ADD_MEDIA_FAILURE: 'js_sdk_add_media_failures', GET_USER_MEDIA_FAILURE: 'js_sdk_get_user_media_failures', GET_DISPLAY_MEDIA_FAILURE: 'js_sdk_get_display_media_failures', JOIN_FAILURE: 'js_sdk_join_failures', JOIN_WITH_MEDIA_FAILURE: 'js_sdk_join_with_media_failures', MEETING_LEAVE_RELEASE: 'js_sdk_meeting_leave_release', - MEETING_MEDIA_RELEASE: 'js_sdk_meeting_media_release', + DISCONNECT_DUE_TO_INACTIVITY: 'js_sdk_disconnect_due_to_inactivity', + MEETING_MEDIA_INACTIVE: 'js_sdk_meeting_media_inactive', MEETING_RECONNECT_FAILURE: 'js_sdk_meeting_reconnect_failures', MEETING_SHARE_FAILURE: 'js_sdk_meeting_share_failures', MUTE_AUDIO_FAILURE: 'js_sdk_mute_audio_failures', diff --git a/packages/node_modules/@webex/plugin-meetings/src/meeting/index.js b/packages/node_modules/@webex/plugin-meetings/src/meeting/index.js index 9e988d740a6..74c1ba9c55e 100644 --- a/packages/node_modules/@webex/plugin-meetings/src/meeting/index.js +++ b/packages/node_modules/@webex/plugin-meetings/src/meeting/index.js @@ -666,6 +666,14 @@ export default class Meeting extends StatelessWebexPlugin { */ setUpLocusInfoMediaInactiveListener() { this.locusInfo.on(EVENTS.DISCONNECT_DUE_TO_INACTIVITY, (res) => { + Metrics.sendOperationalMetric( + METRICS_OPERATIONAL_MEASURES.DISCONNECT_DUE_TO_INACTIVITY, + { + correlation_id: this.correlationId, + locus_id: this.locusId + } + ); + // TODO: need to send metric for locus disconnect LoggerProxy.logger.error(`Meeting:index#setUpLocusInfoMediaInactiveListener --> Meeting disconnected due to inactivity: ${res.reason}`); this.reconnect(); @@ -1183,6 +1191,13 @@ export default class Meeting extends StatelessWebexPlugin { }); this.locusInfo.on(LOCUSINFO.EVENTS.MEDIA_INACTIVITY, () => { + Metrics.sendOperationalMetric( + METRICS_OPERATIONAL_MEASURES.MEETING_MEDIA_INACTIVE, + { + correlation_id: this.correlationId, + locus_id: this.locusId + } + ); this.reconnect(); }); } @@ -2400,6 +2415,13 @@ export default class Meeting extends StatelessWebexPlugin { meeting: this, data: {trigger: trigger.USER_INTERACTION} }); + + Metrics.sendOperationalMetric( + METRICS_OPERATIONAL_MEASURES.JOIN_ATTEMPT, + { + correlation_id: this.correlationId + } + ); } LoggerProxy.logger.log('Meeting:index#join --> Joining a meeting');