@webex/plugin-meetings 3.12.0-next.125 → 3.12.0-next.127

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.
@@ -252,5 +252,6 @@ export default class MeetingInfoV2 {
252
252
  }, installedOrgID?: any, locusId?: any, extraParams?: object, options?: {
253
253
  meetingId?: string;
254
254
  sendCAevents?: boolean;
255
+ correlationId?: string;
255
256
  }, registrationId?: string, fullSiteUrl?: string, classificationId?: string): Promise<any>;
256
257
  }
@@ -869,7 +869,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
869
869
  }, _callee1);
870
870
  }))();
871
871
  },
872
- version: "3.12.0-next.125"
872
+ version: "3.12.0-next.127"
873
873
  });
874
874
  var _default = exports.default = Webinar;
875
875
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -43,7 +43,7 @@
43
43
  "@webex/eslint-config-legacy": "0.0.0",
44
44
  "@webex/jest-config-legacy": "0.0.0",
45
45
  "@webex/legacy-tools": "0.0.0",
46
- "@webex/plugin-rooms": "3.12.0-next.46",
46
+ "@webex/plugin-rooms": "3.12.0-next.47",
47
47
  "@webex/test-helper-chai": "3.12.0-next.5",
48
48
  "@webex/test-helper-mocha": "3.12.0-next.5",
49
49
  "@webex/test-helper-mock-webex": "3.12.0-next.5",
@@ -63,20 +63,20 @@
63
63
  "@webex/common": "3.12.0-next.5",
64
64
  "@webex/event-dictionary-ts": "^1.0.2215",
65
65
  "@webex/internal-media-core": "2.28.2",
66
- "@webex/internal-plugin-conversation": "3.12.0-next.46",
67
- "@webex/internal-plugin-device": "3.12.0-next.40",
68
- "@webex/internal-plugin-llm": "3.12.0-next.47",
69
- "@webex/internal-plugin-mercury": "3.12.0-next.44",
70
- "@webex/internal-plugin-metrics": "3.12.0-next.40",
71
- "@webex/internal-plugin-support": "3.12.0-next.46",
72
- "@webex/internal-plugin-user": "3.12.0-next.41",
73
- "@webex/internal-plugin-voicea": "3.12.0-next.49",
66
+ "@webex/internal-plugin-conversation": "3.12.0-next.47",
67
+ "@webex/internal-plugin-device": "3.12.0-next.41",
68
+ "@webex/internal-plugin-llm": "3.12.0-next.48",
69
+ "@webex/internal-plugin-mercury": "3.12.0-next.45",
70
+ "@webex/internal-plugin-metrics": "3.12.0-next.41",
71
+ "@webex/internal-plugin-support": "3.12.0-next.47",
72
+ "@webex/internal-plugin-user": "3.12.0-next.42",
73
+ "@webex/internal-plugin-voicea": "3.12.0-next.50",
74
74
  "@webex/media-helpers": "3.12.0-next.11",
75
- "@webex/plugin-people": "3.12.0-next.44",
76
- "@webex/plugin-rooms": "3.12.0-next.46",
75
+ "@webex/plugin-people": "3.12.0-next.45",
76
+ "@webex/plugin-rooms": "3.12.0-next.47",
77
77
  "@webex/ts-sdp": "^1.8.1",
78
- "@webex/web-capabilities": "^1.12.0",
79
- "@webex/webex-core": "3.12.0-next.40",
78
+ "@webex/web-capabilities": "^1.13.0",
79
+ "@webex/webex-core": "3.12.0-next.41",
80
80
  "ampersand-collection": "^2.0.2",
81
81
  "bowser": "^2.11.0",
82
82
  "btoa": "^1.2.1",
@@ -94,5 +94,5 @@
94
94
  "//": [
95
95
  "TODO: upgrade jwt-decode when moving to node 18"
96
96
  ],
97
- "version": "3.12.0-next.125"
97
+ "version": "3.12.0-next.127"
98
98
  }
