Documentation
¶
Index ¶
- type Agent
- type Collector
- type Jaeger
- func (j *Jaeger) AddOperationSampling(operation string, maxTracesPerSecond int, probabilisticSampling float64) *Jaeger
- func (j *Jaeger) AddTag(key, value string) *Jaeger
- func (j *Jaeger) Clone() internal.Configurable
- func (j *Jaeger) Disable() *Jaeger
- func (j *Jaeger) Enable() *Jaeger
- func (j *Jaeger) Get() interface{}
- func (j *Jaeger) IsEnabled() bool
- func (j *Jaeger) Set(data interface{})
- func (j *Jaeger) Validate() error
- func (j *Jaeger) WithAgent(host string, port int) *Jaeger
- func (j *Jaeger) WithCollector(endpoint, username, password string) *Jaeger
- func (j *Jaeger) WithEnabled(enabled bool) *Jaeger
- func (j *Jaeger) WithEndpoint(endpoint string) *Jaeger
- func (j *Jaeger) WithModuleName(moduleName string) *Jaeger
- func (j *Jaeger) WithSampleRate(sampleRate float64) *Jaeger
- func (j *Jaeger) WithSampling(samplingType string, param float64, maxTracesPerSecond int) *Jaeger
- func (j *Jaeger) WithServiceName(serviceName string) *Jaeger
- type OperationSampling
- type Sampling
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
Host string `mapstructure:"host" yaml:"host" json:"host"` // Agent主机
Port int `mapstructure:"port" yaml:"port" json:"port"` // Agent端口
}
Agent Agent配置
type Collector ¶
type Collector struct {
Endpoint string `mapstructure:"endpoint" yaml:"endpoint" json:"endpoint"` // Collector端点
Username string `mapstructure:"username" yaml:"username" json:"username"` // 用户名
Password string `mapstructure:"password" yaml:"password" json:"password"` // 密码
}
Collector Collector配置
type Jaeger ¶
type Jaeger struct {
ModuleName string `mapstructure:"module-name" yaml:"module-name" json:"moduleName"` // 模块名称
Enabled bool `mapstructure:"enabled" yaml:"enabled" json:"enabled"` // 是否启用Jaeger
Endpoint string `mapstructure:"endpoint" yaml:"endpoint" json:"endpoint"` // Jaeger端点
ServiceName string `mapstructure:"service-name" yaml:"service-name" json:"serviceName"` // 服务名称
SampleRate float64 `mapstructure:"sample-rate" yaml:"sample-rate" json:"sampleRate"` // 采样率
Agent *Agent `mapstructure:"agent" yaml:"agent" json:"agent"` // Agent配置
Collector *Collector `mapstructure:"collector" yaml:"collector" json:"collector"` // Collector配置
Sampling *Sampling `mapstructure:"sampling" yaml:"sampling" json:"sampling"` // 采样配置
Tags map[string]string `mapstructure:"tags" yaml:"tags" json:"tags"` // 全局标签
}
Jaeger Jaeger配置
func (*Jaeger) AddOperationSampling ¶
func (j *Jaeger) AddOperationSampling(operation string, maxTracesPerSecond int, probabilisticSampling float64) *Jaeger
AddOperationSampling 添加操作采样
func (*Jaeger) WithCollector ¶
WithCollector 设置Collector配置
func (*Jaeger) WithEndpoint ¶
WithEndpoint 设置端点
func (*Jaeger) WithModuleName ¶
WithModuleName 设置模块名称
func (*Jaeger) WithSampleRate ¶
WithSampleRate 设置采样率
func (*Jaeger) WithSampling ¶
WithSampling 设置采样配置
func (*Jaeger) WithServiceName ¶
WithServiceName 设置服务名称
type OperationSampling ¶
type OperationSampling struct {
Operation string `mapstructure:"operation" yaml:"operation" json:"operation"` // 操作名称
MaxTracesPerSecond int `mapstructure:"max-traces-per-second" yaml:"max-traces-per-second" json:"maxTracesPerSecond"` // 每秒最大追踪数
ProbabilisticSampling float64 `mapstructure:"probabilistic-sampling" yaml:"probabilistic-sampling" json:"probabilisticSampling"` // 概率采样
}
OperationSampling 操作采样配置
type Sampling ¶
type Sampling struct {
Type string `mapstructure:"type" yaml:"type" json:"type"` // 采样类型
Param float64 `mapstructure:"param" yaml:"param" json:"param"` // 采样参数
MaxTracesPerSecond int `mapstructure:"max-traces-per-second" yaml:"max-traces-per-second" json:"maxTracesPerSecond"` // 每秒最大追踪数
OperationSampling []OperationSampling `mapstructure:"operation-sampling" yaml:"operation-sampling" json:"operationSampling"` // 操作采样
}
Sampling 采样配置
Click to show internal directories.
Click to hide internal directories.