Documentation
¶
Index ¶
- Constants
- Variables
- func ExtractHTTPHeader(ctx context.Context, headers http.Header) context.Context
- func InitTracer(ctx context.Context, cfg Config, resource *resource.Resource) (func(context.Context) error, error)
- func InjectHTTPHeader(ctx context.Context, headers http.Header)
- func ResetTracer()
- func SetTracer(name string)
- func Tracer() trace.Tracer
- type Config
- type Mode
Constants ¶
View Source
const ( ModeDisable = "disable" // Disable trace ModeConsole = "console" // trace in console ModeRemote = "remote" // trace in remote backend )
Variables ¶
View Source
var ( ErrHTTPCollectionEndpointRequired = errors.New("http collection endpoint is required for remote mode") ErrBatchTimeoutMustBePositive = errors.New("http collection endpoint is required for remote mode") )
Functions ¶
func ExtractHTTPHeader ¶
func InitTracer ¶
func ResetTracer ¶
func ResetTracer()
Types ¶
type Config ¶
type Config struct {
Mode Mode `koanf:"mode"` // Operating mode for the metrics system
HTTPCollectionEndpoint string `koanf:"http_collection_endpoint"`
GRPCCollectionEndpoint string `koanf:"grpc_collection_endpoint"`
BatchTimeout time.Duration `koanf:"batch_timeout"`
BatchSize int `koanf:"batch_size"`
SSLMode bool `koanf:"ssl_mode"`
SamplingRatio float64 `koanf:"sampling_ratio"` // Sampling rate (0-1)
}
Config holds the quick-connect traces system configuration.
Click to show internal directories.
Click to hide internal directories.