service

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 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(
	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.

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