summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-09-02 14:10:32 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-09-02 14:10:32 +1000
commiteebd61b19d9d21c32685e72552748874c10c8dfb (patch)
treedc9f1c4e43136df3d275948f73f84a44f6ad2743 /src
parenttypeorm inverse relations of guild relations (diff)
downloadserver-eebd61b19d9d21c32685e72552748874c10c8dfb.tar.xz
update sentry
Diffstat (limited to 'src')
-rw-r--r--src/util/util/Sentry.ts35
1 files changed, 23 insertions, 12 deletions
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 <https://www.gnu.org/licenses/>.
 */
 
-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,
 		});