with Context
inline fun <T> withContext(correlationId: String? = null, operationName: String? = null, block: () -> T): T
Execute a block with a new or specified correlation context. Previous context is restored after the block completes.
Return
The result of the block
Parameters
correlation Id
Optional correlation ID (auto-generated if null)
operation Name
Optional operation name for tracing
block
The block to execute