Skip to content

Commit

Permalink
apply workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
PH1P5 committed Apr 22, 2022
1 parent f054912 commit 0cbde53
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions build.gradle.kts
Expand Up @@ -32,6 +32,7 @@ dependencies {
implementation("org.springframework.boot:spring-boot-starter-webflux")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.cloud:spring-cloud-starter-sleuth")
implementation("io.projectreactor.netty:reactor-netty-http-brave")


// kotlin related
Expand Down
@@ -0,0 +1,24 @@
package de.idealo.homepage.dataprovider.config.logging

import brave.http.HttpTracing

import org.springframework.beans.factory.ObjectProvider

import org.springframework.boot.web.embedded.netty.NettyServerCustomizer

import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import reactor.netty.http.brave.ReactorNettyHttpTracing
import reactor.netty.http.server.HttpServer

@Configuration(proxyBeanMethods = true)
class NettyLogTracingConfiguration {
@Bean
fun traceNettyServerCustomizer(tracing: ObjectProvider<HttpTracing>): NettyServerCustomizer {
return NettyServerCustomizer { server: HttpServer ->
ReactorNettyHttpTracing.create(
tracing.getObject()
).decorateHttpServer(server)
}
}
}

0 comments on commit 0cbde53

Please sign in to comment.