Documentation ¶
Index ¶
- func LabelsToMap(kvs ...attribute.KeyValue) map[attribute.Key]attribute.Value
- func ResolveNumberByKind(t *testing.T, kind number.Kind, value float64) number.Number
- type Async
- type Batch
- type Handle
- type Instrument
- type Measured
- type Measurement
- type MeterImpl
- func (m *MeterImpl) CollectAsync(labels []attribute.KeyValue, obs ...metric.Observation)
- func (m *MeterImpl) NewAsyncInstrument(descriptor metric.Descriptor, runner metric.AsyncRunner) (metric.AsyncImpl, error)
- func (m *MeterImpl) NewSyncInstrument(descriptor metric.Descriptor) (metric.SyncImpl, error)
- func (m *MeterImpl) RecordBatch(ctx context.Context, labels []attribute.KeyValue, ...)
- func (m *MeterImpl) RunAsyncInstruments()
- type Sync
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LabelsToMap ¶
LabelsToMap converts label set to keyValue map, to be easily used in tests
Types ¶
type Async ¶
type Async struct { Instrument // contains filtered or unexported fields }
func (*Async) Implementation ¶
func (a *Async) Implementation() interface{}
type Instrument ¶
type Instrument struct {
// contains filtered or unexported fields
}
func (Instrument) Descriptor ¶
func (i Instrument) Descriptor() metric.Descriptor
type Measured ¶
type Measured struct { Name string InstrumentationName string InstrumentationVersion string Labels map[attribute.Key]attribute.Value Number number.Number }
Measured is the helper struct which provides flat representation of recorded measurements to simplify testing
type Measurement ¶
type Measurement struct { // Number needs to be aligned for 64-bit atomic operations. Number number.Number Instrument metric.InstrumentImpl }
type MeterImpl ¶
type MeterImpl struct { MeasurementBatches []Batch // contains filtered or unexported fields }
MeterImpl is an OpenTelemetry Meter implementation used for testing.
func NewMeterProvider ¶
func NewMeterProvider() (*MeterImpl, metric.MeterProvider)
func (*MeterImpl) CollectAsync ¶
func (m *MeterImpl) CollectAsync(labels []attribute.KeyValue, obs ...metric.Observation)
func (*MeterImpl) NewAsyncInstrument ¶
func (m *MeterImpl) NewAsyncInstrument(descriptor metric.Descriptor, runner metric.AsyncRunner) (metric.AsyncImpl, error)
func (*MeterImpl) NewSyncInstrument ¶
func (*MeterImpl) RecordBatch ¶
func (*MeterImpl) RunAsyncInstruments ¶
func (m *MeterImpl) RunAsyncInstruments()
type Sync ¶
type Sync struct {
Instrument
}
func (*Sync) Implementation ¶
func (s *Sync) Implementation() interface{}
Click to show internal directories.
Click to hide internal directories.