remappedmetric

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyMutator = func(pmetric.NumberDataPoint) {}

EmptyMutator is a no-op mutator.

Functions

func Add

func Add(
	ms pmetric.MetricSlice,
	mutator func(dp pmetric.NumberDataPoint),
	metrics ...Metric,
)

Add adds a list of remapped OTel metric to the give MetricSlice.

func ChainedMutator added in v0.7.0

func ChainedMutator(fs ...func(pmetric.NumberDataPoint)) func(pmetric.NumberDataPoint)

ChainedMutator combines multiple mutators into a single mutator.

Types

type Metric

type Metric struct {
	IntValue       *int64
	DoubleValue    *float64
	Name           string
	Timestamp      pcommon.Timestamp
	StartTimestamp pcommon.Timestamp
	DataType       pmetric.MetricType
}

Metric is a simplified representation of a remapped OTel metric.

func (*Metric) Valid added in v0.6.1

func (m *Metric) Valid() bool

Valid returns true if the metric is valid and set properly. A metric is properly set if the value and the timestamp are set. In addition, only gauge and sum metric are considered valid as these are the only two currently supported metric type.

Jump to

Keyboard shortcuts

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