Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Sentry monitoring #503

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: 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>
Loading