tracing

package
v0.0.0-...-2e8b532 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractIDs

func ExtractIDs(ctx context.Context) (traceID, spanID string)

func SpanFromContext

func SpanFromContext(ctx context.Context) *simpleSpan

Types

type Span

type Span interface {
	End()
	SetAttribute(key string, value any)
	Context() SpanContext
	IsEnded() bool
}

type SpanContext

type SpanContext struct {
	TraceID, SpanID, ParentSpanID string
	Start, End                    time.Time
}

type Tracer

type Tracer interface {
	StartSpan(ctx context.Context, name string) (context.Context, Span)
	Noop() bool
}

func NewAdaptiveTracer

func NewAdaptiveTracer(percentFn func() float64) Tracer

func NewTracer

func NewTracer(enabled bool) Tracer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL