fix(server): use updowncounter by default (#10482)

This commit is contained in:
forehalo
2025-02-27 10:15:13 +00:00
parent b995b4f965
commit d50860eee2
6 changed files with 109 additions and 36 deletions
@@ -153,13 +153,13 @@ export class SpaceSyncGateway
handleConnection() {
this.connectionCount++;
this.logger.log(`New connection, total: ${this.connectionCount}`);
metrics.socketio.gauge('connections').record(1);
metrics.socketio.gauge('connections').record(this.connectionCount);
}
handleDisconnect() {
this.connectionCount--;
this.logger.log(`Connection disconnected, total: ${this.connectionCount}`);
metrics.socketio.gauge('connections').record(-1);
metrics.socketio.gauge('connections').record(this.connectionCount);
}
selectAdapter(client: Socket, spaceType: SpaceType): SyncSocketAdapter {