recorder

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMeter

func NewMeter(c MeterConfig) otelmetric.Meter

Types

type Counter

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

func NewCounter

func NewCounter(c CounterConfig) *Counter

func (*Counter) Labels

func (c *Counter) Labels() map[string][]string

func (*Counter) Record

func (c *Counter) Record(val float64, lab ...attribute.KeyValue)

type CounterConfig

type CounterConfig struct {
	Des string
	Lab map[string][]string
	Met metric.Meter
	Nam string
}

type Fake

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

func NewFake

func NewFake(c FakeConfig) *Fake

func (*Fake) Labels

func (f *Fake) Labels() map[string][]string

func (*Fake) Record

func (f *Fake) Record(val float64, lab ...attribute.KeyValue)

func (*Fake) Recorded

func (f *Fake) Recorded() *Recorded

type FakeConfig

type FakeConfig struct {
	Lab map[string][]string
}

type Gauge

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

func NewGauge

func NewGauge(c GaugeConfig) *Gauge

func (*Gauge) Labels

func (g *Gauge) Labels() map[string][]string

func (*Gauge) Record

func (g *Gauge) Record(val float64, lab ...attribute.KeyValue)

type GaugeConfig

type GaugeConfig struct {
	Des string
	Lab map[string][]string
	Met metric.Meter
	Nam string
}

type Histogram

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

func NewHistogram

func NewHistogram(c HistogramConfig) *Histogram

func (*Histogram) Labels

func (h *Histogram) Labels() map[string][]string

func (*Histogram) Record

func (h *Histogram) Record(val float64, lab ...attribute.KeyValue)

type HistogramConfig

type HistogramConfig struct {
	Des string
	Lab map[string][]string
	Met metric.Meter
	Nam string
}

type Interface

type Interface interface {
	// Labels returns the whitelisted set of labels that is allowed to be recorded
	// for the underlying metric.
	Labels() map[string][]string

	// Record tracks the given value for the underlying metric.
	Record(val float64, lab ...attribute.KeyValue)
}

type MeterConfig

type MeterConfig struct {
	Env string
	Ver string
}

type Recorded

type Recorded struct {
	Val []float64
	Lab []map[string]string
}

Jump to

Keyboard shortcuts

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