@webex/internal-plugin-metrics 3.12.0-next.55 → 3.12.0-next.57

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.
@@ -94,6 +94,7 @@ type GetIdentifiersOptions = {
94
94
  preLoginId?: string;
95
95
  globalMeetingId?: string;
96
96
  webexConferenceIdStr?: string;
97
+ locusCluster?: string;
97
98
  };
98
99
 
99
100
  /**
@@ -420,6 +421,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
420
421
  globalMeetingId,
421
422
  preLoginId,
422
423
  sessionCorrelationId,
424
+ locusCluster,
423
425
  } = options;
424
426
  const identifiers: Event['event']['identifiers'] = {
425
427
  correlationId: 'unknown', // concerned with setting this to unknown. This will fail diagnostic events parsing because it's not a uuid pattern
@@ -486,6 +488,10 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
486
488
  identifiers.webexSiteName = meeting.meetingInfo?.siteName;
487
489
  }
488
490
 
491
+ if (meeting?.meetingInfo?.locusClusterUrl) {
492
+ identifiers.locusCluster = meeting.meetingInfo.locusClusterUrl;
493
+ }
494
+
489
495
  if (mediaConnections) {
490
496
  identifiers.mediaAgentAlias = mediaConnections?.[0]?.mediaAgentAlias;
491
497
  identifiers.mediaAgentGroupId = mediaConnections?.[0]?.mediaAgentGroupId;
@@ -499,6 +505,10 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
499
505
  identifiers.globalMeetingId = globalMeetingId;
500
506
  }
501
507
 
508
+ if (!identifiers?.locusCluster && locusCluster) {
509
+ identifiers.locusCluster = locusCluster;
510
+ }
511
+
502
512
  if (identifiers.correlationId === undefined) {
503
513
  throw new Error('Identifiers initialization failed.');
504
514
  }
@@ -1063,6 +1073,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
1063
1073
  globalMeetingId,
1064
1074
  webexConferenceIdStr,
1065
1075
  sessionCorrelationId,
1076
+ locusCluster,
1066
1077
  } = options;
1067
1078
 
1068
1079
  // @ts-ignore
@@ -1096,6 +1107,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
1096
1107
  webexConferenceIdStr,
1097
1108
  globalMeetingId,
1098
1109
  sessionCorrelationId,
1110
+ locusCluster,
1099
1111
  });
1100
1112
 
1101
1113
  // create common event object structure
@@ -1136,9 +1148,11 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
1136
1148
  commonEventObject.meetingJoinedTime = meetingJoinedTime;
1137
1149
  }
1138
1150
 
1139
- if (options.meetingJoinPhase) {
1151
+ const meetingJoinPhase =
1152
+ options.meetingJoinPhase ?? meeting.callStateForMetrics?.meetingJoinPhase;
1153
+ if (meetingJoinPhase) {
1140
1154
  // @ts-ignore
1141
- commonEventObject.meetingJoinPhase = options.meetingJoinPhase;
1155
+ commonEventObject.meetingJoinPhase = meetingJoinPhase;
1142
1156
  }
1143
1157
 
1144
1158
  return commonEventObject;
@@ -1219,8 +1233,14 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
1219
1233
  options?: SubmitClientEventOptions;
1220
1234
  errors?: ClientEventPayloadError;
1221
1235
  }) {
1222
- const {correlationId, globalMeetingId, webexConferenceIdStr, preLoginId, sessionCorrelationId} =
1223
- options;
1236
+ const {
1237
+ correlationId,
1238
+ globalMeetingId,
1239
+ webexConferenceIdStr,
1240
+ preLoginId,
1241
+ sessionCorrelationId,
1242
+ locusCluster,
1243
+ } = options;
1224
1244
 
1225
1245
  // grab identifiers
1226
1246
  const identifiers = this.getIdentifiers({
@@ -1229,6 +1249,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
1229
1249
  preLoginId,
1230
1250
  globalMeetingId,
1231
1251
  webexConferenceIdStr,
1252
+ locusCluster,
1232
1253
  });
1233
1254
 
1234
1255
  // create client event object
@@ -1253,9 +1274,8 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
1253
1274
  clientEventObject.joinFlowVersion = options.joinFlowVersion;
1254
1275
  }
1255
1276
 
1256
- if (options.meetingJoinPhase) {
1257
- clientEventObject.meetingJoinPhase = options.meetingJoinPhase;
1258
- }
1277
+ // No meeting exists yet for pre-meeting events, so the join phase is pre-join by construction
1278
+ clientEventObject.meetingJoinPhase = options.meetingJoinPhase ?? 'pre-join';
1259
1279
 
1260
1280
  if (options.userNameInput) {
1261
1281
  clientEventObject.userNameInput = options.userNameInput;