Versions in this module Expand all Collapse all v0 v0.6.0 Oct 21, 2026 Changes in this version + const SpanIDField + const TraceIDField + func AttrString(value any) string + func SetTracer(tracer Tracer) + func TracedCall(ctx context.Context, name string, attrs []Attr, ...) error + func Traced[T any](ctx context.Context, name string, attrs []Attr, ...) (T, error) + type Attr struct + Key string + Value any + func BoolAttr(key string, value bool) Attr + func FloatAttr(key string, value float64) Attr + func IntAttr(key string, value int64) Attr + func StringAttr(key string, value string) Attr + type RecordedSpan struct + Attrs map[string]any + Ended bool + Err error + LinkedTo SpanContext + Name string + ParentID string + Root bool + SpanID string + TraceID string + func (s *RecordedSpan) Attr(key string) (any, bool) + type Recorder struct + func NewRecorder() *Recorder + func (r *Recorder) Names() []string + func (r *Recorder) Span(name string) (*RecordedSpan, bool) + func (r *Recorder) SpanFromContext(ctx context.Context) Span + func (r *Recorder) Spans() []*RecordedSpan + func (r *Recorder) Start(ctx context.Context, name string, attrs ...Attr) (context.Context, Span) + func (r *Recorder) StartRoot(ctx context.Context, name string, linkedTo SpanContext, attrs ...Attr) (context.Context, Span) + type Span interface + Context func() SpanContext + End func() + RecordError func(err error) + SetAttributes func(attrs ...Attr) + type SpanContext struct + SpanID string + TraceID string + func LinkFrom(ctx context.Context) SpanContext + func (c SpanContext) Recorded() bool + type Tracer interface + SpanFromContext func(ctx context.Context) Span + Start func(ctx context.Context, name string, attrs ...Attr) (context.Context, Span) + StartRoot func(ctx context.Context, name string, linkedTo SpanContext, attrs ...Attr) (context.Context, Span) + func CurrentTracer() Tracer