summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gradle/libs.versions.toml14
-rw-r--r--sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt6
-rw-r--r--sw-server/src/main/resources/logback-spring.xml11
3 files changed, 15 insertions, 16 deletions
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index aeefd17c..21bc54b6 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -1,11 +1,11 @@
[versions]
-kotlinx-coroutines = "1.5.2"
-kotlinx-serialization = "1.3.1"
-krossbow = "2.7.0"
-logback-classic = "1.2.3"
-loki-logback-appender = "1.0.0"
-micrometer-registry-prometheus = "1.6.1"
-slf4j = "1.7.30"
+kotlinx-coroutines = "1.6.0"
+kotlinx-serialization = "1.3.2"
+krossbow = "3.0.0"
+logback-classic = "1.2.10"
+loki-logback-appender = "1.3.1"
+micrometer-registry-prometheus = "1.8.1"
+slf4j = "1.7.32"
# See https://github.com/JetBrains/kotlin-wrappers
kotlin-react = "17.0.2-pre.266-kotlin-1.6.0"
diff --git a/sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt b/sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt
index f11439ef..b0dfdee2 100644
--- a/sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt
+++ b/sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt
@@ -23,12 +23,14 @@ import org.luxons.sevenwonders.model.api.actions.*
import org.luxons.sevenwonders.model.api.errors.ErrorDTO
import org.luxons.sevenwonders.model.api.events.*
import org.luxons.sevenwonders.model.wonders.AssignedWonder
+import kotlin.time.Duration
+import kotlin.time.Duration.Companion.seconds
class SevenWondersClient {
private val stompClient = StompClient {
- heartBeat = HeartBeat(10000, 10000)
- heartBeatTolerance = HeartBeatTolerance(0, 10000) // wide margin to account for heroku cold start
+ heartBeat = HeartBeat(10.seconds, 10.seconds)
+ heartBeatTolerance = HeartBeatTolerance(Duration.ZERO, 10.seconds) // wide margin to account for heroku cold start
}
suspend fun connect(serverUrl: String): SevenWondersSession {
diff --git a/sw-server/src/main/resources/logback-spring.xml b/sw-server/src/main/resources/logback-spring.xml
index 07b9e58e..afb338bd 100644
--- a/sw-server/src/main/resources/logback-spring.xml
+++ b/sw-server/src/main/resources/logback-spring.xml
@@ -2,14 +2,11 @@
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
- <appender name="LOKI" class="com.github.loki4j.logback.InstrumentedLoki4jAppender">
- <!--
- Loki Cloud hosted solution is limiting the batch size to 65536 Bytes, our log lines are exceeding this
- limit quite often so we are sending them with a granularity of 1 instead of the default 1000.
- The library does not provide a `batchSize` expressed in Bytes yet, so we cannot set it smarter than that.
- -->
- <batchSize>1</batchSize>
+ <appender name="LOKI" class="com.github.loki4j.logback.Loki4jAppender">
+ <!-- Loki Cloud hosted solution is limiting the batch size to 65536 Bytes -->
+ <batchMaxBytes>65536</batchMaxBytes>
<batchTimeoutMs>10000</batchTimeoutMs>
+ <metricsEnabled>true</metricsEnabled>
<http>
<url>https://logs-prod-us-central1.grafana.net/loki/api/v1/push</url>
<auth>
bgstack15