Documentation ¶
Overview ¶
Package service handles the command-line, configuration, and runs the OpenTelemetry Collector.
Index ¶
- func FileLoaderConfigFactory(v *viper.Viper, factories config.Factories) (*configmodels.Config, error)
- type Application
- func (app *Application) Command() *cobra.Command
- func (app *Application) GetExporters() map[configmodels.DataType]map[configmodels.Exporter]component.Exporter
- func (app *Application) GetExtensions() map[configmodels.Extension]component.ServiceExtension
- func (app *Application) GetFactory(kind component.Kind, componentType configmodels.Type) component.Factory
- func (app *Application) GetLogger() *zap.Logger
- func (app *Application) GetStateChannel() chan State
- func (app *Application) RegisterZPages(mux *http.ServeMux, pathPrefix string)
- func (app *Application) ReportFatalError(err error)
- func (app *Application) SignalTestComplete()
- func (app *Application) Start() error
- type ApplicationStartInfo
- type ConfigFactory
- type Parameters
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileLoaderConfigFactory ¶
func FileLoaderConfigFactory(v *viper.Viper, factories config.Factories) (*configmodels.Config, error)
FileLoaderConfigFactory implements ConfigFactory and it creates configuration from file.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
Application represents a collector application
func New ¶
func New(params Parameters) (*Application, error)
New creates and returns a new instance of Application.
func (*Application) Command ¶
func (app *Application) Command() *cobra.Command
Command returns Application's root command.
func (*Application) GetExporters ¶
func (app *Application) GetExporters() map[configmodels.DataType]map[configmodels.Exporter]component.Exporter
func (*Application) GetExtensions ¶
func (app *Application) GetExtensions() map[configmodels.Extension]component.ServiceExtension
func (*Application) GetFactory ¶
func (app *Application) GetFactory(kind component.Kind, componentType configmodels.Type) component.Factory
func (*Application) GetLogger ¶
func (app *Application) GetLogger() *zap.Logger
GetLogger returns logger used by the Application. The logger is initialized after application start.
func (*Application) GetStateChannel ¶
func (app *Application) GetStateChannel() chan State
GetStateChannel returns state channel of the application.
func (*Application) RegisterZPages ¶
func (app *Application) RegisterZPages(mux *http.ServeMux, pathPrefix string)
func (*Application) ReportFatalError ¶
func (app *Application) ReportFatalError(err error)
ReportFatalError is used to report to the host that the receiver encountered a fatal error (i.e.: an error that the instance can't recover from) after its start function has already returned.
func (*Application) SignalTestComplete ¶ added in v0.5.0
func (app *Application) SignalTestComplete()
func (*Application) Start ¶
func (app *Application) Start() error
Start starts the collector according to the command and configuration given by the user.
type ApplicationStartInfo ¶
type ApplicationStartInfo struct { // Executable file name, e.g. "otelcol". ExeName string // Long name, used e.g. in the logs. LongName string // Version string. Version string // Git hash of the source code. GitHash string }
ApplicationStartInfo is the information that is logged at the application start. This information can be overridden in custom builds.
type ConfigFactory ¶
ConfigFactory creates config.
type Parameters ¶
type Parameters struct { // Factories component factories. Factories config.Factories // ApplicationStartInfo provides application start information. ApplicationStartInfo ApplicationStartInfo // ConfigFactory that creates the configuration. // If it is not provided the default factory (FileLoaderConfigFactory) is used. // The default factory loads the configuration specified as a command line flag. ConfigFactory ConfigFactory // LoggingHooks provides a way to supply a hook into logging events LoggingHooks []func(zapcore.Entry) error }
Parameters holds configuration for creating a new Application.
Directories ¶
Path | Synopsis |
---|---|
Package builder handles the options to build the OpenTelemetry collector pipeline.
|
Package builder handles the options to build the OpenTelemetry collector pipeline. |
Package defaultcomponents composes the default set of components used by the otel service
|
Package defaultcomponents composes the default set of components used by the otel service |