Skip to content

Commit 142ffa5

Browse files
committed
refactor(audio): move consumer restart metric to fs-consumer-bridge
1 parent 1ea4f17 commit 142ffa5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/audio/audio-session.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ module.exports = class AudioSession extends BaseProvider {
122122
force: true,
123123
reason: 'consumer_bridge_restarting',
124124
});
125-
PrometheusAgent.increment(SFUA_NAMES.TRANSCEIVER_CONSUMER_RESTARTS);
126125
}
127126

128127
_onConsumerBridgeRestarted () {

lib/audio/fs-consumer-bridge.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const config = require('config');
55
const C = require('../bbb/messages/Constants');
66
const Logger = require('../common/logger.js');
77
const errors = require('../base/errors.js');
8+
const { PrometheusAgent, SFUA_NAMES } = require('./metrics/audio-metrics.js');
89

910
const GLOBAL_AUDIO_PREFIX = "GLOBAL_AUDIO_";
1011
const GLOBAL_AUDIO_CONNECTION_TIMEOUT = config.get('mediaFlowTimeoutDuration');
@@ -340,6 +341,7 @@ module.exports = class FSConsumerBridge extends EventEmitter {
340341
if (this._restarting) {
341342
this.emit(C.MEDIA_RESTARTED);
342343
this._restarting = false;
344+
PrometheusAgent.increment(SFUA_NAMES.TRANSCEIVER_CONSUMER_RESTARTS);
343345
}
344346

345347
this.emit(C.MEDIA_STARTED);

0 commit comments

Comments
 (0)