Documentation ¶
Index ¶
- type Span
- func (*Span) Descriptor() ([]byte, []int)
- func (*Span) ProtoMessage()
- func (m *Span) Reset()
- func (m *Span) String() string
- 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) Marshal() ([]byte, error)
- 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) UnmarshalText(text []byte) error
- type TraceID
- func (t TraceID) Marshal() ([]byte, error)
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Span) Descriptor ¶
func (*Span) ProtoMessage ¶
func (*Span) ProtoMessage()
func (*Span) XXX_DiscardUnknown ¶
func (m *Span) XXX_DiscardUnknown()
func (*Span) XXX_Unmarshal ¶
type SpanID ¶
type SpanID uint64
SpanID is a random 64bit identifier for a span
func SpanIDFromString ¶
SpanIDFromString creates a SpanID from a hexadecimal string
func (SpanID) Marshal ¶
Marshal converts span ID into a binary representation. Called by protobuf serialization.
func (SpanID) MarshalJSON ¶
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 ¶
MarshalTo converts span ID into a binary representation. Called by protobuf serialization.
func (*SpanID) Unmarshal ¶
Unmarshal inflates span ID from a binary representation. Called by protobuf serialization.
func (*SpanID) UnmarshalJSON ¶
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) UnmarshalText ¶
UnmarshalText is called by encoding/json, which we do not want people to use.
type TraceID ¶
TraceID is a random 128bit identifier for a trace
func NewTraceID ¶
NewTraceID creates a new TraceID from two 64bit unsigned ints.
func TraceIDFromString ¶
TraceIDFromString creates a TraceID from a hexadecimal string
func (TraceID) Marshal ¶
Marshal converts trace ID into a binary representation. Called by protobuf serialization.
func (TraceID) MarshalJSON ¶
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 ¶
MarshalTo converts trace ID into a binary representation. Called by protobuf serialization.
func (*TraceID) Unmarshal ¶
Unmarshal inflates this trace ID from binary representation. Called by protobuf serialization.
func (*TraceID) UnmarshalJSON ¶
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.