Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Disable sentry in dev mode #157

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/frontend/src/api/utils/logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export enum ELogLevel {

let logLevel: ELogLevel;

const notProd = CONFIG.IS_DEV || CONFIG.IS_STAGING;
const notProd = CONFIG.IS_LOCAL || CONFIG.IS_DEV || CONFIG.IS_STAGING;

logLevel = ((): ELogLevel => {
if (LOGLEVEL in ELogLevel) {
Expand Down
2 changes: 2 additions & 0 deletions packages/frontend/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export enum EEnvironments {
}

const IS_TEST = import.meta.env.VITE_ENVIRONMENT === EEnvironments.Test;
const IS_LOCAL = import.meta.env.MODE === "development" && import.meta.env.DEV;
const IS_DEV =
import.meta.env.VITE_ENVIRONMENT === EEnvironments.Development ||
!import.meta.env.VITE_ENVIRONMENT;
Expand Down Expand Up @@ -60,6 +61,7 @@ export type TFeatureEnvironment = EEnvironments | "none";
const CONFIG = {
ENVIRONMENT,
IS_TEST,
IS_LOCAL,
IS_DEV,
IS_STAGING,
IS_PROD,
Expand Down
1 change: 1 addition & 0 deletions packages/frontend/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ try {
const { cookieChoice } = JSON.parse(persistedState?.ui || "{}");
if (
CONFIG.SENTRY.ENABLE &&
!CONFIG.IS_LOCAL &&
(!CONFIG.IS_PROD ||
(cookieChoice != null &&
typeof cookieChoice === "number" &&
Expand Down
Loading