Package-level declarations

Types

Link copied to clipboard
class KeyValue(val key: String = "", val v_type: ValueType = ValueType.STRING, val v_str: String = "", val v_bool: Boolean = false, val v_int64: Long = 0, val v_float64: Double = 0.0, val v_binary: ByteString = ByteString.EMPTY, unknownFields: ByteString = ByteString.EMPTY) : Message<KeyValue, Nothing>
Link copied to clipboard
class ListOfSpans(spans: List<Span> = emptyList(), tags: List<KeyValue> = emptyList(), unknownFields: ByteString = ByteString.EMPTY) : Message<ListOfSpans, Nothing>

List of spans is a message to send multiple spans in a single call. Any tags specified in this call will be added to all the spans sent in this message. If the list of spans is empty, this message will be ignored even if tags field is set.

Link copied to clipboard
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

Link copied to clipboard
enum ValueType : Enum<ValueType> , WireEnum

The KeyValue message defines a key and value pair. The key is always a string. The value for the field is determined by the ValueType. If the ValueType is STRING the field v_str should be set, for BOOL v_bool is used etc.. Only the type of valueType is used. Rest of the fields are ignored even if they are set. So, of v_type is ValueType.STRING, only the value v_str is used. Rest of the fields are ignored. We chose not to use OneOf field, since it's JSON encoding is not as straight forward.