model

package
v1.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2018 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package model describes the internal data model for Trace and Span

Package model is a generated protocol buffer package.

It is generated from these files:
	model.proto

It has these top-level messages:
	KeyValue
	Log
	SpanRef
	Process
	Span
	Trace
	Batch
	PostSpansRequest
	PostSpansResponse
	GetTraceRequest
	GetTraceResponse

Package model is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
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.

View Source
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)
)
View Source
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
)

Variables

View Source
var (
	ErrInvalidLengthModel = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowModel   = fmt.Errorf("proto: integer overflow")
)
View Source
var SpanRefType_name = map[int32]string{
	0: "CHILD_OF",
	1: "FOLLOWS_FROM",
}
View Source
var SpanRefType_value = map[string]int32{
	"CHILD_OF":     0,
	"FOLLOWS_FROM": 1,
}
View Source
var ValueType_name = map[int32]string{
	0: "STRING",
	1: "BOOL",
	2: "INT64",
	3: "FLOAT64",
	4: "BINARY",
}
View Source
var ValueType_value = map[string]int32{
	"STRING":  0,
	"BOOL":    1,
	"INT64":   2,
	"FLOAT64": 3,
	"BINARY":  4,
}

Functions

func DurationAsMicroseconds

func DurationAsMicroseconds(d time.Duration) uint64

DurationAsMicroseconds converts time.Duration to microseconds, which is the format the Duration field is stored in the Span.

func EpochMicrosecondsAsTime

func EpochMicrosecondsAsTime(ts uint64) time.Time

EpochMicrosecondsAsTime converts microseconds since epoch to time.Time value.

func HashCode

func HashCode(o Hashable) (uint64, error)

HashCode calcualtes a FNV-1a hash code for a Hashable object.

func MicrosecondsAsDuration

func MicrosecondsAsDuration(v uint64) time.Duration

MicrosecondsAsDuration converts duration in microseconds to time.Duration value.

func RegisterCollectorServiceV2Handler added in v1.6.0

func RegisterCollectorServiceV2Handler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterCollectorServiceV2Handler registers the http handlers for service CollectorServiceV2 to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterCollectorServiceV2HandlerClient added in v1.6.0

func RegisterCollectorServiceV2HandlerClient(ctx context.Context, mux *runtime.ServeMux, client CollectorServiceV2Client) error

RegisterCollectorServiceV2Handler registers the http handlers for service CollectorServiceV2 to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CollectorServiceV2Client". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CollectorServiceV2Client" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CollectorServiceV2Client" to call the correct interceptors.

func RegisterCollectorServiceV2HandlerFromEndpoint added in v1.6.0

func RegisterCollectorServiceV2HandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterCollectorServiceV2HandlerFromEndpoint is same as RegisterCollectorServiceV2Handler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterCollectorServiceV2Server added in v1.6.0

func RegisterCollectorServiceV2Server(s *grpc.Server, srv CollectorServiceV2Server)

func RegisterQueryServiceV2Handler added in v1.6.0

func RegisterQueryServiceV2Handler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryServiceV2Handler registers the http handlers for service QueryServiceV2 to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryServiceV2HandlerClient added in v1.6.0

func RegisterQueryServiceV2HandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryServiceV2Client) error

RegisterQueryServiceV2Handler registers the http handlers for service QueryServiceV2 to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryServiceV2Client". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryServiceV2Client" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryServiceV2Client" to call the correct interceptors.

func RegisterQueryServiceV2HandlerFromEndpoint added in v1.6.0

func RegisterQueryServiceV2HandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryServiceV2HandlerFromEndpoint is same as RegisterQueryServiceV2Handler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryServiceV2Server added in v1.6.0

func RegisterQueryServiceV2Server(s *grpc.Server, srv QueryServiceV2Server)

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 SortTraces added in v0.5.2

func SortTraces(traces []*Trace)

SortTraces deep sorts a list of traces by TraceID.

func TimeAsEpochMicroseconds

