diff --git a/package-lock.json b/package-lock.json index 0576c589..aabad644 100644 Binary files a/package-lock.json and b/package-lock.json differ diff --git a/package.json b/package.json index 70e4ae84..3994670b 100644 --- a/package.json +++ b/package.json @@ -66,9 +66,8 @@ }, "dependencies": { "@aws-sdk/client-s3": "^3.385.0", - "@sentry/integrations": "^7.61.1", - "@sentry/node": "^7.61.1", - "@sentry/tracing": "^7.61.1", + "@sentry/integrations": "^7.66.0", + "@sentry/node": "^7.66.0", "ajv": "8.6.2", "ajv-formats": "2.1.1", "amqplib": "^0.10.3", diff --git a/src/util/util/Sentry.ts b/src/util/util/Sentry.ts index e302da0c..74a23a1e 100644 --- a/src/util/util/Sentry.ts +++ b/src/util/util/Sentry.ts @@ -16,13 +16,12 @@ along with this program. If not, see . */ -import { Config } from "./Config"; import { yellow } from "picocolors"; +import { Config } from "./Config"; -import express from "express"; -import * as SentryNode from "@sentry/node"; -import * as Tracing from "@sentry/tracing"; import * as Integrations from "@sentry/integrations"; +import * as SentryNode from "@sentry/node"; +import express from "express"; // Work around for when bundle calls api/etc let errorHandlersUsed = false; @@ -46,16 +45,28 @@ export const Sentry = { ); } + const integrations = [ + new SentryNode.Integrations.Http({ tracing: true }), + new Integrations.RewriteFrames({ + root: __dirname, + }), + new SentryNode.Integrations.Http({ + tracing: true, + breadcrumbs: true, + }), + ...SentryNode.autoDiscoverNodePerformanceMonitoringIntegrations(), + ]; + + if (app) + integrations.push( + new SentryNode.Integrations.Express({ + app, + }), + ); + SentryNode.init({ dsn: endpoint, - integrations: [ - new SentryNode.Integrations.Http({ tracing: true }), - new Tracing.Integrations.Express({ app }), - new Tracing.Integrations.Mysql(), - new Integrations.RewriteFrames({ - root: __dirname, - }), - ], + integrations, tracesSampleRate: traceSampleRate, // naming? environment, });