Documentation ¶
Overview ¶
Package tracer contains components able to send opentracing events.
Index ¶
Constants ¶
const ( TypeJaeger = "jaeger" TypeNone = "none" )
String constants representing each tracer type.
Variables ¶
var Constructors = map[string]TypeSpec{}
Constructors is a map of all tracer types with their specs.
var (
ErrInvalidTracerType = errors.New("invalid tracer type")
)
Errors for the tracer package.
Functions ¶
func Descriptions ¶
func Descriptions() string
Descriptions returns a formatted string of collated descriptions of each type.
func SanitiseConfig ¶
SanitiseConfig returns a sanitised version of the Config, meaning sections that aren't relevant to behaviour are removed.
func WalkConstructors ¶ added in v3.43.0
func WalkConstructors(fn func(ConstructorFunc, docs.ComponentSpec))
WalkConstructors iterates each component constructor.
Types ¶
type Config ¶
type Config struct { Type string `json:"type" yaml:"type"` Jaeger JaegerConfig `json:"jaeger" yaml:"jaeger"` None struct{} `json:"none" yaml:"none"` }
Config is the all encompassing configuration struct for all tracer types.
func NewConfig ¶
func NewConfig() Config
NewConfig returns a configuration struct fully populated with default values.
type ConstructorFunc ¶ added in v3.43.0
ConstructorFunc is a func signature able to construct a tracer.
type Jaeger ¶
type Jaeger struct {
// contains filtered or unexported fields
}
Jaeger is a tracer with the capability to push spans to a Jaeger instance.
type JaegerConfig ¶
type JaegerConfig struct { AgentAddress string `json:"agent_address" yaml:"agent_address"` CollectorURL string `json:"collector_url" yaml:"collector_url"` ServiceName string `json:"service_name" yaml:"service_name"` SamplerType string `json:"sampler_type" yaml:"sampler_type"` SamplerManagerAddress string `json:"sampler_manager_address" yaml:"sampler_manager_address"` SamplerParam float64 `json:"sampler_param" yaml:"sampler_param"` Tags map[string]string `json:"tags" yaml:"tags"` FlushInterval string `json:"flush_interval" yaml:"flush_interval"` }
JaegerConfig is config for the Jaeger metrics type.
func NewJaegerConfig ¶
func NewJaegerConfig() JaegerConfig
NewJaegerConfig creates an JaegerConfig struct with default values.
type Type ¶
type Type interface { // Close stops and cleans up the tracers resources. Close() error }
Type is an interface implemented by all tracer types.