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
3
3
val mockkVersion = " 1.13.2"
4
4
val logstashVersion = " 7.2"
5
5
val springVersion = " 2.5.5"
6
+ val springSleuthVersion = " 3.1.4"
6
7
val testContainersVersion = " 1.17.5"
7
8
val springDocVersion = " 1.6.11"
8
9
val tokenValidationVersion = " 2.1.6"
@@ -31,6 +32,7 @@ dependencies {
31
32
implementation(" org.springframework.boot:spring-boot-starter-webflux" )
32
33
implementation(" org.springframework.boot:spring-boot-starter-data-jpa" )
33
34
implementation(" org.springframework.boot:spring-boot-starter-validation" )
35
+ implementation(" org.springframework.cloud:spring-cloud-starter-sleuth:$springSleuthVersion " )
34
36
35
37
implementation(" org.zalando:problem-spring-web-starter:$problemSpringWebStartVersion " )
36
38
Original file line number Diff line number Diff line change 1
1
package no.nav.klage.document.clients
2
2
3
+ import brave.Tracer
3
4
import no.nav.klage.document.domain.PDFDocument
4
5
import no.nav.klage.document.util.getLogger
5
6
import org.springframework.http.MediaType
@@ -8,7 +9,8 @@ import org.springframework.web.reactive.function.client.WebClient
8
9
9
10
@Component
10
11
class KabalJsonToPdfClient (
11
- private val kabalJsonToPdfWebClient : WebClient
12
+ private val kabalJsonToPdfWebClient : WebClient ,
13
+ private val tracer : Tracer
12
14
) {
13
15
companion object {
14
16
@Suppress(" JAVA_CLASS_ON_COMPANION" )
@@ -20,6 +22,7 @@ class KabalJsonToPdfClient(
20
22
.uri { it.path(" /topdf" ).build() }
21
23
.contentType(MediaType .APPLICATION_JSON )
22
24
.bodyValue(json)
25
+ .header(" Nav-Call-Id" , tracer.currentSpan().context().traceIdString())
23
26
.retrieve()
24
27
.toEntity(ByteArray ::class .java)
25
28
.map {
You can’t perform that action at this time.
0 commit comments