mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-15 02:22:38 +00:00
Evade metric constructors handling registration by default
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
|
||||
import { Member, Session, User, VoiceState } from "@spacebar/database";
|
||||
import { Random } from "@spacebar/extensions";
|
||||
import { WebSocket } from "@spacebar/gateway";
|
||||
import { WebSocket } from "@spacebar/gateway/util";
|
||||
import { emitEvent, PresenceUpdateEvent, SessionsReplace, VoiceStateUpdateEvent, distributePresenceUpdate } from "@spacebar/util";
|
||||
import { ProcessLifecycle } from "@spacebar/util/util/ProcessLifecycle";
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ const openConnectionCount = Monitoring.attachMetric(
|
||||
new Gauge({
|
||||
name: "spacebar_gateway_open_connection_count",
|
||||
help: "The total number of HTTP requests received",
|
||||
registers: [],
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ export class Monitoring {
|
||||
name: "spacebar_http_request_total",
|
||||
help: "The total number of HTTP requests received",
|
||||
labelNames: ["path", "method", "status_code"],
|
||||
registers: [],
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -55,6 +56,7 @@ export class Monitoring {
|
||||
labelNames: ["path", "method", "status_code"],
|
||||
help: "The duration of HTTP requests in seconds",
|
||||
buckets: [0.0, 0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.75, 1.0, 1.25, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 10],
|
||||
registers: [],
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ export class RabbitMqSingleListener extends BaseEventListener {
|
||||
name: "spacebar_ipc_rabbitmqsingle_listener_open_listener_count",
|
||||
help: "Amount of open listeners on unix socket",
|
||||
labelNames: ["host"],
|
||||
registers: [],
|
||||
}),
|
||||
);
|
||||
this.openListenersMetric = RabbitMqSingleListener.openListenersMetric.labels({ host });
|
||||
|
||||
@@ -48,6 +48,7 @@ export class UnixSocketListener extends BaseEventListener {
|
||||
name: "spacebar_ipc_unix_listener_open_connection_count",
|
||||
help: "Amount of open inbound connections on unix socket",
|
||||
labelNames: ["path"],
|
||||
registers: [],
|
||||
}),
|
||||
);
|
||||
this.openConnectionsMetric = UnixSocketListener.openConnectionsMetric.labels({ path: socketPath });
|
||||
@@ -58,6 +59,7 @@ export class UnixSocketListener extends BaseEventListener {
|
||||
name: "spacebar_ipc_unix_listener_open_listener_count",
|
||||
help: "Amount of open listeners on unix socket",
|
||||
labelNames: ["path"],
|
||||
registers: [],
|
||||
}),
|
||||
);
|
||||
this.openListenersMetric = UnixSocketListener.openListenersMetric.labels({ path: socketPath });
|
||||
|
||||
@@ -49,6 +49,7 @@ export class UnixSocketWriter extends BaseEventWriter {
|
||||
name: "spacebar_ipc_unix_writer_open_connection_count",
|
||||
help: "Amount of open outbound connections on unix socket",
|
||||
labelNames: ["path"],
|
||||
registers: [],
|
||||
}),
|
||||
);
|
||||
this.openConnectionsMetric = UnixSocketWriter.openConnectionsMetric.labels({ path: socketPath });
|
||||
|
||||
Reference in New Issue
Block a user