Skip to content

Commit

Permalink
another sentry attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
sschr15 committed Dec 7, 2023
1 parent 378b28e commit 7c948a3
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/main/kotlin/org/quiltmc/community/_Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,18 @@ suspend fun ExtensibleBotBuilder.common() {

extensions {
val sentryDsn = envOrNull("SENTRY_DSN")
if (sentryDsn != null) {
sentry {
enable = true
dsn = sentryDsn
}
} else {
sentry {
enable = false
dsn = "" // why is it like this
sentry {
enableIfDSN(sentryDsn)
setupCallback = {
init {
dsn = sentryDsn ?: ""
isEnabled = sentryDsn != null
isDebug = debug
dist = distribution
environment = this@sentry.environment
release = this@sentry.release
serverName = this@sentry.serverName
}
}
}

Expand Down

0 comments on commit 7c948a3

Please sign in to comment.