From 77d3be53bd01e2aed846ed98a0beaacaba6acc21 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Thu, 14 Apr 2022 15:04:19 +0200 Subject: [PATCH] Documents the access logs for Reactor Netty; fixes gh-2132 --- docs/src/main/asciidoc/integrations.adoc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/src/main/asciidoc/integrations.adoc b/docs/src/main/asciidoc/integrations.adoc index 84537d5ba..1de9403e4 100644 --- a/docs/src/main/asciidoc/integrations.adoc +++ b/docs/src/main/asciidoc/integrations.adoc @@ -271,6 +271,26 @@ include::{project-root}/benchmarks/src/main/java/org/springframework/cloud/sleut To change the order of tracing filter registration, please set the `spring.sleuth.web.filter-order` property. +[[sleuth-reactor-netty-http-server-integration]] +=== Reactor Netty HttpServer + +If you're using Reactor Netty and would like to have your access logs instrumented you need to add the `io.projectreactor.netty:reactor-netty-http-brave` (this will work only for the Brave Tracer). Also add the following configuration to your project. + +[source,java,indent=0] +----- +import brave.http.HttpTracing; +import reactor.netty.http.brave.ReactorNettyHttpTracing; + +@Configuration(proxyBeanMethods = false) +class TraceNettyConfig { + + @Bean + NettyServerCustomizer traceNettyServerCustomizer(ObjectProvider tracing) { + return server -> ReactorNettyHttpTracing.create(tracing.getObject()).decorateHttpServer(server); + } +} +----- + [[sleuth-messaging-integration]] == Messaging