func TimeAsEpochMicroseconds(t time.Time) uint64

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" json:"spans,omitempty"`
	Process Process `protobuf:"bytes,2,opt,name=process" json:"process"`
}

func (*Batch) Descriptor added in v1.6.0

func (*Batch) Descriptor() ([]byte, []int)

func (*Batch) GetProcess added in v1.6.0

func (m *Batch) GetProcess() Process

func (*Batch) GetSpans added in v1.6.0

func (m *Batch) GetSpans() []*Span

func (*Batch) Marshal added in v1.6.0

func (m *Batch) Marshal() (dAtA []byte, err error)

func (*Batch) MarshalTo added in v1.6.0

func (m *Batch) MarshalTo(dAtA []byte) (int, error)

func (*Batch) ProtoMessage added in v1.6.0

func (*Batch) ProtoMessage()

func (*Batch) Reset added in v1.6.0

func (m *Batch) Reset()

func (*Batch) Size added in v1.6.0

func (m *Batch) Size() (n int)

func (*Batch) String added in v1.6.0

func (m *Batch) String() string

func (*Batch) Unmarshal added in v1.6.0

func (m *Batch) Unmarshal(dAtA []byte) error

type CollectorServiceV2Client added in v1.6.0

type CollectorServiceV2Client interface {
	PostSpans(ctx context.Context, in *PostSpansRequest, opts ...grpc.CallOption) (*PostSpansResponse, error)
}

func NewCollectorServiceV2Client added in v1.6.0

func NewCollectorServiceV2Client(cc *grpc.ClientConn) CollectorServiceV2Client

type CollectorServiceV2Server added in v1.6.0

type CollectorServiceV2Server interface {
	PostSpans(context.Context, *PostSpansRequest) (*PostSpansResponse, error)
}
type DependencyLink struct {
	Parent    string `json:"parent"`
	Child     string `json:"child"`
	CallCount uint64 `json:"callCount"`
}

DependencyLink shows dependencies between services

type Flags

type Flags uint32

Flags is a bit map of flags for a span

func (Flags) IsDebug

func (f Flags) IsDebug() bool

IsDebug returns true if the Flags denote debugging Debugging can be useful in testing tracing availability or correctness

func (Flags) IsSampled

func (f Flags) IsSampled() bool

IsSampled returns true if the Flags denote sampling

func (*Flags) SetDebug

func (f *Flags) SetDebug()

SetDebug set the Flags as sampled

func (*Flags) SetSampled

func (f *Flags) SetSampled()

SetSampled sets the Flags as sampled

type GetTraceRequest added in v1.6.0

type GetTraceRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}

func (*GetTraceRequest) Descriptor added in v1.6.0

func (*GetTraceRequest) Descriptor() ([]byte, []int)

func (*GetTraceRequest) GetId added in v1.6.0

func (m *GetTraceRequest) GetId() string

func (*GetTraceRequest) Marshal added in v1.6.0

func (m *GetTraceRequest) Marshal() (dAtA []byte, err error)

func (*GetTraceRequest) MarshalTo added in v1.6.0

func (m *GetTraceRequest) MarshalTo(dAtA []byte) (int, error)

func (*GetTraceRequest) ProtoMessage added in v1.6.0

func (*GetTraceRequest) ProtoMessage()

func (*GetTraceRequest) Reset added in v1.6.0

func (m *GetTraceRequest) Reset()

func (*GetTraceRequest) Size added in v1.6.0

func (m *GetTraceRequest) Size() (n int)

func (*GetTraceRequest) String added in v1.6.0

func (m *GetTraceRequest) String() string

func (*GetTraceRequest) Unmarshal added in v1.6.0

func (m *GetTraceRequest) Unmarshal(dAtA []byte) error

type GetTraceResponse added in v1.6.0

type GetTraceResponse struct {
	Trace *Trace `protobuf:"bytes,1,opt,name=trace" json:"trace,omitempty"`
}

func (*GetTraceResponse) Descriptor added in v1.6.0

func (*GetTraceResponse) Descriptor() ([]byte, []int)

