Skip to content

Commit

Permalink
Merge pull request #155 from zhiyan114/master
Browse files Browse the repository at this point in the history
T
  • Loading branch information
zhiyan114 authored Sep 24, 2024
2 parents 2696290 + 981f646 commit 17938b8
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

// Load Env Variable
import {config as dotenv} from "dotenv";
import {redisPrefix} from './config.json';
import {errors} from 'undici';
dotenv();

Expand All @@ -20,7 +19,7 @@ if(process.env["COMMITHASH"] === undefined) {


// Run Sentry first as required by the docs
import { expressIntegration, extraErrorDataIntegration, prismaIntegration, redisIntegration, rewriteFramesIntegration, SentryContextManager, init as sentryInit, validateOpenTelemetrySetup } from "@sentry/node";
import { extraErrorDataIntegration, prismaIntegration, redisIntegration, rewriteFramesIntegration, SentryContextManager, init as sentryInit, validateOpenTelemetrySetup } from "@sentry/node";
import { DiscordAPIError } from "discord.js";
import { relative } from "path";
import { APIErrors } from "./utils/discordErrorCode";
Expand All @@ -46,8 +45,7 @@ const sentryCli = sentryInit({
}
}),
prismaIntegration(),
redisIntegration({cachePrefixes: [redisPrefix]}),
expressIntegration(),
redisIntegration(),
],

beforeBreadcrumb: (breadcrumb) => {
Expand Down Expand Up @@ -88,12 +86,12 @@ const sentryCli = sentryInit({
return evnt;
},

beforeSendTransaction: (transaction) => {
// Ignore callback stuff from PubSubHubbub
if(new RegExp("/UwU/youtube/callback/").test(transaction.transaction ?? ""))
return null;
return transaction;
},
// beforeSendTransaction: (transaction) => {
// // Ignore callback stuff from PubSubHubbub
// if(new RegExp("/UwU/youtube/callback/").test(transaction.transaction ?? ""))
// return null;
// return transaction;
// },

release: process.env['COMMITHASH'],
environment: process.env["ENVIRONMENT"]
Expand Down

0 comments on commit 17938b8

Please sign in to comment.