Documentation ¶
Index ¶
- Constants
- func MicroToTime(micro int64) time.Time
- func NewAnnotations(annotations []Annotation, endpoint Endpoint) []trace.Annotation
- func NewBinaryAnnotations(annotations []BinaryAnnotation, endpoint Endpoint) []trace.BinaryAnnotation
- func NewTrace(spans []Span) (trace.Trace, error)
- type Annotation
- type BinaryAnnotation
- type Decoder
- type DefaultEndpoint
- type Endpoint
- type Span
Constants ¶
const DefaultServiceName = "unknown"
DefaultServiceName when the span does not have any serviceName
Variables ¶
This section is empty.
Functions ¶
func MicroToTime ¶
MicroToTime converts zipkin's native time of microseconds into time.Time
func NewAnnotations ¶
func NewAnnotations(annotations []Annotation, endpoint Endpoint) []trace.Annotation
NewAnnotations converts a slice of Annotation into a slice of new Annotations
func NewBinaryAnnotations ¶
func NewBinaryAnnotations(annotations []BinaryAnnotation, endpoint Endpoint) []trace.BinaryAnnotation
NewBinaryAnnotations is very similar to NewAnnotations, but it converts BinaryAnnotations instead of the normal Annotation
Types ¶
type Annotation ¶
Annotation represents an event that explains latency with a timestamp.
type BinaryAnnotation ¶
BinaryAnnotation represent tags applied to a Span to give it context
type DefaultEndpoint ¶
type DefaultEndpoint struct{}
DefaultEndpoint is used if the annotations have no endpoints
func (*DefaultEndpoint) Host ¶
func (d *DefaultEndpoint) Host() string
Host returns 0.0.0.0; used when the host is unknown
func (*DefaultEndpoint) Name ¶
func (d *DefaultEndpoint) Name() string
Name returns "unknown" when an endpoint doesn't exist
type Span ¶
type Span interface { Trace() (string, error) SpanID() (string, error) Parent() (string, error) Name() string Annotations() []Annotation BinaryAnnotations() ([]BinaryAnnotation, error) Timestamp() time.Time Duration() time.Duration }
Span are created by instrumentation in RPC clients or servers