AbstractTracer

abstract class AbstractTracer : Tracer

An abstract implementation of a tracer. By default, this class uses no-op implementations for all members unless overridden in a subclass.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun createSpan(name: String, initialAttributes: <Error class: unknown class>, spanKind: SpanKind, parentContext: Context?): 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.