trace

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitTracer

func InitTracer(ctx context.Context, conf *Config) (func(context.Context) error, error)

InitTracer initializes the global OpenTelemetry tracer provider. It returns a shutdown function that should be called when the application exits.

Types

type Config

type Config struct {
	ServiceName string
	Endpoint    string // e.g., "localhost:4317" or "https://host/path"
	Exporter    string // "otlp" or "stdout" (default: "stdout")
	SampleRate  float64
	Headers     map[string]string // Authorization headers
	Compression string            // "gzip"
	Timeout     time.Duration
}

Jump to

Keyboard shortcuts

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