With Spring Boot 3.x and Micrometer 1.10+ you can try the following dependencies:
(Part of pom.xml)
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
<version>3.5.3</version>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-tracing-bridge-brave</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-observation</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<version>1.0.2</version>
<artifactId>micrometer-tracing</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<version>1.0.2</version>
<artifactId>context-propagation</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.micrometer</groupId>
<version>1.10.4</version>
<artifactId>micrometer-bom</artifactId>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
And in the main class of the application make the following call:
import reactor.core.publisher.Hooks;
public static void main(String[] args) {
Hooks.enableAutomaticContextPropagation();
// ...
}
Spring Boot should soon integrate those versions of dependencies and make the call for you, but for now these manual steps should get you the logs with tracing info.
In reactor-core 3.5.3 we added automatic propagation of ThreadLocal values registered with context-propagation (optional) library which Micrometer also uses. For those interested in the details, check the PR introducing this feature. This is a general enhancement from what 3.5.0 brought, where the ThreadLocals were populated in special operators -> handle and tap (and its overloads).