traced

suspend fun <T> traced(    tags: Iterable<Any>,     args: Iterable<Any>,     block: suspend CoroutineScope.() -> T): T

Creates a Trace child node from outside a HasTraceTags implementation.

The difference between the two parameters is that tags essentially describe the receiver of the trace (the class, any identifying immutable instance properties like project path, etc.), and the arguments are just like function arguments.

Parameters

tags

the Trace.tags added to this trace child

args

the dynamic runtime Trace.Child.args arguments added to this trace

Throws


suspend fun <T> HasTraceTags.traced(    tags: Iterable<Any>,     args: Iterable<Any>,     block: suspend CoroutineScope.() -> T): T

Don't use. This overload exists in order to prevent accidentally providing the wrong tags to a Trace from inside a HasTraceTags. If you need to provide runtime


suspend fun <T> HasTraceTags.traced(args: Iterable<Any>, block: suspend CoroutineScope.() -> T): T
suspend fun <T> HasTraceTags.traced(vararg args: Any, block: suspend CoroutineScope.() -> T): T

Creates a Trace child node from inside a HasTraceTags implementation.

If you're sure you need to provide Trace.tags arguments as well, then remove the HasTraceTags implementation from the receiver.

Parameters

args

the dynamic runtime Trace.Child.args arguments added to this trace

Throws

Sources

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard