Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProvider ¶
func NewProvider(opts ...Option) (*tracesdk.TracerProvider, error)
NewProvider create an instance of tracer provider
Types ¶
type Config ¶
type Config struct { // ServiceName customize service name ServiceName string `yaml:"serviceName"` // EndPoint the jaeger endpoint EndPoint string `yaml:"endpoint"` // InstanceID MUST be unique for each instance of the same InstanceID string `yaml:"instanceID"` //SamplingRatio customize sampling ratio //ratio >= 1 will always sample (default),< 0 are treated as zero will no sample // if you set this to .5, half of traces will be sampled SamplingRatio string `yaml:"samplingRatio"` }
Config is the config for tracer
type Option ¶
type Option func(ops *optionParams) error
Option the tracer provider option
func WithEndpoint ¶
WithEndpoint defines the full URL to the Jaeger HTTP Thrift collector
func WithInstanceID ¶
WithInstanceID defines the instance id
func WithSamplingRatio ¶ added in v1.6.3
WithSamplingRatio defines the sampling ratio
func WithServiceName ¶
WithServiceName defines service name
Click to show internal directories.
Click to hide internal directories.