metric

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Async added in v0.3.0

type Async struct {
	Instrument
	// contains filtered or unexported fields
}

func (*Async) Implementation added in v0.3.0

func (a *Async) Implementation() interface{}

type Batch

type Batch struct {
	// Measurement needs to be aligned for 64-bit atomic operations.
	Measurements []Measurement
	Ctx          context.Context
	Labels       []core.KeyValue
	LibraryName  string
}

type Handle

type Handle struct {
	Instrument *Sync
	Labels     []core.KeyValue
}

func (*Handle) RecordOne

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

func (*Handle) Unbind added in v0.2.1

func (h *Handle) Unbind()

type Instrument

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

func (Instrument) Descriptor added in v0.3.0

func (i Instrument) Descriptor() apimetric.Descriptor

type Measurement

type Measurement struct {
	// Number needs to be aligned for 64-bit atomic operations.
	Number     core.Number
	Instrument apimetric.InstrumentImpl
}

type MeterImpl added in v0.4.0

type MeterImpl struct {
	MeasurementBatches []Batch
	AsyncInstruments   []*Async
}

func NewMeter

func NewMeter() (*MeterImpl, apimetric.Meter)

func NewProvider added in v0.2.1

func NewProvider() (*MeterImpl, apimetric.Provider)

func (*MeterImpl) NewAsyncInstrument added in v0.4.0

func (m *MeterImpl) NewAsyncInstrument(descriptor metric.Descriptor, callback func(func(core.Number, []core.KeyValue))) (apimetric.AsyncImpl, error)

func (*MeterImpl) NewSyncInstrument added in v0.4.0

func (m *MeterImpl) NewSyncInstrument(descriptor metric.Descriptor) (apimetric.SyncImpl, error)

func (*MeterImpl) RecordBatch added in v0.4.0

func (m *MeterImpl) RecordBatch(ctx context.Context, labels []core.KeyValue, measurements ...apimetric.Measurement)

func (*MeterImpl) RunAsyncInstruments added in v0.4.0

func (m *MeterImpl) RunAsyncInstruments()

type MeterProvider added in v0.2.1

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

func (*MeterProvider) Meter added in v0.2.1

func (p *MeterProvider) Meter(name string) apimetric.Meter

type Sync added in v0.3.0

type Sync struct {
	Instrument
}

func (*Sync) Bind added in v0.3.0

func (s *Sync) Bind(labels []core.KeyValue) apimetric.BoundSyncImpl

func (*Sync) Implementation added in v0.3.0

func (s *Sync) Implementation() interface{}

func (*Sync) RecordOne added in v0.3.0

func (s *Sync) RecordOne(ctx context.Context, number core.Number, labels []core.KeyValue)

Jump to

Keyboard shortcuts

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