File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
src/main/kotlin/no/nav/klage/document/clients Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
33val mockkVersion = " 1.13.2"
44val logstashVersion = " 7.2"
55val springVersion = " 2.5.5"
6+ val springSleuthVersion = " 3.1.4"
67val testContainersVersion = " 1.17.5"
78val springDocVersion = " 1.6.11"
89val tokenValidationVersion = " 2.1.6"
@@ -31,6 +32,7 @@ dependencies {
3132 implementation(" org.springframework.boot:spring-boot-starter-webflux" )
3233 implementation(" org.springframework.boot:spring-boot-starter-data-jpa" )
3334 implementation(" org.springframework.boot:spring-boot-starter-validation" )
35+ implementation(" org.springframework.cloud:spring-cloud-starter-sleuth:$springSleuthVersion " )
3436
3537 implementation(" org.zalando:problem-spring-web-starter:$problemSpringWebStartVersion " )
3638
Original file line number Diff line number Diff line change 11package no.nav.klage.document.clients
22
3+ import brave.Tracer
34import no.nav.klage.document.domain.PDFDocument
45import no.nav.klage.document.util.getLogger
56import org.springframework.http.MediaType
@@ -8,7 +9,8 @@ import org.springframework.web.reactive.function.client.WebClient
89
910@Component
1011class KabalJsonToPdfClient (
11- private val kabalJsonToPdfWebClient : WebClient
12+ private val kabalJsonToPdfWebClient : WebClient ,
13+ private val tracer : Tracer
1214) {
1315 companion object {
1416 @Suppress(" JAVA_CLASS_ON_COMPANION" )
@@ -20,6 +22,7 @@ class KabalJsonToPdfClient(
2022 .uri { it.path(" /topdf" ).build() }
2123 .contentType(MediaType .APPLICATION_JSON )
2224 .bodyValue(json)
25+ .header(" Nav-Call-Id" , tracer.currentSpan().context().traceIdString())
2326 .retrieve()
2427 .toEntity(ByteArray ::class .java)
2528 .map {
You can’t perform that action at this time.
0 commit comments