You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CallStats.js 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711
  1. /* global $, callstats */
  2. const logger = require('jitsi-meet-logger').getLogger(__filename);
  3. const GlobalOnErrorHandler = require('../util/GlobalOnErrorHandler');
  4. const jsSHA = require('jssha');
  5. const io = require('socket.io-client');
  6. /**
  7. * We define enumeration of wrtcFuncNames as we need them before
  8. * callstats is initialized to queue events.
  9. * @const
  10. * @see http://www.callstats.io/api/#enumeration-of-wrtcfuncnames
  11. */
  12. const wrtcFuncNames = {
  13. createOffer: 'createOffer',
  14. createAnswer: 'createAnswer',
  15. setLocalDescription: 'setLocalDescription',
  16. setRemoteDescription: 'setRemoteDescription',
  17. addIceCandidate: 'addIceCandidate',
  18. getUserMedia: 'getUserMedia',
  19. iceConnectionFailure: 'iceConnectionFailure',
  20. signalingError: 'signalingError',
  21. applicationLog: 'applicationLog'
  22. };
  23. /**
  24. * We define enumeration of fabricEvent as we need them before
  25. * callstats is initialized to queue events.
  26. * @const
  27. * @see http://www.callstats.io/api/#enumeration-of-fabricevent
  28. */
  29. const fabricEvent = {
  30. fabricHold: 'fabricHold',
  31. fabricResume: 'fabricResume',
  32. audioMute: 'audioMute',
  33. audioUnmute: 'audioUnmute',
  34. videoPause: 'videoPause',
  35. videoResume: 'videoResume',
  36. fabricUsageEvent: 'fabricUsageEvent',
  37. fabricStats: 'fabricStats',
  38. fabricTerminated: 'fabricTerminated',
  39. screenShareStart: 'screenShareStart',
  40. screenShareStop: 'screenShareStop',
  41. dominantSpeaker: 'dominantSpeaker',
  42. activeDeviceList: 'activeDeviceList'
  43. };
  44. /**
  45. * The user id to report to callstats as destination.
  46. * @type {string}
  47. */
  48. const DEFAULT_REMOTE_USER = 'jitsi';
  49. /**
  50. * Type of pending reports, can be event or an error.
  51. * @type {{ERROR: string, EVENT: string}}
  52. */
  53. const reportType = {
  54. ERROR: 'error',
  55. EVENT: 'event',
  56. MST_WITH_USERID: 'mstWithUserID'
  57. };
  58. /**
  59. * An instance of this class is a wrapper for the CallStats API fabric. A fabric
  60. * reports one peer connection the the CallStats backend and is allocated with
  61. * {@link callstats.addNewFabric}. It has a bunch of instance methods for
  62. * reporting various events. A fabric is considered disposed when
  63. * {@link CallStats.sendTerminateEvent} is executed.
  64. *
  65. * Currently only one backend instance can be created ever and it's done using
  66. * {@link CallStats.initBackend}. At the time of this writing there is no way to
  67. * explicitly shutdown the backend, but it's supposed to close it's connection
  68. * automatically, after all fabrics have been terminated.
  69. */
  70. export default class CallStats {
  71. /**
  72. * A callback passed to {@link callstats.addNewFabric}.
  73. * @param {string} error 'success' means ok
  74. * @param {string} msg some more details
  75. * @private
  76. */
  77. static _addNewFabricCallback(error, msg) {
  78. if (CallStats.backend && error !== 'success') {
  79. logger.error(`Monitoring status: ${error} msg: ${msg}`);
  80. }
  81. }
  82. /**
  83. * Callback passed to {@link callstats.initialize} (backend initialization)
  84. * @param {string} error 'success' means ok
  85. * @param {String} msg
  86. * @private
  87. */
  88. static _initCallback(error, msg) {
  89. logger.log(`CallStats Status: err=${error} msg=${msg}`);
  90. // there is no lib, nothing to report to
  91. if (error !== 'success') {
  92. return;
  93. }
  94. // I hate that
  95. let atLeastOneFabric = false;
  96. let defaultInstance = null;
  97. for (const callStatsInstance of CallStats.fabrics.values()) {
  98. if (!callStatsInstance.hasFabric) {
  99. logger.debug('addNewFabric - initCallback');
  100. if (callStatsInstance._addNewFabric()) {
  101. atLeastOneFabric = true;
  102. if (!defaultInstance) {
  103. defaultInstance = callStatsInstance;
  104. }
  105. }
  106. }
  107. }
  108. if (!atLeastOneFabric) {
  109. return;
  110. }
  111. CallStats.initialized = true;
  112. // There is no conference ID nor a PeerConnection available when some of
  113. // the events are scheduled on the reportsQueue, so those will be
  114. // reported on the first initialized fabric.
  115. const defaultConfID = defaultInstance.confID;
  116. const defaultPC = defaultInstance.peerconnection;
  117. // notify callstats about failures if there were any
  118. for (const report of CallStats.reportsQueue) {
  119. if (report.type === reportType.ERROR) {
  120. const errorData = report.data;
  121. CallStats._reportError(
  122. defaultInstance,
  123. errorData.type,
  124. errorData.error,
  125. errorData.pc || defaultPC);
  126. } else if (report.type === reportType.EVENT) {
  127. // if we have and event to report and we failed to add
  128. // fabric this event will not be reported anyway, returning
  129. // an error
  130. const eventData = report.data;
  131. CallStats.backend.sendFabricEvent(
  132. report.pc || defaultPC,
  133. eventData.event,
  134. defaultConfID,
  135. eventData.eventData);
  136. } else if (report.type === reportType.MST_WITH_USERID) {
  137. const data = report.data;
  138. CallStats.backend.associateMstWithUserID(
  139. report.pc || defaultPC,
  140. data.callStatsId,
  141. defaultConfID,
  142. data.ssrc,
  143. data.usageLabel,
  144. data.containerId
  145. );
  146. }
  147. }
  148. CallStats.reportsQueue.length = 0;
  149. }
  150. /* eslint-disable max-params */
  151. /**
  152. * Reports an error to callstats.
  153. *
  154. * @param {CallStats} [cs]
  155. * @param type the type of the error, which will be one of the wrtcFuncNames
  156. * @param error the error
  157. * @param pc the peerconnection
  158. * @private
  159. */
  160. static _reportError(cs, type, error, pc) {
  161. let _error = error;
  162. if (!_error) {
  163. logger.warn('No error is passed!');
  164. _error = new Error('Unknown error');
  165. }
  166. if (CallStats.initialized && cs) {
  167. CallStats.backend.reportError(pc, cs.confID, type, _error);
  168. } else {
  169. CallStats.reportsQueue.push({
  170. type: reportType.ERROR,
  171. data: {
  172. error: _error,
  173. pc,
  174. type
  175. }
  176. });
  177. }
  178. // else just ignore it
  179. }
  180. /* eslint-enable max-params */
  181. /**
  182. * Reports an error to callstats.
  183. *
  184. * @param {CallStats} cs
  185. * @param event the type of the event, which will be one of the fabricEvent
  186. * @param eventData additional data to pass to event
  187. * @private
  188. */
  189. static _reportEvent(cs, event, eventData) {
  190. const pc = cs && cs.peerconnection;
  191. const confID = cs && cs.confID;
  192. if (CallStats.initialized && cs) {
  193. CallStats.backend.sendFabricEvent(pc, event, confID, eventData);
  194. } else {
  195. CallStats.reportsQueue.push({
  196. confID,
  197. pc,
  198. type: reportType.EVENT,
  199. data: { event,
  200. eventData }
  201. });
  202. }
  203. }
  204. /**
  205. * Wraps some of the CallStats API method and logs their calls with
  206. * arguments on the debug logging level. Also wraps some of the backend
  207. * methods execution into try catch blocks to not crash the app in case
  208. * there is a problem with the backend itself.
  209. * @param {callstats} theBackend
  210. * @private
  211. */
  212. static _traceAndCatchBackendCalls(theBackend) {
  213. const tryCatchMethods = [
  214. 'associateMstWithUserID',
  215. 'sendFabricEvent',
  216. 'sendUserFeedback'
  217. // 'reportError', - this one needs special handling - see code below
  218. ];
  219. for (const methodName of tryCatchMethods) {
  220. const originalMethod = theBackend[methodName];
  221. theBackend[methodName] = function(...theArguments) {
  222. try {
  223. return originalMethod.apply(theBackend, theArguments);
  224. } catch (e) {
  225. GlobalOnErrorHandler.callErrorHandler(e);
  226. }
  227. };
  228. }
  229. const debugMethods = [
  230. 'associateMstWithUserID',
  231. 'sendFabricEvent',
  232. 'sendUserFeedback'
  233. // 'reportError', - this one needs special handling - see code below
  234. ];
  235. for (const methodName of debugMethods) {
  236. const originalMethod = theBackend[methodName];
  237. theBackend[methodName] = function(...theArguments) {
  238. logger.debug(methodName, theArguments);
  239. originalMethod.apply(theBackend, theArguments);
  240. };
  241. }
  242. const originalReportError = theBackend.reportError;
  243. /* eslint-disable max-params */
  244. theBackend.reportError
  245. = function(pc, cs, type, ...args) {
  246. // Logs from the logger are submitted on the applicationLog event
  247. // "type". Logging the arguments on the logger will create endless
  248. // loop, because it will put all the logs to the logger queue again.
  249. if (type === wrtcFuncNames.applicationLog) {
  250. // NOTE otherArguments are not logged to the console on purpose
  251. // to not log the whole log batch
  252. // FIXME check the current logging level (currently not exposed
  253. // by the logger implementation)
  254. console && console.debug('reportError', pc, cs, type);
  255. } else {
  256. logger.debug('reportError', pc, cs, type, ...args);
  257. }
  258. try {
  259. originalReportError.call(theBackend, pc, cs, type, ...args);
  260. } catch (exception) {
  261. if (type === wrtcFuncNames.applicationLog) {
  262. console && console.error('reportError', exception);
  263. } else {
  264. GlobalOnErrorHandler.callErrorHandler(exception);
  265. }
  266. }
  267. };
  268. /* eslint-enable max-params */
  269. }
  270. /**
  271. * Initializes the CallStats backend. Should be called only if
  272. * {@link CallStats.isBackendInitialized} returns <tt>false</tt>.
  273. * @param {object} options
  274. * @param {String} options.callStatsID CallStats credentials - ID
  275. * @param {String} options.callStatsSecret CallStats credentials - secret
  276. * @param {string} options.aliasName the <tt>aliasName</tt> part of
  277. * the <tt>userID</tt> aka endpoint ID, see CallStats docs for more info.
  278. * @param {string} options.userName the <tt>userName</tt> part of
  279. * the <tt>userID</tt> aka display name, see CallStats docs for more info.
  280. *
  281. */
  282. static initBackend(options) {
  283. if (CallStats.backend) {
  284. throw new Error('CallStats backend has been initialized already!');
  285. }
  286. try {
  287. CallStats.backend
  288. = new callstats($, io, jsSHA); // eslint-disable-line new-cap
  289. CallStats._traceAndCatchBackendCalls(CallStats.backend);
  290. CallStats.userID = {
  291. aliasName: options.aliasName,
  292. userName: options.userName
  293. };
  294. CallStats.callStatsID = options.callStatsID;
  295. CallStats.callStatsSecret = options.callStatsSecret;
  296. // userID is generated or given by the origin server
  297. CallStats.backend.initialize(
  298. CallStats.callStatsID,
  299. CallStats.callStatsSecret,
  300. CallStats.userID,
  301. CallStats._initCallback);
  302. return true;
  303. } catch (e) {
  304. // The callstats.io API failed to initialize (e.g. because its
  305. // download did not succeed in general or on time). Further attempts
  306. // to utilize it cannot possibly succeed.
  307. GlobalOnErrorHandler.callErrorHandler(e);
  308. CallStats.backend = null;
  309. logger.error(e);
  310. return false;
  311. }
  312. }
  313. /**
  314. * Checks if the CallStats backend has been created. It does not mean that
  315. * it has been initialized, but only that the API instance has been
  316. * allocated successfully.
  317. * @return {boolean} <tt>true</tt> if backend exists or <tt>false</tt>
  318. * otherwise
  319. */
  320. static isBackendInitialized() {
  321. return Boolean(CallStats.backend);
  322. }
  323. /**
  324. * Notifies CallStats about active device.
  325. * @param {{deviceList: {String:String}}} devicesData list of devices with
  326. * their data
  327. * @param {CallStats} cs callstats instance related to the event
  328. */
  329. static sendActiveDeviceListEvent(devicesData, cs) {
  330. CallStats._reportEvent(cs, fabricEvent.activeDeviceList, devicesData);
  331. }
  332. /**
  333. * Notifies CallStats that there is a log we want to report.
  334. *
  335. * @param {Error} e error to send or {String} message
  336. * @param {CallStats} cs callstats instance related to the error (optional)
  337. */
  338. static sendApplicationLog(e, cs) {
  339. try {
  340. CallStats._reportError(
  341. cs,
  342. wrtcFuncNames.applicationLog,
  343. e,
  344. cs && cs.peerconnection);
  345. } catch (error) {
  346. // If sendApplicationLog fails it should not be printed to
  347. // the logger, because it will try to push the logs again
  348. // (through sendApplicationLog) and an endless loop is created.
  349. if (console && (typeof console.error === 'function')) {
  350. // FIXME send analytics event as well
  351. console.error('sendApplicationLog failed', error);
  352. }
  353. }
  354. }
  355. /**
  356. * Sends the given feedback through CallStats.
  357. *
  358. * @param {string} conferenceID the conference ID for which the feedback
  359. * will be reported.
  360. * @param overallFeedback an integer between 1 and 5 indicating the
  361. * user feedback
  362. * @param detailedFeedback detailed feedback from the user. Not yet used
  363. */
  364. static sendFeedback(conferenceID, overallFeedback, detailedFeedback) {
  365. if (CallStats.backend) {
  366. CallStats.backend.sendUserFeedback(
  367. conferenceID, {
  368. userID: CallStats.userID,
  369. overall: overallFeedback,
  370. comment: detailedFeedback
  371. });
  372. } else {
  373. logger.error('Failed to submit feedback to CallStats - no backend');
  374. }
  375. }
  376. /**
  377. * Notifies CallStats that getUserMedia failed.
  378. *
  379. * @param {Error} e error to send
  380. * @param {CallStats} cs callstats instance related to the error (optional)
  381. */
  382. static sendGetUserMediaFailed(e, cs) {
  383. CallStats._reportError(cs, wrtcFuncNames.getUserMedia, e, null);
  384. }
  385. /**
  386. * Notifies CallStats for mute events
  387. * @param mute {boolean} true for muted and false for not muted
  388. * @param type {String} "audio"/"video"
  389. * @param {CallStats} cs callstats instance related to the event
  390. */
  391. static sendMuteEvent(mute, type, cs) {
  392. let event;
  393. if (type === 'video') {
  394. event = mute ? fabricEvent.videoPause : fabricEvent.videoResume;
  395. } else {
  396. event = mute ? fabricEvent.audioMute : fabricEvent.audioUnmute;
  397. }
  398. CallStats._reportEvent(cs, event);
  399. }
  400. /**
  401. * Creates new CallStats instance that handles all callstats API calls for
  402. * given {@link TraceablePeerConnection}. Each instance is meant to handle
  403. * one CallStats fabric added with 'addFabric' API method for the
  404. * {@link TraceablePeerConnection} instance passed in the constructor.
  405. * @param {TraceablePeerConnection} tpc
  406. * @param {Object} options
  407. * @param {string} options.confID the conference ID that wil be used to
  408. * report the session.
  409. * @param {string} [options.remoteUserID='jitsi'] the remote user ID to
  410. * which given <tt>tpc</tt> is connected.
  411. */
  412. constructor(tpc, options) {
  413. if (!CallStats.backend) {
  414. throw new Error('CallStats backend not intiialized!');
  415. }
  416. this.confID = options.confID;
  417. this.tpc = tpc;
  418. this.peerconnection = tpc.peerconnection;
  419. this.remoteUserID = options.remoteUserID || DEFAULT_REMOTE_USER;
  420. this.hasFabric = false;
  421. CallStats.fabrics.add(this);
  422. if (CallStats.initialized) {
  423. this._addNewFabric();
  424. }
  425. }
  426. /**
  427. * Initializes CallStats fabric by calling "addNewFabric" for
  428. * the peer connection associated with this instance.
  429. * @return {boolean} true if the call was successful or false otherwise.
  430. */
  431. _addNewFabric() {
  432. logger.info('addNewFabric', this.remoteUserID, this);
  433. try {
  434. const ret
  435. = CallStats.backend.addNewFabric(
  436. this.peerconnection,
  437. this.remoteUserID,
  438. CallStats.backend.fabricUsage.multiplex,
  439. this.confID,
  440. CallStats._addNewFabricCallback);
  441. this.hasFabric = true;
  442. const success = ret.status === 'success';
  443. if (!success) {
  444. logger.error('callstats fabric not initilized', ret.message);
  445. }
  446. return success;
  447. } catch (error) {
  448. GlobalOnErrorHandler.callErrorHandler(error);
  449. return false;
  450. }
  451. }
  452. /* eslint-disable max-params */
  453. /**
  454. * Lets CallStats module know where is given SSRC rendered by providing
  455. * renderer tag ID.
  456. * If the lib is not initialized yet queue the call for later, when it's
  457. * ready.
  458. * @param {number} ssrc the SSRC of the stream
  459. * @param {boolean} isLocal indicates whether this the stream is local
  460. * @param {string|null} streamEndpointId if the stream is not local the it
  461. * needs to contain the stream owner's ID
  462. * @param {string} usageLabel meaningful usage label of this stream like
  463. * 'microphone', 'camera' or 'screen'.
  464. * @param {string} containerId the id of media 'audio' or 'video' tag which
  465. * renders the stream.
  466. */
  467. associateStreamWithVideoTag(
  468. ssrc,
  469. isLocal,
  470. streamEndpointId,
  471. usageLabel,
  472. containerId) {
  473. if (!CallStats.backend) {
  474. return;
  475. }
  476. const callStatsId = isLocal ? CallStats.userID : streamEndpointId;
  477. if (CallStats.initialized) {
  478. CallStats.backend.associateMstWithUserID(
  479. this.peerconnection,
  480. callStatsId,
  481. this.confID,
  482. ssrc,
  483. usageLabel,
  484. containerId);
  485. } else {
  486. CallStats.reportsQueue.push({
  487. type: reportType.MST_WITH_USERID,
  488. pc: this.peerconnection,
  489. data: {
  490. callStatsId,
  491. containerId,
  492. ssrc,
  493. usageLabel
  494. }
  495. });
  496. }
  497. }
  498. /* eslint-enable max-params */
  499. /**
  500. * Notifies CallStats that we are the new dominant speaker in the
  501. * conference.
  502. */
  503. sendDominantSpeakerEvent() {
  504. CallStats._reportEvent(this, fabricEvent.dominantSpeaker);
  505. }
  506. /**
  507. * Notifies CallStats that the fabric for the underlying peerconnection was
  508. * closed and no evens should be reported, after this call.
  509. */
  510. sendTerminateEvent() {
  511. if (CallStats.initialized) {
  512. CallStats.backend.sendFabricEvent(
  513. this.peerconnection,
  514. CallStats.backend.fabricEvent.fabricTerminated,
  515. this.confID);
  516. }
  517. CallStats.fabrics.delete(this);
  518. }
  519. /**
  520. * Notifies CallStats for ice connection failed
  521. */
  522. sendIceConnectionFailedEvent() {
  523. CallStats._reportError(
  524. this,
  525. wrtcFuncNames.iceConnectionFailure,
  526. null,
  527. this.peerconnection);
  528. }
  529. /**
  530. * Notifies CallStats that peer connection failed to create offer.
  531. *
  532. * @param {Error} e error to send
  533. */
  534. sendCreateOfferFailed(e) {
  535. CallStats._reportError(
  536. this, wrtcFuncNames.createOffer, e, this.peerconnection);
  537. }
  538. /**
  539. * Notifies CallStats that peer connection failed to create answer.
  540. *
  541. * @param {Error} e error to send
  542. */
  543. sendCreateAnswerFailed(e) {
  544. CallStats._reportError(
  545. this, wrtcFuncNames.createAnswer, e, this.peerconnection);
  546. }
  547. /**
  548. * Sends either resume or hold event for the fabric associated with
  549. * the underlying peerconnection.
  550. * @param {boolean} isResume true to resume or false to hold
  551. */
  552. sendResumeOrHoldEvent(isResume) {
  553. CallStats._reportEvent(
  554. this,
  555. isResume ? fabricEvent.fabricResume : fabricEvent.fabricHold);
  556. }
  557. /**
  558. * Notifies CallStats for screen sharing events
  559. * @param {boolean} start true for starting screen sharing and
  560. * false for not stopping
  561. */
  562. sendScreenSharingEvent(start) {
  563. CallStats._reportEvent(
  564. this,
  565. start ? fabricEvent.screenShareStart : fabricEvent.screenShareStop);
  566. }
  567. /**
  568. * Notifies CallStats that peer connection failed to set local description.
  569. *
  570. * @param {Error} e error to send
  571. */
  572. sendSetLocalDescFailed(e) {
  573. CallStats._reportError(
  574. this, wrtcFuncNames.setLocalDescription, e, this.peerconnection);
  575. }
  576. /**
  577. * Notifies CallStats that peer connection failed to set remote description.
  578. *
  579. * @param {Error} e error to send
  580. */
  581. sendSetRemoteDescFailed(e) {
  582. CallStats._reportError(
  583. this, wrtcFuncNames.setRemoteDescription, e, this.peerconnection);
  584. }
  585. /**
  586. * Notifies CallStats that peer connection failed to add ICE candidate.
  587. *
  588. * @param {Error} e error to send
  589. */
  590. sendAddIceCandidateFailed(e) {
  591. CallStats._reportError(
  592. this, wrtcFuncNames.addIceCandidate, e, this.peerconnection);
  593. }
  594. }
  595. /**
  596. * The CallStats API backend instance
  597. * @type {callstats}
  598. */
  599. CallStats.backend = null;
  600. // some errors/events may happen before CallStats init
  601. // in this case we accumulate them in this array
  602. // and send them to callstats on init
  603. CallStats.reportsQueue = [];
  604. /**
  605. * Whether the library was successfully initialized using its initialize method.
  606. * And whether we had successfully called addNewFabric at least once.
  607. * @type {boolean}
  608. */
  609. CallStats.initialized = false;
  610. /**
  611. * Part of the CallStats credentials - application ID
  612. * @type {string}
  613. */
  614. CallStats.callStatsID = null;
  615. /**
  616. * Part of the CallStats credentials - application secret
  617. * @type {string}
  618. */
  619. CallStats.callStatsSecret = null;
  620. /**
  621. * Local CallStats user ID structure. Can be set only once when
  622. * {@link backend} is initialized, so it's static for the time being.
  623. * See CallStats API for more info:
  624. * https://www.callstats.io/api/#userid
  625. * @type {object}
  626. */
  627. CallStats.userID = null;
  628. /**
  629. * Set of currently existing {@link CallStats} instances.
  630. * @type {Set<CallStats>}
  631. */
  632. CallStats.fabrics = new Set();