Versions in this module Expand all Collapse all v0 v0.6.6 Nov 10, 2021 Changes in this version + const ComponentIDHttpServer + const EmptyTraceID + const NoopTraceID + func TraceID(ctx context.Context) string + type ConstSampler struct + func NewConstSampler(sample bool) *ConstSampler + func (s *ConstSampler) IsSampled(operation string) bool + type NoopSpan struct + func (*NoopSpan) End() + func (*NoopSpan) Error(time.Time, ...string) + func (*NoopSpan) GetOperationName() string + func (*NoopSpan) IsEntry() bool + func (*NoopSpan) IsExit() bool + func (*NoopSpan) Log(time.Time, ...string) + func (*NoopSpan) SetComponent(int32) + func (*NoopSpan) SetOperationName(string) + func (*NoopSpan) SetPeer(string) + func (*NoopSpan) SetSpanLayer(v3.SpanLayer) + func (*NoopSpan) Tag(Tag, string) + type RandomSampler struct + func NewRandomSampler(samplingRate float64) *RandomSampler + func (s *RandomSampler) IsSampled(operation string) bool + type ReportedSpan interface + ComponentID func() int32 + Context func() *SegmentContext + EndTime func() int64 + IsError func() bool + Logs func() []*v3.Log + OperationName func() string + Peer func() string + Refs func() []*propagation.SpanContext + SpanLayer func() v3.SpanLayer + SpanType func() v3.SpanType + StartTime func() int64 + Tags func() []*common.KeyStringValuePair + type Reporter interface + Boot func(service string, serviceInstance string) + Close func() + Send func(spans []ReportedSpan) + type Sampler interface + IsSampled func(operation string) (sampled bool) + type SegmentContext struct + FirstSpan Span + ParentSegmentID string + ParentSpanID int32 + SegmentID string + SpanID int32 + TraceID string + type Span interface + End func() + Error func(time.Time, ...string) + GetOperationName func() string + IsEntry func() bool + IsExit func() bool + Log func(time.Time, ...string) + SetComponent func(int32) + SetOperationName func(string) + SetPeer func(string) + SetSpanLayer func(v3.SpanLayer) + Tag func(Tag, string) + type SpanOption func(s *defaultSpan) + func WithContext(sc *propagation.SpanContext) SpanOption + func WithOperationName(operationName string) SpanOption + func WithSpanType(spanType SpanType) SpanOption + type SpanType int32 + const SpanTypeEntry + const SpanTypeExit + const SpanTypeLocal + type Tag string + const TagDBBindVariables + const TagDBInstance + const TagDBStatement + const TagDBType + const TagHTTPMethod + const TagMQBroker + const TagMQQueue + const TagMQTopic + const TagStatusCode + const TagURL + type Tracer struct + func NewTracer(service string, opts ...TracerOption) (tracer *Tracer, err error) + func (t *Tracer) CreateEntrySpan(ctx context.Context, operationName string, extractor propagation.Extractor) (s Span, nCtx context.Context, err error) + func (t *Tracer) CreateExitSpan(ctx context.Context, operationName string, peer string, ...) (Span, error) + func (t *Tracer) CreateLocalSpan(ctx context.Context, opts ...SpanOption) (s Span, c context.Context, err error) + type TracerOption func(t *Tracer) + func WithInstance(instance string) TracerOption + func WithReporter(reporter Reporter) TracerOption + func WithSampler(samplingRate float64) TracerOption