app

package
v1.34.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2022 License: Apache-2.0 Imports: 23 Imported by: 63

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlags added in v0.6.0

func AddFlags(flags *flag.FlagSet)

AddFlags adds flags for Builder.

Types

type Agent

type Agent struct {
	// contains filtered or unexported fields
}

Agent is a composition of all services / components

func NewAgent

func NewAgent(
	processors []processors.Processor,
	httpServer *http.Server,
	logger *zap.Logger,
) *Agent

NewAgent creates the new Agent.

func (*Agent) GetHTTPRouter added in v1.17.0

func (a *Agent) GetHTTPRouter() *mux.Router

GetHTTPRouter returns Gorilla HTTP router used by the agent's HTTP server.

func (*Agent) HTTPAddr added in v1.1.0

func (a *Agent) HTTPAddr() string

HTTPAddr returns the address that HTTP server is listening on

func (*Agent) Run

func (a *Agent) Run() error

Run runs all of agent UDP and HTTP servers in separate go-routines. It returns an error when it's immediately apparent on startup, but any errors happening after starting the servers are only logged.

func (*Agent) Stop

func (a *Agent) Stop()

Stop forces all agent go routines to exit.

type Builder

type Builder struct {
	Processors []ProcessorConfiguration `yaml:"processors"`
	HTTPServer HTTPServerConfiguration  `yaml:"httpServer"`
	// contains filtered or unexported fields
}

Builder Struct to hold configurations

func (*Builder) CreateAgent

func (b *Builder) CreateAgent(primaryProxy CollectorProxy, logger *zap.Logger, mFactory metrics.Factory) (*Agent, error)

CreateAgent creates the Agent

func (*Builder) InitFromViper added in v0.6.0

func (b *Builder) InitFromViper(v *viper.Viper) *Builder

InitFromViper initializes Builder with properties retrieved from Viper.

func (*Builder) WithReporter

func (b *Builder) WithReporter(r ...reporter.Reporter) *Builder

WithReporter adds auxiliary reporters.

type CollectorProxy added in v1.8.0

type CollectorProxy interface {
	GetReporter() reporter.Reporter
	GetManager() configmanager.ClientConfigManager
	io.Closer
}

CollectorProxy provides access to Reporter and ClientConfigManager

func CreateCollectorProxy added in v1.11.0

func CreateCollectorProxy(
	opts ProxyBuilderOptions,
	builders map[reporter.Type]CollectorProxyBuilder,
) (CollectorProxy, error)

CreateCollectorProxy creates collector proxy

type CollectorProxyBuilder added in v1.18.0

type CollectorProxyBuilder func(ProxyBuilderOptions) (CollectorProxy, error)

CollectorProxyBuilder is a func which builds CollectorProxy.

func GRPCCollectorProxyBuilder added in v1.18.0

func GRPCCollectorProxyBuilder(builder *grpc.ConnBuilder) CollectorProxyBuilder

GRPCCollectorProxyBuilder creates CollectorProxyBuilder for GRPC reporter

type HTTPServerConfiguration

type HTTPServerConfiguration struct {
	HostPort string `yaml:"hostPort" validate:"nonzero"`
}

HTTPServerConfiguration holds config for a server providing sampling strategies and baggage restrictions to clients

type Model added in v1.3.0

type Model string

Model used to distinguish the data transfer model

type ProcessorConfiguration

type ProcessorConfiguration struct {
	Workers  int                 `yaml:"workers"`
	Model    Model               `yaml:"model"`
	Protocol Protocol            `yaml:"protocol"`
	Server   ServerConfiguration `yaml:"server"`
}

ProcessorConfiguration holds config for a processor that receives spans from Server

func (*ProcessorConfiguration) GetThriftProcessor

func (c *ProcessorConfiguration) GetThriftProcessor(
	mFactory metrics.Factory,
	factory thrift.TProtocolFactory,
	handler processors.AgentProcessor,
	logger *zap.Logger,
) (processors.Processor, error)

GetThriftProcessor gets a TBufferedServer backed Processor using the collector configuration

type Protocol added in v1.3.0

type Protocol string

Protocol used to distinguish the data transfer protocol

type ProxyBuilderOptions added in v1.18.0

type ProxyBuilderOptions struct {
	reporter.Options
	Logger  *zap.Logger
	Metrics metrics.Factory
}

ProxyBuilderOptions holds config for CollectorProxyBuilder

type ServerConfiguration

type ServerConfiguration struct {
	QueueSize        int    `yaml:"queueSize"`
	MaxPacketSize    int    `yaml:"maxPacketSize"`
	SocketBufferSize int    `yaml:"socketBufferSize"`
	HostPort         string `yaml:"hostPort" validate:"nonzero"`
}

ServerConfiguration holds config for a server that receives spans from the network

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL