mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-07-06 07:30:17 +02:00
ce8f55fd9a
Add the Spotlight container to compose.override.yaml so the feedback widget and error events can be inspected locally without sending anything to Sentry. The JS SDK switches to spotlight mode automatically when no SENTRY_DSN is configured.
29 lines
835 B
JavaScript
29 lines
835 B
JavaScript
import 'bootstrap/dist/css/bootstrap.min.css';
|
|
import 'bootstrap-icons/font/bootstrap-icons.min.css';
|
|
import './styles/backoffice.scss';
|
|
import './stimulus.js';
|
|
import './bootstrap.js';
|
|
import * as Sentry from '@sentry/browser';
|
|
|
|
const dsn = document.querySelector('meta[name="sentry-dsn"]')?.content ?? '';
|
|
const userEmail = document.querySelector('meta[name="user-email"]')?.content ?? '';
|
|
|
|
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 });
|
|
}
|