Skip to content

Commit

Permalink
[FE] FEAT: Sentry 에서 local 과 production 을 구분하도록 설정 #1665
Browse files Browse the repository at this point in the history
  • Loading branch information
junyoung2015 committed Aug 7, 2024
1 parent 6fcd6be commit b523c11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions frontend/src/Cabinet/api/axios/axios.log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export const logAxiosError = (
api: error.response?.config.url,
httpMethod: error.config?.method?.toUpperCase(),
httpStatusCode: (error.response?.status ?? "").toString(),
environment:
import.meta.env.VITE_IS_LOCAL === "true" ? "local" : "production",
},
level: "error",
extra: { type: type },
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import { GlobalStyle } from "@/Cabinet/assets/data/ColorTheme";

Sentry.init({
dsn: import.meta.env.VITE_SENTRY_DSN,
environment: "development",
environment:
import.meta.env.VITE_IS_LOCAL === "true" ? "local" : "production",
release: "^8.18.0",
integrations: [
// See docs for support of different versions of variation of react router
Expand Down

0 comments on commit b523c11

Please sign in to comment.