feat(gateway,admin): Expand stats for metrics (#3064)

This commit is contained in:
Tarek
2026-10-02 12:58:16 +02:00
committed by GitHub
parent 840dc3dfa5
commit 632067b552
13 changed files with 175 additions and 2 deletions
@@ -1744,6 +1744,8 @@ export class GatewayService {
}
async getNodeStats(): Promise<GatewayNodeStats> {
const a = this.call<GatewayNodeStats>('process.node_stats', {});
console.log(a.then((stats) => console.log('Node stats:', stats)));
return this.call<GatewayNodeStats>('process.node_stats', {});
}
@@ -62,6 +62,9 @@ export interface GatewayNodeStatsEntry {
node_id: string;
status: string;
sessions: number;
session_resumes_total: number | null;
websocket_dispatches_total: number | null;
websocket_dispatch_drops_total: number | null;
guilds: number;
presences: number;
calls: number;
@@ -74,6 +77,9 @@ export interface GatewayNodeStatsEntry {
export interface GatewayNodeStats {
status: string;
sessions: number;
session_resumes_total: number;
websocket_dispatches_total: number;
websocket_dispatch_drops_total: number;
guilds: number;
presences: number;
calls: number;
@@ -968,6 +968,9 @@ export class NoopGatewayService extends IGatewayService {
return {
status: 'ok',
sessions: 0,
session_resumes_total: 0,
websocket_dispatches_total: 0,
websocket_dispatch_drops_total: 0,
guilds: 0,
presences: 0,
calls: 0,