Skip to content

Commit

Permalink
Add Raygun monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
pvannierop committed Jul 19, 2024
1 parent 72bc2d7 commit c8c8db2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions data-dashboard-backend/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ dependencies {
}
implementation("org.radarbase:radar-commons-kotlin:${Versions.radarCommons}")

implementation("com.mindscapehq:core:3.0.0")
implementation("com.mindscapehq:webprovider:3.0.0")

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,9 @@

package org.radarbase.datadashboard.api

import com.mindscapehq.raygun4java.core.IRaygunClientFactory
import com.mindscapehq.raygun4java.core.RaygunClient
import com.mindscapehq.raygun4java.core.RaygunClientFactory
import io.sentry.Sentry
import io.sentry.SentryOptions
import org.radarbase.datadashboard.api.config.DashboardApiConfig
Expand Down Expand Up @@ -53,6 +56,19 @@ object Main {
options.tracesSampleRate = 1.0
// When first trying Sentry it's good to see what the SDK is doing:
options.isDebug = true

}
val raygunFactory: IRaygunClientFactory = RaygunClientFactory("T6N90OBA1JBDQeQ8vIwg")
.withVersion("1.2.3")
.withTag("beta")
.withData("prod", false)
val raygunClient: RaygunClient = raygunFactory.newClient()

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

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

0 comments on commit c8c8db2

Please sign in to comment.