Skip to content

Commit c9ad9e7

Browse files
committed
add version to sentry reports
1 parent 82a7419 commit c9ad9e7

File tree

1 file changed

+8
-4
lines changed
  • app/src/main/kotlin/warlockfe/warlock3/app

1 file changed

+8
-4
lines changed

app/src/main/kotlin/warlockfe/warlock3/app/Main.kt

+8-4
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ import kotlin.math.roundToInt
6969
@OptIn(ExperimentalResourceApi::class)
7070
fun main(args: Array<String>) {
7171

72-
initializeSentry()
73-
7472
val parser = ArgParser("warlock3")
7573
val port by parser.option(
7674
type = ArgType.Int,
@@ -99,6 +97,9 @@ fun main(args: Array<String>) {
9997
parser.parse(args)
10098

10199
val version = System.getProperty("app.version")
100+
version?.let {
101+
initializeSentry(version)
102+
}
102103
if (debug == true || (debug == null && version == null)) {
103104
System.setProperty(DEFAULT_LOG_LEVEL_KEY, "DEBUG")
104105
}
@@ -331,9 +332,12 @@ private fun GameState.getTitle(): Flow<String> {
331332
}
332333
}
333334

334-
fun initializeSentry() {
335+
fun initializeSentry(version: String) {
335336
Sentry.init { options ->
336-
options.dsn = "https://06169c08bd931ba4308dab95573400e2@o4508437273378816.ingest.us.sentry.io/4508437322727424"
337+
with(options) {
338+
dsn = "https://06169c08bd931ba4308dab95573400e2@o4508437273378816.ingest.us.sentry.io/4508437322727424"
339+
release = "desktop@$version"
340+
}
337341
}
338342
}
339343

0 commit comments

Comments
 (0)