asyncfloat64

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

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. The value of x is
	// assumed to be the exact Counter value to record.
	//
	// 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.

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.

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.

type UpDownCounter

type UpDownCounter interface {
	// Observe records the state of the instrument to be x. The value of x is
	// assumed to be the exact UpDownCounter value to record.
	//
	// 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.

Jump to

Keyboard shortcuts

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