Versions in this module Expand all Collapse all v1 v1.0.0 Dec 5, 2022 Changes in this version + var ErrValidDurationRequired = errors.New("valid duration required") + var ErrValidIDRequired = errors.New("valid span id required") + var ErrValidTimestampRequired = errors.New("valid annotation timestamp required") + var ErrValidTraceIDRequired = errors.New("valid traceId required") + type Annotation struct + Timestamp time.Time + Value string + func (a *Annotation) MarshalJSON() ([]byte, error) + func (a *Annotation) UnmarshalJSON(b []byte) error + type Endpoint struct + IPv4 net.IP + IPv6 net.IP + Port uint16 + ServiceName string + func (e *Endpoint) Empty() bool + type ID uint64 + func (i *ID) UnmarshalJSON(b []byte) (err error) + func (i ID) MarshalJSON() ([]byte, error) + func (i ID) String() string + type Kind string + const Client + const Consumer + const Producer + const Server + const Undetermined + type SpanContext struct + Debug bool + Err error + ID ID + ParentID *ID + Sampled *bool + TraceID TraceID + type SpanModel struct + Annotations []Annotation + Duration time.Duration + Kind Kind + LocalEndpoint *Endpoint + Name string + RemoteEndpoint *Endpoint + Shared bool + Tags map[string]string + Timestamp time.Time + func (s *SpanModel) UnmarshalJSON(b []byte) error + func (s SpanModel) MarshalJSON() ([]byte, error) + type TraceID struct + High uint64 + Low uint64 + func TraceIDFromHex(h string) (t TraceID, err error) + func (t *TraceID) UnmarshalJSON(traceID []byte) error + func (t TraceID) Empty() bool + func (t TraceID) MarshalJSON() ([]byte, error) + func (t TraceID) String() string