instrument

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asynchronous

type Asynchronous interface {
	// contains filtered or unexported methods
}

Asynchronous instruments are instruments that are updated within a Callback. If an instrument is observed outside of it's callback it should be an error.

This interface is used as a grouping mechanism.

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config contains options for metric instrument descriptors.

func NewConfig

func NewConfig(opts ...Option) Config

NewConfig creates a new Config and applies all the given options.

func (Config) Description

func (cfg Config) Description() string

Description describes the instrument in human-readable terms.

func (Config) Unit

func (cfg Config) Unit() unit.Unit

Unit describes the measurement unit for a instrument.

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option is an interface for applying metric instrument options.

func WithDescription

func WithDescription(desc string) Option

WithDescription applies provided description.

func WithUnit

func WithUnit(unit unit.Unit) Option

WithUnit applies provided unit.

type Synchronous

type Synchronous interface {
	// contains filtered or unexported methods
}

Synchronous instruments are updated in line with application code.

This interface is used as a grouping mechanism.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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