func (*GetTraceResponse) GetTrace added in v1.6.0

func (m *GetTraceResponse) GetTrace() *Trace

func (*GetTraceResponse) Marshal added in v1.6.0

func (m *GetTraceResponse) Marshal() (dAtA []byte, err error)

func (*GetTraceResponse) MarshalTo added in v1.6.0

func (m *GetTraceResponse) MarshalTo(dAtA []byte) (int, error)

func (*GetTraceResponse) ProtoMessage added in v1.6.0

func (*GetTraceResponse) ProtoMessage()

func (*GetTraceResponse) Reset added in v1.6.0

func (m *GetTraceResponse) Reset()

func (*GetTraceResponse) Size added in v1.6.0

func (m *GetTraceResponse) Size() (n int)

func (*GetTraceResponse) String added in v1.6.0

func (m *GetTraceResponse) String() string

func (*GetTraceResponse) Unmarshal added in v1.6.0

func (m *GetTraceResponse) Unmarshal(dAtA []byte) error

type Hashable

type Hashable interface {
	Hash(w io.Writer) error
}

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.model.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"`
}

func Binary

func Binary(key string, value []byte) KeyValue

Binary creates a Binary-typed KeyValue

func Bool

func Bool(key string, value bool) KeyValue

Bool creates a Bool-typed KeyValue

func Float64

func Float64(key string, value float64) KeyValue

Float64 creates a Float64-typed KeyValue

func Int64

func Int64(key string, value int64) KeyValue

Int64 creates a Int64-typed KeyValue

func String

func String(key string, value string) KeyValue

String creates a String-typed KeyValue

func (*KeyValue) AsString

func (kv *KeyValue) AsString() string

AsString returns a potentially lossy string representation of the value.

func (*KeyValue) Binary

func (kv *KeyValue) Binary() []byte

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

func (kv *KeyValue) Bool() 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) Compare added in v1.6.0

func (this *KeyValue) Compare(that interface{}) int

func (*KeyValue) Descriptor added in v1.6.0

func (*KeyValue) Descriptor() ([]byte, []int)

func (*KeyValue) Equal

func (this *KeyValue) Equal(that interface{}) bool

func (*KeyValue) Float64

func (kv *KeyValue) Float64() 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) GetKey added in v1.6.0

func (m *KeyValue) GetKey() string

func (*KeyValue) GetVBinary added in v1.6.0

func (m *KeyValue) GetVBinary() []byte

func (*KeyValue) GetVBool added in v1.6.0

func (m *KeyValue) GetVBool() bool

func (*KeyValue) GetVFloat64 added in v1.6.0

func (m *KeyValue) GetVFloat64() float64

func (*KeyValue) GetVInt64 added in v1.6.0

func (m *KeyValue) GetVInt64() int64

func (*KeyValue) GetVStr added in v1.6.0

func (m *KeyValue) GetVStr() string

func (*KeyValue) GetVType added in v1.6.0

func (m *KeyValue) GetVType() ValueType

func (KeyValue) Hash

func (kv KeyValue) Hash(w io.Writer) error

Hash implements Hash from Hashable.

func (*KeyValue) Int64

func (kv *KeyValue) Int64() 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

func (kv *KeyValue) IsLess(two *KeyValue) bool

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) Marshal added in v1.6.0

func (m *KeyValue) Marshal() (dAtA []byte, err error)

func (*KeyValue) MarshalTo added in v1.6.0

func (m *KeyValue) MarshalTo(dAtA []byte) (int, error)

func (*KeyValue) ProtoMessage added in v1.6.0

func (*KeyValue) ProtoMessage()

func (*KeyValue) Reset added in v1.6.0

func (m *KeyValue) Reset()

func (*KeyValue) Size added in v1.6.0

func (m *KeyValue) Size() (n int)

func (*KeyValue) String added in v1.6.0

func (m *KeyValue) String() string

func (*KeyValue) Unmarshal added in v1.6.0

func (m *KeyValue) Unmarshal(dAtA []byte) error

func (*KeyValue) Value

