go2sky

package module
v0.0.0-...-a0b15b2 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

README

GO2Sky

CircleCI

GO2Sky is an intrument SDK library, writen in Go, by following Apache SkyWalking tracing and metric formats.

License

Apache 2.0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reporter

type Reporter interface {
	Send(spans []Span)
	Close()
}

Reporter is a data transit specification

type SegmentSpan

type SegmentSpan interface {
	SegmentRegister() bool
	SegmentContext() segmentContext
}

SegmentSpan interface as segment span specification

type Span

type Span interface {
	Context() propagation.ContextCarrier
	End()
}

Span interface as common span specification

type SpanOption

type SpanOption func(s *defaultSpan)

SpanOption allows for functional options to adjust behaviour of a Span to be created by CreateLocalSpan

func WithParent

func WithParent(cc propagation.ContextCarrier) SpanOption

WithParent setup parent context from propagation

type Tracer

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

Tracer is go2sky tracer implementation.

func NewTracer

func NewTracer(opts ...TracerOption) (tracer *Tracer, err error)

NewTracer return a new go2sky Tracer

func (*Tracer) CreateEntrySpan

func (t *Tracer) CreateEntrySpan(ctx context.Context, extractor propagation.Extractor) (Span, context.Context, error)

CreateEntrySpan creates and starts an entry span for incoming request

func (*Tracer) CreateExitSpan

func (t *Tracer) CreateExitSpan(ctx context.Context, injector propagation.Injector) (Span, error)

CreateExitSpan creates and starts an exit span for client

func (*Tracer) CreateLocalSpan

func (t *Tracer) CreateLocalSpan(ctx context.Context, opts ...SpanOption) (Span, context.Context, error)

CreateLocalSpan creates and starts a span for local usage

type TracerOption

type TracerOption func(t *Tracer)

TracerOption allows for functional options to adjust behaviour of a Tracer to be created by NewTracer

func WithReporter

func WithReporter(reporter Reporter) TracerOption

WithReporter setup report pipeline for tracer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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