tracer

package
v1.13.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close() error

Close flushes buffers before shutdown.

func InitTracer

func InitTracer(cfg Config) error

InitTracer creates a new Jaeger tracer, and sets it as global tracer.

Types

type Config

type Config struct {
	// Enabled to enable global tracer set it to true
	Enabled bool

	// ServiceName is service name to be traces
	ServiceName string

	// AgentAddress is jaeger-agent's HTTP sampling server (e.g. localhost:6565)
	AgentAddress string

	// SamplerType is type of sampler: const, probabilistic, rateLimiting, or remote
	SamplerType string

	// SamplerParam is a value passed to the sampler.
	// Valid values for Param field are:
	// - for "const" sampler, 0 or 1 for always false/true respectively
	// - for "probabilistic" sampler, a probability between 0 and 1
	// - for "rateLimiting" sampler, the number of spans per second
	// - for "remote" sampler, param is the same as for "probabilistic"
	SamplerParam float64

	// Tags
	Tags map[string]string
}

Config stores tracer configuration

Jump to

Keyboard shortcuts

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