jaeger

package
v0.23.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: Apache-2.0 Imports: 19 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTracer

func NewTracer(ctx context.Context, logger log.Logger, metrics *prometheus.Registry, conf []byte) (opentracing.Tracer, io.Closer, error)

NewTracer create tracer from YAML.

func ParseConfigFromYaml

func ParseConfigFromYaml(cfg []byte) (*config.Configuration, error)

ParseConfigFromYaml uses config YAML to set the tracer's Configuration.

Types

type Config

type Config struct {
	ServiceName            string        `yaml:"service_name"`
	Disabled               bool          `yaml:"disabled"`
	RPCMetrics             bool          `yaml:"rpc_metrics"`
	Tags                   string        `yaml:"tags"`
	SamplerType            string        `yaml:"sampler_type"`
	SamplerParam           float64       `yaml:"sampler_param"`
	SamplerManagerHostPort string        `yaml:"sampler_manager_host_port"`
	SamplerMaxOperations   int           `yaml:"sampler_max_operations"`
	SamplerRefreshInterval time.Duration `yaml:"sampler_refresh_interval"`
	ReporterMaxQueueSize   int           `yaml:"reporter_max_queue_size"`
	ReporterFlushInterval  time.Duration `yaml:"reporter_flush_interval"`
	ReporterLogSpans       bool          `yaml:"reporter_log_spans"`
	Endpoint               string        `yaml:"endpoint"`
	User                   string        `yaml:"user"`
	Password               string        `yaml:"password"`
	AgentHost              string        `yaml:"agent_host"`
	AgentPort              int           `yaml:"agent_port"`
}

Config - YAML configuration. For details see to https://github.com/jaegertracing/jaeger-client-go#environment-variables.

type Tracer

type Tracer struct {
	opentracing.Tracer
}

Tracer extends opentracing.Tracer.

func (*Tracer) GetTraceIDFromSpanContext

func (t *Tracer) GetTraceIDFromSpanContext(ctx opentracing.SpanContext) (string, bool)

GetTraceIDFromSpanContext return TraceID from span.Context.

Jump to

Keyboard shortcuts

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