common

package
v0.135.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResourceFunctions added in v0.64.0

func ResourceFunctions() map[string]ottl.Factory[ottlresource.TransformContext]

func ScopeFunctions added in v0.64.0

func ScopeFunctions() map[string]ottl.Factory[ottlscope.TransformContext]

Types

type ContextID added in v0.64.0

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"
	Profile   ContextID = "profile"
)

func (*ContextID) UnmarshalText added in v0.64.0

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

type ContextStatements added in v0.64.0

type ContextStatements struct {
	Context    ContextID `mapstructure:"context"`
	Conditions []string  `mapstructure:"conditions"`
	Statements []string  `mapstructure:"statements"`
	// ErrorMode determines how the processor reacts to errors that occur while processing
	// this group of statements. When provided, it overrides the default Config ErrorMode.
	ErrorMode ottl.ErrorMode `mapstructure:"error_mode"`
}

func (ContextStatements) GetStatements added in v0.119.0

func (c ContextStatements) GetStatements() []string

type LogParserCollection added in v0.64.0

type LogParserCollection ottl.ParserCollection[LogsConsumer]

func NewLogParserCollection added in v0.64.0

func NewLogParserCollection(settings component.TelemetrySettings, options ...LogParserCollectionOption) (*LogParserCollection, error)

func (*LogParserCollection) ParseContextStatements added in v0.64.0

func (lpc *LogParserCollection) ParseContextStatements(contextStatements ContextStatements) (LogsConsumer, error)

type LogParserCollectionOption added in v0.64.0

type LogParserCollectionOption ottl.ParserCollectionOption[LogsConsumer]

func WithLogErrorMode added in v0.73.0

func WithLogErrorMode(errorMode ottl.ErrorMode) LogParserCollectionOption

func WithLogParser added in v0.65.0

type LogsConsumer added in v0.119.0

type LogsConsumer interface {
	Context() ContextID
	ConsumeLogs(ctx context.Context, ld plog.Logs) error
}

type MetricParserCollection added in v0.64.0

type MetricParserCollection ottl.ParserCollection[MetricsConsumer]

func NewMetricParserCollection added in v0.64.0

func NewMetricParserCollection(settings component.TelemetrySettings, options ...MetricParserCollectionOption) (*MetricParserCollection, error)

func (*MetricParserCollection) ParseContextStatements added in v0.64.0

func (mpc *MetricParserCollection) ParseContextStatements(contextStatements ContextStatements) (MetricsConsumer, error)

type MetricParserCollectionOption added in v0.64.0

type MetricParserCollectionOption ottl.ParserCollectionOption[MetricsConsumer]

func WithDataPointParser added in v0.65.0

func WithMetricErrorMode added in v0.73.0

func WithMetricErrorMode(errorMode ottl.ErrorMode) MetricParserCollectionOption

func WithMetricParser added in v0.65.0

type MetricsConsumer added in v0.119.0

type MetricsConsumer interface {
	Context() ContextID
	ConsumeMetrics(ctx context.Context, md pmetric.Metrics) error
}

type ProfileParserCollection added in v0.130.0

type ProfileParserCollection ottl.ParserCollection[ProfilesConsumer]

func NewProfileParserCollection added in v0.130.0

func NewProfileParserCollection(settings component.TelemetrySettings, options ...ProfileParserCollectionOption) (*ProfileParserCollection, error)

func (*ProfileParserCollection) ParseContextStatements added in v0.130.0

func (ppc *ProfileParserCollection) ParseContextStatements(contextStatements ContextStatements) (ProfilesConsumer, error)

type ProfileParserCollectionOption added in v0.130.0

type ProfileParserCollectionOption ottl.ParserCollectionOption[ProfilesConsumer]

func WithProfileErrorMode added in v0.130.0

func WithProfileErrorMode(errorMode ottl.ErrorMode) ProfileParserCollectionOption

func WithProfileParser added in v0.130.0

type ProfilesConsumer added in v0.130.0

type ProfilesConsumer interface {
	Context() ContextID
	ConsumeProfiles(ctx context.Context, ld pprofile.Profiles) error
}

type TraceParserCollection added in v0.64.0

type TraceParserCollection ottl.ParserCollection[TracesConsumer]

func NewTraceParserCollection added in v0.64.0

func NewTraceParserCollection(settings component.TelemetrySettings, options ...TraceParserCollectionOption) (*TraceParserCollection, error)

func (*TraceParserCollection) ParseContextStatements added in v0.64.0

func (tpc *TraceParserCollection) ParseContextStatements(contextStatements ContextStatements) (TracesConsumer, error)

type TraceParserCollectionOption added in v0.64.0

type TraceParserCollectionOption ottl.ParserCollectionOption[TracesConsumer]

func WithSpanEventParser added in v0.65.0

func WithSpanParser added in v0.65.0

func WithTraceErrorMode added in v0.73.0

func WithTraceErrorMode(errorMode ottl.ErrorMode) TraceParserCollectionOption

type TracesConsumer added in v0.119.0

type TracesConsumer interface {
	Context() ContextID
	ConsumeTraces(ctx context.Context, td ptrace.Traces) error
}

Jump to

Keyboard shortcuts

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