withSpan
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
inline suspend fun <T, R> 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.
inline suspend fun <R> withSpan(span: TraceSpan, context: <Error class: unknown class> = EmptyCoroutineContext, crossinline block: suspend <Error class: unknown class>.(span: TraceSpan) -> R): R
Executes block within the scope of TraceSpan. The block of code is executed with a new coroutine context that contains the span set in the context.
inline suspend fun <R> withSpan(sourceComponent: String, 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 using Tracer for sourceComponent 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.