We would like to support our Kotlin community by adapting the Micrometer context propagation mechanism with the Kotlin coroutine context. This has been requested multiple times, including in https://github.com/spring-projects/spring-framework/issues/32165. Without this, observability instrumentations in Spring are not propagated to Kotlin suspending functions. This means that observation-related thread locals in this execution context are missing and typically, log statements are missing observability correlation ids.

We implemented and tested a ThreadContextElement that does this and discussed whether this should be hosted by Micrometer or Kotlinx. There is no clear choice for that, especially since this involves multiple dependencies and runtime behavior.

Because this enhancement request is mostly coming from the Spring community, we have decided to publish this as part of spring core. If there is more community demand outside of the Spring ecosystem, we might reconsider contributing it somewhere else. Arguably, the community has waited long enough for this feature and we shouldn't postpone further.

Once implemented in Spring Framework, we should then consider if and how we can automatically enable this feature in Spring applications in a separate issue (cc @sdeleuze ).