Documentation ¶
Index ¶
- Constants
- Variables
- func ApplyGRPCEnvConfigs(cfg *Config)
- func ApplyHTTPEnvConfigs(cfg *Config)
- func CreateTLSConfig(certBytes []byte) (*tls.Config, error)
- type Compression
- type Config
- type EnvOptionsReader
- type GRPCOption
- type GenericOption
- func WithCompression(compression Compression) GenericOption
- func WithEndpoint(endpoint string) GenericOption
- func WithHeaders(headers map[string]string) GenericOption
- func WithInsecure() GenericOption
- func WithRetry(rc retry.Config) GenericOption
- func WithSecure() GenericOption
- func WithTLSClientConfig(tlsCfg *tls.Config) GenericOption
- func WithTimeout(duration time.Duration) GenericOption
- func WithURLPath(urlPath string) GenericOption
- type HTTPOption
- type Marshaler
- type SignalConfig
Constants ¶
View Source
const ( // DefaultTracesPath is a default URL path for endpoint that // receives spans. DefaultTracesPath string = "/v1/traces" // DefaultTimeout is a default max waiting time for the backend to process // each span batch. DefaultTimeout time.Duration = 10 * time.Second )
View Source
const ( // DefaultCollectorPort is the port the Exporter will attempt connect to // if no collector port is provided. DefaultCollectorPort uint16 = 4317 // DefaultCollectorHost is the host address the Exporter will attempt // connect to if no collector address is provided. DefaultCollectorHost string = "localhost" )
Variables ¶
View Source
var ErrAppendCerificate = errors.New("failed to append certificate to the cert pool")
Functions ¶
func ApplyGRPCEnvConfigs ¶
func ApplyGRPCEnvConfigs(cfg *Config)
func ApplyHTTPEnvConfigs ¶
func ApplyHTTPEnvConfigs(cfg *Config)
Types ¶
type Compression ¶
type Compression int
Compression describes the compression used for payloads sent to the collector.
const ( // NoCompression tells the driver to send payloads without // compression. NoCompression Compression = iota // GzipCompression tells the driver to send payloads after // compressing them with gzip. GzipCompression )
type Config ¶
type Config struct { // Signal specific configurations Traces SignalConfig RetryConfig retry.Config // gRPC configurations ReconnectionPeriod time.Duration ServiceConfig string DialOptions []grpc.DialOption GRPCConn *grpc.ClientConn }
func NewDefaultConfig ¶
func NewDefaultConfig() Config
type EnvOptionsReader ¶
type EnvOptionsReader struct { GetEnv func(string) string ReadFile func(filename string) ([]byte, error) }
func (*EnvOptionsReader) ApplyGRPCEnvConfigs ¶
func (e *EnvOptionsReader) ApplyGRPCEnvConfigs(cfg *Config)
func (*EnvOptionsReader) ApplyHTTPEnvConfigs ¶
func (e *EnvOptionsReader) ApplyHTTPEnvConfigs(cfg *Config)
func (*EnvOptionsReader) GetOptionsFromEnv ¶
func (e *EnvOptionsReader) GetOptionsFromEnv() []GenericOption
type GRPCOption ¶
type GRPCOption interface { ApplyGRPCOption(*Config) // contains filtered or unexported methods }
GRPCOption applies an option to the gRPC driver.
func NewGRPCOption ¶
func NewGRPCOption(fn func(cfg *Config)) GRPCOption
type GenericOption ¶
type GenericOption interface { ApplyHTTPOption(*Config) ApplyGRPCOption(*Config) // contains filtered or unexported methods }
GenericOption applies an option to the HTTP or gRPC driver.
func WithCompression ¶
func WithCompression(compression Compression) GenericOption
func WithEndpoint ¶
func WithEndpoint(endpoint string) GenericOption
func WithHeaders ¶
func WithHeaders(headers map[string]string) GenericOption
func WithInsecure ¶
func WithInsecure() GenericOption
func WithRetry ¶
func WithRetry(rc retry.Config) GenericOption
func WithSecure ¶
func WithSecure() GenericOption
func WithTLSClientConfig ¶
func WithTLSClientConfig(tlsCfg *tls.Config) GenericOption
func WithTimeout ¶
func WithTimeout(duration time.Duration) GenericOption
func WithURLPath ¶
func WithURLPath(urlPath string) GenericOption
type HTTPOption ¶
type HTTPOption interface { ApplyHTTPOption(*Config) // contains filtered or unexported methods }
HTTPOption applies an option to the HTTP driver.
func NewHTTPOption ¶
func NewHTTPOption(fn func(cfg *Config)) HTTPOption
type Marshaler ¶
type Marshaler int
Marshaler describes the kind of message format sent to the collector
type SignalConfig ¶
type SignalConfig struct { Endpoint string Insecure bool TLSCfg *tls.Config Headers map[string]string Compression Compression Timeout time.Duration URLPath string // gRPC configurations GRPCCredentials credentials.TransportCredentials }
Click to show internal directories.
Click to hide internal directories.