[WIKI-724 ] feat: sentry setup for live express server #7934

This commit is contained in:
sriram veeraghanta 2025-10-09 21:00:43 +05:30 committed by GitHub
parent b7c14ac9f5
commit ae215a542e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 837 additions and 299 deletions

View file

@ -29,6 +29,8 @@
"@plane/editor": "workspace:*",
"@plane/logger": "workspace:*",
"@plane/types": "workspace:*",
"@sentry/node": "^10.5.0",
"@sentry/profiling-node": "^10.5.0",
"@tiptap/core": "catalog:",
"@tiptap/html": "catalog:",
"axios": "catalog:",

View file

@ -0,0 +1,15 @@
import * as Sentry from "@sentry/node";
import { nodeProfilingIntegration } from "@sentry/profiling-node";
export const setupSentry = () => {
if (process.env.SENTRY_DSN) {
Sentry.init({
dsn: process.env.SENTRY_DSN,
integrations: [Sentry.httpIntegration(), Sentry.expressIntegration(), nodeProfilingIntegration()],
tracesSampleRate: process.env.SENTRY_TRACES_SAMPLE_RATE ? parseFloat(process.env.SENTRY_TRACES_SAMPLE_RATE) : 0.5,
environment: process.env.SENTRY_ENVIRONMENT || "development",
release: process.env.APP_VERSION || "v1.0.0",
sendDefaultPii: true,
});
}
};

View file

@ -1,3 +1,7 @@
import { setupSentry } from "./instrument";
setupSentry();
// eslint-disable-next-line import/order
import { logger } from "@plane/logger";
import { Server } from "./server";