reduceresolution

package module
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: GPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs added in v0.3.0

func Abs[T GaugeValue](value T) T

func AggregateCounter

func AggregateCounter[T CounterValue](aggregate *CounterAggregate[T], startTS pcommon.Timestamp, lastTS pcommon.Timestamp, value T)

func AggregateGauge

func AggregateGauge[T GaugeValue](aggregate *GaugeAggregate[T], startTS pcommon.Timestamp, value T)

func AggregateHistogram added in v0.2.0

func AggregateHistogram(aggregate *HistogramAggregate, value pmetric.HistogramDataPoint) int16

func CompareFloat64SlicesEqual added in v0.2.1

func CompareFloat64SlicesEqual(a, b []float64) bool

func CreateArgument

func CreateArgument(metricArg MetricArg) pmetric.Metrics

func CreateCounterMetrics

func CreateCounterMetrics[T GaugeValue](scope pmetric.ScopeMetrics, aggregate *CounterAggregate[T], aggregationTS pcommon.Timestamp)

func CreateGaugeMetrics

func CreateGaugeMetrics[T GaugeValue](scope pmetric.ScopeMetrics, aggregate *GaugeAggregate[T], aggregationTS pcommon.Timestamp, p *ReduceResolution)

func CreateHistogramMetrics added in v0.2.0

func CreateHistogramMetrics(scope pmetric.ScopeMetrics, aggregate *HistogramAggregate, aggregationTS pcommon.Timestamp)

func CreateMetricKey

func CreateMetricKey(metric pmetric.Metric, attributes pcommon.Map) string

Creates a unique deterministic key based on a metric's name, and its attributes

func CreateScopeKey

func CreateScopeKey(scopeMetric pmetric.ScopeMetrics) string

Creates a unique deterministic key based on a scope's name, version, and its attributes

func NewFactory

func NewFactory() processor.Factory

NewFactory creates a factory for the metric logging processor

func ValidateCounter

func ValidateCounter(t *testing.T, metric pmetric.Metric, wasChecked *bool, isCumulative bool, isMonotonic bool, startTs pcommon.Timestamp)

func ValidateDoubleCounter

func ValidateDoubleCounter(t *testing.T, metric pmetric.Metric, wasChecked *bool, isCumulative bool, isMonotonic bool, value float64, startTs pcommon.Timestamp)

func ValidateDoubleGauge

func ValidateDoubleGauge(t *testing.T, metric pmetric.Metric, wasChecked *bool, value float64, startTs pcommon.Timestamp)

func ValidateGauge

func ValidateGauge(t *testing.T, metric pmetric.Metric, wasChecked *bool, startTs pcommon.Timestamp)

func ValidateHistogram added in v0.2.0

func ValidateHistogram(t *testing.T, metric pmetric.Metric, wasChecked *bool, isCumulative bool, boundaries []float64, value HistogramValue, startTs pcommon.Timestamp)

func ValidateIntCounter

func ValidateIntCounter(t *testing.T, metric pmetric.Metric, wasChecked *bool, isCumulative bool, isMonotonic bool, value int64, startTs pcommon.Timestamp)

func ValidateIntGauge

func ValidateIntGauge(t *testing.T, metric pmetric.Metric, wasChecked *bool, value int64, startTs pcommon.Timestamp)

Types

type Config

type Config struct {
	MetricStatistics map[string][]string `mapstructure:"gauge-aggregations"`
}

func (*Config) Validate

func (cfg *Config) Validate() error

Validate checks if the receiver configuration is valid

type CounterAggregate

type CounterAggregate[T CounterValue] struct {
	// contains filtered or unexported fields
}

func CreateCounterAggregate

func CreateCounterAggregate[T CounterValue](metric pmetric.Metric, attributes pcommon.Map, startTS pcommon.Timestamp, lastTS pcommon.Timestamp, value T) *CounterAggregate[T]

type CounterArg

type CounterArg[T CounterValue] struct {
	// contains filtered or unexported fields
}

type CounterValue

type CounterValue interface {
	int64 | float64
}

type GaugeAggregate

type GaugeAggregate[T GaugeValue] struct {
	// contains filtered or unexported fields
}

func CreateGaugeAggregate

func CreateGaugeAggregate[T GaugeValue](metric pmetric.Metric, attributes pcommon.Map, startTS pcommon.Timestamp, value T) *GaugeAggregate[T]

type GaugeArg

type GaugeArg[T GaugeValue] struct {
	// contains filtered or unexported fields
}

type GaugeValue

type GaugeValue interface {
	int64 | float64
}

type HistogramAggregate added in v0.2.0

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

func CreateHistogramAggregate added in v0.2.0

func CreateHistogramAggregate(metric pmetric.Metric, value pmetric.HistogramDataPoint) *HistogramAggregate

type HistogramArg added in v0.2.0

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

type HistogramValue added in v0.2.0

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

type MetricArg

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

type ProcessedConfig added in v0.3.0

type ProcessedConfig struct {
	MetricsStatistics map[string][]string
}

type ReduceResolution

type ReduceResolution struct {
	Logger *zap.Logger
	Config ProcessedConfig
}

func (*ReduceResolution) ProcessMetrics

func (p *ReduceResolution) ProcessMetrics(_ context.Context, metrics pmetric.Metrics) (pmetric.Metrics, error)

ProcessMetrics logs information about incoming metrics

type ResourceMetricsArg

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

type ScopeArg

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

type ScopeContainer

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

func CreateScopeContainer

func CreateScopeContainer(scopeMetric pmetric.ScopeMetrics) *ScopeContainer

Jump to

Keyboard shortcuts

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