Documentation ¶
Overview ¶
Package builder handles the options to build the OpenCensus collector pipeline.
Index ¶
- Constants
- func JaegerReceiverEnabled(v *viper.Viper, cmdFlag string) bool
- func OpenCensusReceiverEnabled(v *viper.Viper, cmdFlag string) bool
- func ZipkinReceiverEnabled(v *viper.Viper, cmdFlag string) bool
- type AttributesCfg
- type GlobalProcessorCfg
- type JaegerReceiverCfg
- type JaegerThriftHTTPSenderCfg
- type JaegerThriftTChannelSenderCfg
- type MultiSpanProcessorCfg
- type OpenCensusReceiverCfg
- type QueuedSpanProcessorCfg
- type SenderType
- type ZipkinReceiverCfg
Constants ¶
const ( // ThriftTChannelSenderType represents a thrift-format tchannel-transport sender ThriftTChannelSenderType SenderType = "jaeger-thrift-tchannel" // ThriftHTTPSenderType represents a thrift-format http-transport sender ThriftHTTPSenderType = "jaeger-thrift-http" // InvalidSenderType represents an invalid sender InvalidSenderType = "invalid" )
Variables ¶
This section is empty.
Functions ¶
func JaegerReceiverEnabled ¶
JaegerReceiverEnabled checks if the Jaeger receiver is enabled, via a command-line flag, environment variable, or configuration file.
func OpenCensusReceiverEnabled ¶
OpenCensusReceiverEnabled checks if the OpenCensus receiver is enabled, via a command-line flag, environment variable, or configuration file.
Types ¶
type AttributesCfg ¶ added in v0.1.0
type AttributesCfg struct { Overwrite bool `mapstructure:"overwrite"` Values map[string]interface{} `mapstructure:"values"` }
AttributesCfg holds configuration for attributes that can be added to all spans going through a processor.
type GlobalProcessorCfg ¶ added in v0.1.0
type GlobalProcessorCfg struct {
Attributes *AttributesCfg `mapstructure:"attributes"`
}
GlobalProcessorCfg holds global configuration values that apply to all processors
type JaegerReceiverCfg ¶
type JaegerReceiverCfg struct { // ThriftTChannelPort is the port that the relay receives on for jaeger thrift tchannel requests ThriftTChannelPort int `mapstructure:"jaeger-thrift-tchannel-port"` // ThriftHTTPPort is the port that the relay receives on for jaeger thrift http requests ThriftHTTPPort int `mapstructure:"jaeger-thrift-http-port"` }
JaegerReceiverCfg holds configuration for Jaeger receivers.
func NewDefaultJaegerReceiverCfg ¶
func NewDefaultJaegerReceiverCfg() *JaegerReceiverCfg
NewDefaultJaegerReceiverCfg returns an instance of JaegerReceiverCfg with default values
func (*JaegerReceiverCfg) InitFromViper ¶
func (cfg *JaegerReceiverCfg) InitFromViper(v *viper.Viper) (*JaegerReceiverCfg, error)
InitFromViper returns a JaegerReceiverCfg according to the configuration.
type JaegerThriftHTTPSenderCfg ¶ added in v0.0.4
type JaegerThriftHTTPSenderCfg struct { CollectorEndpoint string `mapstructure:"collector-endpoint"` Timeout time.Duration `mapstructure:"timeout"` Headers map[string]string `mapstructure:"headers"` }
JaegerThriftHTTPSenderCfg holds configuration for Jaeger Thrift HTTP sender
func NewJaegerThriftHTTPSenderCfg ¶ added in v0.0.4
func NewJaegerThriftHTTPSenderCfg() *JaegerThriftHTTPSenderCfg
NewJaegerThriftHTTPSenderCfg returns an instance of JaegerThriftHTTPSenderCfg with default values
type JaegerThriftTChannelSenderCfg ¶ added in v0.0.4
type JaegerThriftTChannelSenderCfg struct { CollectorHostPorts []string `mapstructure:"collector-host-ports"` DiscoveryMinPeers int `mapstructure:"discovery-min-peers"` DiscoveryConnCheckTimeout time.Duration `mapstructure:"discovery-conn-check-timeout"` }
JaegerThriftTChannelSenderCfg holds configuration for Jaeger Thrift Tchannel sender
func NewJaegerThriftTChannelSenderCfg ¶ added in v0.0.4
func NewJaegerThriftTChannelSenderCfg() *JaegerThriftTChannelSenderCfg
NewJaegerThriftTChannelSenderCfg returns an instance of JaegerThriftTChannelSenderCfg with default values
type MultiSpanProcessorCfg ¶ added in v0.0.4
type MultiSpanProcessorCfg struct { Processors []*QueuedSpanProcessorCfg Global *GlobalProcessorCfg `mapstructure:"global"` }
MultiSpanProcessorCfg holds configuration for all the span processors
func NewDefaultMultiSpanProcessorCfg ¶ added in v0.0.4
func NewDefaultMultiSpanProcessorCfg() *MultiSpanProcessorCfg
NewDefaultMultiSpanProcessorCfg returns an instance of MultiSpanProcessorCfg with default values
func (*MultiSpanProcessorCfg) InitFromViper ¶ added in v0.0.4
func (mOpts *MultiSpanProcessorCfg) InitFromViper(v *viper.Viper) *MultiSpanProcessorCfg
InitFromViper initializes MultiSpanProcessorCfg with properties from viper
type OpenCensusReceiverCfg ¶
type OpenCensusReceiverCfg struct { // Port is the port that the receiver will use Port int `mapstructure:"port"` }
OpenCensusReceiverCfg holds configuration for OpenCensus receiver.
func NewDefaultOpenCensusReceiverCfg ¶
func NewDefaultOpenCensusReceiverCfg() *OpenCensusReceiverCfg
NewDefaultOpenCensusReceiverCfg returns an instance of OpenCensusReceiverCfg with default values
func (*OpenCensusReceiverCfg) InitFromViper ¶
func (cfg *OpenCensusReceiverCfg) InitFromViper(v *viper.Viper) (*OpenCensusReceiverCfg, error)
InitFromViper returns a OpenCensusReceiverCfg according to the configuration.
type QueuedSpanProcessorCfg ¶ added in v0.0.4
type QueuedSpanProcessorCfg struct { // Name is the friendly name of the processor Name string // NumWorkers is the number of queue workers that dequeue batches and send them out NumWorkers int `mapstructure:"num-workers"` // QueueSize is the maximum number of batches allowed in queue at a given time QueueSize int `mapstructure:"queue-size"` // Retry indicates whether queue processor should retry span batches in case of processing failure RetryOnFailure bool `mapstructure:"retry-on-failure"` // BackoffDelay is the amount of time a worker waits after a failed send before retrying BackoffDelay time.Duration `mapstructure:"backoff-delay"` // SenderType indicates the type of sender to instantiate SenderType SenderType `mapstructure:"sender-type"` SenderConfig interface{} }
QueuedSpanProcessorCfg holds configuration for the queued span processor
func NewDefaultQueuedSpanProcessorCfg ¶ added in v0.0.4
func NewDefaultQueuedSpanProcessorCfg() *QueuedSpanProcessorCfg
NewDefaultQueuedSpanProcessorCfg returns an instance of QueuedSpanProcessorCfg with default values
func (*QueuedSpanProcessorCfg) InitFromViper ¶ added in v0.0.4
func (qOpts *QueuedSpanProcessorCfg) InitFromViper(v *viper.Viper) *QueuedSpanProcessorCfg
InitFromViper initializes QueuedSpanProcessorCfg with properties from viper
type ZipkinReceiverCfg ¶
type ZipkinReceiverCfg struct { // Port is the port that the receiver will use Port int `mapstructure:"port"` }
ZipkinReceiverCfg holds configuration for Zipkin receiver.
func NewDefaultZipkinReceiverCfg ¶
func NewDefaultZipkinReceiverCfg() *ZipkinReceiverCfg
NewDefaultZipkinReceiverCfg returns an instance of ZipkinReceiverCfg with default values
func (*ZipkinReceiverCfg) InitFromViper ¶
func (cfg *ZipkinReceiverCfg) InitFromViper(v *viper.Viper) (*ZipkinReceiverCfg, error)
InitFromViper returns a ZipkinReceiverCfg according to the configuration.