lsmintervalprocessor

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

README

LSM interval processor

Interval processor rewrite with db-backed persistence.

See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/33949 for discussion on implementing persistence for upstream interval processor.

Documentation

Overview

package lsmintervalprocessor implements a processor which aggregates metrics over time, backed by db for persistence, and periodically exports the latest values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() processor.Factory

NewFactory returns a new factory for the Metrics Generation processor.

Types

type Config

type Config struct {
	// Directory is the data directory used by the database to store files.
	// If the directory is empty in-memory storage is used.
	Directory string `mapstructure:"directory"`
	// PassThrough is a configuration that determines whether summary
	// metrics should be passed through as they are or aggregated. This
	// is because they lead to lossy aggregations.
	PassThrough PassThrough `mapstructure:"pass_through"`
	// Intervals is a list of interval configuration that the processor
	// will aggregate over. The interval duration must be in increasing
	// order and must be a factor of the smallest interval duration.
	// TODO (lahsivjar): Make specifying interval easier. We can just
	// optimize the timer to run on differnt times and remove any
	// restriction on different interval configuration.
	Intervals []IntervalConfig `mapstructure:"intervals"`
}

func (*Config) Validate

func (config *Config) Validate() error

type IntervalConfig

type IntervalConfig struct {
	Duration time.Duration `mapstructure:"duration"`
	// Statements are a list of OTTL statements to be executed on the
	// metrics produced for a given interval. The list of available
	// OTTL paths for datapoints can be checked at:
	// https://pkg.go.dev/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoint#section-readme
	// The list of available OTTL editors can be checked at:
	// https://pkg.go.dev/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs#section-readme
	Statements []string `mapstructure:"statements"`
}

type PassThrough

type PassThrough struct {
	// Summary is a flag that determines whether summary metrics should
	// be passed through as they are or aggregated. Since summaries don't
	// have an associated temporality, we assume that summaries are
	// always cumulative.
	Summary bool `mapstructure:"summary"`
}

PassThrough determines whether metrics should be passed through as they are or aggregated.

type Processor

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

func (*Processor) Capabilities

func (p *Processor) Capabilities() consumer.Capabilities

func (*Processor) ConsumeMetrics

func (p *Processor) ConsumeMetrics(ctx context.Context, md pmetric.Metrics) error

func (*Processor) Shutdown

func (p *Processor) Shutdown(ctx context.Context) error

func (*Processor) Start

func (p *Processor) Start(ctx context.Context, host component.Host) error

Directories

Path Synopsis
internal
data/expo
Package expo implements various operations on exponential histograms and their bucket counts
Package expo implements various operations on exponential histograms and their bucket counts
identity
identity types for metrics and sample streams.
identity types for metrics and sample streams.

Jump to

Keyboard shortcuts

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