metric

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch

type Batch struct {
	Ctx          context.Context
	LabelSet     *LabelSet
	Measurements []Measurement
}

type Handle

type Handle struct {
	Instrument *Instrument
	LabelSet   *LabelSet
}

func (*Handle) RecordOne

func (h *Handle) RecordOne(ctx context.Context, number core.Number)

func (*Handle) Release

func (h *Handle) Release()

type Instrument

type Instrument struct {
	Name       string
	Kind       Kind
	NumberKind core.NumberKind
	Opts       apimetric.Options
}

func (*Instrument) AcquireHandle

func (i *Instrument) AcquireHandle(labels apimetric.LabelSet) apimetric.HandleImpl

func (*Instrument) RecordOne

func (i *Instrument) RecordOne(ctx context.Context, number core.Number, labels apimetric.LabelSet)

type Kind

type Kind int8
const (
	KindCounter Kind = iota
	KindGauge
	KindMeasure
)

type LabelSet

type LabelSet struct {
	TheMeter *Meter
	Labels   map[core.Key]core.Value
}

func (*LabelSet) Meter

func (s *LabelSet) Meter() apimetric.Meter

type Measurement

type Measurement struct {
	Instrument *Instrument
	Number     core.Number
}

type Meter

type Meter struct {
	MeasurementBatches []Batch
}

func NewMeter

func NewMeter() *Meter

func (*Meter) Labels

func (m *Meter) Labels(labels ...core.KeyValue) apimetric.LabelSet

func (*Meter) NewFloat64Counter

func (m *Meter) NewFloat64Counter(name string, cos ...apimetric.CounterOptionApplier) apimetric.Float64Counter

func (*Meter) NewFloat64Gauge

func (m *Meter) NewFloat64Gauge(name string, gos ...apimetric.GaugeOptionApplier) apimetric.Float64Gauge

func (*Meter) NewFloat64Measure

func (m *Meter) NewFloat64Measure(name string, mos ...apimetric.MeasureOptionApplier) apimetric.Float64Measure

func (*Meter) NewInt64Counter

func (m *Meter) NewInt64Counter(name string, cos ...apimetric.CounterOptionApplier) apimetric.Int64Counter

func (*Meter) NewInt64Gauge

func (m *Meter) NewInt64Gauge(name string, gos ...apimetric.GaugeOptionApplier) apimetric.Int64Gauge

func (*Meter) NewInt64Measure

func (m *Meter) NewInt64Measure(name string, mos ...apimetric.MeasureOptionApplier) apimetric.Int64Measure

func (*Meter) RecordBatch

func (m *Meter) RecordBatch(ctx context.Context, labels apimetric.LabelSet, measurements ...apimetric.Measurement)

Jump to

Keyboard shortcuts

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