Span

class Span(val id: ByteString = ByteString.EMPTY, val parent_id: ByteString = ByteString.EMPTY, val trace_id: ByteString = ByteString.EMPTY, val name: String = "", val start_timestamp_micros: Long = 0, val duration_micros: Long = 0, tags: List<KeyValue> = emptyList(), unknownFields: ByteString = ByteString.EMPTY) : Message<Span, Nothing>

A span defines a single event in a trace. This span format is inspired by the zipkin span design at: https://github.com/openzipkin/zipkin-api/blob/master/zipkin.proto

Constructors

Link copied to clipboard
constructor(id: ByteString = ByteString.EMPTY, parent_id: ByteString = ByteString.EMPTY, trace_id: ByteString = ByteString.EMPTY, name: String = "", start_timestamp_micros: Long = 0, duration_micros: Long = 0, tags: List<KeyValue> = emptyList(), unknownFields: ByteString = ByteString.EMPTY)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val adapter: ProtoAdapter<Span>
Link copied to clipboard

This field stored the duration in microseconds for the event in the critical path. For example 150 milliseconds is 150000 microseconds. This field is required.

Link copied to clipboard
val id: ByteString

A field that uniquely identifies this event. This field usually contains a randomly generated UUID. This field is required and encoded as 8 or 16 bytes, in big endian byte order.

Link copied to clipboard

A name for the event.

Link copied to clipboard
val parent_id: ByteString

This field contains the parent id of this span. It is useful to establish a parent-child relationships between spans. If empty, this span will be considered a root span.

Link copied to clipboard

The timestamp field stores the epoch microseconds at which this event happened. For example: a value of 1551849569000000 represents March 6, 2019 5:19:29 UTC. We use fixed64 since it is more wire efficient for than int64 for larger numbers. This field is required.

Link copied to clipboard

A list of key value pairs.

Link copied to clipboard
val trace_id: ByteString

A trace is a directed acyclic graph of spans. All spans with the same trace_id belong to the same transaction. This field is required.

Link copied to clipboard
val unknownFields: ByteString

Functions

Link copied to clipboard
fun copy(id: ByteString = this.id, parent_id: ByteString = this.parent_id, trace_id: ByteString = this.trace_id, name: String = this.name, start_timestamp_micros: Long = this.start_timestamp_micros, duration_micros: Long = this.duration_micros, tags: List<KeyValue> = this.tags, unknownFields: ByteString = this.unknownFields): Span
Link copied to clipboard
fun encode(stream: OutputStream)
fun encode(sink: BufferedSink)
Link copied to clipboard
fun encodeByteString(): ByteString
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard