Help us shape the future of Go! Take the 2026 Go Developer Survey

zipkin

package module
v0.0.0-...-83e7dbd Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

README

go-zipkin

Work In Progress

This is a simple Zipkin tracing client borrowing a few ideas from the following projects:

Documentation

Overview

Package zipkin provides a Zipkin tracing interface and client.

NOTE: This is a WIP. Please see the README.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientRecvAnnotation

func ClientRecvAnnotation(t time.Time) *zipkin.Annotation

func ClientSendAnnotation

func ClientSendAnnotation(t time.Time) *zipkin.Annotation

func Handler

func Handler(next http.Handler, options *Options) http.Handler

func NewStringAnnotation

func NewStringAnnotation(key string, value string) *zipkin.BinaryAnnotation

func NewTimestampAnnotation

func NewTimestampAnnotation(value string, t time.Time) *zipkin.Annotation

func ServerRecvAnnotation

func ServerRecvAnnotation(t time.Time) *zipkin.Annotation

func ServerSendAnnotation

func ServerSendAnnotation(t time.Time) *zipkin.Annotation

Types

type DebugCollector

type DebugCollector struct{}

func (*DebugCollector) Collect

func (*DebugCollector) Collect(span *zipkin.Span)

type ID

type ID int64

func (ID) String

func (id ID) String() string

type Options

type Options struct {
	Enabled    bool
	Sample     float64
	Collectors []SpanCollector
	IP         net.IP

	Port        int16
	ServiceName string
	// contains filtered or unexported fields
}

func (*Options) Endpoint

func (o *Options) Endpoint() *zipkin.Endpoint

type ScribeCollector

type ScribeCollector struct {
	// contains filtered or unexported fields
}

func NewScribeCollector

func NewScribeCollector(addr string) *ScribeCollector

func (*ScribeCollector) Collect

func (c *ScribeCollector) Collect(span *zipkin.Span)

func (*ScribeCollector) HandleConnection

func (c *ScribeCollector) HandleConnection()

func (*ScribeCollector) SetCategory

func (c *ScribeCollector) SetCategory(category string)

type SpanCollector

type SpanCollector interface {
	Collect(span *zipkin.Span)
}

type Trace

type Trace struct {
	Endpoint   *zipkin.Endpoint
	Collectors []SpanCollector
	// contains filtered or unexported fields
}

func CurrentTrace

func CurrentTrace(r *http.Request) *Trace

func CurrentTraceForURL

func CurrentTraceForURL(u *url.URL) *Trace

func NewTrace

func NewTrace(traceName string, collectors []SpanCollector) *Trace

func NewTraceForHTTPHeader

func NewTraceForHTTPHeader(traceName string, h http.Header, collectors []SpanCollector) *Trace

func NewTraceForIDs

func NewTraceForIDs(traceName string, traceID, spanID int64, parentSpanID *int64, collectors []SpanCollector) *Trace

func (*Trace) Child

func (t *Trace) Child(name string) *Trace

func (*Trace) HTTPHeader

func (t *Trace) HTTPHeader() http.Header

func (*Trace) ParentSpanID

func (t *Trace) ParentSpanID() *ID

func (*Trace) Record

func (t *Trace) Record(annotation *zipkin.Annotation)

func (*Trace) RecordBinary

func (t *Trace) RecordBinary(annotation *zipkin.BinaryAnnotation)

func (*Trace) SetServiceName

func (t *Trace) SetServiceName(serviceName string)

func (*Trace) SpanID

func (t *Trace) SpanID() ID

func (*Trace) Submit

func (t *Trace) Submit()

func (*Trace) TraceID

func (t *Trace) TraceID() ID

Directories

Path Synopsis
gen-go

Jump to

Keyboard shortcuts

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