extension

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package extension provides utilities to create a Flow component from OpenTelemetry Collector extensions.

Other OpenTelemetry Collector extensions are better served as generic Flow components rather than being placed in the otelcol namespace.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arguments

type Arguments interface {
	component.Arguments

	// Convert converts the Arguments into an OpenTelemetry Collector
	// extension configuration.
	Convert() (otelconfig.Extension, error)

	// Extensions returns the set of extensions that the configured component is
	// allowed to use.
	Extensions() map[otelconfig.ComponentID]otelcomponent.Extension

	// Exporters returns the set of exporters that are exposed to the configured
	// component.
	Exporters() map[otelconfig.DataType]map[otelconfig.ComponentID]otelcomponent.Exporter
}

Arguments is an extension of component.Arguments which contains necessary settings for OpenTelemetry Collector extensions.

type Extension

type Extension struct {
	// contains filtered or unexported fields
}

Extension is a Flow component shim which manages an OpenTelemetry Collector extension.

func New

New creates a new Flow component which encapsulates an OpenTelemetry Collector extension. args must hold a value of the argument type registered with the Flow component.

func (*Extension) CurrentHealth

func (e *Extension) CurrentHealth() component.Health

CurrentHealth implements component.HealthComponent.

func (*Extension) Run

func (e *Extension) Run(ctx context.Context) error

Run starts the Extension component.

func (*Extension) Update

func (e *Extension) Update(args component.Arguments) error

Update implements component.Component. It will convert the Arguments into configuration for OpenTelemetry Collector extension configuration and manage the underlying OpenTelemetry Collector extension.

Jump to

Keyboard shortcuts

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