Documentation
¶
Overview ¶
Package trace provides an interface for distributed tracing
Index ¶
Constants ¶
View Source
const (
// DefaultSize of the buffer.
DefaultSize = 64
)
Variables ¶
View Source
var ( // DefaultTracer is the default tracer. DefaultTracer = NewTracer() )
Functions ¶
func FromContext ¶
FromContext returns a span from context.
Types ¶
type ReadOption ¶
type ReadOption func(o *ReadOptions)
type Span ¶
type Span struct {
// Start time
Started time.Time
// associated data
Metadata map[string]string
// Id of the trace
Trace string
// name of the span
Name string
// id of the span
Id string
// parent span id
Parent string
// Duration in nano seconds
Duration time.Duration
// Type
Type SpanType
}
Span is used to record an entry.
Source Files
¶
- default.go
- noop.go
- options.go
- trace.go
Click to show internal directories.
Click to hide internal directories.