AbstractTraceSpan

abstract class AbstractTraceSpan : TraceSpan

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

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val spanContext: SpanContext

The immutable tracing context this span belongs to

Functions

Link copied to clipboard
open override fun asContextElement(): <Error class: unknown class>

A representation of this span as a CoroutineContext element

Link copied to clipboard
open override fun close()

Marks the end of this span's execution. This MUST be called when the unit of work the span represents has finished.

Link copied to clipboard
open override fun emitEvent(name: String, attributes: <Error class: unknown class>)

Add an event to this span

Link copied to clipboard
open override fun mergeAttributes(attributes: <Error class: unknown class>)

Merge all attributes from attributes into this span's attributes (overriding any previously set values with the same keys).

Link copied to clipboard
open operator override fun <T : Any> set(key: <Error class: unknown class><T>, value: T)

Set an attribute on the span

Link copied to clipboard
open override fun setStatus(status: SpanStatus)

Set the span status

Inherited functions

Link copied to clipboard

Set common error attributes from an exception

Link copied to clipboard
fun <T : Any> TraceSpan.setAttribute(key: String, value: T)

Set an attribute on the span using a string key