After migration to spring boot 3 and micrometer tracing library. The tracing IDs aren't automatically appended to the logs for Classes which implement the CommandLineRunner interface unlike for rest controllers.
Example code
public class JobRunner implements CommandLineRunner {
private final petsJobExecutor petsJobExecutor;
@TrackExecutionTime
public void run(String... args) {
log.info("Started the job");
petsJobExecutor.updatePets();
log.info("Finished the job");
}
}
How can I enable automatically trace-id context propagation for CommandLineRunner implementations in sprint boot 3 with micrometer?