Skip to content

Commit

Permalink
Fixed metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
kev306 committed Aug 15, 2024
1 parent 7fce7d2 commit bb7fe3c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/gameplay/game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import { sendReplyToCommand } from '../sockets/sockets';
import {
gamesPlayedMetric,
getGameMetricRoomType,
getGameType,
} from '../metrics/gameMetrics';

export const WAITING = 'Waiting';
Expand Down Expand Up @@ -1260,7 +1259,7 @@ class Game extends Room {
// From this point on, no more game moves can be made. Game is finished.
gamesPlayedMetric.inc(1, {
status: 'finished',
room_creation_type: getRoomCreationMetricType(this.roomCreationType),
room_type: getGameMetricRoomType(this),
});

// Clean up from here.
Expand Down Expand Up @@ -2085,7 +2084,7 @@ class Game extends Room {
if (this.voidGameTracker.playerVoted(socket.request.user.username)) {
gamesPlayedMetric.inc(1, {
status: 'voided',
room_type: getGameMetricRoomType(this.roomCreationType),
room_type: getGameMetricRoomType(this),
});

this.changePhase(Phase.Voided);
Expand Down

0 comments on commit bb7fe3c

Please sign in to comment.