func (kv *KeyValue) Value() interface{}

Value returns typed values stored in KeyValue as interface{}.

type KeyValues

type KeyValues []KeyValue

KeyValues is a type alias that exposes convenience functions like Sort, FindByKey.

func (KeyValues) Equal

func (kvs KeyValues) Equal(other KeyValues) bool

Equal compares KeyValues with another list. Both lists must be already sorted.

func (KeyValues) FindByKey

func (kvs KeyValues) FindByKey(key string) (KeyValue, bool)

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.

func (KeyValues) Hash

func (kvs KeyValues) Hash(w io.Writer) error

Hash implements Hash from Hashable.

func (KeyValues) Len

func (kvs KeyValues) Len() int

func (KeyValues) Less

func (kvs KeyValues) Less(i, j int) bool

func (KeyValues) Sort

func (kvs KeyValues) Sort()

Sort does in-place sorting of KeyValues, then by value type, then by value.

func (KeyValues) Swap

func (kvs KeyValues) Swap(i, j int)

type Log

type Log struct {
	Timestamp time.Time  `protobuf:"bytes,1,opt,name=timestamp,stdtime" json:"timestamp"`
	Fields    []KeyValue `protobuf:"bytes,2,rep,name=fields" json:"fields"`
}

func (*Log) Descriptor added in v1.6.0

func (*Log) Descriptor() ([]byte, []int)

func (*Log) GetFields added in v1.6.0

func (m *Log) GetFields() []KeyValue

func (*Log) GetTimestamp added in v1.6.0

func (m *Log) GetTimestamp() time.Time

func (*Log) Marshal added in v1.6.0

func (m *Log) Marshal() (dAtA []byte, err error)

func (*Log) MarshalTo added in v1.6.0

func (m *Log) MarshalTo(dAtA []byte) (int, error)

func (*Log) ProtoMessage added in v1.6.0

func (*Log) ProtoMessage()

func (*Log) Reset added in v1.6.0

func (m *Log) Reset()

func (*Log) Size added in v1.6.0

func (m *Log) Size() (n int)

func (*Log) String added in v1.6.0

func (m *Log) String() string

func (*Log) Unmarshal added in v1.6.0

func (m *Log) Unmarshal(dAtA []byte) error

type PostSpansRequest added in v1.6.0

type PostSpansRequest struct {
	Batch *Batch `protobuf:"bytes,1,opt,name=batch" json:"batch,omitempty"`
}

func (*PostSpansRequest) Descriptor added in v1.6.0

func (*PostSpansRequest) Descriptor() ([]byte, []int)

func (*PostSpansRequest) GetBatch added in v1.6.0

func (m *PostSpansRequest) GetBatch() *Batch

func (*PostSpansRequest) Marshal added in v1.6.0

func (m *PostSpansRequest) Marshal() (dAtA []byte, err error)

func (*PostSpansRequest) MarshalTo added in v1.6.0

func (m *PostSpansRequest) MarshalTo(dAtA []byte) (int, error)

func (*PostSpansRequest) ProtoMessage added in v1.6.0

func (*PostSpansRequest) ProtoMessage()

func (*PostSpansRequest) Reset added in v1.6.0

func (m *PostSpansRequest) Reset()

func (*PostSpansRequest) Size added in v1.6.0

func (m *PostSpansRequest) Size() (n int)

func (*PostSpansRequest) String added in v1.6.0

func (m *PostSpansRequest) String() string

func (*PostSpansRequest) Unmarshal added in v1.6.0

func (m *PostSpansRequest) Unmarshal(dAtA []byte) error

type PostSpansResponse added in v1.6.0

type PostSpansResponse struct {
	Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
}

func (*PostSpansResponse) Descriptor added in v1.6.0

func (*PostSpansResponse) Descriptor() ([]byte, []int)

func (*PostSpansResponse) GetOk added in v1.6.0

func (m *PostSpansResponse) GetOk() bool

func (*PostSpansResponse) Marshal added in v1.6.0

func (m *PostSpansResponse) Marshal() (dAtA []byte, err error)

