graph

package
v0.119.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Overview

Package graph contains the internal graph representation of the pipelines.

Build is the constructor for a Graph object. The method calls out to helpers that transform the graph from a config to a DAG of components. The configuration undergoes additional validation here as well, and is used to instantiate the components of the pipeline.

Graph.StartAll starts all components in each pipeline.

Graph.ShutdownAll stops all components in each pipeline.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Graph

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

func Build

func Build(ctx context.Context, set Settings) (*Graph, error)

Build builds a full pipeline graph. Build also validates the configuration of the pipelines and does the actual initialization of each Component in the Graph.

func (*Graph) GetExporters

func (g *Graph) GetExporters() map[pipeline.Signal]map[component.ID]component.Component

func (*Graph) HandleZPages

func (g *Graph) HandleZPages(w http.ResponseWriter, r *http.Request)

func (*Graph) ShutdownAll

func (g *Graph) ShutdownAll(ctx context.Context, reporter status.Reporter) error

func (*Graph) StartAll

func (g *Graph) StartAll(ctx context.Context, host *Host) error

type Host added in v0.108.0

type Host struct {
	AsyncErrorChannel chan error
	Receivers         *builders.ReceiverBuilder
	Processors        *builders.ProcessorBuilder
	Exporters         *builders.ExporterBuilder
	Connectors        *builders.ConnectorBuilder
	Extensions        *builders.ExtensionBuilder

	ModuleInfo extension.ModuleInfo
	BuildInfo  component.BuildInfo

	Pipelines         *Graph
	ServiceExtensions *extensions.Extensions

	Reporter status.Reporter
}

func (*Host) GetExporters deprecated added in v0.108.0

func (host *Host) GetExporters() map[pipeline.Signal]map[component.ID]component.Component

Deprecated: [0.79.0] This function will be removed in the future. Several components in the contrib repository use this function so it cannot be removed before those cases are removed. In most cases, use of this function can be replaced by a connector. See https://github.com/open-telemetry/opentelemetry-collector/issues/7370 and https://github.com/open-telemetry/opentelemetry-collector/pull/7390#issuecomment-1483710184 for additional information.

func (*Host) GetExtensions added in v0.108.0

func (host *Host) GetExtensions() map[component.ID]component.Component

func (*Host) GetFactory added in v0.108.0

func (host *Host) GetFactory(kind component.Kind, componentType component.Type) component.Factory

func (*Host) NotifyComponentStatusChange added in v0.108.0

func (host *Host) NotifyComponentStatusChange(source *componentstatus.InstanceID, event *componentstatus.Event)

func (*Host) RegisterZPages added in v0.108.0

func (host *Host) RegisterZPages(mux *http.ServeMux, pathPrefix string)

type HostWrapper added in v0.108.0

type HostWrapper struct {
	*Host
	InstanceID *componentstatus.InstanceID
}

func (*HostWrapper) Report added in v0.108.0

func (host *HostWrapper) Report(event *componentstatus.Event)

type Settings

type Settings struct {
	Telemetry component.TelemetrySettings
	BuildInfo component.BuildInfo

	ReceiverBuilder  *builders.ReceiverBuilder
	ProcessorBuilder *builders.ProcessorBuilder
	ExporterBuilder  *builders.ExporterBuilder
	ConnectorBuilder *builders.ConnectorBuilder

	// PipelineConfigs is a map of component.ID to PipelineConfig.
	PipelineConfigs pipelines.Config

	ReportStatus status.ServiceStatusFunc
}

Settings holds configuration for building builtPipelines.

Jump to

Keyboard shortcuts

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