Documentation
¶
Index ¶
Constants ¶
View Source
const ( TracingClientGRPC string = "grpc" TracingClientHTTP string = "http" AlwaysSample string = "alwayssample" NeverSample string = "neversample" TraceIDRatioBasedSample string = "traceidratiobased" ParentBasedAlwaysSample string = "parentbasedalwayssample" ParentBasedNeverSample string = "parentbasedneversample" ParentBasedTraceIDRatioBasedSample string = "parentbasedtraceidratiobased" )
Variables ¶
This section is empty.
Functions ¶
func NewTLSConfig ¶
NewTLSConfig creates a new tls.Config from the given TLSConfig.
func NewTracerProvider ¶
func NewTracerProvider(ctx context.Context, logger log.Logger, conf []byte) (*tracesdk.TracerProvider, error)
NewOTELTracer returns an OTLP exporter based tracer.
Types ¶
type Config ¶
type Config struct {
ClientType string `yaml:"client_type"`
ServiceName string `yaml:"service_name"`
ResourceAttributes map[string]string `yaml:"resource_attributes"`
ReconnectionPeriod time.Duration `yaml:"reconnection_period"`
Compression string `yaml:"compression"`
Insecure bool `yaml:"insecure"`
Endpoint string `yaml:"endpoint"`
URLPath string `yaml:"url_path"`
Timeout time.Duration `yaml:"timeout"`
RetryConfig retryConfig `yaml:"retry_config"`
Headers map[string]string `yaml:"headers"`
TLSConfig TLSConfig `yaml:"tls_config"`
SamplerType string `yaml:"sampler_type"`
SamplerParam string `yaml:"sampler_param"`
}
type TLSConfig ¶
type TLSConfig struct {
// The CA cert to use for the targets.
CAFile string `yaml:"ca_file"`
// The client cert file for the targets.
CertFile string `yaml:"cert_file"`
// The client key file for the targets.
KeyFile string `yaml:"key_file"`
// Used to verify the hostname for the targets.
ServerName string `yaml:"server_name"`
// Disable target certificate validation.
InsecureSkipVerify bool `yaml:"insecure_skip_verify"`
}
TLSConfig configures the options for TLS connections.
Click to show internal directories.
Click to hide internal directories.