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

Ajoute Sentry pour capturer les erreurs #1103

Merged
merged 6 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4,639 changes: 4 additions & 4,635 deletions export/package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion export/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ module.exports = convict({
dsn: {
format: 'url',
env: 'SENTRY_EXPORT_DSN',
default: null
default: null,
nullable: true
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bien vu 👍🏻

}
}
})
1 change: 1 addition & 0 deletions front/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ module.exports = {
globals: {
APP_VERSION: true,
APP_ENVIRONMENT: true,
SENTRY_DSN: true,
__BACKEND_ENDPOINT__: true,
__GRAPHQL_ENDPOINT__: true,
__EXPORT_ENDPOINT__: true,
Expand Down
6 changes: 3 additions & 3 deletions front/src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ import Story from './stories/Story.jsx'
const Route = Sentry.withSentryRouting(OriginalRoute)
const history = createBrowserHistory()

if (import.meta.env.SENTRY_DSN) {
if (SENTRY_DSN) {
Sentry.init({
dsn: import.meta.env.SENTRY_DSN,
environment: import.meta.env.APP_ENVIRONMENT,
dsn: SENTRY_DSN,
environment: APP_ENVIRONMENT,
integrations: [
Sentry.reactRouterV5BrowserTracingIntegration({ history })
],
Expand Down
2 changes: 2 additions & 0 deletions front/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ export default defineConfig(async ({ mode }) => {
],
define: {
APP_VERSION: JSON.stringify(pkg.version),
APP_ENVIRONMENT: JSON.stringify(env.SENTRY_ENVIRONMENT),
SENTRY_DSN: JSON.stringify(env.SENTRY_DSN),
__BACKEND_ENDPOINT__: JSON.stringify(env.SNOWPACK_PUBLIC_BACKEND_ENDPOINT),
__GRAPHQL_ENDPOINT__: JSON.stringify(env.SNOWPACK_PUBLIC_GRAPHQL_ENDPOINT),
__EXPORT_ENDPOINT__: JSON.stringify(env.SNOWPACK_PUBLIC_EXPORT_ENDPOINT),
Expand Down
3 changes: 2 additions & 1 deletion graphql/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ module.exports = convict({
dsn: {
format: 'url',
env: 'SENTRY_GRAPHQL_DSN',
default: null
default: null,
nullable: true
}
}
})
8 changes: 1 addition & 7 deletions graphql/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading