Skip to content

Commit

Permalink
Merge branch 'hotfix/front-sentry' into 'master'
Browse files Browse the repository at this point in the history
fix: fix sentry front

See merge request la-fabrique-numerique/biocarburants!202
  • Loading branch information
benjamin-grilleres committed Oct 21, 2024
2 parents f1e6143 + 0d3d688 commit 30fdb16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
container_name: carbure_frontend
environment:
VITE_SENTRY_DSN: ${SENTRY_DSN}
VITE_SENTRY_ENV: ${SENTRY_ENV}
VITE_APP_ENV: ${IMAGE_TAG}
build:
context: ./front
volumes:
Expand Down
4 changes: 2 additions & 2 deletions front/src/sentry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import { MailTo } from "common/components/button"
// Define sentry only if url/env are defined in .env AND environment is not local
if (
import.meta.env.VITE_SENTRY_DSN &&
import.meta.env.VITE_SENTRY_ENV &&
import.meta.env.VITE_APP_ENV &&
process.env.NODE_ENV !== "development"
) {
Sentry.init({
dsn: import.meta.env.VITE_SENTRY_DSN,
environment: import.meta.env.VITE_SENTRY_ENV,
environment: `carbure-${import.meta.env.VITE_APP_ENV}`,
})
}

Expand Down

0 comments on commit 30fdb16

Please sign in to comment.