metrics

package
v0.1.72 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package metrics stores wide, numeric time series using the record store's dynamic schemas. Every metric is a column; identities are separate dimensions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppendOptions

type AppendOptions struct {
	Backend recordstore.BatchAppender
	Batch   recordstore.Batch
	Samples []Sample
}

type Definition

type Definition struct {
	Name    string `json:"name"`
	Unit    string `json:"unit,omitempty"`
	Counter bool   `json:"counter,omitempty"`
}

type DynamicMetricSource

type DynamicMetricSource struct {
	Table  *DynamicMetricTable
	Stream string
}

DynamicMetricSource prepares metric samples for atomic observation batches. The caller supplies a durable batch identity and may append sibling results.

func (DynamicMetricSource) Append

func (DynamicMetricSource) Entry

type DynamicMetricTable

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

func NewDynamicMetricTable

func NewDynamicMetricTable(options TableOptions) (*DynamicMetricTable, error)

func (*DynamicMetricTable) Definitions

func (t *DynamicMetricTable) Definitions() []Definition

func (*DynamicMetricTable) Row

func (t *DynamicMetricTable) Row(sample Sample) (recordstore.Row, error)

func (*DynamicMetricTable) Schema

type Sample

type Sample struct {
	Entity      string
	At          time.Time
	Tick        int64
	Values      map[string]any
	Definitions []Definition
}

type TableOptions

type TableOptions struct {
	Kind       string
	Metrics    []Definition
	MaxMetrics int
}

Jump to

Keyboard shortcuts

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