From 83026bc4fcd80877da9f9e1f43eb5efdaccb312d Mon Sep 17 00:00:00 2001 From: pvannierop Date: Fri, 4 Oct 2024 14:42:48 +0200 Subject: [PATCH] Add support for Sentry monitoring Includes addition to documentation. --- README.md | 9 +++++++++ build.gradle | 1 + src/main/resources/application-dev.properties | 6 +++--- src/main/resources/logback-spring.xml | 6 ++++++ 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 619fc726..b3d43590 100644 --- a/README.md +++ b/README.md @@ -571,6 +571,15 @@ Deploying the Spring Boot Admin server and the client as different components ma used to register multiple client apps and the server's lifecycle is not associated with the client. This also means that our client app is lighter and production ready. +### Sentry monitoring + +To enable Sentry monitoring: + +1. Add the `sentry` profile to active spring profiles. +2. Set a `SENTRY_DSN` environment variable that points to the desired Sentry DSN. +3. (Optional) Set the `SENTRY_LOG_LEVEL` environment variable to control the minimum log level of events sent to Sentry. + The default log level for Sentry is `WARN`. Possible values are `TRACE`, `DEBUG`, `INFO`, `WARN`, and `ERROR`. + ## Performance Testing The app server supports performance testing using Gatling and Scala. The simulations are located in the diff --git a/build.gradle b/build.gradle index 696e705c..9eb0a5a3 100644 --- a/build.gradle +++ b/build.gradle @@ -5,6 +5,7 @@ plugins { id 'org.springframework.boot' version "3.0.4" id 'org.openjfx.javafxplugin' version '0.0.13' id("com.github.ben-manes.versions") version "0.46.0" + id 'io.sentry.jvm.gradle' version '4.11.0' } apply plugin: 'checkstyle' diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties index 06cadc09..21756c84 100644 --- a/src/main/resources/application-dev.properties +++ b/src/main/resources/application-dev.properties @@ -66,10 +66,10 @@ fcmserver.fcmsender=org.radarbase.fcm.downstream.AdminSdkFcmSender # EMAIL SETTINGS # needed when notifications via email are enabled -radar.notification.email.enabled=false +radar.notification.email.enabled=true radar.notification.email.from=radar@radar.thehyve.nl -spring.mail.host=smtp.office365.com -spring.mail.port=587 +spring.mail.host=asasdasd +spring.mail.port=55 spring.mail.properties.mail.smtp.auth=false # RADAR protocols diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml index 59495e4e..4c7165a5 100644 --- a/src/main/resources/logback-spring.xml +++ b/src/main/resources/logback-spring.xml @@ -59,12 +59,18 @@ + + ${SENTRY_LOG_LEVEL:-WARN} + + + +