extension

package module
v0.109.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 4 Imported by: 141

README

General Information

Extensions provide capabilities on top of the primary functionality of the collector. Generally, extensions are used for implementing components that can be added to the Collector, but which do not require direct access to telemetry data and are not part of the pipelines (like receivers, processors or exporters). Example extensions are: Health Check extension that responds to health check requests or PProf extension that allows fetching Collector's performance profile.

Supported service extensions (sorted alphabetically):

The contributors repository may have more extensions that can be added to custom builds of the Collector.

Ordering Extensions

The order extensions are specified for the service is important as this is the order in which each extension will be started and the reverse order in which they will be shutdown. The ordering is determined in the extensions tag under the service tag in the configuration file, example:

service:
  # Extensions specified below are going to be loaded by the service in the
  # order given below, and shutdown on reverse order.
  extensions: [extension1, extension2]

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeFactoryMap

func MakeFactoryMap(factories ...Factory) (map[component.Type]Factory, error)

MakeFactoryMap takes a list of factories and returns a map with Factory type as keys. It returns a non-nil error when there are factories with duplicate type.

Types

type ConfigWatcher deprecated added in v0.83.0

type ConfigWatcher = internal.ConfigWatcher

Deprecated: [v0.109.0] Use [extensioncapabilities.ConfigWatcher] instead.

type CreateFunc

type CreateFunc func(context.Context, Settings, component.Config) (Extension, error)

CreateFunc is the equivalent of Factory.Create(...) function.

func (CreateFunc) CreateExtension

func (f CreateFunc) CreateExtension(ctx context.Context, set Settings, cfg component.Config) (Extension, error)

CreateExtension implements Factory.Create.

type Dependent deprecated added in v0.89.0

type Dependent = internal.Dependent

Deprecated: [v0.109.0] Use [extensioncapabilities.Dependent] instead.

type Extension

type Extension = internal.Extension

Extension is the interface for objects hosted by the OpenTelemetry Collector that don't participate directly on data pipelines but provide some functionality to the service, examples: health check endpoint, z-pages, etc.

type Factory

type Factory interface {
	component.Factory

	// CreateExtension creates an extension based on the given config.
	CreateExtension(ctx context.Context, set Settings, cfg component.Config) (Extension, error)

	// ExtensionStability gets the stability level of the Extension.
	ExtensionStability() component.StabilityLevel
	// contains filtered or unexported methods
}

func NewFactory

func NewFactory(
	cfgType component.Type,
	createDefaultConfig component.CreateDefaultConfigFunc,
	createServiceExtension CreateFunc,
	sl component.StabilityLevel) Factory

NewFactory returns a new Factory based on this configuration.

type ModuleInfo added in v0.108.0

type ModuleInfo struct {
	Receiver  map[component.Type]string
	Processor map[component.Type]string
	Exporter  map[component.Type]string
	Extension map[component.Type]string
	Connector map[component.Type]string
}

ModuleInfo describes the go module for each component.

type PipelineWatcher deprecated

type PipelineWatcher = internal.PipelineWatcher

Deprecated: [v0.109.0] Use [extensioncapabilities.PipelineWatcher] instead.

type Settings added in v0.103.0

type Settings struct {
	// ID returns the ID of the component that will be created.
	ID component.ID

	component.TelemetrySettings

	// BuildInfo can be used by components for informational purposes
	BuildInfo component.BuildInfo

	// ModuleInfo describes the go module for each component.
	ModuleInfo ModuleInfo
}

Settings is passed to Factory.Create(...) function.

Directories

Path Synopsis
auth module
experimental
storage Module

Jump to

Keyboard shortcuts

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