Help us shape the future of Go! Take the 2026 Go Developer Survey

tracing

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JaegerType = "jaeger"
	OtelType   = "otel"
)

Variables

This section is empty.

Functions

func SetupTracing

func SetupTracing(ctx context.Context, name string, c Config) (func(context.Context) error, error)

Types

type Config

type Config struct {
	Type string `yaml:"type" json:"type"`
	Otel Otel   `yaml:"otel" json:"otel"`
}

func (*Config) RegisterFlags

func (c *Config) RegisterFlags(f *flag.FlagSet)

RegisterFlags registers flag.

func (*Config) Validate

func (c *Config) Validate() error

type Otel

type Otel struct {
	OtlpEndpoint   string              `yaml:"otlp_endpoint" json:"otlp_endpoint"`
	ExporterType   string              `yaml:"exporter_type" json:"exporter_type"`
	SampleRatio    float64             `yaml:"sample_ratio" json:"sample_ratio"`
	RoundRobin     bool                `yaml:"round_robin" json:"round_robin"`
	TLSEnabled     bool                `yaml:"tls_enabled"`
	TLS            tls.ClientConfig    `yaml:"tls"`
	ExtraDetectors []resource.Detector `yaml:"-"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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