service

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2020 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package service handles the command-line, configuration, and runs the OpenTelemetry Collector.

Index

Constants

This section is empty.

Variables

View Source
var (
	// AppTelemetry is application's own telemetry.
	AppTelemetry = &appTelemetry{}
)

Functions

This section is empty.

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 added in v0.2.7

func (app *Application) Command() *cobra.Command

Command returns Application's root command.

func (*Application) Context

func (app *Application) Context() context.Context

Context returns a context provided by the host to be used on the receiver operations.

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) Start

func (app *Application) Start() error

Start starts the collector according to the command and configuration given by the user.

type ApplicationStartInfo added in v0.2.2

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 added in v0.2.8

type ConfigFactory func(v *viper.Viper, factories config.Factories) (*configmodels.Config, error)

ConfigFactory creates config.

type Parameters added in v0.2.8

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 will be used.
	// The default factory loads the configuration specified as a command line flag.
	ConfigFactory ConfigFactory
}

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.

Jump to

Keyboard shortcuts

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