correlatedBlock

inline fun <T> correlatedBlock(operationName: String, attributes: Map<String, String> = emptyMap(), block: () -> T): CorrelatedResult<T>

Execute a blocking operation with correlation context.

For non-suspending code that needs correlation tracking.

Return

The operation result

Since

0.4.0

Parameters

operationName

Human-readable operation name

attributes

Additional attributes for context

block

The blocking operation to execute