transform

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package transform provides an otelcol.processor.transform component.

Index

Constants

This section is empty.

Variables

View Source
var DefaultArguments = Arguments{
	ErrorMode: ottl.PropagateError,
}

DefaultArguments holds default settings for Arguments.

Functions

This section is empty.

Types

type Arguments

type Arguments struct {
	// ErrorMode determines how the processor reacts to errors that occur while processing a statement.
	ErrorMode        ottl.ErrorMode         `alloy:"error_mode,attr,optional"`
	TraceStatements  ContextStatementsSlice `alloy:"trace_statements,block,optional"`
	MetricStatements ContextStatementsSlice `alloy:"metric_statements,block,optional"`
	LogStatements    ContextStatementsSlice `alloy:"log_statements,block,optional"`

	// Output configures where to send processed data. Required.
	Output *otelcol.ConsumerArguments `alloy:"output,block"`

	// DebugMetrics configures component internal metrics. Optional.
	DebugMetrics otelcolCfg.DebugMetricsArguments `alloy:"debug_metrics,block,optional"`
}

Arguments configures the otelcol.processor.transform component.

func (Arguments) Convert

func (args Arguments) Convert() (otelcomponent.Config, error)

Convert implements processor.Arguments.

func (Arguments) DebugMetricsConfig added in v1.2.0

func (args Arguments) DebugMetricsConfig() otelcolCfg.DebugMetricsArguments

DebugMetricsConfig implements processor.Arguments.

func (Arguments) Exporters

func (args Arguments) Exporters() map[pipeline.Signal]map[otelcomponent.ID]otelcomponent.Component

Exporters implements processor.Arguments.

func (Arguments) Extensions

func (args Arguments) Extensions() map[otelcomponent.ID]otelextension.Extension

Extensions implements processor.Arguments.

func (Arguments) NextConsumers

func (args Arguments) NextConsumers() *otelcol.ConsumerArguments

NextConsumers implements processor.Arguments.

func (*Arguments) SetToDefault

func (args *Arguments) SetToDefault()

SetToDefault implements syntax.Defaulter.

func (*Arguments) Validate

func (args *Arguments) Validate() error

Validate implements syntax.Validator.

type ContextID

type ContextID string
const (
	Resource  ContextID = "resource"
	Scope     ContextID = "scope"
	Span      ContextID = "span"
	SpanEvent ContextID = "spanevent"
	Metric    ContextID = "metric"
	DataPoint ContextID = "datapoint"
	Log       ContextID = "log"
)

func (*ContextID) UnmarshalText

func (c *ContextID) UnmarshalText(text []byte) error

type ContextStatements

type ContextStatements struct {
	Context    ContextID `alloy:"context,attr"`
	Statements []string  `alloy:"statements,attr"`
}

type ContextStatementsSlice

type ContextStatementsSlice []ContextStatements

Jump to

Keyboard shortcuts

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