Documentation ¶
Overview ¶
Package service handles the command-line, configuration, and runs the OpenTelemetry Collector.
Index ¶
Constants ¶
This section is empty.
Variables ¶
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( factories config.Factories, appInfo ApplicationStartInfo, ) (*Application, error)
New creates and returns a new instance of Application.
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.