Documentation ¶
Overview ¶
Package pb contains the data structures used by the trace agent to communicate with tracers and the Datadog API. Note that the "//go:generate" directives from this package were removed because the generated files were manually edited to create adaptions (see decoder.go).
TODO: eventually move this to https://github.com/DataDog/agent-payload
Index ¶
- Variables
- func FreeMsgpReader(r *msgp.Reader)
- func NewMsgpReader(r io.Reader) *msgp.Reader
- type APITrace
- func (*APITrace) Descriptor() ([]byte, []int)
- func (m *APITrace) GetSpans() []*Span
- func (m *APITrace) Marshal() (data []byte, err error)
- func (m *APITrace) MarshalTo(data []byte) (int, error)
- func (*APITrace) ProtoMessage()
- func (m *APITrace) Reset()
- func (m *APITrace) Size() (n int)
- func (m *APITrace) String() string
- func (m *APITrace) Unmarshal(data []byte) error
- type Span
- func (z *Span) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *Span) DecodeMsgDictionary(dc *msgp.Reader, dict []string) error
- func (*Span) Descriptor() ([]byte, []int)
- func (z *Span) EncodeMsg(en *msgp.Writer) (err error)
- func (m *Span) GetMeta() map[string]string
- func (m *Span) GetMetrics() map[string]float64
- func (m *Span) Marshal() (data []byte, err error)
- func (m *Span) MarshalTo(data []byte) (int, error)
- func (z *Span) Msgsize() (s int)
- func (*Span) ProtoMessage()
- func (m *Span) Reset()
- func (m *Span) Size() (n int)
- func (m *Span) String() string
- func (m *Span) Unmarshal(data []byte) error
- type Trace
- type TracePayload
- func (*TracePayload) Descriptor() ([]byte, []int)
- func (m *TracePayload) GetTraces() []*APITrace
- func (m *TracePayload) GetTransactions() []*Span
- func (m *TracePayload) Marshal() (data []byte, err error)
- func (m *TracePayload) MarshalTo(data []byte) (int, error)
- func (*TracePayload) ProtoMessage()
- func (m *TracePayload) Reset()
- func (m *TracePayload) Size() (n int)
- func (m *TracePayload) String() string
- func (m *TracePayload) Unmarshal(data []byte) error
- type Traces
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthSpan = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSpan = fmt.Errorf("proto: integer overflow") )
var ( ErrInvalidLengthTrace = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTrace = fmt.Errorf("proto: integer overflow") )
var ( ErrInvalidLengthTracePayload = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTracePayload = fmt.Errorf("proto: integer overflow") )
Functions ¶
Types ¶
type APITrace ¶
type APITrace struct { TraceID uint64 `protobuf:"varint,1,opt,name=traceID,proto3" json:"traceID,omitempty"` Spans []*Span `protobuf:"bytes,2,rep,name=spans" json:"spans,omitempty"` StartTime int64 `protobuf:"varint,6,opt,name=startTime,proto3" json:"startTime,omitempty"` EndTime int64 `protobuf:"varint,7,opt,name=endTime,proto3" json:"endTime,omitempty"` }
func (*APITrace) Descriptor ¶
func (*APITrace) ProtoMessage ¶
func (*APITrace) ProtoMessage()
type Span ¶
type Span struct { Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service" msg:"service"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name" msg:"name"` Resource string `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource" msg:"resource"` TraceID uint64 `protobuf:"varint,4,opt,name=traceID,proto3" json:"trace_id" msg:"trace_id"` SpanID uint64 `protobuf:"varint,5,opt,name=spanID,proto3" json:"span_id" msg:"span_id"` ParentID uint64 `protobuf:"varint,6,opt,name=parentID,proto3" json:"parent_id" msg:"parent_id"` Start int64 `protobuf:"varint,7,opt,name=start,proto3" json:"start" msg:"start"` Duration int64 `protobuf:"varint,8,opt,name=duration,proto3" json:"duration" msg:"duration"` Error int32 `protobuf:"varint,9,opt,name=error,proto3" json:"error" msg:"error"` Meta map[string]string `` /* 144-byte string literal not displayed */ Metrics map[string]float64 `` /* 155-byte string literal not displayed */ Type string `protobuf:"bytes,12,opt,name=type,proto3" json:"type" msg:"type"` }
Span specifies the common Datadog API and trace agent span.
func (*Span) DecodeMsgDictionary ¶
DecodeMsgDictionary decodes a span from the given decoder dc, looking up strings in the given dictionary dict. For details, see the documentation for endpoint v0.5 in pkg/trace/api/version.go
func (*Span) Descriptor ¶
func (*Span) GetMetrics ¶
func (*Span) Msgsize ¶
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*Span) ProtoMessage ¶
func (*Span) ProtoMessage()
type Trace ¶
type Trace []*Span
Trace is a collection of spans with the same trace ID
type TracePayload ¶
type TracePayload struct { HostName string `protobuf:"bytes,1,opt,name=hostName,proto3" json:"hostName,omitempty"` Env string `protobuf:"bytes,2,opt,name=env,proto3" json:"env,omitempty"` Traces []*APITrace `protobuf:"bytes,3,rep,name=traces" json:"traces,omitempty"` Transactions []*Span `protobuf:"bytes,4,rep,name=transactions" json:"transactions,omitempty"` }
func (*TracePayload) Descriptor ¶
func (*TracePayload) Descriptor() ([]byte, []int)
func (*TracePayload) GetTraces ¶
func (m *TracePayload) GetTraces() []*APITrace
func (*TracePayload) GetTransactions ¶
func (m *TracePayload) GetTransactions() []*Span
func (*TracePayload) Marshal ¶
func (m *TracePayload) Marshal() (data []byte, err error)
func (*TracePayload) ProtoMessage ¶
func (*TracePayload) ProtoMessage()
func (*TracePayload) Reset ¶
func (m *TracePayload) Reset()
func (*TracePayload) Size ¶
func (m *TracePayload) Size() (n int)
func (*TracePayload) String ¶
func (m *TracePayload) String() string
func (*TracePayload) Unmarshal ¶
func (m *TracePayload) Unmarshal(data []byte) error
type Traces ¶
type Traces []Trace
Traces is a list of traces. This model matters as this is what we unpack from msgp.
func (*Traces) DecodeMsgDictionary ¶
DecodeMsgDictionary decodes a trace using the specification from the v0.5 endpoint. For details, see the documentation for endpoint v0.5 in pkg/trace/api/version.go