pzipkin

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFilePath

func GetFilePath(defName string) string

func GetSamplerRate

func GetSamplerRate() float64

func GetServerEndpoint

func GetServerEndpoint() string

func New

func New() mgr.Instance

func ZipkinTracer

func ZipkinTracer() opentracing.Tracer

Types

type Annotation

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

type BinaryAnnotation

type BinaryAnnotation struct {
	Key   string `thrift:"key,1" db:"key" json:"key"`
	Value string `thrift:"value,2" db:"value" json:"value"`
}

type Endpoint

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

type FileCollector

type FileCollector struct {
	Fd        *os.File
	Timeout   time.Duration
	Interval  time.Duration
	BatchSize int
	// contains filtered or unexported fields
}

func NewFileCollector

func NewFileCollector(path string) (*FileCollector, error)

func (*FileCollector) Close

func (f *FileCollector) Close() error

func (*FileCollector) Collect

func (f *FileCollector) Collect(span *zipkincore.Span) error

func (*FileCollector) Run

func (f *FileCollector) Run()

type Span

type Span struct {
	TraceID string `thrift:"traceId,1" db:"traceId" json:"traceId"`
	// unused field # 2
	Name        string        `thrift:"name,3" db:"name" json:"name"`
	ID          string        `thrift:"id,4" db:"id" json:"id"`
	ParentID    string        `thrift:"parentId,5" db:"parentId" json:"parentId,omitempty"`
	Annotations []*Annotation `thrift:"annotations,6" db:"annotations" json:"annotations"`
	// unused field # 7
	BinaryAnnotations []*BinaryAnnotation `thrift:"binaryAnnotations,8" db:"binaryAnnotations" json:"binaryAnnotations"`
	//Debug bool `thrift:"debug,9" db:"debug" json:"debug,omitempty"`
	Timestamp *int64 `thrift:"timestamp,10" db:"timestamp" json:"timestamp,omitempty"`
	Duration  *int64 `thrift:"duration,11" db:"duration" json:"duration,omitempty"`
}

func FromZipkinSpan

func FromZipkinSpan(span *zipkincore.Span) (s Span)

func (*Span) FromZipkinSpan

func (s *Span) FromZipkinSpan(span *zipkincore.Span)

type Zipkin

type Zipkin struct {
}

func (*Zipkin) ClientBegin

func (zp *Zipkin) ClientBegin(operationName string, itf tracing.Request) tracing.Span

func (*Zipkin) ClientEnd

func (zp *Zipkin) ClientEnd(itf tracing.Span, code int, message string)

func (*Zipkin) ServerBegin

func (zp *Zipkin) ServerBegin(operationName string, itf tracing.Request) tracing.Span

func (*Zipkin) ServerEnd

func (zp *Zipkin) ServerEnd(itf tracing.Span, code int, message string)

Jump to

Keyboard shortcuts

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