From 4f008c8fe280b77501b2aeb1245c12f5c6ac850f Mon Sep 17 00:00:00 2001 From: Marcel Date: Fri, 15 May 2026 08:11:10 +0200 Subject: [PATCH] feat(backend): add sentry-spring-boot-starter-jakarta for GlitchTip error reporting Co-Authored-By: Claude Sonnet 4.6 --- backend/pom.xml | 7 +++++++ backend/src/main/resources/application.yaml | 9 +++++++++ docker-compose.yml | 1 + 3 files changed, 17 insertions(+) diff --git a/backend/pom.xml b/backend/pom.xml index 7ac0a6a5..accc6293 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -224,6 +224,13 @@ + + + + io.sentry + sentry-spring-boot-starter-jakarta + 8.5.0 + diff --git a/backend/src/main/resources/application.yaml b/backend/src/main/resources/application.yaml index 6198f3d9..76a6d753 100644 --- a/backend/src/main/resources/application.yaml +++ b/backend/src/main/resources/application.yaml @@ -118,3 +118,12 @@ ocr: sender-model: activation-threshold: 100 retrain-delta: 50 + +sentry: + dsn: ${SENTRY_DSN:} + environment: ${SPRING_PROFILES_ACTIVE:dev} + traces-sample-rate: 1.0 + send-default-pii: false + enable-tracing: true + ignored-exceptions-for-type: + - org.raddatz.familienarchiv.exception.DomainException diff --git a/docker-compose.yml b/docker-compose.yml index 3e42c981..4923e789 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -147,6 +147,7 @@ services: SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_ENABLE: ${MAIL_STARTTLS_ENABLE:-false} APP_OCR_BASE_URL: http://ocr-service:8000 APP_OCR_TRAINING_TOKEN: "${OCR_TRAINING_TOKEN:-}" + SENTRY_DSN: ${SENTRY_DSN:-} # Observability: send traces to Tempo inside archiv-net (OTLP gRPC port 4317) # Tempo is defined in docker-compose.observability.yml (future issue). # OTLP failures are non-fatal — backend starts cleanly without the observability stack.