metrics

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecordHistogram

func RecordHistogram(ctx context.Context, histogram metric.Float64Histogram, value float64, attrs ...attribute.KeyValue)

func RecordSum

func RecordSum(ctx context.Context, counter metric.Int64Counter, value int64, attrs ...attribute.KeyValue)

func RegisterGauge

func RegisterGauge(meter metric.Meter, gc GaugeConfig) (metric.Float64ObservableGauge, error)

func RegisterHistogram

func RegisterHistogram(meter metric.Meter, hc HistogramConfig) (metric.Float64Histogram, error)

func RegisterSum

func RegisterSum(meter metric.Meter, sc SumConfig) (metric.Int64Counter, error)

func SimulateHistogram

func SimulateHistogram(ctx context.Context, histogram metric.Float64Histogram, hc HistogramConfig)

Types

type GaugeConfig

type GaugeConfig struct {
	Name        string
	Description string
	Unit        string
	Attributes  []attribute.KeyValue
	Min         float64
	Max         float64
	Temporality metricdata.Temporality
}

type HistogramConfig

type HistogramConfig struct {
	Name         string
	Description  string
	Unit         string
	Attributes   []attribute.KeyValue
	Bounds       []float64
	RecordMinMax bool
}

type SumConfig

type SumConfig struct {
	Name        string
	Description string
	Unit        string
	Attributes  []attribute.KeyValue
	IsMonotonic bool
}

Jump to

Keyboard shortcuts

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