host

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AttributeCPUTimeUser = []metric.ObserveOption{
		metric.WithAttributes(attribute.String("state", "user")),
	}
	AttributeCPUTimeSystem = []metric.ObserveOption{
		metric.WithAttributes(attribute.String("state", "system")),
	}
	AttributeCPUTimeOther = []metric.ObserveOption{
		metric.WithAttributes(attribute.String("state", "other")),
	}
	AttributeCPUTimeIdle = []metric.ObserveOption{
		metric.WithAttributes(attribute.String("state", "idle")),
	}

	AttributeMemoryAvailable = []metric.ObserveOption{
		metric.WithAttributes(attribute.String("state", "available")),
	}
	AttributeMemoryUsed = []metric.ObserveOption{
		metric.WithAttributes(attribute.String("state", "used")),
	}

	AttributeNetworkTransmit = []metric.ObserveOption{
		metric.WithAttributes(attribute.String("direction", "transmit")),
	}
	AttributeNetworkReceive = []metric.ObserveOption{
		metric.WithAttributes(attribute.String("direction", "receive")),
	}
)

Attribute sets.

Functions

func Start

func Start(opts ...Option) error

Start initializes reporting of host metrics using the supplied config.

Types

type Option

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

Option supports configuring optional settings for host metrics.

func WithMeterProvider

func WithMeterProvider(provider metric.MeterProvider) Option

WithMeterProvider sets the Metric implementation to use for reporting. If this option is not used, the global metric.MeterProvider will be used. `provider` must be non-nil.

Jump to

Keyboard shortcuts

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