Files
TijdVoorDeTest/assets/backoffice.js
T
Marijn ce8f55fd9a feat: add Spotlight sidecar for local Sentry development testing
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.
2026-07-05 22:10:50 +02:00

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 });
}