Documentation ¶
Index ¶
- Variables
- func Init()
- func NewJaegerFileReporter(name string, opts ...JaegerReporterOption) jaeger.Reporter
- func NewJaegerTracer(serviceName, traceFileName string, samplingRate float64, sig os.Signal, ...) (opentracing.Tracer, io.Closer, error)
- type DefaultThrottler
- type Field
- type JaegerReporterOption
- type LocalSpan
- func (s LocalSpan) Set(key string, value interface{})
- func (s LocalSpan) SetHostname(hostname string)
- func (s LocalSpan) SetIP(ip string)
- func (s LocalSpan) SetOperationName(operationName string)
- func (s LocalSpan) SetParentSpanID(parentSpanID int64)
- func (s LocalSpan) SetServiceName(serviceName string)
- func (s LocalSpan) SetSpanID(spanID int64)
- func (s LocalSpan) SetTag(key string, value string)
- func (s LocalSpan) SetTraceID(traceIDHigh, traceIDLow int64)
- type Log
- type ProbabilisticSampler
Constants ¶
This section is empty.
Variables ¶
var DefaultSignal os.Signal = syscall.SIGUSR1
Functions ¶
func NewJaegerFileReporter ¶
func NewJaegerFileReporter(name string, opts ...JaegerReporterOption) jaeger.Reporter
NewFileReporter returns a new file Reporter.
func NewJaegerTracer ¶
func NewJaegerTracer(serviceName, traceFileName string, samplingRate float64, sig os.Signal, bufferSize int, options ...jaeger.TracerOption) (opentracing.Tracer, io.Closer, error)
NewJaegerTracer构造返回一个opentracing.Tracer。采样率小于0会被修正为0; 修正后的采样率 大于1,使用限速采样,每秒最多采样指定数量的trace; 修正后的采样率介于0和1之间则使用概率采样。
Types ¶
type DefaultThrottler ¶
type DefaultThrottler struct{}
DefaultThrottler doesn't throttle at all.
func (DefaultThrottler) IsAllowed ¶
func (t DefaultThrottler) IsAllowed(operation string) bool
IsAllowed implements Throttler#IsAllowed.
type JaegerReporterOption ¶
type JaegerReporterOption func(r *jaegerFileReporter)
JaegerReporterOption sets a parameter for the HTTP Reporter
func JaegerBufferSize ¶
func JaegerBufferSize(size int) JaegerReporterOption
func JaegerReopenSignal ¶
func JaegerReopenSignal(sig os.Signal) JaegerReporterOption
type LocalSpan ¶
type LocalSpan map[string]interface{}
func (LocalSpan) SetHostname ¶
func (LocalSpan) SetOperationName ¶
func (LocalSpan) SetParentSpanID ¶
func (LocalSpan) SetServiceName ¶
func (LocalSpan) SetTraceID ¶
type ProbabilisticSampler ¶
type ProbabilisticSampler struct {
// contains filtered or unexported fields
}
ProbabilisticSampler is a sampler that randomly samples a certain percentage of traces.
func NewProbabilisticSampler ¶
func NewProbabilisticSampler(samplingRate float64) *ProbabilisticSampler
NewProbabilisticSampler creates a sampler that randomly samples a certain percentage of traces specified by the samplingRate, in the range between 0.0 and 1.0.
It relies on the fact that new trace IDs are 63bit random numbers themselves, thus making the sampling decision without generating a new random number, but simply calculating if traceID < (samplingRate * 2^63).
func (*ProbabilisticSampler) Close ¶
func (s *ProbabilisticSampler) Close()
Close implements Close() of Sampler.
func (*ProbabilisticSampler) Equal ¶
func (s *ProbabilisticSampler) Equal(other jaeger.Sampler) bool
Equal implements Equal() of Sampler.
func (*ProbabilisticSampler) IsSampled ¶
func (s *ProbabilisticSampler) IsSampled(id jaeger.TraceID, operation string) (bool, []jaeger.Tag)
IsSampled implements IsSampled() of Sampler.
func (*ProbabilisticSampler) SamplingRate ¶
func (s *ProbabilisticSampler) SamplingRate() float64
SamplingRate returns the sampling probability this sampled was constructed with.