asyncfloat64

package
v0.0.0-...-d84dff6 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: Apache-2.0 Imports: 3 Imported by: 1

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.

Jump to

Keyboard shortcuts

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