Skip to content

Commit

Permalink
Add Bugsnag monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
pvannierop committed Jul 19, 2024
1 parent c8c8db2 commit e95a0a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions data-dashboard-backend/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ dependencies {
implementation("com.mindscapehq:core:3.0.0")
implementation("com.mindscapehq:webprovider:3.0.0")

implementation("com.bugsnag:bugsnag:3.+")

testImplementation("org.mockito:mockito-core:${Versions.mockitoKotlin}")
testImplementation("org.mockito.kotlin:mockito-kotlin:${Versions.mockitoKotlin}")
testImplementation("org.glassfish.jersey.test-framework:jersey-test-framework-core:${Versions.jersey}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

package org.radarbase.datadashboard.api

import com.bugsnag.Bugsnag
import com.mindscapehq.raygun4java.core.IRaygunClientFactory
import com.mindscapehq.raygun4java.core.RaygunClient
import com.mindscapehq.raygun4java.core.RaygunClientFactory
Expand Down Expand Up @@ -64,11 +65,14 @@ object Main {
.withData("prod", false)
val raygunClient: RaygunClient = raygunFactory.newClient()

val bugsnag: Bugsnag = Bugsnag("28921adc65be4fd1643684b73ab0b636")

try {
throw Exception("This is a test exception")
} catch (e: Exception) {
Sentry.captureException(e);
Sentry.captureException(e)
raygunClient.send(e)
bugsnag.notify(e)
}

GrizzlyServer(config.service.baseUri, resources).run {
Expand Down

0 comments on commit e95a0a9

Please sign in to comment.