Documentation
¶
Index ¶
- Variables
- func Inject(ctx context.Context, injector Injector)
- func SetError(ctx context.Context, v bool)
- func SetGlobalTracer(t Tracer)
- func WithSpan(ctx context.Context, name string, body func(context.Context) error) error
- type Injector
- type Option
- type Reference
- type RelationshipType
- type Span
- type Tracer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ServiceKey = tag.New("service") ComponentKey = tag.New("component") ErrorKey = tag.New("error") SpanIDKey = tag.New("span_id") TraceIDKey = tag.New("trace_id") ParentSpanIDKey = tag.New("parent_span_id") MessageKey = tag.New("message", tag.WithDescription("message text: info, error, etc"), ) )
Functions ¶
func SetGlobalTracer ¶
func SetGlobalTracer(t Tracer)
Types ¶
type Option ¶
type Option struct {
// contains filtered or unexported fields
}
func ChildOf ¶
func ChildOf(sc core.SpanContext) Option
func FollowsFrom ¶
func FollowsFrom(sc core.SpanContext) Option
func WithAttribute ¶
func WithAttributes ¶
func WithStartTime ¶
type Reference ¶
type Reference struct { core.SpanContext RelationshipType }
type RelationshipType ¶
type RelationshipType int
const ( ChildOfRelationship RelationshipType = iota FollowsFromRelationship )
type Span ¶
type Tracer ¶
type Tracer interface { Start(context.Context, string, ...Option) (context.Context, Span) WithSpan( ctx context.Context, operation string, body func(ctx context.Context) error, ) error WithService(name string) Tracer WithComponent(name string) Tracer WithResources(res ...core.KeyValue) Tracer // Note: see https://github.com/opentracing/opentracing-go/issues/127 Inject(context.Context, Span, Injector) // ScopeID returns the resource scope of this tracer. scope.Scope }
func GlobalTracer ¶
func GlobalTracer() Tracer
Click to show internal directories.
Click to hide internal directories.