@@ -2090,7 +2090,7 @@ export default class Meeting extends StatelessWebexPlugin {
2090
2090
  this.config.installedOrgID,
2091
2091
  this.locusId,
2092
2092
  extraParams,
2093
- {meetingId: this.id, sendCAevents},
2093
+ {meetingId: this.id, sendCAevents, correlationId: this.correlationId},
2094
2094
  registrationId,
2095
2095
  null,
2096
2096
  classificationId
@@ -649,12 +649,12 @@ export default class MeetingInfoV2 {
649
649
  installedOrgID = null,
650
650
  locusId = null,
651
651
  extraParams: object = {},
652
- options: {meetingId?: string; sendCAevents?: boolean} = {},
652
+ options: {meetingId?: string; sendCAevents?: boolean; correlationId?: string} = {},
653
653
  registrationId: string = null,
654
654
  fullSiteUrl: string = null,
655
655
  classificationId: string = null
656
656
  ) {
657
- const {meetingId, sendCAevents} = options;
657
+ const {meetingId, sendCAevents, correlationId} = options;
658
658
 
659
659
  const destinationType = await MeetingInfoUtil.getDestinationType({
660
660
  destination,
@@ -706,6 +706,10 @@ export default class MeetingInfoV2 {
706
706
  body,
707
707
  };
708
708
 
709
+ if (meetingId && sendCAevents && correlationId) {
710
+ requestOptions.headers = {correlationId};
711
+ }
712
+
709
713
  const directURI = await MeetingInfoUtil.getDirectMeetingInfoURI(destinationType);
710
714
 
711
715
  if (fullSiteUrl) {
@@ -219,19 +219,34 @@ export default class Meetings extends WebexPlugin {
219
219
  * @returns {void}
220
220
  */
221
221
  private emitWasmRuntimePerformance = once((correlationId: string): void => {
222
- // This check is designed to swallow any probe/metrics failure so it can never break meeting
223
- // creation, while still reporting the status so we can track browsers with WASM issues.
222
+ // Probe and telemetry failures must not prevent meeting creation.
224
223
  WasmRuntimeProbe.check()
225
224
  .then((result) => {
225
+ const {status, capability, reason, measurements} = result;
226
+ const {
227
+ divRatio = null,
228
+ sqrtRatio = null,
229
+ addNsPerOp = null,
230
+ addMedianMs = null,
231
+ divMedianMs = null,
232
+ sqrtMedianMs = null,
233
+ } = measurements ?? {};
234
+ const measurementsLog = JSON.stringify(measurements);
235
+
226
236
  LoggerProxy.logger.log(
227
- `Meetings:index#emitWasmRuntimePerformance --> WASM runtime performance status: ${result.status}, ratio: ${result.ratio}, wasmMs: ${result.wasmMs}, jsMs: ${result.jsMs}`
237
+ `Meetings:index#emitWasmRuntimePerformance --> WASM runtime performance status: ${status}, capability: ${capability}, reason: ${reason}, measurements: ${measurementsLog}`
228
238
  );
229
239
 
230
240
  return Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.WASM_RUNTIME_PERFORMANCE, {
231
- status: result.status,
232
- ratio: result.ratio,
233
- wasmMs: result.wasmMs,
234
- jsMs: result.jsMs,
241
+ status,
242
+ capability,
243
+ reason,
244
+ divRatio,
245
+ sqrtRatio,
246
+ addNsPerOp,
247
+ addMedianMs,
248
+ divMedianMs,
249
+ sqrtMedianMs,
235
250
  correlation_id: correlationId,
236
251
  });
237
252
  })
@@ -9033,7 +9033,11 @@ describe('plugin-meetings', () => {
9033
9033
  beforeEach(() => {
9034
9034
  meeting.locusId = 'locus-id';
9035
9035
  meeting.id = 'meeting-id';
9036
- FAKE_OPTIONS = {meetingId: meeting.id, sendCAevents: true};
9036
+ FAKE_OPTIONS = {
9037
+ meetingId: meeting.id,
9038
+ sendCAevents: true,
9039
+ correlationId: meeting.correlationId,
9040
+ };
9037
9041
  });
9038
9042
 
9039
9043
  it('calls meetingInfoProvider with all the right parameters and parses the result', async () => {
@@ -9118,7 +9122,11 @@ describe('plugin-meetings', () => {
9118
9122
  undefined,
9119
9123
  meeting.locusId,
9120
9124
  {},
9121
- {meetingId: meeting.id, sendCAevents: false}
9125
+ {
9126
+ meetingId: meeting.id,
9127
+ sendCAevents: false,
9128
+ correlationId: meeting.correlationId,
9129
+ }
9122
9130
  );
9123
9131
 
9124
9132
  // parseMeeting info
@@ -9204,7 +9212,11 @@ describe('plugin-meetings', () => {
9204
9212
  undefined,
9205
9213
  'locus-id',
9206
9214
  {},
9207
- {meetingId: meeting.id, sendCAevents: true}
9215
+ {
9216
+ meetingId: meeting.id,
9217
+ sendCAevents: true,
9218
+ correlationId: meeting.correlationId,
9219
+ }
9208
9220
  );
9209
9221
 
9210
9222
  assert.deepEqual(meeting.meetingInfo, FAKE_MEETING_INFO);
@@ -9240,7 +9252,11 @@ describe('plugin-meetings', () => {
9240
9252
  undefined,
9241
9253
  'locus-id',
9242
9254
  {},
9243
- {meetingId: meeting.id, sendCAevents: true}
9255
+ {
9256
+ meetingId: meeting.id,
9257
+ sendCAevents: true,
9258
+ correlationId: meeting.correlationId,
9259
+ }
9244
9260
  );
9245
9261
 
9246
9262
  assert.deepEqual(meeting.meetingInfo, FAKE_MEETING_INFO);
@@ -9269,7 +9285,11 @@ describe('plugin-meetings', () => {
9269
9285
  undefined,
9270
9286
  'locus-id',
9271
9287
  {},
9272
- {meetingId: meeting.id, sendCAevents: true}
9288
+ {
9289
+ meetingId: meeting.id,
9290
+ sendCAevents: true,
9291
+ correlationId: meeting.correlationId,
9292
+ }
9273
9293
  );
9274
9294
 
9275
9295
  assert.deepEqual(meeting.meetingInfo, FAKE_MEETING_INFO);
@@ -9304,7 +9324,11 @@ describe('plugin-meetings', () => {
9304
9324
  undefined,
9305
9325
  'locus-id',
9306
9326
  {},
9307
- {meetingId: meeting.id, sendCAevents: true}
9327
+ {
9328
+ meetingId: meeting.id,
9329
+ sendCAevents: true,
9330
+ correlationId: meeting.correlationId,
9331
+ }
9308
9332
  );
9309
9333
 
9310
9334
  assert.deepEqual(meeting.meetingInfo, {});
@@ -9350,7 +9374,11 @@ describe('plugin-meetings', () => {
9350
9374
  undefined,
9351
9375
  'locus-id',
9352
9376
  {},
9353
- {meetingId: meeting.id, sendCAevents: true}
9377
+ {
9378
+ meetingId: meeting.id,
9379
+ sendCAevents: true,
9380
+ correlationId: meeting.correlationId,
9381
+ }
9354
9382
  );
9355
9383
 
9356
9384
  assert.deepEqual(meeting.meetingInfo, {});
@@ -9384,7 +9412,11 @@ describe('plugin-meetings', () => {
9384
9412
  undefined,
9385
9413
  'locus-id',
9386
9414
  {},
9387
- {meetingId: meeting.id, sendCAevents: true}
9415
+ {
9416
+ meetingId: meeting.id,
9417
+ sendCAevents: true,
9418
+ correlationId: meeting.correlationId,
9419
+ }
9388
9420
  );
9389
9421
 
9390
9422
  assert.deepEqual(meeting.meetingInfo, {
@@ -9437,7 +9469,11 @@ describe('plugin-meetings', () => {
9437
9469
  undefined,
9438
9470
  'locus-id',
9439
9471
  {},
9440
- {meetingId: meeting.id, sendCAevents: true}
9472
+ {
9473
+ meetingId: meeting.id,
9474
+ sendCAevents: true,
9475
+ correlationId: meeting.correlationId,
9476
+ }
9441
9477
  );
9442
9478
 
9443
9479
  assert.deepEqual(meeting.meetingInfo, FAKE_MEETING_INFO);
@@ -9726,7 +9762,11 @@ describe('plugin-meetings', () => {
9726
9762
  'fake-installed-org-id',
9727
9763
  'locus-id',
9728
9764
  {extraParam1: 'value1', permissionToken: FAKE_PERMISSION_TOKEN},
9729
- {meetingId: meeting.id, sendCAevents: true},
9765
+ {
9766
+ meetingId: meeting.id,
9767
+ sendCAevents: true,
9768
+ correlationId: meeting.correlationId,
9769
+ },
9730
9770
  null,
9731
9771
  null,
9732
9772
  null
@@ -9774,7 +9814,11 @@ describe('plugin-meetings', () => {
9774
9814
  'fake-installed-org-id',
9775
9815
  'locus-id',
9776
9816
  {extraParam1: 'value1', permissionToken: FAKE_PERMISSION_TOKEN},
9777
- {meetingId: meeting.id, sendCAevents: true},
9817
+ {
9818
+ meetingId: meeting.id,
9819
+ sendCAevents: true,
9820
+ correlationId: meeting.correlationId,
9821
+ },
9778
9822
  null,
9779
9823
  null,
9780
9824
  null
@@ -9831,7 +9875,11 @@ describe('plugin-meetings', () => {
9831
9875
  extraParam1: 'value1',
9832
9876
  permissionToken: FAKE_PERMISSION_TOKEN,
9833
9877
  },
9834
- {meetingId: meeting.id, sendCAevents: true},
9878
+ {
9879
+ meetingId: meeting.id,
9880
+ sendCAevents: true,
9881
+ correlationId: meeting.correlationId,
9882
+ },
9835
9883
  null,
9836
9884
  null,
9837
9885
  null
@@ -900,6 +900,63 @@ describe('plugin-meetings', () => {
900
900
  }
901
901
  );
902
902
 
903
+ forEach(
904
+ [
905
+ {
906
+ meetingId: 'meeting-id',
907
+ sendCAevents: true,
908
+ correlationId: 'correlation-id',
909
+ shouldSendCorrelationId: true,
910
+ condition: 'when CA events are enabled for the meeting',
911
+ },
912
+ {
913
+ sendCAevents: true,
914
+ correlationId: 'correlation-id',
915
+ shouldSendCorrelationId: false,
916
+ condition: 'without a meetingId',
917
+ },
918
+ {
919
+ meetingId: 'meeting-id',
920
+ sendCAevents: false,
921
+ correlationId: 'correlation-id',
922
+ shouldSendCorrelationId: false,
923
+ condition: 'when CA events are disabled',
924
+ },
925
+ {
926
+ meetingId: 'meeting-id',
927
+ sendCAevents: true,
928
+ shouldSendCorrelationId: false,
929
+ condition: 'without a correlationId',
930
+ },
931
+ ],
932
+ ({meetingId, sendCAevents, correlationId, shouldSendCorrelationId, condition}) => {
933
+ it(`should ${
934
+ shouldSendCorrelationId ? '' : 'not '
935
+ }send the correlationId header ${condition}`, async () => {
936
+ webex.request.resolves({statusCode: 200, body: {meetingKey: '1234323'}});
937
+
938
+ await meetingInfo.fetchMeetingInfo(
939
+ '1234323',
940
+ DESTINATION_TYPE.MEETING_ID,
941
+ null,
942
+ null,
943
+ null,
944
+ null,
945
+ undefined,
946
+ {meetingId, sendCAevents, correlationId}
947
+ );
948
+
949
+ const requestOptions = webex.request.firstCall.args[0];
950
+
951
+ if (shouldSendCorrelationId) {
952
+ assert.deepEqual(requestOptions.headers, {correlationId});
953
+ } else {
954
+ assert.notProperty(requestOptions, 'headers');
955
+ }
956
+ });
957
+ }
958
+ );
959
+
903
960
  it('should send CA metric if meetingId is provided and send CA events is authorized', async () => {
904
961
  const requestResponse = {
905
962
  statusCode: 200,
@@ -1879,12 +1879,27 @@ describe('plugin-meetings', () => {
1879
1879
  });
1880
1880
 
1881
1881
  describe('wasm runtime performance telemetry', () => {
1882
+ const correlationId = 'wasm-corr-id';
1883
+ const benchmarkMeasurements = {
1884
+ divRatio: 1.888,
1885
+ sqrtRatio: 3.474,
1886
+ addNsPerOp: 2.006,
1887
+ addMedianMs: 32.1,
1888
+ divMedianMs: 60.6,
1889
+ sqrtMedianMs: 111.5,
1890
+ };
1882
1891
  const probeResult = {
1883
1892
  status: 'slow',
1884
1893
  capability: 'not capable',
1885
- ratio: 0.25,
1886
- wasmMs: 25,
1887
- jsMs: 100,
1894
+ reason: null,
1895
+ measurements: benchmarkMeasurements,
1896
+ };
1897
+ const expectedMetricFields = {
1898
+ status: probeResult.status,
1899
+ capability: probeResult.capability,
1900
+ reason: probeResult.reason,
1901
+ ...benchmarkMeasurements,
1902
+ correlation_id: correlationId,
1888
1903
  };
1889
1904
  let metricsSpy;
1890
1905
  let probeCheckStub;
@@ -1893,7 +1908,7 @@ describe('plugin-meetings', () => {
1893
1908
  webex.meetings.meetingInfo.fetchInfoOptions = sinon.stub().resolves({});
1894
1909
  webex.meetings.createMeeting = sinon
1895
1910
  .stub()
1896
- .returns(Promise.resolve({on: () => true, correlationId: 'wasm-corr-id'}));
1911
+ .returns(Promise.resolve({on: () => true, correlationId}));
1897
1912
  probeCheckStub = sinon.stub(WasmRuntimeProbe, 'check').resolves(probeResult);
1898
1913
  metricsSpy = sinon.stub(Metrics, 'sendBehavioralMetric');
1899
1914
  });
@@ -1908,13 +1923,11 @@ describe('plugin-meetings', () => {
1908
1923
  await testUtils.flushPromises();
1909
1924
 
1910
1925
  assert.calledOnceWithExactly(probeCheckStub);
1911
- assert.calledOnceWithExactly(metricsSpy, 'js_sdk_wasm_runtime_performance', {
1912
- status: 'slow',
1913
- ratio: 0.25,
1914
- wasmMs: 25,
1915
- jsMs: 100,
1916
- correlation_id: 'wasm-corr-id',
1917
- });
1926
+ assert.calledOnceWithExactly(
1927
+ metricsSpy,
1928
+ 'js_sdk_wasm_runtime_performance',
1929
+ expectedMetricFields
1930
+ );
1918
1931
  });
1919
1932
 
1920
1933
  it('logs the WASM runtime status after a meeting is created', async () => {
@@ -1939,12 +1952,35 @@ describe('plugin-meetings', () => {
1939
1952
  await testUtils.flushPromises();
1940
1953
 
1941
1954
  assert.calledOnceWithExactly(probeCheckStub);
1955
+ assert.calledOnceWithExactly(
1956
+ metricsSpy,
1957
+ 'js_sdk_wasm_runtime_performance',
1958
+ expectedMetricFields
1959
+ );
1960
+ });
1961
+
1962
+ it('emits the reason with null measurement fields when no measurements are available', async () => {
1963
+ probeCheckStub.resolves({
1964
+ status: 'unknown',
1965
+ capability: 'unknown',
1966
+ reason: 'worker_timeout',
1967
+ measurements: null,
1968
+ });
1969
+
1970
+ await webex.meetings.create(test1, test2);
1971
+ await testUtils.flushPromises();
1972
+
1942
1973
  assert.calledOnceWithExactly(metricsSpy, 'js_sdk_wasm_runtime_performance', {
1943
- status: 'slow',
1944
- ratio: 0.25,
1945
- wasmMs: 25,
1946
- jsMs: 100,
1947
- correlation_id: 'wasm-corr-id',
1974
+ status: 'unknown',
1975
+ capability: 'unknown',
1976
+ reason: 'worker_timeout',
1977
+ divRatio: null,
1978
+ sqrtRatio: null,
1979
+ addNsPerOp: null,
1980
+ addMedianMs: null,
1981
+ divMedianMs: null,
1982
+ sqrtMedianMs: null,
1983
+ correlation_id: correlationId,
1948
1984
  });
1949
1985
  });
1950
1986
 
@@ -1955,8 +1991,7 @@ describe('plugin-meetings', () => {
1955
1991
  const created = await webex.meetings.create(test1, test2);
1956
1992
  await testUtils.flushPromises();
1957
1993
 
1958
- // create() resolved normally with the meeting, i.e. the failed probe did not break it.
1959
- assert.equal(created.correlationId, 'wasm-corr-id');
1994
+ assert.equal(created.correlationId, correlationId);
1960
1995
  assert.notCalled(metricsSpy);
1961
1996
  assert.calledOnceWithExactly(
1962
1997
  loggerErrorStub,
@@ -2680,7 +2715,11 @@ describe('plugin-meetings', () => {
2680
2715
  undefined,
2681
2716
  undefined,
2682
2717
  extraParams,
2683
- {meetingId: meeting.id, sendCAevents}
2718
+ {
2719
+ meetingId: meeting.id,
2720
+ sendCAevents,
2721
+ correlationId: meeting.correlationId,
2722
+ }
2684
2723
  );
2685
2724
  }
2686
2725