Documentation
¶
Overview ¶
Package trace provides an interface for distributed tracing
Index ¶
- Constants
- func Finish(span *Span) error
- func FromContext(ctx context.Context) (traceID string, parentSpanID string, isFound bool)
- func ToContext(ctx context.Context, traceID, parentSpanID string) context.Context
- type Option
- type Options
- type ReadOption
- type ReadOptions
- type Span
- type SpanType
- type Tracer
Constants ¶
View Source
const (
// DefaultSize of the buffer
DefaultSize = 64
)
Variables ¶
This section is empty.
Functions ¶
func FromContext ¶
FromContext returns a span from context
Types ¶
type ReadOption ¶
type ReadOption func(o *ReadOptions)
type ReadOptions ¶
type ReadOptions struct {
// Trace id
Trace string
}
type Span ¶
type Span struct {
// Id of the trace
Trace string
// name of the span
Name string
// id of the span
Id string
// parent span id
Parent string
// Start time
Started time.Time
// Duration in nano seconds
Duration time.Duration
// associated data
Metadata map[string]string
// Type
Type SpanType
}
Span is used to record an entry
func Read ¶ added in v1.1.0
func Read(opts ...ReadOption) ([]*Span, error)
Click to show internal directories.
Click to hide internal directories.