Run NodesReference

trace

Package trace provides tracing primitives.

import "github.com/luxfi/node/trace"

Package trace provides tracing primitives. The package ships a no-op tracer suitable for ZAP-native production builds; a real exporter implementation lives outside the node tree and plugs in via the Tracer interface.

Types

Config

Config holds tracing configuration

EventOption

EventOption configures events

ExporterConfig

ExporterConfig holds exporter configuration

ExporterType

ExporterType represents the type of trace exporter

func ExporterTypeFromString(s string) (ExporterType, error)
func (t ExporterType) MarshalJSON() ([]byte, error)
func (t ExporterType) String() string
func (t *ExporterType) UnmarshalJSON(b []byte) error

KeyValue

KeyValue represents a key-value attribute pair (otel compatible name)

func Bool(key string, value bool) KeyValue
func Int(key string, value int) KeyValue
func Int64(key string, value int64) KeyValue
func String(key, value string) KeyValue
func Stringer(key string, value interface{ String() string }) KeyValue

Span

Span represents a trace span

SpanEndOption

SpanEndOption configures span ending

SpanStartOption

SpanStartOption configures span creation

func WithAttributes(...KeyValue) SpanStartOption

StatusCode

StatusCode represents span status

Tracer

Tracer interface for tracing operations

func New(Config) (Tracer, error)

Value

Value wraps attribute values