metrics

package
v0.0.0-...-4b9e021 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UseConvertBetweenSumAndGaugeMetricContext = featuregate.GlobalRegistry().MustRegister(
	"processor.transform.ConvertBetweenSumAndGaugeMetricContext",
	featuregate.StageStable,
	featuregate.WithRegisterDescription("When enabled will use metric context for conversion between sum and gauge"),
	featuregate.WithRegisterToVersion("v0.114.0"),
)

Functions

func AggregateOnAttributeValue

func AggregateOnAttributeValue(aggregationType aggregateutil.AggregationType, attribute string, values []string, newValue string) (ottl.ExprFunc[ottlmetric.TransformContext], error)

func AggregateOnAttributes

func AggregateOnAttributes(aggregationFunction aggregateutil.AggregationType, attributes ottl.Optional[[]string]) (ottl.ExprFunc[ottlmetric.TransformContext], error)

func DataPointFunctions

func DataPointFunctions() map[string]ottl.Factory[ottldatapoint.TransformContext]

func MetricFunctions

func MetricFunctions() map[string]ottl.Factory[ottlmetric.TransformContext]

Types

type Processor

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

func NewProcessor

func NewProcessor(contextStatements []common.ContextStatements, errorMode ottl.ErrorMode, settings component.TelemetrySettings, metricFunctions map[string]ottl.Factory[ottlmetric.TransformContext], dataPointFunctions map[string]ottl.Factory[ottldatapoint.TransformContext]) (*Processor, error)

func (*Processor) ProcessMetrics

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

type ScaleArguments

type ScaleArguments struct {
	Multiplier float64
	Unit       ottl.Optional[ottl.StringGetter[ottlmetric.TransformContext]]
}

type SumCountDataPoint

type SumCountDataPoint interface {
	Attributes() pcommon.Map
	Sum() float64
	Count() uint64
	StartTimestamp() pcommon.Timestamp
	Timestamp() pcommon.Timestamp
}

SumCountDataPoint interface helps unify the logic for extracting data from different histogram types all supported metric types' datapoints implement it

Jump to

Keyboard shortcuts

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