func (*PostSpansResponse) MarshalTo added in v1.6.0

func (m *PostSpansResponse) MarshalTo(dAtA []byte) (int, error)

func (*PostSpansResponse) ProtoMessage added in v1.6.0

func (*PostSpansResponse) ProtoMessage()

func (*PostSpansResponse) Reset added in v1.6.0

func (m *PostSpansResponse) Reset()

func (*PostSpansResponse) Size added in v1.6.0

func (m *PostSpansResponse) Size() (n int)

func (*PostSpansResponse) String added in v1.6.0

func (m *PostSpansResponse) String() string

func (*PostSpansResponse) Unmarshal added in v1.6.0

func (m *PostSpansResponse) Unmarshal(dAtA []byte) error

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" json:"tags"`
}

func NewProcess

func NewProcess(serviceName string, tags []KeyValue) *Process

NewProcess creates a new Process for given serviceName and tags. The tags are sorted in place and kept in the 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) Descriptor() ([]byte, []int)

func (*Process) Equal

func (p *Process) Equal(other *Process) bool

Equal compares Process object with another Process.

func (*Process) GetServiceName added in v1.6.0

func (m *Process) GetServiceName() string

func (*Process) GetTags added in v1.6.0

func (m *Process) GetTags() []KeyValue

func (*Process) Hash

func (p *Process) Hash(w io.Writer) (err error)

Hash implements Hash from Hashable.

func (*Process) Marshal added in v1.6.0

func (m *Process) Marshal() (dAtA []byte, err error)

func (*Process) MarshalTo added in v1.6.0

func (m *Process) MarshalTo(dAtA []byte) (int, error)

func (*Process) ProtoMessage added in v1.6.0

func (*Process) ProtoMessage()

func (*Process) Reset added in v1.6.0

func (m *Process) Reset()

func (*Process) Size added in v1.6.0

func (m *Process) Size() (n int)

func (*Process) String added in v1.6.0

func (m *Process) String() string

func (*Process) Unmarshal added in v1.6.0

func (m *Process) Unmarshal(dAtA []byte) error

type QueryServiceV2Client added in v1.6.0

type QueryServiceV2Client interface {
	GetTrace(ctx context.Context, in *GetTraceRequest, opts ...grpc.CallOption) (*GetTraceResponse, error)
}

func NewQueryServiceV2Client added in v1.6.0

func NewQueryServiceV2Client(cc *grpc.ClientConn) QueryServiceV2Client

type QueryServiceV2Server added in v1.6.0

type QueryServiceV2Server interface {
	GetTrace(context.Context, *GetTraceRequest) (*GetTraceResponse, error)
}

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" 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,stdtime" json:"start_time"`
	Duration      time.Duration `protobuf:"bytes,7,opt,name=duration,stdduration" json:"duration"`
	Tags          []KeyValue    `protobuf:"bytes,8,rep,name=tags" json:"tags"`
	Logs          []Log         `protobuf:"bytes,9,rep,name=logs" json:"logs"`
	Process       *Process      `protobuf:"bytes,10,opt,name=process" 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" json:"warnings,omitempty"`
}

func (*Span) Descriptor added in v1.6.0

func (*Span) Descriptor() ([]byte, []int)

func (*Span) GetDuration added in v1.6.0

func (m *Span) GetDuration() time.Duration

func (*Span) GetLogs added in v1.6.0

func (m *Span) GetLogs() []Log

func (*Span) GetOperationName added in v1.6.0

func (m *Span) GetOperationName() string

func (*Span) GetProcess added in v1.6.0

func (m *Span) GetProcess() *Process

func (*Span) GetProcessID added in v1.6.0

func (m *Span) GetProcessID() string

func (*Span) GetReferences added in v1.6.0

func (m *Span) GetReferences() []SpanRef

func (*Span) GetStartTime added in v1.6.0

func (m *Span) GetStartTime() time.Time

func (*Span) GetTags added in v1.6.0

func (m *Span) GetTags() []KeyValue

