xtrace

package
v0.0.0-...-953156a Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

关闭tracer

func GetServiceName

func GetServiceName() string

func InitFromConfig

func InitFromConfig(c *Config) (err error)

从配置文件初始化

func InitFromEnv

func InitFromEnv() (err error)

从环境变量读取配置初始化

func InitOnlyTracingLog

func InitOnlyTracingLog(serviceName string) error

只生成链式日志,无需jaeger服务,不采样,不上报

Types

type Config

type Config struct {
	ServiceName         string  `json:"ServiceName" yaml:"ServiceName"`                 //服务名, 必须
	JaegerAgent         string  `json:"JaegerAgent" yaml:"JaegerAgent"`                 //jaeger-agent地址,可选: 默认:jaeger-agent:6831
	SamplerRateLimit    float64 `json:"SamplerRateLimit" yaml:"SamplerRateLimit"`       //<=0 永不上报,< 1 按固定概率上报,> 1 限制每秒最大上报数量,=1 总是上报
	QueueSize           int     `json:"QueueSize" yaml:"QueueSize"`                     //异步span队列最大大小,可选:默认100
	BufferFlushInterval int     `json:"BufferFlushInterval" yaml:"BufferFlushInterval"` //buff刷新间隔,可选:默认1  单位:秒
}

Config 配置文件

Jump to

Keyboard shortcuts

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