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);
|