connector

package
v0.36.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package connector exposes utilities to create a Flow component from OpenTelemetry Collector connectors.

Index

Constants

View Source
const (
	ConnectorTracesToTraces = iota
	ConnectorTracesToMetrics
	ConnectorTracesToLogs
	ConnectorMetricsToTraces
	ConnectorMetricsToMetrics
	ConnectorMetricsToLogs
	ConnectorLogsToTraces
	ConnectorLogsToMetrics
	ConnectorLogsToLogs
)

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 connector
	// configuration.
	Convert() (otelcomponent.Config, error)

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

	// Exporters returns the set of exporters that are exposed to the configured
	// component.
	Exporters() map[otelcomponent.DataType]map[otelcomponent.ID]otelcomponent.Component

	// NextConsumers returns the set of consumers to send data to.
	NextConsumers() *otelcol.ConsumerArguments

	ConnectorType() int
}

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

type Connector

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

Connector is a Flow component shim which manages an OpenTelemetry Collector connector component.

func New

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

The registered component must be registered to export the otelcol.ConsumerExports type, otherwise New will panic.

func (*Connector) CurrentHealth

func (p *Connector) CurrentHealth() component.Health

CurrentHealth implements component.HealthComponent.

func (*Connector) Run

func (p *Connector) Run(ctx context.Context) error

Run starts the Connector component.

func (*Connector) Update

func (p *Connector) Update(args component.Arguments) error

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

Directories

Path Synopsis
Package spanmetrics provides an otelcol.connector.spanmetrics component.
Package spanmetrics provides an otelcol.connector.spanmetrics component.

Jump to

Keyboard shortcuts

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