Add mysql sentry integration
This commit is contained in:
parent
8a2a84c278
commit
b1933bb1ce
@ -73,6 +73,7 @@ async function main() {
|
|||||||
integrations: [
|
integrations: [
|
||||||
new Sentry.Integrations.Http({ tracing: true }),
|
new Sentry.Integrations.Http({ tracing: true }),
|
||||||
new Tracing.Integrations.Express({ app }),
|
new Tracing.Integrations.Express({ app }),
|
||||||
|
new Tracing.Integrations.Mysql(),
|
||||||
],
|
],
|
||||||
tracesSampleRate: Config.get().sentry.traceSampleRate,
|
tracesSampleRate: Config.get().sentry.traceSampleRate,
|
||||||
environment: Config.get().sentry.environment,
|
environment: Config.get().sentry.environment,
|
||||||
|
@ -9,7 +9,7 @@ import { Tuple } from "lambert-server";
|
|||||||
import { check } from "../opcodes/instanceOf";
|
import { check } from "../opcodes/instanceOf";
|
||||||
import WS from "ws";
|
import WS from "ws";
|
||||||
import BigIntJson from "json-bigint";
|
import BigIntJson from "json-bigint";
|
||||||
import Sentry from "@Sentry/node";
|
import * as Sentry from "@sentry/node";
|
||||||
const bigIntJson = BigIntJson({ storeAsString: true });
|
const bigIntJson = BigIntJson({ storeAsString: true });
|
||||||
|
|
||||||
const PayloadSchema = {
|
const PayloadSchema = {
|
||||||
@ -56,7 +56,7 @@ export async function Message(this: WebSocket, buffer: WS.Data) {
|
|||||||
name: `GATEWAY ${OPCODES[data.op]}`,
|
name: `GATEWAY ${OPCODES[data.op]}`,
|
||||||
data: {
|
data: {
|
||||||
...data.d,
|
...data.d,
|
||||||
token: data.d.token ? "[Redacted]" : undefined,
|
token: data?.d?.token ? "[Redacted]" : undefined,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -297,5 +297,5 @@ export async function onIdentify(this: WebSocket, data: Payload) {
|
|||||||
|
|
||||||
await setupListener.call(this);
|
await setupListener.call(this);
|
||||||
|
|
||||||
console.log(`${this.ipAddress} identified as ${d.user.id}`)
|
console.log(`${this.ipAddress} identified as ${d.user.id}`);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user