func (*Span) GetWarnings added in v1.6.0

func (m *Span) GetWarnings() []string

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) Hash

func (s *Span) Hash(w io.Writer) (err error)

Hash implements Hash from Hashable.

func (*Span) IsRPCClient

func (s *Span) IsRPCClient() bool

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

func (s *Span) IsRPCServer() bool

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) Marshal added in v1.6.0

func (m *Span) Marshal() (dAtA []byte, err error)

func (*Span) MarshalTo added in v1.6.0

func (m *Span) MarshalTo(dAtA []byte) (int, error)

func (*Span) NormalizeTimestamps

func (s *Span) NormalizeTimestamps()

NormalizeTimestamps changes all timestamps in this span to UTC.

func (*Span) ParentSpanID

func (s *Span) ParentSpanID() SpanID

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

func (s *Span) ReplaceParentID(newParentID SpanID)

ReplaceParentID replaces span ID in the parent span reference. See also ParentSpanID.

func (*Span) Reset added in v1.6.0

func (m *Span) Reset()

func (*Span) Size added in v1.6.0

func (m *Span) Size() (n int)

func (*Span) String added in v1.6.0

func (m *Span) String() string

func (*Span) Unmarshal added in v1.6.0

func (m *Span) Unmarshal(dAtA []byte) error

type SpanID

type SpanID uint64

SpanID is a random 64bit identifier for a span

func NewSpanID added in v1.6.0

func NewSpanID(v uint64) SpanID

NewSpanID creates a new SpanID from a 64bit unsigned int.

func SpanIDFromString

func SpanIDFromString(s string) (SpanID, error)

SpanIDFromString creates a SpanID from a hexadecimal string

func (SpanID) MarshalJSON added in v1.6.0

func (s SpanID) MarshalJSON() ([]byte, error)

MarshalJSON converts span id into a base64 string enclosed in quotes. Used by protobuf JSON serialization. Example: {1} => "AAAAAAAAAAE=".

func (SpanID) MarshalText

func (s SpanID) MarshalText() ([]byte, error)

MarshalText is called by encoding/json, which we do not want people to use.

func (*SpanID) MarshalTo added in v1.6.0

func (s *SpanID) MarshalTo(data []byte) (n int, err error)

MarshalTo converts span ID into a binary representation. Called by protobuf serialization.

func (*SpanID) Size added in v1.6.0

func (s *SpanID) Size() int

Size returns the size of this datum in protobuf. It is always 8 bytes.

func (SpanID) String

func (s SpanID) String() string

func (*SpanID) Unmarshal added in v1.6.0

func (s *SpanID) Unmarshal(data []byte) error

Unmarshal inflates span ID from a binary representation. Called by protobuf serialization.

func (*SpanID) UnmarshalJSON added in v1.6.0

func (s *SpanID) UnmarshalJSON(data []byte) error

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

func (s *SpanID) UnmarshalText(text []byte) error

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.model.SpanRefType" json:"ref_type,omitempty"`
}

func MaybeAddParentSpanID added in v1.5.0

func MaybeAddParentSpanID(traceID TraceID, parentSpanID SpanID, refs []SpanRef) []SpanRef

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

func NewChildOfRef(traceID TraceID, spanID SpanID) SpanRef

NewChildOfRef creates a new child-of span reference.

func NewFollowsFromRef added in v1.5.0

func NewFollowsFromRef(traceID TraceID, spanID SpanID) SpanRef

NewFollowsFromRef creates a new follows-from span reference.

func (*SpanRef) Descriptor added in v1.6.0

func (*SpanRef) Descriptor() ([]byte, []int)

func (*SpanRef) GetRefType added in v1.6.0

func (m *SpanRef) GetRefType() SpanRefType

func (*SpanRef) Marshal added in v1.6.0

func (m *SpanRef) Marshal() (dAtA []byte, err error)

func (*SpanRef) MarshalTo added in v1.6.0

func (m *SpanRef) MarshalTo(dAtA []byte) (int, error)

func (*SpanRef) ProtoMessage added in v1.6.0

