Span informations missing when logging with DispatcherHandler starting from Sleuth 2.0.0.M8
See original GitHub issueHi,
Here are the versions I use :
- Spring Framework version : 5.0.4.RELEASE
- Spring Boot version : 2.0.1.RELEASE
- Spring Cloud Sleuth : 2.0.0.RC1 (via Finchley.RC1 release train)
Using the latest version of spring cloud Sleuth, logging handled requests using o.s.web.reactive.DispatcherHandler (ie : Webflux equivalent to MVC o.s.web.servlet.DispatcherServlet) does not display span informations.
2018-05-04 15:06:06.109 DEBUG [myapp,,,] 73025 --- [ http-54] o.s.web.reactive.DispatcherHandler : Processing GET request for [http://localhost:8080/test]
If I switch back to Sleuth 2.0.0.M7 and Spring Boot 2.0.0.RELEASE, things are working as expected (the problem seems starting from Sleuth 2.0.0.M8 with both Spring Boot 2.0.1.RELEASE and 2.0.0.RELEASE) :
2018-05-04 15:09:12.449 DEBUG [myapp,394cf756c1f3a695,394cf756c1f3a695,false] 73218 --- [ http-52] o.s.web.reactive.DispatcherHandler : Processing GET request for [http://localhost:8080/test]
This strange behavior has impacts on log correlation. Does someone have any idea about this problem (is it spring boot or spring cloud sleuth ?) ?
Thank you.
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (8 by maintainers)
Hi again,
You can find a simple spring boot project (I used spring initializr for convenience) here : https://github.com/jhaeyaert/issue-sleuth-logging
Follow these steps to reproduce the problem :
The server will start and if you make a curl on localhost:8080 you will have a 404 with expected working logs (ie : with span id). Ex:
Now if you update pom.xml and change
<spring-cloud.version>Finchley.M8</spring-cloud.version>
to<spring-cloud.version>Finchley.M9</spring-cloud.version>
then restart the server you will now have DispatcherHandler log without span id. Ex :Note : I take a long time to make it work until I discover that whatever the version of Sleuth, If I remove the spring-boot-starter-actuator dependency then span id will never be logged by the DispatcherHandler. If the spring-boot-starter-actuator is added It works only with version <= Finchley.M8 (–> sleuth 2.0.0.M7)
I hope this will help you to figure out the problem.
Yes no problem I will test that tomorrow.