v2.1.1
Simplification
MDCContext.modifyContext(Cotnext, (MDC) -> Unit): Context
// Mono or Flux
.contextWrite { ctx -> MDCContext.modifyContext(ctx) { it: MDC -> it["key"] = "value" } }
Library limitation in Coroutine scope
Its use has not changed. There was no need for Context. ContextView is enough for function.
// old
typealias CCResolveFn<E> = suspend (CCKey<out E>) -> Context?
fun <E : CoroutineContext.Element> builder(element: CCKey<E>, contextExtractive: CCResolveFn<E>): Builder<E> { ... }
// new
typealias CCResolveFn<E> = suspend (CCKey<out E>) -> ContextView?
fun <E : CoroutineContext.Element> builder(element: CCKey<E>, contextExtractive: CCResolveFn<E>): Builder<E> { ... }
// usage:
CoroutineLogger.builder(ReactorContext) { coroutineContext[it]?.context }.build()