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() ([]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
SpanID is a random 64bit identifier for a span
type SpanID uint64
func NewSpanID(v uint64) SpanID
NewSpanID creates a new SpanID from a 64bit unsigned int.
func SpanIDFromString(s string) (SpanID, error)
SpanIDFromString creates a SpanID from a hexadecimal string
func (s SpanID) Marshal() ([]byte, error)
Marshal converts span ID into a binary representation. Called by protobuf serialization.
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 (s SpanID) MarshalText() ([]byte, error)
MarshalText is called by encoding/json, which we do not want people to use.
func (s *SpanID) MarshalTo(data []byte) (n int, err error)
MarshalTo converts span ID into a binary representation. Called by protobuf serialization.
func (s *SpanID) Size() int
Size returns the size of this datum in protobuf. It is always 8 bytes.
func (s SpanID) String() string
func (s *SpanID) Unmarshal(data []byte) error
Unmarshal inflates span ID from a binary representation. Called by protobuf serialization.
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 (s *SpanID) UnmarshalText(text []byte) error
UnmarshalText is called by encoding/json, which we do not want people to use.
TraceID is a random 128bit identifier for a trace
type TraceID struct { Low uint64 `json:"lo"` High uint64 `json:"hi"` }
func NewTraceID(high, low uint64) TraceID
NewTraceID creates a new TraceID from two 64bit unsigned ints.
func TraceIDFromString(s string) (TraceID, error)
TraceIDFromString creates a TraceID from a hexadecimal string
func (t TraceID) Marshal() ([]byte, error)
Marshal converts trace ID into a binary representation. Called by protobuf serialization.
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 (t TraceID) MarshalText() ([]byte, error)
MarshalText is called by encoding/json, which we do not want people to use.
func (t *TraceID) MarshalTo(data []byte) (n int, err error)
MarshalTo converts trace ID into a binary representation. Called by protobuf serialization.
func (t *TraceID) Size() int
Size returns the size of this datum in protobuf. It is always 16 bytes.
func (t TraceID) String() string
func (t *TraceID) Unmarshal(data []byte) error
Unmarshal inflates this trace ID from binary representation. Called by protobuf serialization.
func (t *TraceID) UnmarshalJSON(data []byte) error
UnmarshalJSON inflates trace id from base64 string, possibly enclosed in quotes. User by protobuf JSON serialization.
func (t *TraceID) UnmarshalText(text []byte) error
UnmarshalText is called by encoding/json, which we do not want people to use.