Tracer

interface Tracer

Entry point for creating TraceSpan instances.

Inheritors

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun createSpan(name: String, initialAttributes: <Error class: unknown class> = emptyAttributes(), spanKind: SpanKind = SpanKind.INTERNAL, parentContext: Context? = null): TraceSpan

Creates a new span and makes it active in the current Context.

Inherited functions

Link copied to clipboard
inline suspend fun <R> Tracer.withSpan(name: String, initialAttributes: <Error class: unknown class> = emptyAttributes(), spanKind: SpanKind = SpanKind.INTERNAL, context: <Error class: unknown class> = EmptyCoroutineContext, crossinline block: suspend <Error class: unknown class>.(span: TraceSpan) -> R): R

Creates a new TraceSpan and executes block within the scope of the new span. The block of code is executed with a new coroutine context that contains the newly created span set.