Documentation ¶
Overview ¶
Package tracer provides an interface for distributed tracing
Package tracer provides an interface for distributed tracing
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewContext ¶
NewContext saves the tracer in the context
Types ¶
type EventOption ¶
type EventOption func(o *EventOptions)
type EventOptions ¶
type EventOptions struct{}
type Label ¶
type Label struct {
// contains filtered or unexported fields
}
func LabelFloat64 ¶ added in v3.8.1
func LabelInt64 ¶ added in v3.8.1
func LabelString ¶ added in v3.8.1
type Options ¶
type Options struct { // Logger used for logging Logger logger.Logger // Name of the tracer Name string }
Options struct
type Span ¶
type Span interface { // Tracer return underlining tracer Tracer() Tracer // Finish complete and send span Finish(opts ...SpanOption) // AddEvent add event to span AddEvent(name string, opts ...EventOption) // Context return context with span Context() context.Context // SetName set the span name SetName(name string) // SetLabels set the span labels SetLabels(labels ...Label) }
type SpanOption ¶
type SpanOption func(o *SpanOptions)
type SpanOptions ¶
type SpanOptions struct{}
type Tracer ¶
type Tracer interface { // Name return tracer name Name() string // Init tracer with options Init(...Option) error // Start a trace Start(ctx context.Context, name string, opts ...SpanOption) (context.Context, Span) }
Tracer is an interface for distributed tracing
func FromContext ¶
FromContext returns a tracer from context
Click to show internal directories.
Click to hide internal directories.