Skip to content

Commit 1a86bbb

Browse files
committed
chore: dep updates
1 parent 6d33095 commit 1a86bbb

File tree

5 files changed

+36
-10
lines changed

5 files changed

+36
-10
lines changed

backend/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
$ ./gradlew :backend:jvm:run
66
```
77

8+
### OpenTelemetry
9+
10+
* [Prometheus Java client Sample](https://prometheus.github.io/client_java/otel/otlp/)
11+
812
### Misc
913

1014
* [JFR Speedscope](https://github.com/parttimenerd/jfrtofp/blob/main/src/main/kotlin/me/bechberger/jfrtofp/other)

backend/jvm/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ jib {
8080
"OTEL_TRACES_EXPORTER" to "logging",
8181
"OTEL_METRICS_EXPORTER" to "logging",
8282
"OTEL_LOGS_EXPORTER" to "logging",
83+
// "OTEL_EXPORTER_OTLP_PROTOCOL" to "grpc",
84+
// "OTEL_EXPORTER_OTLP_ENDPOINT" to "http://host.docker.internal:4317",
8385
// "OTEL_RESOURCE_ATTRIBUTES" to
8486
// "service.name=${project.name},service.namespace=${project.group},service.instance.id=localhost:8080",
8587
)

gradle/build-logic/src/main/kotlin/common/ProjectExtns.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ val Project.isKotlinJsProject
117117
val Project.isRootProject
118118
get() = this == rootProject
119119

120+
val Project.orgName
121+
get() = libs.versions.org.name.get()
122+
120123
val Project.githubUser
121124
get() = libs.versions.dev.name.get().lowercase()
122125

gradle/build-logic/src/main/kotlin/common/ServiceClient.kt

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import io.ktor.client.*
44
import io.ktor.client.call.*
55
import io.ktor.client.engine.java.*
66
import io.ktor.client.plugins.*
7+
import io.ktor.client.plugins.auth.*
8+
import io.ktor.client.plugins.auth.providers.*
79
import io.ktor.client.plugins.compression.*
810
import io.ktor.client.plugins.contentnegotiation.*
911
import io.ktor.client.plugins.cookies.*
@@ -25,7 +27,6 @@ object ApiClient {
2527
fun get() =
2628
HttpClient(Java) {
2729
install(Resources)
28-
2930
install(ContentNegotiation) {
3031
json(
3132
Json {
@@ -44,32 +45,48 @@ object ApiClient {
4445
gzip(0.9F)
4546
}
4647

48+
install(HttpRequestRetry) {
49+
maxRetries = 2
50+
retryOnException(retryOnTimeout = true)
51+
retryOnServerErrors()
52+
constantDelay(millis = 1_000)
53+
}
54+
4755
install(HttpTimeout) {
48-
requestTimeoutMillis = 20_000
49-
connectTimeoutMillis = 5_000
56+
connectTimeoutMillis = 10_000
57+
requestTimeoutMillis = 5_000
5058
socketTimeoutMillis = 5_000
5159
}
5260

5361
install(HttpCookies)
5462

5563
install(Logging) {
5664
logger = Logger.DEFAULT
57-
level = LogLevel.INFO
65+
level = LogLevel.ALL
66+
sanitizeHeader { header -> header == HttpHeaders.Authorization }
5867
}
5968

6069
engine { pipelining = true }
6170

6271
followRedirects = true
6372

64-
defaultRequest {
65-
url {
66-
protocol = URLProtocol.HTTPS
67-
host = "api.github.com"
68-
}
73+
install(UserAgent) { agent = "Service Client" }
74+
75+
install(DefaultRequest) {
76+
url("https://api.github.com")
6977
headers.appendIfNameAndValueAbsent(
7078
HttpHeaders.ContentType, ContentType.Application.Json.toString())
7179
}
7280

81+
install(Auth) {
82+
basic {
83+
credentials {
84+
sendWithoutRequest { true }
85+
BasicAuthCredentials(username = "", password = "")
86+
}
87+
}
88+
}
89+
7390
// expectSuccess = false
7491
HttpResponseValidator {
7592
validateResponse {

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ kotlinx-metadata = "0.9.0"
3535
kotlinx-reflect-lite = "1.1.0"
3636
kotlinx-bcv = "0.15.0-Beta.2"
3737
kotlin-dokka = "1.9.20"
38-
kotlin-wrappers = "1.0.0-pre.760"
38+
kotlin-wrappers = "1.0.0-pre.761"
3939
kotlin-redacted = "1.9.0"
4040
kotlinx-multik = "0.2.3"
4141
kotlinx-dataframe = "0.13.1"

0 commit comments

Comments
 (0)