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
Package pb is a generated protocol buffer package. It is generated from these files: stats.proto It has these top-level messages: StatsPayload ClientStatsPayload ClientStatsBucket ClientGroupedStats
Index ¶
- Variables
- 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 ClientGroupedStats
- func (z *ClientGroupedStats) DecodeMsg(dc *msgp.Reader) (err error)
- func (*ClientGroupedStats) Descriptor() ([]byte, []int)
- func (z *ClientGroupedStats) EncodeMsg(en *msgp.Writer) (err error)
- func (m *ClientGroupedStats) Marshal() (data []byte, err error)
- func (z *ClientGroupedStats) MarshalMsg(b []byte) (o []byte, err error)
- func (m *ClientGroupedStats) MarshalTo(data []byte) (int, error)
- func (z *ClientGroupedStats) Msgsize() (s int)
- func (*ClientGroupedStats) ProtoMessage()
- func (m *ClientGroupedStats) Reset()
- func (m *ClientGroupedStats) Size() (n int)
- func (m *ClientGroupedStats) String() string
- func (m *ClientGroupedStats) Unmarshal(data []byte) error
- func (z *ClientGroupedStats) UnmarshalMsg(bts []byte) (o []byte, err error)
- type ClientStatsBucket
- func (z *ClientStatsBucket) DecodeMsg(dc *msgp.Reader) (err error)
- func (*ClientStatsBucket) Descriptor() ([]byte, []int)
- func (z *ClientStatsBucket) EncodeMsg(en *msgp.Writer) (err error)
- func (m *ClientStatsBucket) GetStats() []ClientGroupedStats
- func (m *ClientStatsBucket) Marshal() (data []byte, err error)
- func (z *ClientStatsBucket) MarshalMsg(b []byte) (o []byte, err error)
- func (m *ClientStatsBucket) MarshalTo(data []byte) (int, error)
- func (z *ClientStatsBucket) Msgsize() (s int)
- func (*ClientStatsBucket) ProtoMessage()
- func (m *ClientStatsBucket) Reset()
- func (m *ClientStatsBucket) Size() (n int)
- func (m *ClientStatsBucket) String() string
- func (m *ClientStatsBucket) Unmarshal(data []byte) error
- func (z *ClientStatsBucket) UnmarshalMsg(bts []byte) (o []byte, err error)
- type ClientStatsPayload
- func (z *ClientStatsPayload) DecodeMsg(dc *msgp.Reader) (err error)
- func (*ClientStatsPayload) Descriptor() ([]byte, []int)
- func (z *ClientStatsPayload) EncodeMsg(en *msgp.Writer) (err error)
- func (m *ClientStatsPayload) GetStats() []ClientStatsBucket
- func (m *ClientStatsPayload) Marshal() (data []byte, err error)
- func (z *ClientStatsPayload) MarshalMsg(b []byte) (o []byte, err error)
- func (m *ClientStatsPayload) MarshalTo(data []byte) (int, error)
- func (z *ClientStatsPayload) Msgsize() (s int)
- func (*ClientStatsPayload) ProtoMessage()
- func (m *ClientStatsPayload) Reset()
- func (m *ClientStatsPayload) Size() (n int)
- func (m *ClientStatsPayload) String() string
- func (m *ClientStatsPayload) Unmarshal(data []byte) error
- func (z *ClientStatsPayload) UnmarshalMsg(bts []byte) (o []byte, err error)
- type Span
- func (*Span) Descriptor() ([]byte, []int)
- func (m *Span) GetMeta() map[string]string
- func (m *Span) GetMetrics() map[string]float64
- func (m *Span) Marshal() (data []byte, err error)
- func (z *Span) MarshalMsg(b []byte) (o []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
- func (z *Span) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (z *Span) UnmarshalMsgDictionary(bts []byte, dict []string) ([]byte, error)
- type StatsPayload
- func (z *StatsPayload) DecodeMsg(dc *msgp.Reader) (err error)
- func (*StatsPayload) Descriptor() ([]byte, []int)
- func (z *StatsPayload) EncodeMsg(en *msgp.Writer) (err error)
- func (m *StatsPayload) GetStats() []ClientStatsPayload
- func (m *StatsPayload) Marshal() (data []byte, err error)
- func (z *StatsPayload) MarshalMsg(b []byte) (o []byte, err error)
- func (m *StatsPayload) MarshalTo(data []byte) (int, error)
- func (z *StatsPayload) Msgsize() (s int)
- func (*StatsPayload) ProtoMessage()
- func (m *StatsPayload) Reset()
- func (m *StatsPayload) Size() (n int)
- func (m *StatsPayload) String() string
- func (m *StatsPayload) Unmarshal(data []byte) error
- func (z *StatsPayload) UnmarshalMsg(bts []byte) (o []byte, err 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 ( ErrInvalidLengthStats = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowStats = 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 ¶
This section is empty.
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 ClientGroupedStats ¶
type ClientGroupedStats struct { Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Resource string `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"` HTTPStatusCode uint32 `protobuf:"varint,4,opt,name=HTTP_status_code,json=HTTPStatusCode,proto3" json:"HTTP_status_code,omitempty"` Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"` DBType string `protobuf:"bytes,6,opt,name=DB_type,json=DBType,proto3" json:"DB_type,omitempty"` Hits uint64 `protobuf:"varint,7,opt,name=hits,proto3" json:"hits,omitempty"` Errors uint64 `protobuf:"varint,8,opt,name=errors,proto3" json:"errors,omitempty"` Duration uint64 `protobuf:"varint,9,opt,name=duration,proto3" json:"duration,omitempty"` OkSummary []byte `protobuf:"bytes,10,opt,name=okSummary,proto3" json:"okSummary,omitempty"` ErrorSummary []byte `protobuf:"bytes,11,opt,name=errorSummary,proto3" json:"errorSummary,omitempty"` Synthetics bool `protobuf:"varint,12,opt,name=synthetics,proto3" json:"synthetics,omitempty"` TopLevelHits uint64 `protobuf:"varint,13,opt,name=topLevelHits,proto3" json:"topLevelHits,omitempty"` }
TODO(gbbr): doc
func (*ClientGroupedStats) DecodeMsg ¶
func (z *ClientGroupedStats) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*ClientGroupedStats) Descriptor ¶
func (*ClientGroupedStats) Descriptor() ([]byte, []int)
func (*ClientGroupedStats) EncodeMsg ¶
func (z *ClientGroupedStats) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*ClientGroupedStats) Marshal ¶
func (m *ClientGroupedStats) Marshal() (data []byte, err error)
func (*ClientGroupedStats) MarshalMsg ¶
func (z *ClientGroupedStats) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*ClientGroupedStats) MarshalTo ¶
func (m *ClientGroupedStats) MarshalTo(data []byte) (int, error)
func (*ClientGroupedStats) Msgsize ¶
func (z *ClientGroupedStats) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*ClientGroupedStats) ProtoMessage ¶
func (*ClientGroupedStats) ProtoMessage()
func (*ClientGroupedStats) Reset ¶
func (m *ClientGroupedStats) Reset()
func (*ClientGroupedStats) Size ¶
func (m *ClientGroupedStats) Size() (n int)
func (*ClientGroupedStats) String ¶
func (m *ClientGroupedStats) String() string
func (*ClientGroupedStats) Unmarshal ¶
func (m *ClientGroupedStats) Unmarshal(data []byte) error
func (*ClientGroupedStats) UnmarshalMsg ¶
func (z *ClientGroupedStats) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type ClientStatsBucket ¶
type ClientStatsBucket struct { Start uint64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` Duration uint64 `protobuf:"varint,2,opt,name=duration,proto3" json:"duration,omitempty"` Stats []ClientGroupedStats `protobuf:"bytes,3,rep,name=stats" json:"stats"` }
TODO(gbbr): doc
func (*ClientStatsBucket) DecodeMsg ¶
func (z *ClientStatsBucket) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*ClientStatsBucket) Descriptor ¶
func (*ClientStatsBucket) Descriptor() ([]byte, []int)
func (*ClientStatsBucket) EncodeMsg ¶
func (z *ClientStatsBucket) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*ClientStatsBucket) GetStats ¶
func (m *ClientStatsBucket) GetStats() []ClientGroupedStats
func (*ClientStatsBucket) Marshal ¶
func (m *ClientStatsBucket) Marshal() (data []byte, err error)
func (*ClientStatsBucket) MarshalMsg ¶
func (z *ClientStatsBucket) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*ClientStatsBucket) MarshalTo ¶
func (m *ClientStatsBucket) MarshalTo(data []byte) (int, error)
func (*ClientStatsBucket) Msgsize ¶
func (z *ClientStatsBucket) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*ClientStatsBucket) ProtoMessage ¶
func (*ClientStatsBucket) ProtoMessage()
func (*ClientStatsBucket) Reset ¶
func (m *ClientStatsBucket) Reset()
func (*ClientStatsBucket) Size ¶
func (m *ClientStatsBucket) Size() (n int)
func (*ClientStatsBucket) String ¶
func (m *ClientStatsBucket) String() string
func (*ClientStatsBucket) Unmarshal ¶
func (m *ClientStatsBucket) Unmarshal(data []byte) error
func (*ClientStatsBucket) UnmarshalMsg ¶
func (z *ClientStatsBucket) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type ClientStatsPayload ¶
type ClientStatsPayload 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"` Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` Stats []ClientStatsBucket `protobuf:"bytes,4,rep,name=stats" json:"stats"` Lang string `protobuf:"bytes,5,opt,name=lang,proto3" json:"lang,omitempty"` TracerVersion string `protobuf:"bytes,6,opt,name=tracerVersion,proto3" json:"tracerVersion,omitempty"` RuntimeID string `protobuf:"bytes,7,opt,name=runtimeID,proto3" json:"runtimeID,omitempty"` Sequence uint64 `protobuf:"varint,8,opt,name=sequence,proto3" json:"sequence,omitempty"` }
TODO(gbbr): doc
func (*ClientStatsPayload) DecodeMsg ¶
func (z *ClientStatsPayload) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*ClientStatsPayload) Descriptor ¶
func (*ClientStatsPayload) Descriptor() ([]byte, []int)
func (*ClientStatsPayload) EncodeMsg ¶
func (z *ClientStatsPayload) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*ClientStatsPayload) GetStats ¶
func (m *ClientStatsPayload) GetStats() []ClientStatsBucket
func (*ClientStatsPayload) Marshal ¶
func (m *ClientStatsPayload) Marshal() (data []byte, err error)
func (*ClientStatsPayload) MarshalMsg ¶
func (z *ClientStatsPayload) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*ClientStatsPayload) MarshalTo ¶
func (m *ClientStatsPayload) MarshalTo(data []byte) (int, error)
func (*ClientStatsPayload) Msgsize ¶
func (z *ClientStatsPayload) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*ClientStatsPayload) ProtoMessage ¶
func (*ClientStatsPayload) ProtoMessage()
func (*ClientStatsPayload) Reset ¶
func (m *ClientStatsPayload) Reset()
func (*ClientStatsPayload) Size ¶
func (m *ClientStatsPayload) Size() (n int)
func (*ClientStatsPayload) String ¶
func (m *ClientStatsPayload) String() string
func (*ClientStatsPayload) Unmarshal ¶
func (m *ClientStatsPayload) Unmarshal(data []byte) error
func (*ClientStatsPayload) UnmarshalMsg ¶
func (z *ClientStatsPayload) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
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) Descriptor ¶
func (*Span) GetMetrics ¶
func (*Span) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
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()
func (*Span) UnmarshalMsg ¶
UnmarshalMsg implements msgp.Unmarshaler
func (*Span) UnmarshalMsgDictionary ¶
UnmarshalMsgDictionary 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
type StatsPayload ¶
type StatsPayload struct { AgentHostname string `protobuf:"bytes,1,opt,name=agentHostname,proto3" json:"agentHostname,omitempty"` AgentEnv string `protobuf:"bytes,2,opt,name=agentEnv,proto3" json:"agentEnv,omitempty"` Stats []ClientStatsPayload `protobuf:"bytes,3,rep,name=stats" json:"stats"` AgentVersion string `protobuf:"bytes,4,opt,name=agentVersion,proto3" json:"agentVersion,omitempty"` ClientComputed bool `protobuf:"varint,5,opt,name=clientComputed,proto3" json:"clientComputed,omitempty"` }
StatsPayload is the payload used to send stats from the agent to the backend.
func (*StatsPayload) DecodeMsg ¶
func (z *StatsPayload) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*StatsPayload) Descriptor ¶
func (*StatsPayload) Descriptor() ([]byte, []int)
func (*StatsPayload) EncodeMsg ¶
func (z *StatsPayload) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*StatsPayload) GetStats ¶
func (m *StatsPayload) GetStats() []ClientStatsPayload
func (*StatsPayload) Marshal ¶
func (m *StatsPayload) Marshal() (data []byte, err error)
func (*StatsPayload) MarshalMsg ¶
func (z *StatsPayload) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*StatsPayload) Msgsize ¶
func (z *StatsPayload) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*StatsPayload) ProtoMessage ¶
func (*StatsPayload) ProtoMessage()
func (*StatsPayload) Reset ¶
func (m *StatsPayload) Reset()
func (*StatsPayload) Size ¶
func (m *StatsPayload) Size() (n int)
func (*StatsPayload) String ¶
func (m *StatsPayload) String() string
func (*StatsPayload) Unmarshal ¶
func (m *StatsPayload) Unmarshal(data []byte) error
func (*StatsPayload) UnmarshalMsg ¶
func (z *StatsPayload) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type Trace ¶
type Trace []*Span
Trace is a collection of spans with the same trace ID
func (Trace) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
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) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
func (Traces) Msgsize ¶
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*Traces) UnmarshalMsg ¶
UnmarshalMsg implements msgp.Unmarshaler
func (*Traces) UnmarshalMsgDictionary ¶
UnmarshalMsgDictionary 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