mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-07-06 23:50:16 +02:00
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.
This commit is contained in:
@@ -8,9 +8,10 @@ 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,
|
||||
dsn: dsn || undefined,
|
||||
// When no DSN is set (local dev), forward events to Spotlight instead
|
||||
spotlight: !dsn,
|
||||
integrations: [
|
||||
Sentry.feedbackIntegration({
|
||||
colorScheme: 'system',
|
||||
@@ -25,4 +26,3 @@ if (dsn) {
|
||||
if (userEmail) {
|
||||
Sentry.setUser({ email: userEmail });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user