span

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotation

type Annotation struct {
	Timestamp int64     `thrift:"timestamp,1" json:"timestamp"`
	Value     string    `thrift:"value,2" json:"value"`
	Host      *Endpoint `thrift:"host,3" json:"endpoint,omitempty"`
}

func (Annotation) String added in v0.2.2

func (a Annotation) String() string

type AnnotationType

type AnnotationType int64

type BinaryAnnotation

type BinaryAnnotation struct {
	Key            string         `thrift:"key,1" json:"key"`
	Value          interface{}    `thrift:"value,2" json:"value"`
	AnnotationType AnnotationType `thrift:"annotation_type,3" json:"annotationType"`
	Host           *Endpoint      `thrift:"host,4" json:"endpoint,omitempty"`
}

func (BinaryAnnotation) String

func (ba BinaryAnnotation) String() string

type Endpoint

type Endpoint struct {
	Ipv4        string `thrift:"ipv4,1" json:"ipv4"`
	Port        int16  `thrift:"port,2" json:"port"`
	ServiceName string `thrift:"service_name,3" json:"serviceName"`
	Ipv6        []byte `thrift:"ipv6,4" json:"ipv6,omitempty"`
}

type Span

type Span struct {
	TraceID           string
	Name              string
	ID                string
	ParentID          string
	Annotations       []*Annotation
	BinaryAnnotations []BinaryAnnotation
	Debug             bool
	Timestamp         time.Time
	Duration          time.Duration
	TraceIDHigh       *int64
}

Span represents the Zipkin V1 Span object. See https://github.com/openzipkin/zipkin-api/blob/master/zipkin-api.yaml

func DecodeThrift

func DecodeThrift(data []byte) ([]*Span, error)

DecodeThrift reads a list of encoded thrift spans from an io.Reader, and converts that list to a slice of Spans. The implementation is based on jaeger internals, but not exported there.

func (*Span) AddTag added in v0.1.3

func (s *Span) AddTag(key string, value interface{})

AddTag adds a binary annotation with a key/value pair to the span

func (Span) MarshalJSON

func (s Span) MarshalJSON() ([]byte, error)

func (Span) String

func (s Span) String() string

func (*Span) UnmarshalJSON

func (s *Span) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL