mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-07 19:22:14 +09:00
feat(gateway,admin): Expand stats for metrics (#3064)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user