summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-06-19 01:24:25 +0200
committerRory& <root@rory.gay>2026-06-19 01:24:25 +0200
commit7b9b87f308639443a6a7c3b30ec9779cf028c988 (patch)
tree71ba24b0efd0b5e21bdb33bdf003149bddef5c5a /src
parentAttach HTTP metrics via dedup helper (diff)
downloadserver-ts-7b9b87f308639443a6a7c3b30ec9779cf028c988.tar.xz
Evade metric constructors handling registration by default
Diffstat (limited to 'src')
-rw-r--r--src/gateway/events/Close.ts2
-rw-r--r--src/gateway/events/Connection.ts1
-rw-r--r--src/util/monitoring/Monitoring.ts2
-rw-r--r--src/util/util/ipc/listener/RabbitMqSingleListener.ts1
-rw-r--r--src/util/util/ipc/listener/UnixSocketListener.ts2
-rw-r--r--src/util/util/ipc/writer/UnixSocketWriter.ts1
6 files changed, 8 insertions, 1 deletions
diff --git a/src/gateway/events/Close.ts b/src/gateway/events/Close.ts

index d532894c..7a8d79ed 100644 --- a/src/gateway/events/Close.ts +++ b/src/gateway/events/Close.ts
@@ -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"; diff --git a/src/gateway/events/Connection.ts b/src/gateway/events/Connection.ts
index d6a1e33c..32f4e14d 100644 --- a/src/gateway/events/Connection.ts +++ b/src/gateway/events/Connection.ts
@@ -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: [], }), ); diff --git a/src/util/monitoring/Monitoring.ts b/src/util/monitoring/Monitoring.ts
index 3c322455..bbb4ad7f 100644 --- a/src/util/monitoring/Monitoring.ts +++ b/src/util/monitoring/Monitoring.ts
@@ -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: [], }), ); diff --git a/src/util/util/ipc/listener/RabbitMqSingleListener.ts b/src/util/util/ipc/listener/RabbitMqSingleListener.ts
index d221cbb8..933050f1 100644 --- a/src/util/util/ipc/listener/RabbitMqSingleListener.ts +++ b/src/util/util/ipc/listener/RabbitMqSingleListener.ts
@@ -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 }); diff --git a/src/util/util/ipc/listener/UnixSocketListener.ts b/src/util/util/ipc/listener/UnixSocketListener.ts
index cb9ea96b..d2ffdf20 100644 --- a/src/util/util/ipc/listener/UnixSocketListener.ts +++ b/src/util/util/ipc/listener/UnixSocketListener.ts
@@ -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 }); diff --git a/src/util/util/ipc/writer/UnixSocketWriter.ts b/src/util/util/ipc/writer/UnixSocketWriter.ts
index e8b810a8..c2465686 100644 --- a/src/util/util/ipc/writer/UnixSocketWriter.ts +++ b/src/util/util/ipc/writer/UnixSocketWriter.ts
@@ -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 });