Documentation
¶
Index ¶
- type Reporter
- type SegmentSpan
- type Span
- type SpanOption
- type Tracer
- func (t *Tracer) CreateEntrySpan(ctx context.Context, extractor propagation.Extractor) (Span, context.Context, error)
- func (t *Tracer) CreateExitSpan(ctx context.Context, injector propagation.Injector) (Span, error)
- func (t *Tracer) CreateLocalSpan(ctx context.Context, opts ...SpanOption) (Span, context.Context, error)
- type TracerOption
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 ¶
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