update sentry

This commit is contained in:
Madeline 2023-09-02 14:10:32 +10:00
parent 2f48212e6e
commit eebd61b19d
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47
3 changed files with 25 additions and 15 deletions

BIN
package-lock.json generated

Binary file not shown.

View File

@ -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",

View File

@ -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,
});