@Scheduled tasks do not create new spans by default after migrating from Spring Cloud Sleuth to Spring Boot 3. This also causes the traceId and spanId to disappear from logs. There are some workarounds, such as the one suggested here: https://stackoverflow.com/questions/75030590/tracing-of-logs-with-scheduled-in-spring-boot-3-0. However, it would be much more convenient if Spring Boot could handle this automatically.
Comment From: vpavic
This seems to be a duplicate of https://github.com/spring-projects/spring-framework/issues/29883.
Comment From: wilkinsona
Indeed it is. Thanks, Vedran.