diff --git a/assets/backoffice.js b/assets/backoffice.js index 6aa04ac..89afbee 100644 --- a/assets/backoffice.js +++ b/assets/backoffice.js @@ -8,21 +8,21 @@ import * as Sentry from '@sentry/browser'; const dsn = document.querySelector('meta[name="sentry-dsn"]')?.content ?? ''; const userEmail = document.querySelector('meta[name="user-email"]')?.content ?? ''; -if (dsn) { - Sentry.init({ - dsn, - integrations: [ - Sentry.feedbackIntegration({ - colorScheme: 'system', - showName: true, - showEmail: true, - isNameRequired: false, - isEmailRequired: false, - }), - ], - }); +Sentry.init({ + dsn: dsn || undefined, + // When no DSN is set (local dev), forward events to Spotlight instead + spotlight: !dsn, + integrations: [ + Sentry.feedbackIntegration({ + colorScheme: 'system', + showName: true, + showEmail: true, + isNameRequired: false, + isEmailRequired: false, + }), + ], +}); - if (userEmail) { - Sentry.setUser({ email: userEmail }); - } +if (userEmail) { + Sentry.setUser({ email: userEmail }); } diff --git a/compose.override.yaml b/compose.override.yaml index 2efd489..7c718e0 100644 --- a/compose.override.yaml +++ b/compose.override.yaml @@ -70,5 +70,10 @@ services: MP_SMTP_AUTH_ALLOW_INSECURE: 1 ###< symfony/mailer ### + spotlight: + image: ghcr.io/getsentry/spotlight:latest + ports: + - "8969:8969" + volumes: sass: