Versions in this module Expand all Collapse all v0 v0.6.1 Jun 16, 2026 v0.6.0 Jun 16, 2026 v0.5.0 Jun 15, 2026 Changes in this version + const AttrGOWDKLane + const AttrGOWDKSourceCol + const AttrGOWDKSourceFile + const AttrGOWDKSourceLine + const AttrGOWDKSurface + const AttrHTTPRequestMethod + const AttrHTTPResponseStatusCode + const AttrHTTPRoute + const AttrServerAddress + const AttrURLPath + func ContextWithTraceContext(ctx context.Context, traceContext TraceContext) context.Context + func ContextWithTracer(ctx context.Context, tracer *Tracer) context.Context + func Extract(ctx context.Context, carrier Carrier) context.Context + func Inject(ctx context.Context, carrier Carrier) + func Traceparent(traceContext TraceContext) string + type Attribute struct + Key string + Value any + type Carrier interface + Get func(string) string + Set func(string, string) + type Collector struct + func NewCollector(limit int) *Collector + func (collector *Collector) Dropped() uint64 + func (collector *Collector) Handler() http.Handler + func (collector *Collector) RecordSpan(ctx context.Context, span Snapshot) error + func (collector *Collector) Spans() []Snapshot + func (collector *Collector) ViewerHandler() http.Handler + type ConsoleSink struct + func NewConsoleSink(writer io.Writer) *ConsoleSink + func (sink *ConsoleSink) RecordSpan(ctx context.Context, span Snapshot) error + type CountedSampler struct + N uint64 + func (sampler *CountedSampler) Sample(SamplingContext) bool + type Event struct + Attributes []Attribute + Level string + Message string + Time time.Time + type Exporter interface + ExportSpans func(context.Context, []OTLPSpan) error + type JSONLSink struct + func NewJSONLSink(writer io.Writer) *JSONLSink + func (sink *JSONLSink) RecordSpan(ctx context.Context, span Snapshot) error + type Lane string + const LaneAPI + const LaneAction + const LaneContract + const LaneFragment + const LaneGuard + const LaneHandler + const LaneIsland + const LaneJob + const LaneNav + const LaneRoute + const LaneSSR + const LaneUser + type OTLPSpan struct + Attributes []Attribute + EndTimeUnixNano int64 + Events []Event + Name string + ParentSpanID SpanID + SpanID SpanID + StartTimeUnixNano int64 + Status Status + TraceID TraceID + func OTLPSpanFromSnapshot(span Snapshot) OTLPSpan + type RingSink struct + func NewRingSink(limit int) *RingSink + func (sink *RingSink) Dropped() uint64 + func (sink *RingSink) RecordSpan(ctx context.Context, span Snapshot) error + func (sink *RingSink) Spans() []Snapshot + type Sampler interface + Sample func(SamplingContext) bool + func AlwaysOff() Sampler + func AlwaysOn() Sampler + func RatioSampler(ratio float64) Sampler + type SamplingContext struct + Attributes []Attribute + Lane Lane + Name string + ParentSpanID SpanID + Surface Surface + TraceID TraceID + type Sink interface + RecordSpan func(context.Context, Snapshot) error + func ExporterSink(exporter Exporter) Sink + func MultiSink(sinks ...Sink) Sink + type Snapshot struct + Attributes []Attribute + DurationNS int64 + EndTime time.Time + Events []Event + Lane Lane + Name string + ParentSpanID SpanID + Source SourceRef + SpanID SpanID + StartTime time.Time + Status Status + Surface Surface + TraceID TraceID + type SourceRef struct + Column int + File string + Line int + OwnerID string + OwnerKind string + type Span struct + func SpanFrom(ctx context.Context) *Span + func Start(ctx context.Context, name string, options ...StartOption) (context.Context, *Span) + func (span *Span) End() + func (span *Span) EndTime(t time.Time) + func (span *Span) Event(level string, message string, attrs map[string]any) + func (span *Span) Set(key string, value any) + func (span *Span) SetStatus(code StatusCode, message string) + func (span *Span) Snapshot() Snapshot + func (span *Span) TraceContext() TraceContext + type SpanID string + func NewSpanID() SpanID + func (id SpanID) Valid() bool + type StartOption func(*startConfig) + func WithAttributes(attrs map[string]any) StartOption + func WithLane(lane Lane) StartOption + func WithSource(source SourceRef) StartOption + func WithStartTime(start time.Time) StartOption + func WithSurface(surface Surface) StartOption + func WithTracer(tracer *Tracer) StartOption + type Status struct + Code StatusCode + Message string + type StatusCode string + const StatusError + const StatusOK + const StatusUnset + type Surface string + const SurfaceBackend + const SurfaceFrontend + const SurfaceWorker + type TraceContext struct + Remote bool + Sampled bool + SpanID SpanID + TraceID TraceID + func ParseTraceparent(value string) (TraceContext, error) + func TraceContextFromContext(ctx context.Context) (TraceContext, bool) + type TraceID string + func NewTraceID() TraceID + func (id TraceID) Valid() bool + type Tracer struct + func NewTracer(options ...TracerOption) *Tracer + func TracerFromContext(ctx context.Context) (*Tracer, bool) + func (tracer *Tracer) Start(ctx context.Context, name string, options ...StartOption) (context.Context, *Span) + type TracerOption func(*Tracer) + func WithSampler(sampler Sampler) TracerOption + func WithSink(sink Sink) TracerOption