Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Counter ¶
type Counter interface { // Observe records the state of the instrument to be x. Implementations // will assume x to be the cumulative sum of the count. // // It is only valid to call this within a callback. If called outside of the // registered callback it should have no effect on the instrument, and an // error will be reported via the error handler. Observe(ctx context.Context, x float64, attrs ...attribute.KeyValue) instrument.Asynchronous }
Counter is an instrument that records increasing values.
Warning: methods may be added to this interface in minor releases.
type Gauge ¶
type Gauge interface { // Observe records the state of the instrument to be x. // // It is only valid to call this within a callback. If called outside of the // registered callback it should have no effect on the instrument, and an // error will be reported via the error handler. Observe(ctx context.Context, x float64, attrs ...attribute.KeyValue) instrument.Asynchronous }
Gauge is an instrument that records independent readings.
Warning: methods may be added to this interface in minor releases.
type InstrumentProvider ¶
type InstrumentProvider interface { // Counter creates an instrument for recording increasing values. Counter(name string, opts ...instrument.Option) (Counter, error) // UpDownCounter creates an instrument for recording changes of a value. UpDownCounter(name string, opts ...instrument.Option) (UpDownCounter, error) // Gauge creates an instrument for recording the current value. Gauge(name string, opts ...instrument.Option) (Gauge, error) }
InstrumentProvider provides access to individual instruments.
Warning: methods may be added to this interface in minor releases.
type UpDownCounter ¶
type UpDownCounter interface { // Observe records the state of the instrument to be x. Implementations // will assume x to be the cumulative sum of the count. // // It is only valid to call this within a callback. If called outside of the // registered callback it should have no effect on the instrument, and an // error will be reported via the error handler. Observe(ctx context.Context, x float64, attrs ...attribute.KeyValue) instrument.Asynchronous }
UpDownCounter is an instrument that records increasing or decreasing values.
Warning: methods may be added to this interface in minor releases.
Click to show internal directories.
Click to hide internal directories.