Documentation ¶
Index ¶
- func NewJaegerTracer(serviceName string, jaegerHostPort string, opts ...Option) (opentracing.Tracer, io.Closer, error)
- type Option
- func WithBufferFlushInterval(bufferFlushInterval time.Duration) Option
- func WithCollectorEndpoint(collectorEndpoint string) Option
- func WithDisable(disable bool) Option
- func WithLog(log bool) Option
- func WithReporterLogSpans(logSpans bool) Option
- func WithReporterQueueSize(queueSize int) Option
- func WithSamplerParam(samplerParam float64) Option
- func WithSamplerType(samplerType string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶ added in v0.2.0
type Option func(opts *jaegerTracerOptions)
func WithBufferFlushInterval ¶ added in v0.2.0
WithBufferFlushInterval 强制清空、推送队列时间,对于流量不高的程序,队列可能长时间不能满,那么设置这个时间,超时可以自动推送一次。 对于高并发的情况,一般队列很快就会满的,满了后也会自动推送。默认为1秒
func WithCollectorEndpoint ¶ added in v0.2.0
WithCollectorEndpoint 设置 api (链路追踪数据直接上报 collector 组件) 用 Collector 就不用 agent 了
func WithReporterLogSpans ¶ added in v0.2.0
WithReporterLogSpans 设置 是否把 Log 也推送,span 中可以携带一些日志信息
func WithReporterQueueSize ¶ added in v0.2.0
WithReporterQueueSize 设置 设置队列大小,存储采样的 span 信息,队列满了后一次性发送到 jaeger 后端;defaultQueueSize 默认为 100;
func WithSamplerParam ¶ added in v0.2.0
WithSamplerParam 设置 采样率 0 - 1
func WithSamplerType ¶ added in v0.2.0
WithSamplerType 设置 采样方式 "const" 0或1 采样器始终对所有 tracer 做出相同的决定;要么全部采样,要么全部不采样 "probabilistic" 0.0~1.0 采样器做出随机采样决策,Param 为采样概率 "ratelimiting" N 采样器一定的恒定速率对tracer进行采样,Param=2.0,则限制每秒采集2条 "remote" 无 采样器请咨询Jaeger代理以获取在当前服务中使用的适当采样策略。
Click to show internal directories.
Click to hide internal directories.