LoggingContext

Represents a logging context that is used within a coroutine for tracing and tagging operations. It functions as a coroutine context element, managing tags and a stack of spans. Provides constructors to initialize with different combinations of tags and a span.

Constructors

Link copied to clipboard
constructor()
constructor(tags: Tags)
constructor(span: TracingEvent.Span)
constructor(tags: Tags, span: TracingEvent.Span)

Types

Link copied to clipboard
class Builder

Builder for constructing a LoggingContext object with optional configurations.

Link copied to clipboard
Link copied to clipboard
class SpanStack

A simple stack data structure to manage Span objects, allowing push, pop, and peek operations. Provides functionalities to add a new span to the stack, remove the most recently added span, or view it without removing.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val tags: Tags

Functions

Link copied to clipboard
open override fun <R> fold(initial: R, operation: (R, CoroutineContext.Element) -> R): R
Link copied to clipboard
open operator override fun <E : CoroutineContext.Element> get(key: CoroutineContext.Key<E>): E?
Link copied to clipboard
open override fun minusKey(key: CoroutineContext.Key<*>): CoroutineContext
Link copied to clipboard
open operator fun plus(context: CoroutineContext): CoroutineContext
Link copied to clipboard
inline fun <T> span(name: String, f: TracingEvent.Span.Local.() -> T): T

Executes a function within the scope of a tracing span.

Link copied to clipboard
open override fun toString(): String