traced

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

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.

Since

0.12.0

Parameters

tags

the Trace.tags added to this trace child

args

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

block

performed with the updated trace

Throws


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

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.

Since

0.12.0

Parameters

args

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

block

performed with the updated trace

Throws


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

Deprecated (with error)

Don't provide dynamic tags from inside HasTraceTags.

Replace with

traced(args, block)

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

Since

0.12.0