Spring boot 2.6.1 Kotlin 1.6.0 mycode

@Controller
class Test{

    @GetMapping(..)
    suspend fun api(): Response {
      System.out.print(Thread.currentthread()) <-- http-nio-port-exec-1

      Webclient().post().url().retrieve().bodyToMono()..awaitSingle() // api call
      System.out.print(Thread.currentthread()) <-- reactor-1
      throw Exception() <- example

      return Response.builder(suspend fun...)
    }

    @exceptionhadler
    fun..{
       System.out.print(Thread.currentthread()) <-- http-nio-port-exec-2 ?? why!
    }

}

It is being developed through coroutine. Currently, spring boot 2.6 version supports the suspend function, but the thread of request and response are different, so MDC and trace cannot be tracked. Could you give me some help?

trace track and Mdc Context

Comment From: philwebb

Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.