Skip to content

Commit

Permalink
Add support for Sentry monitoring
Browse files Browse the repository at this point in the history
Includes addition to documentation.
  • Loading branch information
pvannierop committed Oct 4, 2024
1 parent 6576954 commit 83026bc
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/application-dev.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,18 @@
</filter>
</appender>

<appender name="Sentry" class="io.sentry.logback.SentryAppender">
<minimumEventLevel>${SENTRY_LOG_LEVEL:-WARN}</minimumEventLevel>
</appender>

<!-- LOG everything at INFO level -->
<root level="info">
<appender-ref ref="RollingFile" />
<appender-ref ref="Console" />
<appender-ref ref="RollingFile-Error" />
<springProfile name="sentry">
<appender-ref ref="Sentry"/>
</springProfile>
</root>

</configuration>

0 comments on commit 83026bc

Please sign in to comment.