Documentation ¶
Overview ¶
Package model describes the internal data model for Trace and Span
Index ¶
- Constants
- Variables
- func DurationAsMicroseconds(d time.Duration) uint64
- func EpochMicrosecondsAsTime(ts uint64) time.Time
- func HashCode(o Hashable) (uint64, error)
- func MicrosecondsAsDuration(v uint64) time.Duration
- func SortSpan(span *Span)
- func SortTrace(trace *Trace)
- func SortTraceIDs(traceIDs []*TraceID)
- func SortTraces(traces []*Trace)
- func TimeAsEpochMicroseconds(t time.Time) uint64
- type Batch
- func (*Batch) Descriptor() ([]byte, []int)
- func (m *Batch) GetProcess() *Process
- func (m *Batch) GetSpans() []*Span
- func (m *Batch) Marshal() (dAtA []byte, err error)
- func (m *Batch) MarshalTo(dAtA []byte) (int, error)
- func (*Batch) ProtoMessage()
- func (m *Batch) Reset()
- func (m *Batch) Size() (n int)
- func (m *Batch) String() string
- func (m *Batch) Unmarshal(dAtA []byte) error
- func (m *Batch) XXX_DiscardUnknown()
- func (m *Batch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Batch) XXX_Merge(src proto.Message)
- func (m *Batch) XXX_Size() int
- func (m *Batch) XXX_Unmarshal(b []byte) error
- type DependencyLink
- func (d DependencyLink) ApplyDefaults() DependencyLink
- func (*DependencyLink) Descriptor() ([]byte, []int)
- func (m *DependencyLink) GetCallCount() uint64
- func (m *DependencyLink) GetChild() string
- func (m *DependencyLink) GetParent() string
- func (m *DependencyLink) GetSource() string
- func (m *DependencyLink) Marshal() (dAtA []byte, err error)
- func (m *DependencyLink) MarshalTo(dAtA []byte) (int, error)
- func (*DependencyLink) ProtoMessage()
- func (m *DependencyLink) Reset()
- func (m *DependencyLink) Size() (n int)
- func (m *DependencyLink) String() string
- func (m *DependencyLink) Unmarshal(dAtA []byte) error
- func (m *DependencyLink) XXX_DiscardUnknown()
- func (m *DependencyLink) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DependencyLink) XXX_Merge(src proto.Message)
- func (m *DependencyLink) XXX_Size() int
- func (m *DependencyLink) XXX_Unmarshal(b []byte) error
- type Flags
- type Hashable
- type KeyValue
- func (kv *KeyValue) AsString() string
- func (kv *KeyValue) AsStringLossy() string
- func (kv *KeyValue) Binary() []byte
- func (kv *KeyValue) Bool() bool
- func (this *KeyValue) Compare(that interface{}) int
- func (*KeyValue) Descriptor() ([]byte, []int)
- func (this *KeyValue) Equal(that interface{}) bool
- func (kv *KeyValue) Float64() float64
- func (m *KeyValue) GetKey() string
- func (m *KeyValue) GetVBinary() []byte
- func (m *KeyValue) GetVBool() bool
- func (m *KeyValue) GetVFloat64() float64
- func (m *KeyValue) GetVInt64() int64
- func (m *KeyValue) GetVStr() string
- func (m *KeyValue) GetVType() ValueType
- func (kv KeyValue) Hash(w io.Writer) error
- func (kv *KeyValue) Int64() int64
- func (kv *KeyValue) IsLess(two *KeyValue) bool
- func (m *KeyValue) Marshal() (dAtA []byte, err error)
- func (m *KeyValue) MarshalTo(dAtA []byte) (int, error)
- func (*KeyValue) ProtoMessage()
- func (m *KeyValue) Reset()
- func (m *KeyValue) Size() (n int)
- func (m *KeyValue) String() string
- func (m *KeyValue) Unmarshal(dAtA []byte) error
- func (kv *KeyValue) Value() interface{}
- func (m *KeyValue) XXX_DiscardUnknown()
- func (m *KeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *KeyValue) XXX_Merge(src proto.Message)
- func (m *KeyValue) XXX_Size() int
- func (m *KeyValue) XXX_Unmarshal(b []byte) error
- type KeyValues
- type Log
- func (*Log) Descriptor() ([]byte, []int)
- func (m *Log) GetFields() []KeyValue
- func (m *Log) GetTimestamp() time.Time
- func (m *Log) Marshal() (dAtA []byte, err error)
- func (m *Log) MarshalTo(dAtA []byte) (int, error)
- func (*Log) ProtoMessage()
- func (m *Log) Reset()
- func (m *Log) Size() (n int)
- func (m *Log) String() string
- func (m *Log) Unmarshal(dAtA []byte) error
- func (m *Log) XXX_DiscardUnknown()
- func (m *Log) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Log) XXX_Merge(src proto.Message)
- func (m *Log) XXX_Size() int
- func (m *Log) XXX_Unmarshal(b []byte) error
- type Process
- func (*Process) Descriptor() ([]byte, []int)
- func (p *Process) Equal(other *Process) bool
- func (m *Process) GetServiceName() string
- func (m *Process) GetTags() []KeyValue
- func (p *Process) Hash(w io.Writer) (err error)
- func (m *Process) Marshal() (dAtA []byte, err error)
- func (m *Process) MarshalTo(dAtA []byte) (int, error)
- func (*Process) ProtoMessage()
- func (m *Process) Reset()
- func (m *Process) Size() (n int)
- func (m *Process) String() string
- func (m *Process) Unmarshal(dAtA []byte) error
- func (m *Process) XXX_DiscardUnknown()
- func (m *Process) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Process) XXX_Merge(src proto.Message)
- func (m *Process) XXX_Size() int
- func (m *Process) XXX_Unmarshal(b []byte) error
- type Span
- func (*Span) Descriptor() ([]byte, []int)
- func (m *Span) GetDuration() time.Duration
- func (m *Span) GetLogs() []Log
- func (m *Span) GetOperationName() string
- func (m *Span) GetProcess() *Process
- func (m *Span) GetProcessID() string
- func (m *Span) GetReferences() []SpanRef
- func (s *Span) GetSamplerType() string
- func (s *Span) GetSpanKind() (spanKind string, found bool)
- func (m *Span) GetStartTime() time.Time
- func (m *Span) GetTags() []KeyValue
- func (m *Span) GetWarnings() []string
- func (s *Span) HasSpanKind(kind ext.SpanKindEnum) bool
- func (s *Span) Hash(w io.Writer) (err error)
- func (s *Span) IsRPCClient() bool
- func (s *Span) IsRPCServer() bool
- func (m *Span) Marshal() (dAtA []byte, err error)
- func (m *Span) MarshalTo(dAtA []byte) (int, error)
- func (s *Span) NormalizeTimestamps()
- func (s *Span) ParentSpanID() SpanID
- func (*Span) ProtoMessage()
- func (s *Span) ReplaceParentID(newParentID SpanID)
- func (m *Span) Reset()
- func (m *Span) Size() (n int)
- func (m *Span) String() string
- func (m *Span) Unmarshal(dAtA []byte) error
- func (m *Span) XXX_DiscardUnknown()
- func (m *Span) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Span) XXX_Merge(src proto.Message)
- func (m *Span) XXX_Size() int
- func (m *Span) XXX_Unmarshal(b []byte) error
- type SpanID
- func (s SpanID) MarshalJSON() ([]byte, error)
- func (s SpanID) MarshalText() ([]byte, error)
- func (s *SpanID) MarshalTo(data []byte) (n int, err error)
- func (s *SpanID) Size() int
- func (s SpanID) String() string
- func (s *SpanID) Unmarshal(data []byte) error
- func (s *SpanID) UnmarshalJSON(data []byte) error
- func (s *SpanID) UnmarshalJSONPB(_ *jsonpb.Unmarshaler, b []byte) error
- func (s *SpanID) UnmarshalText(text []byte) error
- type SpanRef
- func (*SpanRef) Descriptor() ([]byte, []int)
- func (m *SpanRef) GetRefType() SpanRefType
- func (m *SpanRef) Marshal() (dAtA []byte, err error)
- func (m *SpanRef) MarshalTo(dAtA []byte) (int, error)
- func (*SpanRef) ProtoMessage()
- func (m *SpanRef) Reset()
- func (m *SpanRef) Size() (n int)
- func (m *SpanRef) String() string
- func (m *SpanRef) Unmarshal(dAtA []byte) error
- func (m *SpanRef) XXX_DiscardUnknown()
- func (m *SpanRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SpanRef) XXX_Merge(src proto.Message)
- func (m *SpanRef) XXX_Size() int
- func (m *SpanRef) XXX_Unmarshal(b []byte) error
- type SpanRefType
- type Trace
- func (*Trace) Descriptor() ([]byte, []int)
- func (t *Trace) FindSpanByID(id SpanID) *Span
- func (m *Trace) GetProcessMap() []Trace_ProcessMapping
- func (m *Trace) GetSpans() []*Span
- func (m *Trace) GetWarnings() []string
- func (m *Trace) Marshal() (dAtA []byte, err error)
- func (m *Trace) MarshalTo(dAtA []byte) (int, error)
- func (t *Trace) NormalizeTimestamps()
- func (*Trace) ProtoMessage()
- func (m *Trace) Reset()
- func (m *Trace) Size() (n int)
- func (m *Trace) String() string
- func (m *Trace) Unmarshal(dAtA []byte) error
- func (m *Trace) XXX_DiscardUnknown()
- func (m *Trace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Trace) XXX_Merge(src proto.Message)
- func (m *Trace) XXX_Size() int
- func (m *Trace) XXX_Unmarshal(b []byte) error
- type TraceID
- func (t TraceID) MarshalJSON() ([]byte, error)
- func (t TraceID) MarshalText() ([]byte, error)
- func (t *TraceID) MarshalTo(data []byte) (n int, err error)
- func (t *TraceID) Size() int
- func (t TraceID) String() string
- func (t *TraceID) Unmarshal(data []byte) error
- func (t *TraceID) UnmarshalJSON(data []byte) error
- func (t *TraceID) UnmarshalText(text []byte) error
- type Trace_ProcessMapping
- func (*Trace_ProcessMapping) Descriptor() ([]byte, []int)
- func (m *Trace_ProcessMapping) GetProcess() Process
- func (m *Trace_ProcessMapping) GetProcessID() string
- func (m *Trace_ProcessMapping) Marshal() (dAtA []byte, err error)
- func (m *Trace_ProcessMapping) MarshalTo(dAtA []byte) (int, error)
- func (*Trace_ProcessMapping) ProtoMessage()
- func (m *Trace_ProcessMapping) Reset()
- func (m *Trace_ProcessMapping) Size() (n int)
- func (m *Trace_ProcessMapping) String() string
- func (m *Trace_ProcessMapping) Unmarshal(dAtA []byte) error
- func (m *Trace_ProcessMapping) XXX_DiscardUnknown()
- func (m *Trace_ProcessMapping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Trace_ProcessMapping) XXX_Merge(src proto.Message)
- func (m *Trace_ProcessMapping) XXX_Size() int
- func (m *Trace_ProcessMapping) XXX_Unmarshal(b []byte) error
- type ValueType
Constants ¶
const ( // StringType indicates the value is a unicode string StringType = ValueType_STRING // BoolType indicates the value is a Boolean encoded as int64 number 0 or 1 BoolType = ValueType_BOOL // Int64Type indicates the value is an int64 number Int64Type = ValueType_INT64 // Float64Type indicates the value is a float64 number stored as int64 Float64Type = ValueType_FLOAT64 // BinaryType indicates the value is binary blob stored as a byte array BinaryType = ValueType_BINARY )
These constants are kept mostly for backwards compatibility.
const ( // SampledFlag is the bit set in Flags in order to define a span as a sampled span SampledFlag = Flags(1) // DebugFlag is the bit set in Flags in order to define a span as a debug span DebugFlag = Flags(2) // FirehoseFlag is the bit in Flags in order to define a span as a firehose span FirehoseFlag = Flags(8) )
const ( // ChildOf span reference type describes a reference to a parent span // that depends on the response from the current (child) span ChildOf = SpanRefType_CHILD_OF // FollowsFrom span reference type describes a reference to a "parent" span // that does not depend on the response from the current (child) span FollowsFrom = SpanRefType_FOLLOWS_FROM )
const (
// JaegerDependencyLinkSource describes a dependency diagram that was generated from Jaeger traces.
JaegerDependencyLinkSource = "jaeger"
)
Variables ¶
var ( ErrInvalidLengthModel = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowModel = fmt.Errorf("proto: integer overflow") )
var SpanRefType_name = map[int32]string{
0: "CHILD_OF",
1: "FOLLOWS_FROM",
}
var SpanRefType_value = map[string]int32{
"CHILD_OF": 0,
"FOLLOWS_FROM": 1,
}
var ValueType_name = map[int32]string{
0: "STRING",
1: "BOOL",
2: "INT64",
3: "FLOAT64",
4: "BINARY",
}
var ValueType_value = map[string]int32{
"STRING": 0,
"BOOL": 1,
"INT64": 2,
"FLOAT64": 3,
"BINARY": 4,
}
Functions ¶
func DurationAsMicroseconds ¶
DurationAsMicroseconds converts time.Duration to microseconds, which is the format the Duration field is stored in the Span.
func EpochMicrosecondsAsTime ¶
EpochMicrosecondsAsTime converts microseconds since epoch to time.Time value.
func MicrosecondsAsDuration ¶
MicrosecondsAsDuration converts duration in microseconds to time.Duration value.
func SortSpan ¶ added in v0.5.2
func SortSpan(span *Span)
SortSpan deep sorts a span: this sorts its tags, logs by timestamp, tags in logs, and tags in process.
func SortTrace ¶ added in v0.5.2
func SortTrace(trace *Trace)
SortTrace deep sorts a trace's spans by SpanID.
func SortTraceIDs ¶ added in v1.12.0
func SortTraceIDs(traceIDs []*TraceID)
SortTraceIDs sorts a list of TraceIDs
func SortTraces ¶ added in v0.5.2
func SortTraces(traces []*Trace)
SortTraces deep sorts a list of traces by TraceID.
func TimeAsEpochMicroseconds ¶
TimeAsEpochMicroseconds converts time.Time to microseconds since epoch, which is the format the StartTime field is stored in the Span.
Types ¶
type Batch ¶ added in v1.6.0
type Batch struct { Spans []*Span `protobuf:"bytes,1,rep,name=spans,proto3" json:"spans,omitempty"` Process *Process `protobuf:"bytes,2,opt,name=process,proto3" json:"process,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Note that both Span and Batch may contain a Process. This is different from the Thrift model which was only used for transport, because Proto model is also used by the backend as the domain model, where once a batch is received it is split into individual spans which are all processed independently, and therefore they all need a Process. As far as on-the-wire semantics, both Batch and Spans in the same message may contain their own instances of Process, with span.Process taking priority over batch.Process.
func (*Batch) Descriptor ¶ added in v1.6.0
func (*Batch) GetProcess ¶ added in v1.6.0
func (*Batch) ProtoMessage ¶ added in v1.6.0
func (*Batch) ProtoMessage()
func (*Batch) XXX_DiscardUnknown ¶ added in v1.12.0
func (m *Batch) XXX_DiscardUnknown()
func (*Batch) XXX_Marshal ¶ added in v1.12.0
func (*Batch) XXX_Unmarshal ¶ added in v1.12.0
type DependencyLink ¶
type DependencyLink struct { Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` Child string `protobuf:"bytes,2,opt,name=child,proto3" json:"child,omitempty"` CallCount uint64 `protobuf:"varint,3,opt,name=call_count,json=callCount,proto3" json:"call_count,omitempty"` Source string `protobuf:"bytes,4,opt,name=source,proto3" json:"source,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (DependencyLink) ApplyDefaults ¶ added in v1.10.0
func (d DependencyLink) ApplyDefaults() DependencyLink
ApplyDefaults applies defaults to the DependencyLink.
func (*DependencyLink) Descriptor ¶ added in v1.12.0
func (*DependencyLink) Descriptor() ([]byte, []int)
func (*DependencyLink) GetCallCount ¶ added in v1.12.0
func (m *DependencyLink) GetCallCount() uint64
func (*DependencyLink) GetChild ¶ added in v1.12.0
func (m *DependencyLink) GetChild() string
func (*DependencyLink) GetParent ¶ added in v1.12.0
func (m *DependencyLink) GetParent() string
func (*DependencyLink) GetSource ¶ added in v1.12.0
func (m *DependencyLink) GetSource() string
func (*DependencyLink) Marshal ¶ added in v1.12.0
func (m *DependencyLink) Marshal() (dAtA []byte, err error)
func (*DependencyLink) MarshalTo ¶ added in v1.12.0
func (m *DependencyLink) MarshalTo(dAtA []byte) (int, error)
func (*DependencyLink) ProtoMessage ¶ added in v1.12.0
func (*DependencyLink) ProtoMessage()
func (*DependencyLink) Reset ¶ added in v1.12.0
func (m *DependencyLink) Reset()
func (*DependencyLink) Size ¶ added in v1.12.0
func (m *DependencyLink) Size() (n int)
func (*DependencyLink) String ¶ added in v1.12.0
func (m *DependencyLink) String() string
func (*DependencyLink) Unmarshal ¶ added in v1.12.0
func (m *DependencyLink) Unmarshal(dAtA []byte) error
func (*DependencyLink) XXX_DiscardUnknown ¶ added in v1.12.0
func (m *DependencyLink) XXX_DiscardUnknown()
func (*DependencyLink) XXX_Marshal ¶ added in v1.12.0
func (m *DependencyLink) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DependencyLink) XXX_Merge ¶ added in v1.12.0
func (m *DependencyLink) XXX_Merge(src proto.Message)
func (*DependencyLink) XXX_Size ¶ added in v1.12.0
func (m *DependencyLink) XXX_Size() int
func (*DependencyLink) XXX_Unmarshal ¶ added in v1.12.0
func (m *DependencyLink) XXX_Unmarshal(b []byte) error
type Flags ¶
type Flags uint32
Flags is a bit map of flags for a span
func (Flags) IsDebug ¶
IsDebug returns true if the Flags denote debugging Debugging can be useful in testing tracing availability or correctness
func (Flags) IsFirehoseEnabled ¶ added in v1.14.0
IsFirehoseEnabled returns true if firehose is enabled Firehose is used to decide whether to index a span or not
func (*Flags) SetFirehose ¶ added in v1.14.0
func (f *Flags) SetFirehose()
SetFirehose set the Flags as firehose enabled
type Hashable ¶
Hashable interface is for type that can participate in a hash computation by writing their data into io.Writer, which is usually an instance of hash.Hash.
type KeyValue ¶
type KeyValue struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` VType ValueType `protobuf:"varint,2,opt,name=v_type,json=vType,proto3,enum=jaeger.api_v2.ValueType" json:"v_type,omitempty"` VStr string `protobuf:"bytes,3,opt,name=v_str,json=vStr,proto3" json:"v_str,omitempty"` VBool bool `protobuf:"varint,4,opt,name=v_bool,json=vBool,proto3" json:"v_bool,omitempty"` VInt64 int64 `protobuf:"varint,5,opt,name=v_int64,json=vInt64,proto3" json:"v_int64,omitempty"` VFloat64 float64 `protobuf:"fixed64,6,opt,name=v_float64,json=vFloat64,proto3" json:"v_float64,omitempty"` VBinary []byte `protobuf:"bytes,7,opt,name=v_binary,json=vBinary,proto3" json:"v_binary,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*KeyValue) AsStringLossy ¶ added in v1.16.0
AsStringLossy returns a potentially lossy string representation of the value.
func (*KeyValue) Binary ¶
Binary returns the blob ([]byte) value stored in this KeyValue or nil if it stores a different type. The caller must check VType before using this method.
func (*KeyValue) Bool ¶
Bool returns the Boolean value stored in this KeyValue or false if it stores a different type. The caller must check VType before using this method.
func (*KeyValue) Descriptor ¶ added in v1.6.0
func (*KeyValue) Float64 ¶
Float64 returns the Float64 value stored in this KeyValue or 0 if it stores a different type. The caller must check VType before using this method.
func (*KeyValue) GetVBinary ¶ added in v1.6.0
func (*KeyValue) GetVFloat64 ¶ added in v1.6.0
func (*KeyValue) Int64 ¶
Int64 returns the Int64 value stored in this KeyValue or 0 if it stores a different type. The caller must check VType before using this method.
func (*KeyValue) IsLess ¶
IsLess compares KeyValue object with another KeyValue. The order is based first on the keys, then on type, and finally on the value.
func (*KeyValue) ProtoMessage ¶ added in v1.6.0
func (*KeyValue) ProtoMessage()
func (*KeyValue) Value ¶
func (kv *KeyValue) Value() interface{}
Value returns typed values stored in KeyValue as interface{}.
func (*KeyValue) XXX_DiscardUnknown ¶ added in v1.12.0
func (m *KeyValue) XXX_DiscardUnknown()
func (*KeyValue) XXX_Marshal ¶ added in v1.12.0
func (*KeyValue) XXX_Unmarshal ¶ added in v1.12.0
type KeyValues ¶
type KeyValues []KeyValue
KeyValues is a type alias that exposes convenience functions like Sort, FindByKey.
func (KeyValues) Equal ¶
Equal compares KeyValues with another list. Both lists must be already sorted.
func (KeyValues) FindByKey ¶
FindByKey scans the list of key-values searching for the first one with the given key. Returns found tag and a boolean flag indicating if the search was successful.
type Log ¶
type Log struct { Timestamp time.Time `protobuf:"bytes,1,opt,name=timestamp,proto3,stdtime" json:"timestamp"` Fields []KeyValue `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Log) Descriptor ¶ added in v1.6.0
func (*Log) GetTimestamp ¶ added in v1.6.0
func (*Log) ProtoMessage ¶ added in v1.6.0
func (*Log) ProtoMessage()
func (*Log) XXX_DiscardUnknown ¶ added in v1.12.0
func (m *Log) XXX_DiscardUnknown()
func (*Log) XXX_Marshal ¶ added in v1.12.0
func (*Log) XXX_Unmarshal ¶ added in v1.12.0
type Process ¶
type Process struct { ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` Tags []KeyValue `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func NewProcess ¶
NewProcess creates a new Process for given serviceName and tags. The tags are sorted in place and kept in the same array/slice, in order to store the Process in a canonical form that is relied upon by the Equal and Hash functions.
func (*Process) Descriptor ¶ added in v1.6.0
func (*Process) GetServiceName ¶ added in v1.6.0
func (*Process) ProtoMessage ¶ added in v1.6.0
func (*Process) ProtoMessage()
func (*Process) XXX_DiscardUnknown ¶ added in v1.12.0
func (m *Process) XXX_DiscardUnknown()
func (*Process) XXX_Marshal ¶ added in v1.12.0
func (*Process) XXX_Unmarshal ¶ added in v1.12.0
type Span ¶
type Span struct { TraceID TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=TraceID" json:"trace_id"` SpanID SpanID `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3,customtype=SpanID" json:"span_id"` OperationName string `protobuf:"bytes,3,opt,name=operation_name,json=operationName,proto3" json:"operation_name,omitempty"` References []SpanRef `protobuf:"bytes,4,rep,name=references,proto3" json:"references"` Flags Flags `protobuf:"varint,5,opt,name=flags,proto3,customtype=Flags" json:"flags"` StartTime time.Time `protobuf:"bytes,6,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time"` Duration time.Duration `protobuf:"bytes,7,opt,name=duration,proto3,stdduration" json:"duration"` Tags []KeyValue `protobuf:"bytes,8,rep,name=tags,proto3" json:"tags"` Logs []Log `protobuf:"bytes,9,rep,name=logs,proto3" json:"logs"` Process *Process `protobuf:"bytes,10,opt,name=process,proto3" json:"process,omitempty"` ProcessID string `protobuf:"bytes,11,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"` Warnings []string `protobuf:"bytes,12,rep,name=warnings,proto3" json:"warnings,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Span) Descriptor ¶ added in v1.6.0
func (*Span) GetDuration ¶ added in v1.6.0
func (*Span) GetOperationName ¶ added in v1.6.0
func (*Span) GetProcess ¶ added in v1.6.0
func (*Span) GetProcessID ¶ added in v1.6.0
func (*Span) GetReferences ¶ added in v1.6.0
func (*Span) GetSamplerType ¶ added in v1.13.0
GetSamplerType returns the sampler type for span
func (*Span) GetSpanKind ¶ added in v1.16.0
GetSpanKind returns value of `span.kind` tag and whether the tag can be found
func (*Span) GetStartTime ¶ added in v1.6.0
func (*Span) GetWarnings ¶ added in v1.6.0
func (*Span) HasSpanKind ¶
func (s *Span) HasSpanKind(kind ext.SpanKindEnum) bool
HasSpanKind returns true if the span has a `span.kind` tag set to `kind`.
func (*Span) IsRPCClient ¶
IsRPCClient returns true if the span represents a client side of an RPC, as indicated by the `span.kind` tag set to `client`.
func (*Span) IsRPCServer ¶
IsRPCServer returns true if the span represents a server side of an RPC, as indicated by the `span.kind` tag set to `server`.
func (*Span) NormalizeTimestamps ¶
func (s *Span) NormalizeTimestamps()
NormalizeTimestamps changes all timestamps in this span to UTC.
func (*Span) ParentSpanID ¶
ParentSpanID returns ID of a parent span if it exists. It searches for the first child-of reference pointing to the same trace ID.
func (*Span) ProtoMessage ¶ added in v1.6.0
func (*Span) ProtoMessage()
func (*Span) ReplaceParentID ¶ added in v1.5.0
ReplaceParentID replaces span ID in the parent span reference. See also ParentSpanID.
func (*Span) XXX_DiscardUnknown ¶ added in v1.12.0
func (m *Span) XXX_DiscardUnknown()
func (*Span) XXX_Marshal ¶ added in v1.12.0
func (*Span) XXX_Unmarshal ¶ added in v1.12.0
type SpanID ¶
type SpanID uint64
SpanID is a random 64bit identifier for a span
func SpanIDFromBytes ¶ added in v1.14.0
SpanIDFromBytes creates a SpandID from list of bytes
func SpanIDFromString ¶
SpanIDFromString creates a SpanID from a hexadecimal string
func (SpanID) MarshalJSON ¶ added in v1.6.0
MarshalJSON converts span id into a base64 string enclosed in quotes. Used by protobuf JSON serialization. Example: {1} => "AAAAAAAAAAE=".
func (SpanID) MarshalText ¶
MarshalText is called by encoding/json, which we do not want people to use.
func (*SpanID) MarshalTo ¶ added in v1.6.0
MarshalTo converts span ID into a binary representation. Called by protobuf serialization.
func (*SpanID) Size ¶ added in v1.6.0
Size returns the size of this datum in protobuf. It is always 8 bytes.
func (*SpanID) Unmarshal ¶ added in v1.6.0
Unmarshal inflates span ID from a binary representation. Called by protobuf serialization.
func (*SpanID) UnmarshalJSON ¶ added in v1.6.0
UnmarshalJSON inflates span id from base64 string, possibly enclosed in quotes. User by protobuf JSON serialization.
There appears to be a bug in gogoproto, as this function is only called for numeric values. https://github.com/gogo/protobuf/issues/411#issuecomment-393856837
func (*SpanID) UnmarshalJSONPB ¶ added in v1.6.0
func (s *SpanID) UnmarshalJSONPB(_ *jsonpb.Unmarshaler, b []byte) error
UnmarshalJSONPB inflates span id from base64 string, possibly enclosed in quotes. User by protobuf JSON serialization.
TODO: can be removed once this ticket is fixed:
https://github.com/gogo/protobuf/issues/411#issuecomment-393856837
func (*SpanID) UnmarshalText ¶
UnmarshalText is called by encoding/json, which we do not want people to use.
type SpanRef ¶
type SpanRef struct { TraceID TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=TraceID" json:"trace_id"` SpanID SpanID `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3,customtype=SpanID" json:"span_id"` RefType SpanRefType `protobuf:"varint,3,opt,name=ref_type,json=refType,proto3,enum=jaeger.api_v2.SpanRefType" json:"ref_type,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func MaybeAddParentSpanID ¶ added in v1.5.0
MaybeAddParentSpanID adds non-zero parentSpanID to refs as a child-of reference. We no longer store ParentSpanID in the domain model, but the data in the database or other formats might still have these IDs without representing them in the References, so this converts parent IDs to canonical reference format.
func NewChildOfRef ¶ added in v1.5.0
NewChildOfRef creates a new child-of span reference.
func NewFollowsFromRef ¶ added in v1.5.0
NewFollowsFromRef creates a new follows-from span reference.
func (*SpanRef) Descriptor ¶ added in v1.6.0
func (*SpanRef) GetRefType ¶ added in v1.6.0
func (m *SpanRef) GetRefType() SpanRefType
func (*SpanRef) ProtoMessage ¶ added in v1.6.0
func (*SpanRef) ProtoMessage()
func (*SpanRef) XXX_DiscardUnknown ¶ added in v1.12.0
func (m *SpanRef) XXX_DiscardUnknown()
func (*SpanRef) XXX_Marshal ¶ added in v1.12.0
func (*SpanRef) XXX_Unmarshal ¶ added in v1.12.0
type SpanRefType ¶
type SpanRefType int32
const ( SpanRefType_CHILD_OF SpanRefType = 0 SpanRefType_FOLLOWS_FROM SpanRefType = 1 )
func (SpanRefType) EnumDescriptor ¶ added in v1.6.0
func (SpanRefType) EnumDescriptor() ([]byte, []int)
func (SpanRefType) String ¶
func (x SpanRefType) String() string
type Trace ¶
type Trace struct { Spans []*Span `protobuf:"bytes,1,rep,name=spans,proto3" json:"spans,omitempty"` ProcessMap []Trace_ProcessMapping `protobuf:"bytes,2,rep,name=process_map,json=processMap,proto3" json:"process_map"` Warnings []string `protobuf:"bytes,3,rep,name=warnings,proto3" json:"warnings,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Trace) Descriptor ¶ added in v1.6.0
func (*Trace) FindSpanByID ¶
FindSpanByID looks for a span with given span ID and returns the first one it finds (search order is unspecified), or nil if no spans have that ID.
func (*Trace) GetProcessMap ¶ added in v1.6.0
func (m *Trace) GetProcessMap() []Trace_ProcessMapping
func (*Trace) GetWarnings ¶ added in v1.6.0
func (*Trace) NormalizeTimestamps ¶
func (t *Trace) NormalizeTimestamps()
NormalizeTimestamps changes all timestamps in this trace to UTC.
func (*Trace) ProtoMessage ¶ added in v1.6.0
func (*Trace) ProtoMessage()
func (*Trace) XXX_DiscardUnknown ¶ added in v1.12.0
func (m *Trace) XXX_DiscardUnknown()
func (*Trace) XXX_Marshal ¶ added in v1.12.0
func (*Trace) XXX_Unmarshal ¶ added in v1.12.0
type TraceID ¶
TraceID is a random 128bit identifier for a trace
func NewTraceID ¶ added in v1.6.0
NewTraceID creates a new TraceID from two 64bit unsigned ints.
func TraceIDFromBytes ¶ added in v1.14.0
TraceIDFromBytes creates a TraceID from list of bytes
func TraceIDFromString ¶
TraceIDFromString creates a TraceID from a hexadecimal string
func (TraceID) MarshalJSON ¶ added in v1.6.0
MarshalJSON converts trace id into a base64 string enclosed in quotes. Used by protobuf JSON serialization. Example: {high:2, low:1} => "AAAAAAAAAAIAAAAAAAAAAQ==".
func (TraceID) MarshalText ¶
MarshalText is called by encoding/json, which we do not want people to use.
func (*TraceID) MarshalTo ¶ added in v1.6.0
MarshalTo converts trace ID into a binary representation. Called by protobuf serialization.
func (*TraceID) Size ¶ added in v1.6.0
Size returns the size of this datum in protobuf. It is always 16 bytes.
func (*TraceID) Unmarshal ¶ added in v1.6.0
Unmarshal inflates this trace ID from binary representation. Called by protobuf serialization.
func (*TraceID) UnmarshalJSON ¶ added in v1.6.0
UnmarshalJSON inflates trace id from base64 string, possibly enclosed in quotes. User by protobuf JSON serialization.
func (*TraceID) UnmarshalText ¶
UnmarshalText is called by encoding/json, which we do not want people to use.
type Trace_ProcessMapping ¶ added in v1.6.0
type Trace_ProcessMapping struct { ProcessID string `protobuf:"bytes,1,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"` Process Process `protobuf:"bytes,2,opt,name=process,proto3" json:"process"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Trace_ProcessMapping) Descriptor ¶ added in v1.6.0
func (*Trace_ProcessMapping) Descriptor() ([]byte, []int)
func (*Trace_ProcessMapping) GetProcess ¶ added in v1.6.0
func (m *Trace_ProcessMapping) GetProcess() Process
func (*Trace_ProcessMapping) GetProcessID ¶ added in v1.6.0
func (m *Trace_ProcessMapping) GetProcessID() string
func (*Trace_ProcessMapping) Marshal ¶ added in v1.6.0
func (m *Trace_ProcessMapping) Marshal() (dAtA []byte, err error)
func (*Trace_ProcessMapping) MarshalTo ¶ added in v1.6.0
func (m *Trace_ProcessMapping) MarshalTo(dAtA []byte) (int, error)
func (*Trace_ProcessMapping) ProtoMessage ¶ added in v1.6.0
func (*Trace_ProcessMapping) ProtoMessage()
func (*Trace_ProcessMapping) Reset ¶ added in v1.6.0
func (m *Trace_ProcessMapping) Reset()
func (*Trace_ProcessMapping) Size ¶ added in v1.6.0
func (m *Trace_ProcessMapping) Size() (n int)
func (*Trace_ProcessMapping) String ¶ added in v1.6.0
func (m *Trace_ProcessMapping) String() string
func (*Trace_ProcessMapping) Unmarshal ¶ added in v1.6.0
func (m *Trace_ProcessMapping) Unmarshal(dAtA []byte) error
func (*Trace_ProcessMapping) XXX_DiscardUnknown ¶ added in v1.12.0
func (m *Trace_ProcessMapping) XXX_DiscardUnknown()
func (*Trace_ProcessMapping) XXX_Marshal ¶ added in v1.12.0
func (m *Trace_ProcessMapping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Trace_ProcessMapping) XXX_Merge ¶ added in v1.12.0
func (m *Trace_ProcessMapping) XXX_Merge(src proto.Message)
func (*Trace_ProcessMapping) XXX_Size ¶ added in v1.12.0
func (m *Trace_ProcessMapping) XXX_Size() int
func (*Trace_ProcessMapping) XXX_Unmarshal ¶ added in v1.12.0
func (m *Trace_ProcessMapping) XXX_Unmarshal(b []byte) error
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package adjuster contains various adjusters for model.Trace.
|
Package adjuster contains various adjusters for model.Trace. |
Package converter contains various utilities for converting model.Trace to/from other data modes, like Thrift, or UI JSON.
|
Package converter contains various utilities for converting model.Trace to/from other data modes, like Thrift, or UI JSON. |
json
Package json allows converting model.Trace to external JSON data model.
|
Package json allows converting model.Trace to external JSON data model. |
thrift
Package thrift allows converting model.Trace to/from various thrift models.
|
Package thrift allows converting model.Trace to/from various thrift models. |
thrift/jaeger
Package jaeger allows converting model.Trace to/from jaeger.thrift model.
|
Package jaeger allows converting model.Trace to/from jaeger.thrift model. |
thrift/zipkin
Package zipkin allows converting model.Trace to/from zipkin.thrift model.
|
Package zipkin allows converting model.Trace to/from zipkin.thrift model. |
Package json defines the external JSON representation for Jaeger traces.
|
Package json defines the external JSON representation for Jaeger traces. |