Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateConfig ¶
Types ¶
type Config ¶
type Config struct {
ServiceName string
ServiceVersion string
Environment string
Sampler SamplerType
TraceIDRatio float64
MaxQueueSize int
MaxExportBatchSize int
BatchTimeout time.Duration
ExportTimeout time.Duration
}
func DefaultConfig ¶
type ExporterFactory ¶
type ExporterFactory func(ctx context.Context) (sdktrace.SpanExporter, error)
type OTLPConfig ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithIDGenerator ¶
func WithIDGenerator(idGen trace.IDGenerator) Option
func WithPropagator ¶
func WithPropagator(p propagation.TextMapPropagator) Option
func WithResource ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func (*Provider) Propagator ¶
func (p *Provider) Propagator() propagation.TextMapPropagator
func (*Provider) TracerProvider ¶
func (p *Provider) TracerProvider() *sdktrace.TracerProvider
type SamplerType ¶
type SamplerType string
const ( SamplerAlwaysOn SamplerType = "always_on" SamplerAlwaysOff SamplerType = "always_off" SamplerTraceIDRatio SamplerType = "traceidratio" )
func ParseSampler ¶
func ParseSampler(sampler string) (SamplerType, error)
type TraceConfig ¶
type TraceConfig struct {
Enable bool `yaml:"enable"`
ServiceVersion string `yaml:"service_version"`
Sampler string `yaml:"sampler"`
TraceIDRatio float64 `yaml:"trace_id_ratio"`
OTLP OTLPConfig `yaml:"otlp"`
}
Click to show internal directories.
Click to hide internal directories.