Skip to content

Commit

Permalink
update beforeSendTransaction function
Browse files Browse the repository at this point in the history
  • Loading branch information
adonispuente committed Jul 10, 2024
1 parent 29834c6 commit e0ebc19
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/utils/sentry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ function initSentry() {

sentryInitialized = true;
const appDetails = getAppDetails();
//These two apps will not be set up as of now. This helps limit transacations
const avoidedApps = ['subscriptions', 'image-builder'];

// dsn: key
// environment: logs Prod or Prod Beta for filtering
Expand Down Expand Up @@ -97,9 +99,10 @@ function initSentry() {

return event;
},
//These two apps will not be set up as of now. This helps limit transacations
beforeSendTransaction: (event) => {
if (event?.contexts?.app?.app_name === 'subscriptions' || event.contexts?.app?.app_name === 'image-builder') {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
beforeSendTransaction: (event: any) => {
const appName = event?.contexts?.app?.app_name;
if (avoidedApps.includes(appName)) {
return null;
}
return event;
Expand Down

0 comments on commit e0ebc19

Please sign in to comment.