Span

interface Span

A Span represents a single operation within a trace.

Functions

Link copied to clipboard
abstract fun addEvent(name: String): Span

Adds an event to the span.

Link copied to clipboard
abstract fun end()

Ends the span.

Link copied to clipboard
abstract fun recordException(exception: Throwable): Span

Records an exception on the span.

Link copied to clipboard
abstract operator fun set(key: String, value: Boolean): Span

Sets a boolean attribute on the span.

abstract operator fun set(key: String, value: Double): Span

Sets a double attribute on the span.

abstract operator fun set(key: String, value: Long): Span

Sets a long attribute on the span.

abstract operator fun set(key: String, value: String): Span

Sets a string attribute on the span.