Skip to content

Commit

Permalink
refactor: Remove unused code related to Sentry configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
noumanmhd committed Aug 25, 2024
1 parent 33831d1 commit 8bd6b7b
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions configs/app/features/sentry.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
import type { Feature } from './types';

import app from '../app';
import { getEnvValue } from '../utils';

const dsn = getEnvValue('NEXT_PUBLIC_SENTRY_DSN');
const instance = (() => {
const envValue = getEnvValue('NEXT_PUBLIC_APP_INSTANCE');
if (envValue) {
return envValue;
}

return app.host?.replace('.blockscout.com', '').replaceAll('-', '_');
})();
const environment = getEnvValue('NEXT_PUBLIC_APP_ENV') || 'production';
const release = getEnvValue('NEXT_PUBLIC_GIT_TAG');
const title = 'Sentry error monitoring';

const config: Feature<{
Expand All @@ -23,17 +9,6 @@ const config: Feature<{
environment: string;
enableTracing: boolean;
}> = (() => {
if (dsn && instance && environment) {
return Object.freeze({
title,
isEnabled: true,
dsn,
instance,
release,
environment,
enableTracing: getEnvValue('NEXT_PUBLIC_SENTRY_ENABLE_TRACING') === 'true',
});
}

return Object.freeze({
title,
Expand Down

0 comments on commit 8bd6b7b

Please sign in to comment.