feat(sentry): add log + server name
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
// Import with `import * as Sentry from "@sentry/node"` if you are using ESM
|
// Import with `import * as Sentry from "@sentry/node"` if you are using ESM
|
||||||
import * as Sentry from "@sentry/node";
|
import * as Sentry from "@sentry/node";
|
||||||
import { nodeProfilingIntegration } from "@sentry/profiling-node";
|
import { nodeProfilingIntegration } from "@sentry/profiling-node";
|
||||||
|
import { Logger } from "../lib/logger";
|
||||||
|
|
||||||
if (process.env.SENTRY_DSN) {
|
if (process.env.SENTRY_DSN) {
|
||||||
|
Logger.info("Setting up Sentry...");
|
||||||
Sentry.init({
|
Sentry.init({
|
||||||
dsn: process.env.SENTRY_DSN,
|
dsn: process.env.SENTRY_DSN,
|
||||||
integrations: [
|
integrations: [
|
||||||
@@ -10,5 +12,6 @@ if (process.env.SENTRY_DSN) {
|
|||||||
],
|
],
|
||||||
tracesSampleRate: 1.0,
|
tracesSampleRate: 1.0,
|
||||||
profilesSampleRate: 1.0,
|
profilesSampleRate: 1.0,
|
||||||
|
serverName: process.env.FLY_MACHINE_ID,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user