func (*SpanRef) ProtoMessage()

func (*SpanRef) Reset added in v1.6.0

func (m *SpanRef) Reset()

func (*SpanRef) Size added in v1.6.0

func (m *SpanRef) Size() (n int)

func (*SpanRef) String added in v1.6.0

func (m *SpanRef) String() string

func (*SpanRef) Unmarshal added in v1.6.0

func (m *SpanRef) Unmarshal(dAtA []byte) error

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" json:"spans,omitempty"`
	ProcessMap []Trace_ProcessMapping `protobuf:"bytes,2,rep,name=process_map,json=processMap" json:"process_map"`
	Warnings   []string               `protobuf:"bytes,3,rep,name=warnings" json:"warnings,omitempty"`
}

func (*Trace) Descriptor added in v1.6.0

func (*Trace) Descriptor() ([]byte, []int)

func (*Trace) FindSpanByID

func (t *Trace) FindSpanByID(id SpanID) *Span

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) GetSpans added in v1.6.0

func (m *Trace) GetSpans() []*Span

func (*Trace) GetWarnings added in v1.6.0

func (m *Trace) GetWarnings() []string

func (*Trace) Marshal added in v1.6.0

func (m *Trace) Marshal() (dAtA []byte, err error)

func (*Trace) MarshalTo added in v1.6.0

func (m *Trace) MarshalTo(dAtA []byte) (int, error)

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) Reset added in v1.6.0

func (m *Trace) Reset()

func (*Trace) Size added in v1.6.0

func (m *Trace) Size() (n int)

func (*Trace) String added in v1.6.0

func (m *Trace) String() string

func (*Trace) Unmarshal added in v1.6.0

func (m *Trace) Unmarshal(dAtA []byte) error

type TraceID

type TraceID struct {
	Low  uint64 `json:"lo"`
	High uint64 `json:"hi"`
}

TraceID is a random 128bit identifier for a trace

func NewTraceID added in v1.6.0

func NewTraceID(high, low uint64) TraceID

NewTraceID creates a new TraceID from two 64bit unsigned ints.

func TraceIDFromString

func TraceIDFromString(s string) (TraceID, error)

TraceIDFromString creates a TraceID from a hexadecimal string

func (TraceID) MarshalJSON added in v1.6.0

func (t TraceID) MarshalJSON() ([]byte, error)

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

func (t TraceID) MarshalText() ([]byte, error)

MarshalText is called by encoding/json, which we do not want people to use.

func (*TraceID) MarshalTo added in v1.6.0

func (t *TraceID) MarshalTo(data []byte) (n int, err error)

MarshalTo converts trace ID into a binary representation. Called by protobuf serialization.

func (*TraceID) Size added in v1.6.0

func (t *TraceID) Size() int

Size returns the size of this datum in protobuf. It is always 16 bytes.

func (TraceID) String

func (t TraceID) String() string

func (*TraceID) Unmarshal added in v1.6.0

func (t *TraceID) Unmarshal(data []byte) error

Unmarshal inflates this trace ID from binary representation. Called by protobuf serialization.

func (*TraceID) UnmarshalJSON added in v1.6.0

func (t *TraceID) UnmarshalJSON(data []byte) error

UnmarshalJSON inflates trace id from base64 string, possibly enclosed in quotes. User by protobuf JSON serialization.

func (*TraceID) UnmarshalText

func (t *TraceID) UnmarshalText(text []byte) error

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" json:"process"`
}

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

type ValueType

type ValueType int32
const (
	ValueType_STRING  ValueType = 0
	ValueType_BOOL    ValueType = 1
	ValueType_INT64   ValueType = 2
	ValueType_FLOAT64 ValueType = 3
	ValueType_BINARY  ValueType = 4
)

func (ValueType) EnumDescriptor added in v1.6.0

func (ValueType) EnumDescriptor() ([]byte, []int)

func (ValueType) String

func (x ValueType) String() string

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.
Package prototest is a generated protocol buffer package.
Package prototest is a generated protocol buffer package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL