feat(sentry): add log + server name

This commit is contained in:
Gergő Móricz 2024-08-21 19:39:10 +02:00
parent 79f5d49d3f
commit 3d5dc9d90a

View File

@ -1,8 +1,10 @@
// Import with `import * as Sentry from "@sentry/node"` if you are using ESM
import * as Sentry from "@sentry/node";
import { nodeProfilingIntegration } from "@sentry/profiling-node";
import { Logger } from "../lib/logger";
if (process.env.SENTRY_DSN) {
Logger.info("Setting up Sentry...");
Sentry.init({
dsn: process.env.SENTRY_DSN,
integrations: [
@ -10,5 +12,6 @@ if (process.env.SENTRY_DSN) {
],
tracesSampleRate: 1.0,
profilesSampleRate: 1.0,
serverName: process.env.FLY_MACHINE_ID,
});
}