summary refs log tree commit diff
path: root/src/gateway
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-09-29 21:28:06 +0200
committerRory& <root@rory.gay>2025-09-29 22:08:03 +0200
commit0c3d8a792f9f17f2f28ad449cd8bc5c2a381c8d5 (patch)
treec3496223456f3af11f5ce322d36619c22f961cb1 /src/gateway
parentUpdate file-type (diff)
downloadserver-ts-0c3d8a792f9f17f2f28ad449cd8bc5c2a381c8d5.tar.xz
Drop @sentry/node (Sentry support) - untested and unused
Diffstat (limited to 'src/gateway')
-rw-r--r--src/gateway/Server.ts2
-rw-r--r--src/gateway/events/Message.ts25
2 files changed, 2 insertions, 25 deletions
diff --git a/src/gateway/Server.ts b/src/gateway/Server.ts

index 94b4fbe9..79206e4a 100644 --- a/src/gateway/Server.ts +++ b/src/gateway/Server.ts
@@ -24,7 +24,6 @@ import { Config, initDatabase, initEvent, - Sentry, } from "@spacebar/util"; import ws from "ws"; import { Connection } from "./events/Connection"; @@ -74,7 +73,6 @@ export class Server { await initDatabase(); await Config.init(); await initEvent(); - await Sentry.init(); // temporary fix await cleanupOnStartup(); diff --git a/src/gateway/events/Message.ts b/src/gateway/events/Message.ts
index 8ec9fc7d..01836906 100644 --- a/src/gateway/events/Message.ts +++ b/src/gateway/events/Message.ts
@@ -16,7 +16,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import * as Sentry from "@sentry/node"; import { CLOSECODES, OPCODES, Payload, WebSocket } from "@spacebar/gateway"; import { ErlpackType, PayloadSchema } from "@spacebar/util"; import fs from "fs/promises"; @@ -25,6 +24,7 @@ import path from "path"; import WS from "ws"; import OPCodeHandlers from "../opcodes"; import { check } from "../opcodes/instanceOf"; + const bigIntJson = BigIntJson({ storeAsString: true }); let erlpack: ErlpackType | null = null; @@ -89,29 +89,8 @@ export async function Message(this: WebSocket, buffer: WS.Data) { } try { - return await Sentry.startSpan( - // Emma [it/its]@Rory&: is this the right function to migrate to in v8? - { - op: "websocket.server", - name: `GATEWAY ${OPCODES[data.op]}`, - attributes: { - // this needs to be reworked :) - ...data.d, - token: data?.d?.token ? "[Redacted]" : undefined, - }, - }, - async () => { - const ret = await OPCodeHandler.call(this, data); - Sentry.setUser({ id: this.user_id }); - return ret; - }, - ); + return await OPCodeHandler.call(this, data); } catch (error) { - Sentry.captureException(error, { - user: { - id: this.user_id, - }, - }); console.error(`Error: Op ${data.op}`, error); // if (!this.CLOSED && this.CLOSING) return this.close(CLOSECODES.Unknown_error);