From eebd61b19d9d21c32685e72552748874c10c8dfb Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sat, 2 Sep 2023 14:10:32 +1000 Subject: [PATCH] update sentry --- package-lock.json | Bin 292535 -> 292984 bytes package.json | 5 ++--- src/util/util/Sentry.ts | 35 +++++++++++++++++++++++------------ 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0576c58949d073bf23327b7e96645d878b011568..aabad6442f02484fe32b8693c9832791e1448531 100644 GIT binary patch delta 1184 zcmc(d&u`LT7{|kOCK`Y3NA#f1jcg~(M(IzC2U}VOrDZR)l)}MeKu4hrN}&|EEQ>K- zJoz3L<7xlFl4WCCbeqwGdh+1G#P}!7%$pYzL6!xh_r1ycCQshO_wzi@r*ky&^LS)~ zcDadJulwGmi{0aXSkuaNt2I}y28gztBzT?8C?=Ytzt!`l$wWTvi38b?|gwJDjS_W(D)u9$ zC9f7E1YxUcR!|jDRoW%9UKQ(AMB}+=z-BeA9V>7_D@v0{#1PoL*XwYS=@A4^ri41C zA~Uo}TV^ImB)EB8hpVO=e%l@GHoW@z1~hk4@a5jEf%d=eUGKLKn$>VsurNu-n^|^= z3lx|b2JAH1pjvWX&==!|WhbpPNHt?tmJb5M$pj5&E?hI(N?DhEilZi$wImlV#l={J z;k|VVg>SA-!7r~T?*7M>Y{mNHN>3HIvfbNLe_JE3-VXOf>TT=6De80|6Kw?Y0iPZ~ zWehjVINFj~B^x(G6<%hVT8RZ9t<(x8ok^D~3koobWSPiCmsq`shEc;w1{koY14CWr zJaMe46ylUp<@?4M+hg6dL6Vb^ozjd$Pv`b2(J)-;oD451(j16VL{tm#NLa=wp;~BT zqJ-yjY>{yQCK9L$u;p61>|eBt(vmNhA;cDL%M?lTmcPx^^9Cih_?jKEP(0`bXcbwT o`Ze^o$N%!2iOU1?I8&FU=RYnyK017Qbm;2dq0Z6axsO}F0V@}x2><{9 delta 1047 zcmZvbU2oe|7{}G68skMm1;K>I$`%O;6gvCFj-7A;bz<2Zg#oC~D9IF6m#aU9#J zBXPwALIMeNB=QBgr2Dh?cHQgCm_sM>jr3>aE#iN!!=Tf%J?ps_w|i^9--h(@ z2a5;kO8}ny@)G>v_`St^Z??&R7toGb9Flh;=`0OK8dk{`x|ZI(uj4CNLIh`8ezTqBowH5D1k zQqZ(2Nr7beQ|jodykDN?}9&8O|FoK$viQ|LVUG z-|n9~$%y%iFe$f%Dv~HjP3*?nK%*JiGsm)^1rxu}N#fYgcP4mG4TEC8PG(Dn#b&{{ zLi9o#&nikC=rnJ%$F8bl%#Ju${tGcb_!|Co=iI_4cdxDtgi1XbNJ4kuw7@JMb96h5 zn`Vc`B?)QcbG?bEd~3iXT)WJ&qp4`oZFj==%Nc=F@UBu(wH#+xZEcAA#<0%dZq*Ws zi_`n58;k97Y8^hldu^%VwWI4V^ksN-9}35t7dqZLpCe=oIX`VJ=j|z@S^$EztG zA$81MK0vrRXtB$LnxXec-IkPydB@2YU5bbb9DMNUO^DumbJ>&C|4^X#$K@~f&c56` PTU+i+hkIwK-}e6jkaKk% 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, });