Documentation ¶
Index ¶
- func MeterProvider() metric.MeterProvider
- type TestAFInstrumentProvider
- func (ip TestAFInstrumentProvider) Counter(name string, opts ...instrument.Option) (asyncfloat64.Counter, error)
- func (ip TestAFInstrumentProvider) Gauge(name string, opts ...instrument.Option) (asyncfloat64.Gauge, error)
- func (ip TestAFInstrumentProvider) UpDownCounter(name string, opts ...instrument.Option) (asyncfloat64.UpDownCounter, error)
- type TestAIInstrumentProvider
- func (ip TestAIInstrumentProvider) Counter(name string, opts ...instrument.Option) (asyncint64.Counter, error)
- func (ip TestAIInstrumentProvider) Gauge(name string, opts ...instrument.Option) (asyncint64.Gauge, error)
- func (ip TestAIInstrumentProvider) UpDownCounter(name string, opts ...instrument.Option) (asyncint64.UpDownCounter, error)
- type TestCountingFloatInstrument
- type TestCountingIntInstrument
- type TestMeter
- func (m *TestMeter) AsyncFloat64() asyncfloat64.InstrumentProvider
- func (m *TestMeter) AsyncInt64() asyncint64.InstrumentProvider
- func (m *TestMeter) RegisterCallback(insts []instrument.Asynchronous, function func(context.Context)) error
- func (m *TestMeter) SyncFloat64() syncfloat64.InstrumentProvider
- func (m *TestMeter) SyncInt64() syncint64.InstrumentProvider
- type TestMeterProvider
- type TestSIInstrumentProvider
- func (ip TestSIInstrumentProvider) Counter(name string, opts ...instrument.Option) (syncint64.Counter, error)
- func (ip TestSIInstrumentProvider) Histogram(name string, opts ...instrument.Option) (syncint64.Histogram, error)
- func (ip TestSIInstrumentProvider) UpDownCounter(name string, opts ...instrument.Option) (syncint64.UpDownCounter, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MeterProvider ¶
func MeterProvider() metric.MeterProvider
Types ¶
type TestAFInstrumentProvider ¶
type TestAFInstrumentProvider struct{}
func (TestAFInstrumentProvider) Counter ¶
func (ip TestAFInstrumentProvider) Counter(name string, opts ...instrument.Option) (asyncfloat64.Counter, error)
Counter creates an instrument for recording increasing values.
func (TestAFInstrumentProvider) Gauge ¶
func (ip TestAFInstrumentProvider) Gauge(name string, opts ...instrument.Option) (asyncfloat64.Gauge, error)
Gauge creates an instrument for recording the current value.
func (TestAFInstrumentProvider) UpDownCounter ¶
func (ip TestAFInstrumentProvider) UpDownCounter(name string, opts ...instrument.Option) (asyncfloat64.UpDownCounter, error)
UpDownCounter creates an instrument for recording changes of a value.
type TestAIInstrumentProvider ¶
type TestAIInstrumentProvider struct{}
func (TestAIInstrumentProvider) Counter ¶
func (ip TestAIInstrumentProvider) Counter(name string, opts ...instrument.Option) (asyncint64.Counter, error)
Counter creates an instrument for recording increasing values.
func (TestAIInstrumentProvider) Gauge ¶
func (ip TestAIInstrumentProvider) Gauge(name string, opts ...instrument.Option) (asyncint64.Gauge, error)
Gauge creates an instrument for recording the current value.
func (TestAIInstrumentProvider) UpDownCounter ¶
func (ip TestAIInstrumentProvider) UpDownCounter(name string, opts ...instrument.Option) (asyncint64.UpDownCounter, error)
UpDownCounter creates an instrument for recording changes of a value.
type TestCountingFloatInstrument ¶
type TestCountingFloatInstrument struct { Count int instrument.Asynchronous instrument.Synchronous }
type TestCountingIntInstrument ¶
type TestCountingIntInstrument struct { Count int instrument.Asynchronous instrument.Synchronous }
type TestMeter ¶
type TestMeter struct { AfCount int AiCount int SfCount int SiCount int Callbacks []func(context.Context) }
func (*TestMeter) AsyncFloat64 ¶
func (m *TestMeter) AsyncFloat64() asyncfloat64.InstrumentProvider
AsyncFloat64 is the namespace for the Asynchronous Float instruments
To Observe data with instruments it must be registered in a callback.
func (*TestMeter) AsyncInt64 ¶
func (m *TestMeter) AsyncInt64() asyncint64.InstrumentProvider
AsyncInt64 is the namespace for the Asynchronous Integer instruments.
To Observe data with instruments it must be registered in a callback.
func (*TestMeter) RegisterCallback ¶
func (m *TestMeter) RegisterCallback(insts []instrument.Asynchronous, function func(context.Context)) error
RegisterCallback captures the function that will be called during Collect.
It is only valid to call Observe within the scope of the passed function, and only on the instruments that were registered with this call.
func (*TestMeter) SyncFloat64 ¶
func (m *TestMeter) SyncFloat64() syncfloat64.InstrumentProvider
SyncFloat64 is the namespace for the Synchronous Float instruments.
func (*TestMeter) SyncInt64 ¶
func (m *TestMeter) SyncInt64() syncint64.InstrumentProvider
SyncInt64 is the namespace for the Synchronous Integer instruments.
type TestMeterProvider ¶
type TestMeterProvider struct {
Count int
}
func (*TestMeterProvider) Meter ¶
func (p *TestMeterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter
type TestSIInstrumentProvider ¶
type TestSIInstrumentProvider struct{}
func (TestSIInstrumentProvider) Counter ¶
func (ip TestSIInstrumentProvider) Counter(name string, opts ...instrument.Option) (syncint64.Counter, error)
Counter creates an instrument for recording increasing values.
func (TestSIInstrumentProvider) Histogram ¶
func (ip TestSIInstrumentProvider) Histogram(name string, opts ...instrument.Option) (syncint64.Histogram, error)
Histogram creates an instrument for recording a distribution of values.
func (TestSIInstrumentProvider) UpDownCounter ¶
func (ip TestSIInstrumentProvider) UpDownCounter(name string, opts ...instrument.Option) (syncint64.UpDownCounter, error)
UpDownCounter creates an instrument for recording changes of a value.