tracing

package
v0.0.0-...-ada6ab3 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	Key   string
	Value any
}

Attribute represents a key/value pair attached to a span.

func Bool

func Bool(key string, value bool) Attribute

Bool attribute helper.

func Int

func Int(key string, value int) Attribute

Int attribute helper.

func String

func String(key, value string) Attribute

String attribute helper.

type NoopTracer

type NoopTracer struct{}

NoopTracer discards all tracing events.

func (NoopTracer) Start

func (NoopTracer) Start(ctx context.Context, _ string, _ ...Attribute) (context.Context, Span)

Start implements Tracer.

type Span

type Span interface {
	End(err error)
}

Span represents an in-flight tracing span.

type Tracer

type Tracer interface {
	Start(ctx context.Context, name string, attrs ...Attribute) (context.Context, Span)
}

Tracer starts spans for tracing operations.

func NewOTelTracer

func NewOTelTracer(provider trace.TracerProvider, instrumentationName string) Tracer

NewOTelTracer wires the provided provider (or global fallback) into the tracing interface.

func WithTracer

func WithTracer(primary Tracer, others ...Tracer) Tracer

WithTracer normalises the provided tracer set, returning a composite tracer.

Jump to

Keyboard shortcuts

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