-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
155 additions
and
107 deletions.
There are no files selected for viewing
24 changes: 22 additions & 2 deletions
24
backend/src/main/kotlin/fr/gouv/dgampa/rapportnav/RapportNavApplication.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,33 @@ | ||
package fr.gouv.dgampa.rapportnav | ||
|
||
import io.sentry.Sentry | ||
import org.springframework.boot.autoconfigure.SpringBootApplication | ||
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration | ||
import org.springframework.boot.runApplication | ||
|
||
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration | ||
|
||
@SpringBootApplication(exclude = [SecurityAutoConfiguration::class]) | ||
class RapportNavApplication | ||
|
||
fun main(args: Array<String>) { | ||
runApplication<RapportNavApplication>(*args) | ||
|
||
val ctx = runApplication<RapportNavApplication>(*args) | ||
|
||
val isSentryEnabled: String? = ctx.environment.getProperty("sentry.enabled") | ||
val sentryDsn: String? = ctx.environment.getProperty("sentry.dsn") | ||
|
||
if (isSentryEnabled == "true") { | ||
Sentry.init { options -> | ||
options.dsn = sentryDsn | ||
// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring. | ||
// We recommend adjusting this value in production. | ||
options.tracesSampleRate = 1.0 | ||
} | ||
} | ||
|
||
try { | ||
throw Exception("This is a test.") | ||
} catch (e: Exception) { | ||
Sentry.captureException(e) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.