tracking

package
v0.0.0-...-c1c2ac4 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const A = int32('A')
View Source
const SEP = byte(0x1E)
View Source
const SEPSTR = string(SEP)

Variables

This section is empty.

Functions

This section is empty.

Types

type DeltaValue

type DeltaValue struct {
	StartTimestamp pdata.Timestamp
	FloatValue     float64
	IntValue       int64
}

type MetricIdentity

type MetricIdentity struct {
	Resource               pdata.Resource
	InstrumentationLibrary pdata.InstrumentationLibrary
	MetricDataType         pdata.MetricDataType
	MetricIsMonotonic      bool
	MetricName             string
	MetricUnit             string
	StartTimestamp         pdata.Timestamp
	Attributes             pdata.AttributeMap
	MetricValueType        pdata.MetricValueType
}

func (*MetricIdentity) IsFloatVal

func (mi *MetricIdentity) IsFloatVal() bool

func (*MetricIdentity) IsSupportedMetricType

func (mi *MetricIdentity) IsSupportedMetricType() bool

func (*MetricIdentity) Write

func (mi *MetricIdentity) Write(b *bytes.Buffer)

type MetricPoint

type MetricPoint struct {
	Identity MetricIdentity
	Value    ValuePoint
}

type MetricTracker

type MetricTracker interface {
	Convert(MetricPoint) (DeltaValue, bool)
}

func NewMetricTracker

func NewMetricTracker(ctx context.Context, logger *zap.Logger, maxStale time.Duration) MetricTracker

type State

type State struct {
	Identity  MetricIdentity
	PrevPoint ValuePoint
	// contains filtered or unexported fields
}

func (*State) Lock

func (s *State) Lock()

func (*State) Unlock

func (s *State) Unlock()

type ValuePoint

type ValuePoint struct {
	ObservedTimestamp pdata.Timestamp
	FloatValue        float64
	IntValue          int64
}

Jump to

Keyboard shortcuts

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