Package-level declarations

Types

Link copied to clipboard
interface HasTraceTags

Convenience interface for providing static tags to a Trace, then consuming them via a traced extension.

Link copied to clipboard
sealed class Trace(val tags: List<String>) : CoroutineContext.Element

Models a curated call stack from some root, up to this Trace node. In practice, the root will be ModuleCheckRunner.run.

Functions

Link copied to clipboard

Unsafe-ish extension for extracting a Trace from inside a coroutine.

Link copied to clipboard
suspend fun trace(): Trace

Unsafe-ish extension for extracting a Trace from inside a coroutine.

Link copied to clipboard
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.

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

Creates a Trace child node from inside a HasTraceTags implementation.

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

Link copied to clipboard
private suspend fun <T> tracedInternal(tags: Iterable<Any>, args: Iterable<Any>, block: suspend CoroutineScope.() -> T): T
Link copied to clipboard
internal suspend fun traceOrNull(): Trace?