trace

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: BSD-2-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SafeAttr

func SafeAttr(key string, val any) attribute.KeyValue

Types

type Tracer

type Tracer struct {
	TP *sdktrace.TracerProvider
	trace.Tracer
	// contains filtered or unexported fields
}

Tracer is a wrapper for opentelemetry tracer

func New

func New(ctx context.Context, cfg *model.Cfg, serviceName string, log *logger.Log) (*Tracer, error)

New return a new tracer

func NewForTesting

func NewForTesting(ctx context.Context, projectName string, log *logger.Log) (*Tracer, error)

NewForTesting return a new tracer for testing purpose without exporting the trace

func (*Tracer) Shutdown

func (t *Tracer) Shutdown(ctx context.Context) error

Shutdown shuts down the tracer

Jump to

Keyboard shortcuts

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