Skip to content

Commit

Permalink
Merge pull request #2236 from iFixit/sentry--disable-prod-check
Browse files Browse the repository at this point in the history
Sentry: temp disable production check
  • Loading branch information
danielbeardsley authored Feb 8, 2024
2 parents b03bb50 + 02ac56c commit 5e29432
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion frontend/sentry.client.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SENTRY_SAMPLING_ENABLED, VERCEL_ENV } from '@config/env';
import { isCurrentProductionDeployment } from '@helpers/vercel-helpers';
// import { isCurrentProductionDeployment } from '@helpers/vercel-helpers';
import { SentryErrorIntegration } from '@ifixit/sentry';
import { BrowserTracing } from '@sentry/browser';
import * as Sentry from '@sentry/nextjs';
Expand All @@ -14,8 +14,11 @@ const sampleRate = SENTRY_SAMPLING_ENABLED
Sentry.init({
async beforeSend(event) {
try {
/*
* Temporarily disable while we move to a new repo
const current_production = await isCurrentProductionDeployment();
event.tags = { ...event.tags, current_production };
*/
} catch (e) {
event.tags = { ...event.tags, before_send_error: true };
event.extra = {
Expand Down
5 changes: 4 additions & 1 deletion frontend/sentry.edge.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SentryErrorIntegration } from './../packages/sentry/index';
import { SENTRY_SAMPLING_ENABLED, VERCEL_ENV } from '@config/env';
import { isCurrentProductionDeployment } from '@helpers/vercel-helpers';
// import { isCurrentProductionDeployment } from '@helpers/vercel-helpers';
import * as Sentry from '@sentry/nextjs';

const SENTRY_DSN = process.env.NEXT_PUBLIC_SENTRY_DSN;
Expand All @@ -13,8 +13,11 @@ const sampleRate = SENTRY_SAMPLING_ENABLED
Sentry.init({
async beforeSend(event) {
try {
/*
* Temporarily disable while we move to a new repo
const current_production = await isCurrentProductionDeployment();
event.tags = { ...event.tags, current_production };
*/
} catch (e) {
event.tags = { ...event.tags, before_send_error: true };
event.extra = {
Expand Down
5 changes: 4 additions & 1 deletion frontend/sentry.server.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SENTRY_SAMPLING_ENABLED, VERCEL_ENV } from '@config/env';
import { isCurrentProductionDeployment } from '@helpers/vercel-helpers';
// import { isCurrentProductionDeployment } from '@helpers/vercel-helpers';
import { SentryErrorIntegration } from '@ifixit/sentry';
import * as Sentry from '@sentry/nextjs';

Expand Down Expand Up @@ -33,8 +33,11 @@ Sentry.init({
}
}
try {
/*
* Temporarily disable while we move to a new repo
const current_production = await isCurrentProductionDeployment();
event.tags = { ...event.tags, current_production };
*/
} catch (e) {
event.tags = { ...event.tags, before_send_error: true };
event.extra = {
Expand Down

0 comments on commit 5e29432

Please sign in to comment.