[WIKI-724 ] feat: sentry setup for live express server #7934
This commit is contained in:
parent
b7c14ac9f5
commit
ae215a542e
4 changed files with 837 additions and 299 deletions
|
|
@ -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:",
|
||||
|
|
|
|||
15
apps/live/src/instrument.ts
Normal file
15
apps/live/src/instrument.ts
Normal 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,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -1,3 +1,7 @@
|
|||
import { setupSentry } from "./instrument";
|
||||
setupSentry();
|
||||
|
||||
// eslint-disable-next-line import/order
|
||||
import { logger } from "@plane/logger";
|
||||
import { Server } from "./server";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue