We upgraded from Spring Boot 3.1.5 to 3.1.6 and trace id and span id are missing from the logs. However, it's not only a logging issue but also baggage is lost too.

Please find an example application demonstrating the issue: demo.zip. You can change Spring Boot version from build.gradle.kts to 3.1.5 and see that trace id and span id are present in the logs.

Comment From: wilkinsona

Thanks for the sample. This appears to be a regression in Spring Framework 6.0.14. The problem does not occur with Spring Boot 3.1.6 when Framework is downgraded to 6.0.13 but it does occur with Spring Boot 3.1.5 when Framework is upgraded to 6.0.14. We'll transfer this issue to the Framework team so that they can continue the investigation.

Comment From: bclozel

This is due to a regression introduced by #31417.