package hwconv

import "go.opentelemetry.io/otel/semconv/v1.40.0/hwconv"

Package hwconv provides types and functionality for OpenTelemetry semantic conventions in the "hw" namespace.

Index

Types

type BatteryCharge

type BatteryCharge struct {
	metric.Int64Gauge
}

BatteryCharge is an instrument used to record metric values conforming to the "hw.battery.charge" semantic conventions. It represents the remaining fraction of battery charge.

func NewBatteryCharge

func NewBatteryCharge(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (BatteryCharge, error)

NewBatteryCharge returns a new BatteryCharge instrument.

func (BatteryCharge) AttrBatteryCapacity

func (BatteryCharge) AttrBatteryCapacity(val string) attribute.KeyValue

AttrBatteryCapacity returns an optional attribute for the "hw.battery.capacity" semantic convention. It represents the design capacity in Watts-hours or Amper-hours.

func (BatteryCharge) AttrBatteryChemistry

func (BatteryCharge) AttrBatteryChemistry(val string) attribute.KeyValue

AttrBatteryChemistry returns an optional attribute for the "hw.battery.chemistry" semantic convention. It represents the battery chemistry, e.g. Lithium-Ion, Nickel-Cadmium, etc.

func (BatteryCharge) AttrModel

func (BatteryCharge) AttrModel(val string) attribute.KeyValue

AttrModel returns an optional attribute for the "hw.model" semantic convention. It represents the descriptive model name of the hardware component.

func (BatteryCharge) AttrName

func (BatteryCharge) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (BatteryCharge) AttrParent

func (BatteryCharge) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (BatteryCharge) AttrVendor

func (BatteryCharge) AttrVendor(val string) attribute.KeyValue

AttrVendor returns an optional attribute for the "hw.vendor" semantic convention. It represents the vendor name of the hardware component.

func (BatteryCharge) Description

func (BatteryCharge) Description() string

Description returns the semantic convention description of the instrument

func (BatteryCharge) Inst

func (m BatteryCharge) Inst() metric.Int64Gauge

Inst returns the underlying metric instrument.

func (BatteryCharge) Name

func (BatteryCharge) Name() string

Name returns the semantic convention name of the instrument.

func (BatteryCharge) Record

func (m BatteryCharge) Record(
	ctx context.Context,
	val int64,
	id string,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (BatteryCharge) RecordSet

func (m BatteryCharge) RecordSet(ctx context.Context, val int64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (BatteryCharge) Unit

func (BatteryCharge) Unit() string

Unit returns the semantic convention unit of the instrument

type BatteryChargeLimit

type BatteryChargeLimit struct {
	metric.Int64Gauge
}

BatteryChargeLimit is an instrument used to record metric values conforming to the "hw.battery.charge.limit" semantic conventions. It represents the lower limit of battery charge fraction to ensure proper operation.

func NewBatteryChargeLimit

func NewBatteryChargeLimit(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (BatteryChargeLimit, error)

NewBatteryChargeLimit returns a new BatteryChargeLimit instrument.

func (BatteryChargeLimit) AttrBatteryCapacity

func (BatteryChargeLimit) AttrBatteryCapacity(val string) attribute.KeyValue

AttrBatteryCapacity returns an optional attribute for the "hw.battery.capacity" semantic convention. It represents the design capacity in Watts-hours or Amper-hours.

func (BatteryChargeLimit) AttrBatteryChemistry

func (BatteryChargeLimit) AttrBatteryChemistry(val string) attribute.KeyValue

AttrBatteryChemistry returns an optional attribute for the "hw.battery.chemistry" semantic convention. It represents the battery chemistry, e.g. Lithium-Ion, Nickel-Cadmium, etc.

func (BatteryChargeLimit) AttrLimitType

AttrLimitType returns an optional attribute for the "hw.limit_type" semantic convention. It represents the represents battery charge level thresholds relevant to device operation and health. Each `limit_type` denotes a specific charge limit such as the minimum or maximum optimal charge, the shutdown threshold, or energy-saving thresholds. These values are typically provided by the hardware or firmware to guide safe and efficient battery usage.

func (BatteryChargeLimit) AttrModel

AttrModel returns an optional attribute for the "hw.model" semantic convention. It represents the descriptive model name of the hardware component.

func (BatteryChargeLimit) AttrName

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (BatteryChargeLimit) AttrParent

func (BatteryChargeLimit) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (BatteryChargeLimit) AttrVendor

func (BatteryChargeLimit) AttrVendor(val string) attribute.KeyValue

AttrVendor returns an optional attribute for the "hw.vendor" semantic convention. It represents the vendor name of the hardware component.

func (BatteryChargeLimit) Description

func (BatteryChargeLimit) Description() string

Description returns the semantic convention description of the instrument

func (BatteryChargeLimit) Inst

Inst returns the underlying metric instrument.

func (BatteryChargeLimit) Name

func (BatteryChargeLimit) Name() string

Name returns the semantic convention name of the instrument.

func (BatteryChargeLimit) Record

func (m BatteryChargeLimit) Record(
	ctx context.Context,
	val int64,
	id string,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (BatteryChargeLimit) RecordSet

func (m BatteryChargeLimit) RecordSet(ctx context.Context, val int64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (BatteryChargeLimit) Unit

func (BatteryChargeLimit) Unit() string

Unit returns the semantic convention unit of the instrument

type BatteryStateAttr

type BatteryStateAttr string

BatteryStateAttr is an attribute conforming to the hw.battery.state semantic conventions. It represents the current state of the battery.

var (
	// BatteryStateCharging is the charging.
	BatteryStateCharging BatteryStateAttr = "charging"
	// BatteryStateDischarging is the discharging.
	BatteryStateDischarging BatteryStateAttr = "discharging"
)

type BatteryTimeLeft

type BatteryTimeLeft struct {
	metric.Float64Gauge
}

BatteryTimeLeft is an instrument used to record metric values conforming to the "hw.battery.time_left" semantic conventions. It represents the time left before battery is completely charged or discharged.

func NewBatteryTimeLeft

func NewBatteryTimeLeft(
	m metric.Meter,
	opt ...metric.Float64GaugeOption,
) (BatteryTimeLeft, error)

NewBatteryTimeLeft returns a new BatteryTimeLeft instrument.

func (BatteryTimeLeft) AttrBatteryCapacity

func (BatteryTimeLeft) AttrBatteryCapacity(val string) attribute.KeyValue

AttrBatteryCapacity returns an optional attribute for the "hw.battery.capacity" semantic convention. It represents the design capacity in Watts-hours or Amper-hours.

func (BatteryTimeLeft) AttrBatteryChemistry

func (BatteryTimeLeft) AttrBatteryChemistry(val string) attribute.KeyValue

AttrBatteryChemistry returns an optional attribute for the "hw.battery.chemistry" semantic convention. It represents the battery chemistry, e.g. Lithium-Ion, Nickel-Cadmium, etc.

func (BatteryTimeLeft) AttrBatteryState

func (BatteryTimeLeft) AttrBatteryState(val BatteryStateAttr) attribute.KeyValue

AttrBatteryState returns an optional attribute for the "hw.battery.state" semantic convention. It represents the current state of the battery.

func (BatteryTimeLeft) AttrModel

func (BatteryTimeLeft) AttrModel(val string) attribute.KeyValue

AttrModel returns an optional attribute for the "hw.model" semantic convention. It represents the descriptive model name of the hardware component.

func (BatteryTimeLeft) AttrName

func (BatteryTimeLeft) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (BatteryTimeLeft) AttrParent

func (BatteryTimeLeft) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (BatteryTimeLeft) AttrVendor

func (BatteryTimeLeft) AttrVendor(val string) attribute.KeyValue

AttrVendor returns an optional attribute for the "hw.vendor" semantic convention. It represents the vendor name of the hardware component.

func (BatteryTimeLeft) Description

func (BatteryTimeLeft) Description() string

Description returns the semantic convention description of the instrument

func (BatteryTimeLeft) Inst

Inst returns the underlying metric instrument.

func (BatteryTimeLeft) Name

func (BatteryTimeLeft) Name() string

Name returns the semantic convention name of the instrument.

func (BatteryTimeLeft) Record

func (m BatteryTimeLeft) Record(
	ctx context.Context,
	val float64,
	id string,
	state StateAttr,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

The state is the the current state of the component

All additional attrs passed are included in the recorded value.

func (BatteryTimeLeft) RecordSet

func (m BatteryTimeLeft) RecordSet(ctx context.Context, val float64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (BatteryTimeLeft) Unit

func (BatteryTimeLeft) Unit() string

Unit returns the semantic convention unit of the instrument

type CPUSpeed

type CPUSpeed struct {
	metric.Int64Gauge
}

CPUSpeed is an instrument used to record metric values conforming to the "hw.cpu.speed" semantic conventions. It represents the CPU current frequency.

func NewCPUSpeed

func NewCPUSpeed(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (CPUSpeed, error)

NewCPUSpeed returns a new CPUSpeed instrument.

func (CPUSpeed) AttrModel

func (CPUSpeed) AttrModel(val string) attribute.KeyValue

AttrModel returns an optional attribute for the "hw.model" semantic convention. It represents the descriptive model name of the hardware component.

func (CPUSpeed) AttrName

func (CPUSpeed) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (CPUSpeed) AttrParent

func (CPUSpeed) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (CPUSpeed) AttrVendor

func (CPUSpeed) AttrVendor(val string) attribute.KeyValue

AttrVendor returns an optional attribute for the "hw.vendor" semantic convention. It represents the vendor name of the hardware component.

func (CPUSpeed) Description

func (CPUSpeed) Description() string

Description returns the semantic convention description of the instrument

func (CPUSpeed) Inst

func (m CPUSpeed) Inst() metric.Int64Gauge

Inst returns the underlying metric instrument.

func (CPUSpeed) Name

func (CPUSpeed) Name() string

Name returns the semantic convention name of the instrument.

func (CPUSpeed) Record

func (m CPUSpeed) Record(
	ctx context.Context,
	val int64,
	id string,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (CPUSpeed) RecordSet

func (m CPUSpeed) RecordSet(ctx context.Context, val int64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (CPUSpeed) Unit

func (CPUSpeed) Unit() string

Unit returns the semantic convention unit of the instrument

type CPUSpeedLimit

type CPUSpeedLimit struct {
	metric.Int64Gauge
}

CPUSpeedLimit is an instrument used to record metric values conforming to the "hw.cpu.speed.limit" semantic conventions. It represents the CPU maximum frequency.

func NewCPUSpeedLimit

func NewCPUSpeedLimit(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (CPUSpeedLimit, error)

NewCPUSpeedLimit returns a new CPUSpeedLimit instrument.

func (CPUSpeedLimit) AttrLimitType

func (CPUSpeedLimit) AttrLimitType(val LimitTypeAttr) attribute.KeyValue

AttrLimitType returns an optional attribute for the "hw.limit_type" semantic convention. It represents the type of limit for hardware components.

func (CPUSpeedLimit) AttrModel

func (CPUSpeedLimit) AttrModel(val string) attribute.KeyValue

AttrModel returns an optional attribute for the "hw.model" semantic convention. It represents the descriptive model name of the hardware component.

func (CPUSpeedLimit) AttrName

func (CPUSpeedLimit) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (CPUSpeedLimit) AttrParent

func (CPUSpeedLimit) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (CPUSpeedLimit) AttrVendor

func (CPUSpeedLimit) AttrVendor(val string) attribute.KeyValue

AttrVendor returns an optional attribute for the "hw.vendor" semantic convention. It represents the vendor name of the hardware component.

func (CPUSpeedLimit) Description

func (CPUSpeedLimit) Description() string

Description returns the semantic convention description of the instrument

func (CPUSpeedLimit) Inst

func (m CPUSpeedLimit) Inst() metric.Int64Gauge

Inst returns the underlying metric instrument.

func (CPUSpeedLimit) Name

func (CPUSpeedLimit) Name() string

Name returns the semantic convention name of the instrument.

func (CPUSpeedLimit) Record

func (m CPUSpeedLimit) Record(
	ctx context.Context,
	val int64,
	id string,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (CPUSpeedLimit) RecordSet

func (m CPUSpeedLimit) RecordSet(ctx context.Context, val int64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (CPUSpeedLimit) Unit

func (CPUSpeedLimit) Unit() string

Unit returns the semantic convention unit of the instrument

type Energy

type Energy struct {
	metric.Int64Counter
}

Energy is an instrument used to record metric values conforming to the "hw.energy" semantic conventions. It represents the energy consumed by the component.

func NewEnergy

func NewEnergy(
	m metric.Meter,
	opt ...metric.Int64CounterOption,
) (Energy, error)

NewEnergy returns a new Energy instrument.

func (Energy) Add

func (m Energy) Add(
	ctx context.Context,
	incr int64,
	id string,
	hwType TypeAttr,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

The hwType is the type of the component

All additional attrs passed are included in the recorded value.

func (Energy) AddSet

func (m Energy) AddSet(ctx context.Context, incr int64, set attribute.Set)

AddSet adds incr to the existing count for set.

func (Energy) AttrName

func (Energy) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (Energy) AttrParent

func (Energy) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (Energy) Description

func (Energy) Description() string

Description returns the semantic convention description of the instrument

func (Energy) Inst

func (m Energy) Inst() metric.Int64Counter

Inst returns the underlying metric instrument.

func (Energy) Name

func (Energy) Name() string

Name returns the semantic convention name of the instrument.

func (Energy) Unit

func (Energy) Unit() string

Unit returns the semantic convention unit of the instrument

type ErrorTypeAttr

type ErrorTypeAttr string

ErrorTypeAttr is an attribute conforming to the error.type semantic conventions. It represents the type of error encountered by the component.

var (
	// ErrorTypeOther is a fallback error value to be used when the instrumentation
	// doesn't define a custom value.
	ErrorTypeOther ErrorTypeAttr = "_OTHER"
)

type Errors

type Errors struct {
	metric.Int64Counter
}

Errors is an instrument used to record metric values conforming to the "hw.errors" semantic conventions. It represents the number of errors encountered by the component.

func NewErrors

func NewErrors(
	m metric.Meter,
	opt ...metric.Int64CounterOption,
) (Errors, error)

NewErrors returns a new Errors instrument.

func (Errors) Add

func (m Errors) Add(
	ctx context.Context,
	incr int64,
	id string,
	hwType TypeAttr,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

The hwType is the type of the component

All additional attrs passed are included in the recorded value.

func (Errors) AddSet

func (m Errors) AddSet(ctx context.Context, incr int64, set attribute.Set)

AddSet adds incr to the existing count for set.

func (Errors) AttrErrorType

func (Errors) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue

AttrErrorType returns an optional attribute for the "error.type" semantic convention. It represents the type of error encountered by the component.

func (Errors) AttrName

func (Errors) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (Errors) AttrNetworkIODirection

func (Errors) AttrNetworkIODirection(val NetworkIODirectionAttr) attribute.KeyValue

AttrNetworkIODirection returns an optional attribute for the "network.io.direction" semantic convention. It represents the direction of network traffic for network errors.

func (Errors) AttrParent

func (Errors) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (Errors) Description

func (Errors) Description() string

Description returns the semantic convention description of the instrument

func (Errors) Inst

func (m Errors) Inst() metric.Int64Counter

Inst returns the underlying metric instrument.

func (Errors) Name

func (Errors) Name() string

Name returns the semantic convention name of the instrument.

func (Errors) Unit

func (Errors) Unit() string

Unit returns the semantic convention unit of the instrument

type FanSpeed

type FanSpeed struct {
	metric.Int64Gauge
}

FanSpeed is an instrument used to record metric values conforming to the "hw.fan.speed" semantic conventions. It represents the fan speed in revolutions per minute.

func NewFanSpeed

func NewFanSpeed(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (FanSpeed, error)

NewFanSpeed returns a new FanSpeed instrument.

func (FanSpeed) AttrName

func (FanSpeed) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (FanSpeed) AttrParent

func (FanSpeed) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (FanSpeed) AttrSensorLocation

func (FanSpeed) AttrSensorLocation(val string) attribute.KeyValue

AttrSensorLocation returns an optional attribute for the "hw.sensor_location" semantic convention. It represents the location of the sensor.

func (FanSpeed) Description

func (FanSpeed) Description() string

Description returns the semantic convention description of the instrument

func (FanSpeed) Inst

func (m FanSpeed) Inst() metric.Int64Gauge

Inst returns the underlying metric instrument.

func (FanSpeed) Name

func (FanSpeed) Name() string

Name returns the semantic convention name of the instrument.

func (FanSpeed) Record

func (m FanSpeed) Record(
	ctx context.Context,
	val int64,
	id string,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (FanSpeed) RecordSet

func (m FanSpeed) RecordSet(ctx context.Context, val int64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (FanSpeed) Unit

func (FanSpeed) Unit() string

Unit returns the semantic convention unit of the instrument

type FanSpeedLimit

type FanSpeedLimit struct {
	metric.Int64Gauge
}

FanSpeedLimit is an instrument used to record metric values conforming to the "hw.fan.speed.limit" semantic conventions. It represents the speed limit in rpm.

func NewFanSpeedLimit

func NewFanSpeedLimit(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (FanSpeedLimit, error)

NewFanSpeedLimit returns a new FanSpeedLimit instrument.

func (FanSpeedLimit) AttrLimitType

func (FanSpeedLimit) AttrLimitType(val LimitTypeAttr) attribute.KeyValue

AttrLimitType returns an optional attribute for the "hw.limit_type" semantic convention. It represents the type of limit for hardware components.

func (FanSpeedLimit) AttrName

func (FanSpeedLimit) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (FanSpeedLimit) AttrParent

func (FanSpeedLimit) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (FanSpeedLimit) AttrSensorLocation

func (FanSpeedLimit) AttrSensorLocation(val string) attribute.KeyValue

AttrSensorLocation returns an optional attribute for the "hw.sensor_location" semantic convention. It represents the location of the sensor.

func (FanSpeedLimit) Description

func (FanSpeedLimit) Description() string

Description returns the semantic convention description of the instrument

func (FanSpeedLimit) Inst

func (m FanSpeedLimit) Inst() metric.Int64Gauge

Inst returns the underlying metric instrument.

func (FanSpeedLimit) Name

func (FanSpeedLimit) Name() string

Name returns the semantic convention name of the instrument.

func (FanSpeedLimit) Record

func (m FanSpeedLimit) Record(
	ctx context.Context,
	val int64,
	id string,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (FanSpeedLimit) RecordSet

func (m FanSpeedLimit) RecordSet(ctx context.Context, val int64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (FanSpeedLimit) Unit

func (FanSpeedLimit) Unit() string

Unit returns the semantic convention unit of the instrument

type FanSpeedRatio

type FanSpeedRatio struct {
	metric.Int64Gauge
}

FanSpeedRatio is an instrument used to record metric values conforming to the "hw.fan.speed_ratio" semantic conventions. It represents the fan speed expressed as a fraction of its maximum speed.

func NewFanSpeedRatio

func NewFanSpeedRatio(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (FanSpeedRatio, error)

NewFanSpeedRatio returns a new FanSpeedRatio instrument.

func (FanSpeedRatio) AttrName

func (FanSpeedRatio) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (FanSpeedRatio) AttrParent

func (FanSpeedRatio) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (FanSpeedRatio) AttrSensorLocation

func (FanSpeedRatio) AttrSensorLocation(val string) attribute.KeyValue

AttrSensorLocation returns an optional attribute for the "hw.sensor_location" semantic convention. It represents the location of the sensor.

func (FanSpeedRatio) Description

func (FanSpeedRatio) Description() string

Description returns the semantic convention description of the instrument

func (FanSpeedRatio) Inst

func (m FanSpeedRatio) Inst() metric.Int64Gauge

Inst returns the underlying metric instrument.

func (FanSpeedRatio) Name

func (FanSpeedRatio) Name() string

Name returns the semantic convention name of the instrument.

func (FanSpeedRatio) Record

func (m FanSpeedRatio) Record(
	ctx context.Context,
	val int64,
	id string,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (FanSpeedRatio) RecordSet

func (m FanSpeedRatio) RecordSet(ctx context.Context, val int64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (FanSpeedRatio) Unit

func (FanSpeedRatio) Unit() string

Unit returns the semantic convention unit of the instrument

type GpuIO

type GpuIO struct {
	metric.Int64Counter
}

GpuIO is an instrument used to record metric values conforming to the "hw.gpu.io" semantic conventions. It represents the received and transmitted bytes by the GPU.

func NewGpuIO

func NewGpuIO(
	m metric.Meter,
	opt ...metric.Int64CounterOption,
) (GpuIO, error)

NewGpuIO returns a new GpuIO instrument.

func (GpuIO) Add

func (m GpuIO) Add(
	ctx context.Context,
	incr int64,
	id string,
	networkIoDirection NetworkIODirectionAttr,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

The networkIoDirection is the the network IO operation direction.

All additional attrs passed are included in the recorded value.

func (GpuIO) AddSet

func (m GpuIO) AddSet(ctx context.Context, incr int64, set attribute.Set)

AddSet adds incr to the existing count for set.

func (GpuIO) AttrDriverVersion

func (GpuIO) AttrDriverVersion(val string) attribute.KeyValue

AttrDriverVersion returns an optional attribute for the "hw.driver_version" semantic convention. It represents the driver version for the hardware component.

func (GpuIO) AttrFirmwareVersion

func (GpuIO) AttrFirmwareVersion(val string) attribute.KeyValue

AttrFirmwareVersion returns an optional attribute for the "hw.firmware_version" semantic convention. It represents the firmware version of the hardware component.

func (GpuIO) AttrModel

func (GpuIO) AttrModel(val string) attribute.KeyValue

AttrModel returns an optional attribute for the "hw.model" semantic convention. It represents the descriptive model name of the hardware component.

func (GpuIO) AttrName

func (GpuIO) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (GpuIO) AttrParent

func (GpuIO) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (GpuIO) AttrSerialNumber

func (GpuIO) AttrSerialNumber(val string) attribute.KeyValue

AttrSerialNumber returns an optional attribute for the "hw.serial_number" semantic convention. It represents the serial number of the hardware component.

func (GpuIO) AttrVendor

func (GpuIO) AttrVendor(val string) attribute.KeyValue

AttrVendor returns an optional attribute for the "hw.vendor" semantic convention. It represents the vendor name of the hardware component.

func (GpuIO) Description

func (GpuIO) Description() string

Description returns the semantic convention description of the instrument

func (GpuIO) Inst

func (m GpuIO) Inst() metric.Int64Counter

Inst returns the underlying metric instrument.

func (GpuIO) Name

func (GpuIO) Name() string

Name returns the semantic convention name of the instrument.

func (GpuIO) Unit

func (GpuIO) Unit() string

Unit returns the semantic convention unit of the instrument

type GpuMemoryLimit

type GpuMemoryLimit struct {
	metric.Int64UpDownCounter
}

GpuMemoryLimit is an instrument used to record metric values conforming to the "hw.gpu.memory.limit" semantic conventions. It represents the size of the GPU memory.

func NewGpuMemoryLimit

func NewGpuMemoryLimit(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (GpuMemoryLimit, error)

NewGpuMemoryLimit returns a new GpuMemoryLimit instrument.

func (GpuMemoryLimit) Add

func (m GpuMemoryLimit) Add(
	ctx context.Context,
	incr int64,
	id string,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (GpuMemoryLimit) AddSet

func (m GpuMemoryLimit) AddSet(ctx context.Context, incr int64, set attribute.Set)

AddSet adds incr to the existing count for set.

func (GpuMemoryLimit) AttrDriverVersion

func (GpuMemoryLimit) AttrDriverVersion(val string) attribute.KeyValue

AttrDriverVersion returns an optional attribute for the "hw.driver_version" semantic convention. It represents the driver version for the hardware component.

func (GpuMemoryLimit) AttrFirmwareVersion

func (GpuMemoryLimit) AttrFirmwareVersion(val string) attribute.KeyValue

AttrFirmwareVersion returns an optional attribute for the "hw.firmware_version" semantic convention. It represents the firmware version of the hardware component.

func (GpuMemoryLimit) AttrModel

func (GpuMemoryLimit) AttrModel(val string) attribute.KeyValue

AttrModel returns an optional attribute for the "hw.model" semantic convention. It represents the descriptive model name of the hardware component.

func (GpuMemoryLimit) AttrName

func (GpuMemoryLimit) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (GpuMemoryLimit) AttrParent

func (GpuMemoryLimit) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (GpuMemoryLimit) AttrSerialNumber

func (GpuMemoryLimit) AttrSerialNumber(val string) attribute.KeyValue

AttrSerialNumber returns an optional attribute for the "hw.serial_number" semantic convention. It represents the serial number of the hardware component.

func (GpuMemoryLimit) AttrVendor

func (GpuMemoryLimit) AttrVendor(val string) attribute.KeyValue

AttrVendor returns an optional attribute for the "hw.vendor" semantic convention. It represents the vendor name of the hardware component.

func (GpuMemoryLimit) Description

func (GpuMemoryLimit) Description() string

Description returns the semantic convention description of the instrument

func (GpuMemoryLimit) Inst

Inst returns the underlying metric instrument.

func (GpuMemoryLimit) Name

func (GpuMemoryLimit) Name() string

Name returns the semantic convention name of the instrument.

func (GpuMemoryLimit) Unit

func (GpuMemoryLimit) Unit() string

Unit returns the semantic convention unit of the instrument

type GpuMemoryUsage

type GpuMemoryUsage struct {
	metric.Int64UpDownCounter
}

GpuMemoryUsage is an instrument used to record metric values conforming to the "hw.gpu.memory.usage" semantic conventions. It represents the GPU memory used.

func NewGpuMemoryUsage

func NewGpuMemoryUsage(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (GpuMemoryUsage, error)

NewGpuMemoryUsage returns a new GpuMemoryUsage instrument.

func (GpuMemoryUsage) Add

func (m GpuMemoryUsage) Add(
	ctx context.Context,
	incr int64,
	id string,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (GpuMemoryUsage) AddSet

func (m GpuMemoryUsage) AddSet(ctx context.Context, incr int64, set attribute.Set)

AddSet adds incr to the existing count for set.

func (GpuMemoryUsage) AttrDriverVersion

func (GpuMemoryUsage) AttrDriverVersion(val string) attribute.KeyValue

AttrDriverVersion returns an optional attribute for the "hw.driver_version" semantic convention. It represents the driver version for the hardware component.

func (GpuMemoryUsage) AttrFirmwareVersion

func (GpuMemoryUsage) AttrFirmwareVersion(val string) attribute.KeyValue

AttrFirmwareVersion returns an optional attribute for the "hw.firmware_version" semantic convention. It represents the firmware version of the hardware component.

func (GpuMemoryUsage) AttrModel

func (GpuMemoryUsage) AttrModel(val string) attribute.KeyValue

AttrModel returns an optional attribute for the "hw.model" semantic convention. It represents the descriptive model name of the hardware component.

func (GpuMemoryUsage) AttrName

func (GpuMemoryUsage) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (GpuMemoryUsage) AttrParent

func (GpuMemoryUsage) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (GpuMemoryUsage) AttrSerialNumber

func (GpuMemoryUsage) AttrSerialNumber(val string) attribute.KeyValue

AttrSerialNumber returns an optional attribute for the "hw.serial_number" semantic convention. It represents the serial number of the hardware component.

func (GpuMemoryUsage) AttrVendor

func (GpuMemoryUsage) AttrVendor(val string) attribute.KeyValue

AttrVendor returns an optional attribute for the "hw.vendor" semantic convention. It represents the vendor name of the hardware component.

func (GpuMemoryUsage) Description

func (GpuMemoryUsage) Description() string

Description returns the semantic convention description of the instrument

func (GpuMemoryUsage) Inst

Inst returns the underlying metric instrument.

func (GpuMemoryUsage) Name

func (GpuMemoryUsage) Name() string

Name returns the semantic convention name of the instrument.

func (GpuMemoryUsage) Unit

func (GpuMemoryUsage) Unit() string

Unit returns the semantic convention unit of the instrument

type GpuMemoryUtilization

type GpuMemoryUtilization struct {
	metric.Int64Gauge
}

GpuMemoryUtilization is an instrument used to record metric values conforming to the "hw.gpu.memory.utilization" semantic conventions. It represents the fraction of GPU memory used.

func NewGpuMemoryUtilization

func NewGpuMemoryUtilization(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (GpuMemoryUtilization, error)

NewGpuMemoryUtilization returns a new GpuMemoryUtilization instrument.

func (GpuMemoryUtilization) AttrDriverVersion

func (GpuMemoryUtilization) AttrDriverVersion(val string) attribute.KeyValue

AttrDriverVersion returns an optional attribute for the "hw.driver_version" semantic convention. It represents the driver version for the hardware component.

func (GpuMemoryUtilization) AttrFirmwareVersion

func (GpuMemoryUtilization) AttrFirmwareVersion(val string) attribute.KeyValue

AttrFirmwareVersion returns an optional attribute for the "hw.firmware_version" semantic convention. It represents the firmware version of the hardware component.

func (GpuMemoryUtilization) AttrModel

AttrModel returns an optional attribute for the "hw.model" semantic convention. It represents the descriptive model name of the hardware component.

func (GpuMemoryUtilization) AttrName

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (GpuMemoryUtilization) AttrParent

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (GpuMemoryUtilization) AttrSerialNumber

func (GpuMemoryUtilization) AttrSerialNumber(val string) attribute.KeyValue

AttrSerialNumber returns an optional attribute for the "hw.serial_number" semantic convention. It represents the serial number of the hardware component.

func (GpuMemoryUtilization) AttrVendor

AttrVendor returns an optional attribute for the "hw.vendor" semantic convention. It represents the vendor name of the hardware component.

func (GpuMemoryUtilization) Description

func (GpuMemoryUtilization) Description() string

Description returns the semantic convention description of the instrument

func (GpuMemoryUtilization) Inst

Inst returns the underlying metric instrument.

func (GpuMemoryUtilization) Name

Name returns the semantic convention name of the instrument.

func (GpuMemoryUtilization) Record

func (m GpuMemoryUtilization) Record(
	ctx context.Context,
	val int64,
	id string,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (GpuMemoryUtilization) RecordSet

func (m GpuMemoryUtilization) RecordSet(ctx context.Context, val int64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (GpuMemoryUtilization) Unit

Unit returns the semantic convention unit of the instrument

type GpuTaskAttr

type GpuTaskAttr string

GpuTaskAttr is an attribute conforming to the hw.gpu.task semantic conventions. It represents the type of task the GPU is performing.

var (
	// GpuTaskDecoder is the decoder.
	GpuTaskDecoder GpuTaskAttr = "decoder"
	// GpuTaskEncoder is the encoder.
	GpuTaskEncoder GpuTaskAttr = "encoder"
	// GpuTaskGeneral is the general.
	GpuTaskGeneral GpuTaskAttr = "general"
)

type GpuUtilization

type GpuUtilization struct {
	metric.Int64Gauge
}

GpuUtilization is an instrument used to record metric values conforming to the "hw.gpu.utilization" semantic conventions. It represents the fraction of time spent in a specific task.

func NewGpuUtilization

func NewGpuUtilization(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (GpuUtilization, error)

NewGpuUtilization returns a new GpuUtilization instrument.

func (GpuUtilization) AttrDriverVersion

func (GpuUtilization) AttrDriverVersion(val string) attribute.KeyValue

AttrDriverVersion returns an optional attribute for the "hw.driver_version" semantic convention. It represents the driver version for the hardware component.

func (GpuUtilization) AttrFirmwareVersion

func (GpuUtilization) AttrFirmwareVersion(val string) attribute.KeyValue

AttrFirmwareVersion returns an optional attribute for the "hw.firmware_version" semantic convention. It represents the firmware version of the hardware component.

func (GpuUtilization) AttrGpuTask

func (GpuUtilization) AttrGpuTask(val GpuTaskAttr) attribute.KeyValue

AttrGpuTask returns an optional attribute for the "hw.gpu.task" semantic convention. It represents the type of task the GPU is performing.

func (GpuUtilization) AttrModel

func (GpuUtilization) AttrModel(val string) attribute.KeyValue

AttrModel returns an optional attribute for the "hw.model" semantic convention. It represents the descriptive model name of the hardware component.

func (GpuUtilization) AttrName

func (GpuUtilization) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (GpuUtilization) AttrParent

func (GpuUtilization) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (GpuUtilization) AttrSerialNumber

func (GpuUtilization) AttrSerialNumber(val string) attribute.KeyValue

AttrSerialNumber returns an optional attribute for the "hw.serial_number" semantic convention. It represents the serial number of the hardware component.

func (GpuUtilization) AttrVendor

func (GpuUtilization) AttrVendor(val string) attribute.KeyValue

AttrVendor returns an optional attribute for the "hw.vendor" semantic convention. It represents the vendor name of the hardware component.

func (GpuUtilization) Description

func (GpuUtilization) Description() string

Description returns the semantic convention description of the instrument

func (GpuUtilization) Inst

func (m GpuUtilization) Inst() metric.Int64Gauge

Inst returns the underlying metric instrument.

func (GpuUtilization) Name

func (GpuUtilization) Name() string

Name returns the semantic convention name of the instrument.

func (GpuUtilization) Record

func (m GpuUtilization) Record(
	ctx context.Context,
	val int64,
	id string,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (GpuUtilization) RecordSet

func (m GpuUtilization) RecordSet(ctx context.Context, val int64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (GpuUtilization) Unit

func (GpuUtilization) Unit() string

Unit returns the semantic convention unit of the instrument

type HostAmbientTemperature

type HostAmbientTemperature struct {
	metric.Int64Gauge
}

HostAmbientTemperature is an instrument used to record metric values conforming to the "hw.host.ambient_temperature" semantic conventions. It represents the ambient (external) temperature of the physical host.

func NewHostAmbientTemperature

func NewHostAmbientTemperature(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (HostAmbientTemperature, error)

NewHostAmbientTemperature returns a new HostAmbientTemperature instrument.

func (HostAmbientTemperature) AttrName

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (HostAmbientTemperature) AttrParent

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (HostAmbientTemperature) Description

func (HostAmbientTemperature) Description() string

Description returns the semantic convention description of the instrument

func (HostAmbientTemperature) Inst

Inst returns the underlying metric instrument.

func (HostAmbientTemperature) Name

Name returns the semantic convention name of the instrument.

func (HostAmbientTemperature) Record

func (m HostAmbientTemperature) Record(
	ctx context.Context,
	val int64,
	id string,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (HostAmbientTemperature) RecordSet

func (m HostAmbientTemperature) RecordSet(ctx context.Context, val int64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (HostAmbientTemperature) Unit

Unit returns the semantic convention unit of the instrument

type HostEnergy

type HostEnergy struct {
	metric.Int64Counter
}

HostEnergy is an instrument used to record metric values conforming to the "hw.host.energy" semantic conventions. It represents the total energy consumed by the entire physical host, in joules.

func NewHostEnergy

func NewHostEnergy(
	m metric.Meter,
	opt ...metric.Int64CounterOption,
) (HostEnergy, error)

NewHostEnergy returns a new HostEnergy instrument.

func (HostEnergy) Add

func (m HostEnergy) Add(
	ctx context.Context,
	incr int64,
	id string,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

The overall energy usage of a host MUST be reported using the specific `hw.host.energy` and `hw.host.power` metrics **only**, instead of the generic `hw.energy` and `hw.power` described in the previous section, to prevent summing up overlapping values.

func (HostEnergy) AddSet

func (m HostEnergy) AddSet(ctx context.Context, incr int64, set attribute.Set)

AddSet adds incr to the existing count for set.

The overall energy usage of a host MUST be reported using the specific `hw.host.energy` and `hw.host.power` metrics **only**, instead of the generic `hw.energy` and `hw.power` described in the previous section, to prevent summing up overlapping values.

func (HostEnergy) AttrName

func (HostEnergy) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (HostEnergy) AttrParent

func (HostEnergy) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (HostEnergy) Description

func (HostEnergy) Description() string

Description returns the semantic convention description of the instrument

func (HostEnergy) Inst

func (m HostEnergy) Inst() metric.Int64Counter

Inst returns the underlying metric instrument.

func (HostEnergy) Name

func (HostEnergy) Name() string

Name returns the semantic convention name of the instrument.

func (HostEnergy) Unit

func (HostEnergy) Unit() string

Unit returns the semantic convention unit of the instrument

type HostHeatingMargin

type HostHeatingMargin struct {
	metric.Int64Gauge
}

HostHeatingMargin is an instrument used to record metric values conforming to the "hw.host.heating_margin" semantic conventions. It represents the by how many degrees Celsius the temperature of the physical host can be increased, before reaching a warning threshold on one of the internal sensors.

func NewHostHeatingMargin

func NewHostHeatingMargin(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (HostHeatingMargin, error)

NewHostHeatingMargin returns a new HostHeatingMargin instrument.

func (HostHeatingMargin) AttrName

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (HostHeatingMargin) AttrParent

func (HostHeatingMargin) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (HostHeatingMargin) Description

func (HostHeatingMargin) Description() string

Description returns the semantic convention description of the instrument

func (HostHeatingMargin) Inst

Inst returns the underlying metric instrument.

func (HostHeatingMargin) Name

func (HostHeatingMargin) Name() string

Name returns the semantic convention name of the instrument.

func (HostHeatingMargin) Record

func (m HostHeatingMargin) Record(
	ctx context.Context,
	val int64,
	id string,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (HostHeatingMargin) RecordSet

func (m HostHeatingMargin) RecordSet(ctx context.Context, val int64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (HostHeatingMargin) Unit

func (HostHeatingMargin) Unit() string

Unit returns the semantic convention unit of the instrument

type HostPower

type HostPower struct {
	metric.Int64Gauge
}

HostPower is an instrument used to record metric values conforming to the "hw.host.power" semantic conventions. It represents the instantaneous power consumed by the entire physical host in Watts (`hw.host.energy` is preferred).

func NewHostPower

func NewHostPower(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (HostPower, error)

NewHostPower returns a new HostPower instrument.

func (HostPower) AttrName

func (HostPower) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (HostPower) AttrParent

func (HostPower) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (HostPower) Description

func (HostPower) Description() string

Description returns the semantic convention description of the instrument

func (HostPower) Inst

func (m HostPower) Inst() metric.Int64Gauge

Inst returns the underlying metric instrument.

func (HostPower) Name

func (HostPower) Name() string

Name returns the semantic convention name of the instrument.

func (HostPower) Record

func (m HostPower) Record(
	ctx context.Context,
	val int64,
	id string,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

The overall energy usage of a host MUST be reported using the specific `hw.host.energy` and `hw.host.power` metrics **only**, instead of the generic `hw.energy` and `hw.power` described in the previous section, to prevent summing up overlapping values.

func (HostPower) RecordSet

func (m HostPower) RecordSet(ctx context.Context, val int64, set attribute.Set)

RecordSet records val to the current distribution for set.

The overall energy usage of a host MUST be reported using the specific `hw.host.energy` and `hw.host.power` metrics **only**, instead of the generic `hw.energy` and `hw.power` described in the previous section, to prevent summing up overlapping values.

func (HostPower) Unit

func (HostPower) Unit() string

Unit returns the semantic convention unit of the instrument

type LimitTypeAttr

type LimitTypeAttr string

LimitTypeAttr is an attribute conforming to the hw.limit_type semantic conventions. It represents the represents battery charge level thresholds relevant to device operation and health. Each `limit_type` denotes a specific charge limit such as the minimum or maximum optimal charge, the shutdown threshold, or energy-saving thresholds. These values are typically provided by the hardware or firmware to guide safe and efficient battery usage.

var (
	// LimitTypeCritical is the critical.
	LimitTypeCritical LimitTypeAttr = "critical"
	// LimitTypeDegraded is the degraded.
	LimitTypeDegraded LimitTypeAttr = "degraded"
	// LimitTypeHighCritical is the high Critical.
	LimitTypeHighCritical LimitTypeAttr = "high.critical"
	// LimitTypeHighDegraded is the high Degraded.
	LimitTypeHighDegraded LimitTypeAttr = "high.degraded"
	// LimitTypeLowCritical is the low Critical.
	LimitTypeLowCritical LimitTypeAttr = "low.critical"
	// LimitTypeLowDegraded is the low Degraded.
	LimitTypeLowDegraded LimitTypeAttr = "low.degraded"
	// LimitTypeMax is the maximum.
	LimitTypeMax LimitTypeAttr = "max"
	// LimitTypeThrottled is the throttled.
	LimitTypeThrottled LimitTypeAttr = "throttled"
	// LimitTypeTurbo is the turbo.
	LimitTypeTurbo LimitTypeAttr = "turbo"
)

type LogicalDiskLimit

type LogicalDiskLimit struct {
	metric.Int64UpDownCounter
}

LogicalDiskLimit is an instrument used to record metric values conforming to the "hw.logical_disk.limit" semantic conventions. It represents the size of the logical disk.

func NewLogicalDiskLimit

func NewLogicalDiskLimit(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (LogicalDiskLimit, error)

NewLogicalDiskLimit returns a new LogicalDiskLimit instrument.

func (LogicalDiskLimit) Add

func (m LogicalDiskLimit) Add(
	ctx context.Context,
	incr int64,
	id string,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (LogicalDiskLimit) AddSet

func (m LogicalDiskLimit) AddSet(ctx context.Context, incr int64, set attribute.Set)

AddSet adds incr to the existing count for set.

func (LogicalDiskLimit) AttrLogicalDiskRaidLevel

func (LogicalDiskLimit) AttrLogicalDiskRaidLevel(val string) attribute.KeyValue

AttrLogicalDiskRaidLevel returns an optional attribute for the "hw.logical_disk.raid_level" semantic convention. It represents the RAID Level of the logical disk.

func (LogicalDiskLimit) AttrName

func (LogicalDiskLimit) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (LogicalDiskLimit) AttrParent

func (LogicalDiskLimit) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (LogicalDiskLimit) Description

func (LogicalDiskLimit) Description() string

Description returns the semantic convention description of the instrument

func (LogicalDiskLimit) Inst

Inst returns the underlying metric instrument.

func (LogicalDiskLimit) Name

func (LogicalDiskLimit) Name() string

Name returns the semantic convention name of the instrument.

func (LogicalDiskLimit) Unit

func (LogicalDiskLimit) Unit() string

Unit returns the semantic convention unit of the instrument

type LogicalDiskStateAttr

type LogicalDiskStateAttr string

LogicalDiskStateAttr is an attribute conforming to the hw.logical_disk.state semantic conventions. It represents the state of the logical disk space usage.

var (
	// LogicalDiskStateUsed is the used.
	LogicalDiskStateUsed LogicalDiskStateAttr = "used"
	// LogicalDiskStateFree is the free.
	LogicalDiskStateFree LogicalDiskStateAttr = "free"
)

type LogicalDiskUsage

type LogicalDiskUsage struct {
	metric.Int64UpDownCounter
}

LogicalDiskUsage is an instrument used to record metric values conforming to the "hw.logical_disk.usage" semantic conventions. It represents the logical disk space usage.

func NewLogicalDiskUsage

func NewLogicalDiskUsage(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (LogicalDiskUsage, error)

NewLogicalDiskUsage returns a new LogicalDiskUsage instrument.

func (LogicalDiskUsage) Add

func (m LogicalDiskUsage) Add(
	ctx context.Context,
	incr int64,
	id string,
	logicalDiskState LogicalDiskStateAttr,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

The logicalDiskState is the state of the logical disk space usage

All additional attrs passed are included in the recorded value.

func (LogicalDiskUsage) AddSet

func (m LogicalDiskUsage) AddSet(ctx context.Context, incr int64, set attribute.Set)

AddSet adds incr to the existing count for set.

func (LogicalDiskUsage) AttrLogicalDiskRaidLevel

func (LogicalDiskUsage) AttrLogicalDiskRaidLevel(val string) attribute.KeyValue

AttrLogicalDiskRaidLevel returns an optional attribute for the "hw.logical_disk.raid_level" semantic convention. It represents the RAID Level of the logical disk.

func (LogicalDiskUsage) AttrName

func (LogicalDiskUsage) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (LogicalDiskUsage) AttrParent

func (LogicalDiskUsage) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (LogicalDiskUsage) Description

func (LogicalDiskUsage) Description() string

Description returns the semantic convention description of the instrument

func (LogicalDiskUsage) Inst

Inst returns the underlying metric instrument.

func (LogicalDiskUsage) Name

func (LogicalDiskUsage) Name() string

Name returns the semantic convention name of the instrument.

func (LogicalDiskUsage) Unit

func (LogicalDiskUsage) Unit() string

Unit returns the semantic convention unit of the instrument

type LogicalDiskUtilization

type LogicalDiskUtilization struct {
	metric.Int64Gauge
}

LogicalDiskUtilization is an instrument used to record metric values conforming to the "hw.logical_disk.utilization" semantic conventions. It represents the logical disk space utilization as a fraction.

func NewLogicalDiskUtilization

func NewLogicalDiskUtilization(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (LogicalDiskUtilization, error)

NewLogicalDiskUtilization returns a new LogicalDiskUtilization instrument.

func (LogicalDiskUtilization) AttrLogicalDiskRaidLevel

func (LogicalDiskUtilization) AttrLogicalDiskRaidLevel(val string) attribute.KeyValue

AttrLogicalDiskRaidLevel returns an optional attribute for the "hw.logical_disk.raid_level" semantic convention. It represents the RAID Level of the logical disk.

func (LogicalDiskUtilization) AttrName

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (LogicalDiskUtilization) AttrParent

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (LogicalDiskUtilization) Description

func (LogicalDiskUtilization) Description() string

Description returns the semantic convention description of the instrument

func (LogicalDiskUtilization) Inst

Inst returns the underlying metric instrument.

func (LogicalDiskUtilization) Name

Name returns the semantic convention name of the instrument.

func (LogicalDiskUtilization) Record

func (m LogicalDiskUtilization) Record(
	ctx context.Context,
	val int64,
	id string,
	logicalDiskState LogicalDiskStateAttr,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

The logicalDiskState is the state of the logical disk space usage

All additional attrs passed are included in the recorded value.

func (LogicalDiskUtilization) RecordSet

func (m LogicalDiskUtilization) RecordSet(ctx context.Context, val int64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (LogicalDiskUtilization) Unit

Unit returns the semantic convention unit of the instrument

type MemorySize

type MemorySize struct {
	metric.Int64UpDownCounter
}

MemorySize is an instrument used to record metric values conforming to the "hw.memory.size" semantic conventions. It represents the size of the memory module.

func NewMemorySize

func NewMemorySize(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (MemorySize, error)

NewMemorySize returns a new MemorySize instrument.

func (MemorySize) Add

func (m MemorySize) Add(
	ctx context.Context,
	incr int64,
	id string,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (MemorySize) AddSet

func (m MemorySize) AddSet(ctx context.Context, incr int64, set attribute.Set)

AddSet adds incr to the existing count for set.

func (MemorySize) AttrMemoryType

func (MemorySize) AttrMemoryType(val string) attribute.KeyValue

AttrMemoryType returns an optional attribute for the "hw.memory.type" semantic convention. It represents the type of the memory module.

func (MemorySize) AttrModel

func (MemorySize) AttrModel(val string) attribute.KeyValue

AttrModel returns an optional attribute for the "hw.model" semantic convention. It represents the descriptive model name of the hardware component.

func (MemorySize) AttrName

func (MemorySize) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (MemorySize) AttrParent

func (MemorySize) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (MemorySize) AttrSerialNumber

func (MemorySize) AttrSerialNumber(val string) attribute.KeyValue

AttrSerialNumber returns an optional attribute for the "hw.serial_number" semantic convention. It represents the serial number of the hardware component.

func (MemorySize) AttrVendor

func (MemorySize) AttrVendor(val string) attribute.KeyValue

AttrVendor returns an optional attribute for the "hw.vendor" semantic convention. It represents the vendor name of the hardware component.

func (MemorySize) Description

func (MemorySize) Description() string

Description returns the semantic convention description of the instrument

func (MemorySize) Inst

Inst returns the underlying metric instrument.

func (MemorySize) Name

func (MemorySize) Name() string

Name returns the semantic convention name of the instrument.

func (MemorySize) Unit

func (MemorySize) Unit() string

Unit returns the semantic convention unit of the instrument

type NetworkBandwidthLimit

type NetworkBandwidthLimit struct {
	metric.Int64UpDownCounter
}

NetworkBandwidthLimit is an instrument used to record metric values conforming to the "hw.network.bandwidth.limit" semantic conventions. It represents the link speed.

func NewNetworkBandwidthLimit

func NewNetworkBandwidthLimit(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (NetworkBandwidthLimit, error)

NewNetworkBandwidthLimit returns a new NetworkBandwidthLimit instrument.

func (NetworkBandwidthLimit) Add

func (m NetworkBandwidthLimit) Add(
	ctx context.Context,
	incr int64,
	id string,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (NetworkBandwidthLimit) AddSet

func (m NetworkBandwidthLimit) AddSet(ctx context.Context, incr int64, set attribute.Set)

AddSet adds incr to the existing count for set.

func (NetworkBandwidthLimit) AttrModel

AttrModel returns an optional attribute for the "hw.model" semantic convention. It represents the descriptive model name of the hardware component.

func (NetworkBandwidthLimit) AttrName

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (NetworkBandwidthLimit) AttrNetworkLogicalAddresses

func (NetworkBandwidthLimit) AttrNetworkLogicalAddresses(val ...string) attribute.KeyValue

AttrNetworkLogicalAddresses returns an optional attribute for the "hw.network.logical_addresses" semantic convention. It represents the logical addresses of the adapter (e.g. IP address, or WWPN).

func (NetworkBandwidthLimit) AttrNetworkPhysicalAddress

func (NetworkBandwidthLimit) AttrNetworkPhysicalAddress(val string) attribute.KeyValue

AttrNetworkPhysicalAddress returns an optional attribute for the "hw.network.physical_address" semantic convention. It represents the physical address of the adapter (e.g. MAC address, or WWNN).

func (NetworkBandwidthLimit) AttrParent

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (NetworkBandwidthLimit) AttrSerialNumber

func (NetworkBandwidthLimit) AttrSerialNumber(val string) attribute.KeyValue

AttrSerialNumber returns an optional attribute for the "hw.serial_number" semantic convention. It represents the serial number of the hardware component.

func (NetworkBandwidthLimit) AttrVendor

AttrVendor returns an optional attribute for the "hw.vendor" semantic convention. It represents the vendor name of the hardware component.

func (NetworkBandwidthLimit) Description

func (NetworkBandwidthLimit) Description() string

Description returns the semantic convention description of the instrument

func (NetworkBandwidthLimit) Inst

Inst returns the underlying metric instrument.

func (NetworkBandwidthLimit) Name

Name returns the semantic convention name of the instrument.

func (NetworkBandwidthLimit) Unit

Unit returns the semantic convention unit of the instrument

type NetworkBandwidthUtilization

type NetworkBandwidthUtilization struct {
	metric.Int64Gauge
}

NetworkBandwidthUtilization is an instrument used to record metric values conforming to the "hw.network.bandwidth.utilization" semantic conventions. It represents the utilization of the network bandwidth as a fraction.

func NewNetworkBandwidthUtilization

func NewNetworkBandwidthUtilization(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (NetworkBandwidthUtilization, error)

NewNetworkBandwidthUtilization returns a new NetworkBandwidthUtilization instrument.

func (NetworkBandwidthUtilization) AttrModel

AttrModel returns an optional attribute for the "hw.model" semantic convention. It represents the descriptive model name of the hardware component.

func (NetworkBandwidthUtilization) AttrName

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (NetworkBandwidthUtilization) AttrNetworkLogicalAddresses

func (NetworkBandwidthUtilization) AttrNetworkLogicalAddresses(val ...string) attribute.KeyValue

AttrNetworkLogicalAddresses returns an optional attribute for the "hw.network.logical_addresses" semantic convention. It represents the logical addresses of the adapter (e.g. IP address, or WWPN).

func (NetworkBandwidthUtilization) AttrNetworkPhysicalAddress

func (NetworkBandwidthUtilization) AttrNetworkPhysicalAddress(val string) attribute.KeyValue

AttrNetworkPhysicalAddress returns an optional attribute for the "hw.network.physical_address" semantic convention. It represents the physical address of the adapter (e.g. MAC address, or WWNN).

func (NetworkBandwidthUtilization) AttrParent

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (NetworkBandwidthUtilization) AttrSerialNumber

func (NetworkBandwidthUtilization) AttrSerialNumber(val string) attribute.KeyValue

AttrSerialNumber returns an optional attribute for the "hw.serial_number" semantic convention. It represents the serial number of the hardware component.

func (NetworkBandwidthUtilization) AttrVendor

AttrVendor returns an optional attribute for the "hw.vendor" semantic convention. It represents the vendor name of the hardware component.

func (NetworkBandwidthUtilization) Description

func (NetworkBandwidthUtilization) Description() string

Description returns the semantic convention description of the instrument

func (NetworkBandwidthUtilization) Inst

Inst returns the underlying metric instrument.

func (NetworkBandwidthUtilization) Name

Name returns the semantic convention name of the instrument.

func (NetworkBandwidthUtilization) Record

func (m NetworkBandwidthUtilization) Record(
	ctx context.Context,
	val int64,
	id string,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (NetworkBandwidthUtilization) RecordSet

func (m NetworkBandwidthUtilization) RecordSet(ctx context.Context, val int64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (NetworkBandwidthUtilization) Unit

Unit returns the semantic convention unit of the instrument

type NetworkIO

type NetworkIO struct {
	metric.Int64Counter
}

NetworkIO is an instrument used to record metric values conforming to the "hw.network.io" semantic conventions. It represents the received and transmitted network traffic in bytes.

func NewNetworkIO

func NewNetworkIO(
	m metric.Meter,
	opt ...metric.Int64CounterOption,
) (NetworkIO, error)

NewNetworkIO returns a new NetworkIO instrument.

func (NetworkIO) Add

func (m NetworkIO) Add(
	ctx context.Context,
	incr int64,
	id string,
	networkIoDirection NetworkIODirectionAttr,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

The networkIoDirection is the the network IO operation direction.

All additional attrs passed are included in the recorded value.

func (NetworkIO) AddSet

func (m NetworkIO) AddSet(ctx context.Context, incr int64, set attribute.Set)

AddSet adds incr to the existing count for set.

func (NetworkIO) AttrModel

func (NetworkIO) AttrModel(val string) attribute.KeyValue

AttrModel returns an optional attribute for the "hw.model" semantic convention. It represents the descriptive model name of the hardware component.

func (NetworkIO) AttrName

func (NetworkIO) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (NetworkIO) AttrNetworkLogicalAddresses

func (NetworkIO) AttrNetworkLogicalAddresses(val ...string) attribute.KeyValue

AttrNetworkLogicalAddresses returns an optional attribute for the "hw.network.logical_addresses" semantic convention. It represents the logical addresses of the adapter (e.g. IP address, or WWPN).

func (NetworkIO) AttrNetworkPhysicalAddress

func (NetworkIO) AttrNetworkPhysicalAddress(val string) attribute.KeyValue

AttrNetworkPhysicalAddress returns an optional attribute for the "hw.network.physical_address" semantic convention. It represents the physical address of the adapter (e.g. MAC address, or WWNN).

func (NetworkIO) AttrParent

func (NetworkIO) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (NetworkIO) AttrSerialNumber

func (NetworkIO) AttrSerialNumber(val string) attribute.KeyValue

AttrSerialNumber returns an optional attribute for the "hw.serial_number" semantic convention. It represents the serial number of the hardware component.

func (NetworkIO) AttrVendor

func (NetworkIO) AttrVendor(val string) attribute.KeyValue

AttrVendor returns an optional attribute for the "hw.vendor" semantic convention. It represents the vendor name of the hardware component.

func (NetworkIO) Description

func (NetworkIO) Description() string

Description returns the semantic convention description of the instrument

func (NetworkIO) Inst

func (m NetworkIO) Inst() metric.Int64Counter

Inst returns the underlying metric instrument.

func (NetworkIO) Name

func (NetworkIO) Name() string

Name returns the semantic convention name of the instrument.

func (NetworkIO) Unit

func (NetworkIO) Unit() string

Unit returns the semantic convention unit of the instrument

type NetworkIODirectionAttr

type NetworkIODirectionAttr string

NetworkIODirectionAttr is an attribute conforming to the network.io.direction semantic conventions. It represents the direction of network traffic for network errors.

var (
	// NetworkIODirectionTransmit is the standardized value "transmit" of
	// NetworkIODirectionAttr.
	NetworkIODirectionTransmit NetworkIODirectionAttr = "transmit"
	// NetworkIODirectionReceive is the standardized value "receive" of
	// NetworkIODirectionAttr.
	NetworkIODirectionReceive NetworkIODirectionAttr = "receive"
)

type NetworkPackets

type NetworkPackets struct {
	metric.Int64Counter
}

NetworkPackets is an instrument used to record metric values conforming to the "hw.network.packets" semantic conventions. It represents the received and transmitted network traffic in packets (or frames).

func NewNetworkPackets

func NewNetworkPackets(
	m metric.Meter,
	opt ...metric.Int64CounterOption,
) (NetworkPackets, error)

NewNetworkPackets returns a new NetworkPackets instrument.

func (NetworkPackets) Add

func (m NetworkPackets) Add(
	ctx context.Context,
	incr int64,
	id string,
	networkIoDirection NetworkIODirectionAttr,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

The networkIoDirection is the the network IO operation direction.

All additional attrs passed are included in the recorded value.

func (NetworkPackets) AddSet

func (m NetworkPackets) AddSet(ctx context.Context, incr int64, set attribute.Set)

AddSet adds incr to the existing count for set.

func (NetworkPackets) AttrModel

func (NetworkPackets) AttrModel(val string) attribute.KeyValue

AttrModel returns an optional attribute for the "hw.model" semantic convention. It represents the descriptive model name of the hardware component.

func (NetworkPackets) AttrName

func (NetworkPackets) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (NetworkPackets) AttrNetworkLogicalAddresses

func (NetworkPackets) AttrNetworkLogicalAddresses(val ...string) attribute.KeyValue

AttrNetworkLogicalAddresses returns an optional attribute for the "hw.network.logical_addresses" semantic convention. It represents the logical addresses of the adapter (e.g. IP address, or WWPN).

func (NetworkPackets) AttrNetworkPhysicalAddress

func (NetworkPackets) AttrNetworkPhysicalAddress(val string) attribute.KeyValue

AttrNetworkPhysicalAddress returns an optional attribute for the "hw.network.physical_address" semantic convention. It represents the physical address of the adapter (e.g. MAC address, or WWNN).

func (NetworkPackets) AttrParent

func (NetworkPackets) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (NetworkPackets) AttrSerialNumber

func (NetworkPackets) AttrSerialNumber(val string) attribute.KeyValue

AttrSerialNumber returns an optional attribute for the "hw.serial_number" semantic convention. It represents the serial number of the hardware component.

func (NetworkPackets) AttrVendor

func (NetworkPackets) AttrVendor(val string) attribute.KeyValue

AttrVendor returns an optional attribute for the "hw.vendor" semantic convention. It represents the vendor name of the hardware component.

func (NetworkPackets) Description

func (NetworkPackets) Description() string

Description returns the semantic convention description of the instrument

func (NetworkPackets) Inst

Inst returns the underlying metric instrument.

func (NetworkPackets) Name

func (NetworkPackets) Name() string

Name returns the semantic convention name of the instrument.

func (NetworkPackets) Unit

func (NetworkPackets) Unit() string

Unit returns the semantic convention unit of the instrument

type NetworkUp

type NetworkUp struct {
	metric.Int64UpDownCounter
}

NetworkUp is an instrument used to record metric values conforming to the "hw.network.up" semantic conventions. It represents the link status: `1` (up) or `0` (down).

func NewNetworkUp

func NewNetworkUp(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (NetworkUp, error)

NewNetworkUp returns a new NetworkUp instrument.

func (NetworkUp) Add

func (m NetworkUp) Add(
	ctx context.Context,
	incr int64,
	id string,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (NetworkUp) AddSet

func (m NetworkUp) AddSet(ctx context.Context, incr int64, set attribute.Set)

AddSet adds incr to the existing count for set.

func (NetworkUp) AttrModel

func (NetworkUp) AttrModel(val string) attribute.KeyValue

AttrModel returns an optional attribute for the "hw.model" semantic convention. It represents the descriptive model name of the hardware component.

func (NetworkUp) AttrName

func (NetworkUp) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (NetworkUp) AttrNetworkLogicalAddresses

func (NetworkUp) AttrNetworkLogicalAddresses(val ...string) attribute.KeyValue

AttrNetworkLogicalAddresses returns an optional attribute for the "hw.network.logical_addresses" semantic convention. It represents the logical addresses of the adapter (e.g. IP address, or WWPN).

func (NetworkUp) AttrNetworkPhysicalAddress

func (NetworkUp) AttrNetworkPhysicalAddress(val string) attribute.KeyValue

AttrNetworkPhysicalAddress returns an optional attribute for the "hw.network.physical_address" semantic convention. It represents the physical address of the adapter (e.g. MAC address, or WWNN).

func (NetworkUp) AttrParent

func (NetworkUp) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (NetworkUp) AttrSerialNumber

func (NetworkUp) AttrSerialNumber(val string) attribute.KeyValue

AttrSerialNumber returns an optional attribute for the "hw.serial_number" semantic convention. It represents the serial number of the hardware component.

func (NetworkUp) AttrVendor

func (NetworkUp) AttrVendor(val string) attribute.KeyValue

AttrVendor returns an optional attribute for the "hw.vendor" semantic convention. It represents the vendor name of the hardware component.

func (NetworkUp) Description

func (NetworkUp) Description() string

Description returns the semantic convention description of the instrument

func (NetworkUp) Inst

Inst returns the underlying metric instrument.

func (NetworkUp) Name

func (NetworkUp) Name() string

Name returns the semantic convention name of the instrument.

func (NetworkUp) Unit

func (NetworkUp) Unit() string

Unit returns the semantic convention unit of the instrument

type PhysicalDiskEnduranceUtilization

type PhysicalDiskEnduranceUtilization struct {
	metric.Int64Gauge
}

PhysicalDiskEnduranceUtilization is an instrument used to record metric values conforming to the "hw.physical_disk.endurance_utilization" semantic conventions. It represents the endurance remaining for this SSD disk.

func NewPhysicalDiskEnduranceUtilization

func NewPhysicalDiskEnduranceUtilization(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (PhysicalDiskEnduranceUtilization, error)

NewPhysicalDiskEnduranceUtilization returns a new PhysicalDiskEnduranceUtilization instrument.

func (PhysicalDiskEnduranceUtilization) AttrFirmwareVersion

func (PhysicalDiskEnduranceUtilization) AttrFirmwareVersion(val string) attribute.KeyValue

AttrFirmwareVersion returns an optional attribute for the "hw.firmware_version" semantic convention. It represents the firmware version of the hardware component.

func (PhysicalDiskEnduranceUtilization) AttrModel

AttrModel returns an optional attribute for the "hw.model" semantic convention. It represents the descriptive model name of the hardware component.

func (PhysicalDiskEnduranceUtilization) AttrName

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (PhysicalDiskEnduranceUtilization) AttrParent

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (PhysicalDiskEnduranceUtilization) AttrPhysicalDiskType

func (PhysicalDiskEnduranceUtilization) AttrPhysicalDiskType(val string) attribute.KeyValue

AttrPhysicalDiskType returns an optional attribute for the "hw.physical_disk.type" semantic convention. It represents the type of the physical disk.

func (PhysicalDiskEnduranceUtilization) AttrSerialNumber

AttrSerialNumber returns an optional attribute for the "hw.serial_number" semantic convention. It represents the serial number of the hardware component.

func (PhysicalDiskEnduranceUtilization) AttrVendor

AttrVendor returns an optional attribute for the "hw.vendor" semantic convention. It represents the vendor name of the hardware component.

func (PhysicalDiskEnduranceUtilization) Description

Description returns the semantic convention description of the instrument

func (PhysicalDiskEnduranceUtilization) Inst

Inst returns the underlying metric instrument.

func (PhysicalDiskEnduranceUtilization) Name

Name returns the semantic convention name of the instrument.

func (PhysicalDiskEnduranceUtilization) Record

func (m PhysicalDiskEnduranceUtilization) Record(
	ctx context.Context,
	val int64,
	id string,
	physicalDiskState PhysicalDiskStateAttr,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

The physicalDiskState is the state of the physical disk endurance utilization

All additional attrs passed are included in the recorded value.

func (PhysicalDiskEnduranceUtilization) RecordSet

RecordSet records val to the current distribution for set.

func (PhysicalDiskEnduranceUtilization) Unit

Unit returns the semantic convention unit of the instrument

type PhysicalDiskSize

type PhysicalDiskSize struct {
	metric.Int64UpDownCounter
}

PhysicalDiskSize is an instrument used to record metric values conforming to the "hw.physical_disk.size" semantic conventions. It represents the size of the disk.

func NewPhysicalDiskSize

func NewPhysicalDiskSize(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (PhysicalDiskSize, error)

NewPhysicalDiskSize returns a new PhysicalDiskSize instrument.

func (PhysicalDiskSize) Add

func (m PhysicalDiskSize) Add(
	ctx context.Context,
	incr int64,
	id string,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (PhysicalDiskSize) AddSet

func (m PhysicalDiskSize) AddSet(ctx context.Context, incr int64, set attribute.Set)

AddSet adds incr to the existing count for set.

func (PhysicalDiskSize) AttrFirmwareVersion

func (PhysicalDiskSize) AttrFirmwareVersion(val string) attribute.KeyValue

AttrFirmwareVersion returns an optional attribute for the "hw.firmware_version" semantic convention. It represents the firmware version of the hardware component.

func (PhysicalDiskSize) AttrModel

func (PhysicalDiskSize) AttrModel(val string) attribute.KeyValue

AttrModel returns an optional attribute for the "hw.model" semantic convention. It represents the descriptive model name of the hardware component.

func (PhysicalDiskSize) AttrName

func (PhysicalDiskSize) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (PhysicalDiskSize) AttrParent

func (PhysicalDiskSize) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (PhysicalDiskSize) AttrPhysicalDiskType

func (PhysicalDiskSize) AttrPhysicalDiskType(val string) attribute.KeyValue

AttrPhysicalDiskType returns an optional attribute for the "hw.physical_disk.type" semantic convention. It represents the type of the physical disk.

func (PhysicalDiskSize) AttrSerialNumber

func (PhysicalDiskSize) AttrSerialNumber(val string) attribute.KeyValue

AttrSerialNumber returns an optional attribute for the "hw.serial_number" semantic convention. It represents the serial number of the hardware component.

func (PhysicalDiskSize) AttrVendor

func (PhysicalDiskSize) AttrVendor(val string) attribute.KeyValue

AttrVendor returns an optional attribute for the "hw.vendor" semantic convention. It represents the vendor name of the hardware component.

func (PhysicalDiskSize) Description

func (PhysicalDiskSize) Description() string

Description returns the semantic convention description of the instrument

func (PhysicalDiskSize) Inst

Inst returns the underlying metric instrument.

func (PhysicalDiskSize) Name

func (PhysicalDiskSize) Name() string

Name returns the semantic convention name of the instrument.

func (PhysicalDiskSize) Unit

func (PhysicalDiskSize) Unit() string

Unit returns the semantic convention unit of the instrument

type PhysicalDiskSmart

type PhysicalDiskSmart struct {
	metric.Int64Gauge
}

PhysicalDiskSmart is an instrument used to record metric values conforming to the "hw.physical_disk.smart" semantic conventions. It represents the value of the corresponding S.M.A.R.T. (Self-Monitoring, Analysis, and Reporting Technology) attribute.

func NewPhysicalDiskSmart

func NewPhysicalDiskSmart(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (PhysicalDiskSmart, error)

NewPhysicalDiskSmart returns a new PhysicalDiskSmart instrument.

func (PhysicalDiskSmart) AttrFirmwareVersion

func (PhysicalDiskSmart) AttrFirmwareVersion(val string) attribute.KeyValue

AttrFirmwareVersion returns an optional attribute for the "hw.firmware_version" semantic convention. It represents the firmware version of the hardware component.

func (PhysicalDiskSmart) AttrModel

func (PhysicalDiskSmart) AttrModel(val string) attribute.KeyValue

AttrModel returns an optional attribute for the "hw.model" semantic convention. It represents the descriptive model name of the hardware component.

func (PhysicalDiskSmart) AttrName

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (PhysicalDiskSmart) AttrParent

func (PhysicalDiskSmart) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (PhysicalDiskSmart) AttrPhysicalDiskSmartAttribute

func (PhysicalDiskSmart) AttrPhysicalDiskSmartAttribute(val string) attribute.KeyValue

AttrPhysicalDiskSmartAttribute returns an optional attribute for the "hw.physical_disk.smart_attribute" semantic convention. It represents the S.M.A.R.T. (Self-Monitoring, Analysis, and Reporting Technology) attribute of the physical disk.

func (PhysicalDiskSmart) AttrPhysicalDiskType

func (PhysicalDiskSmart) AttrPhysicalDiskType(val string) attribute.KeyValue

AttrPhysicalDiskType returns an optional attribute for the "hw.physical_disk.type" semantic convention. It represents the type of the physical disk.

func (PhysicalDiskSmart) AttrSerialNumber

func (PhysicalDiskSmart) AttrSerialNumber(val string) attribute.KeyValue

AttrSerialNumber returns an optional attribute for the "hw.serial_number" semantic convention. It represents the serial number of the hardware component.

func (PhysicalDiskSmart) AttrVendor

func (PhysicalDiskSmart) AttrVendor(val string) attribute.KeyValue

AttrVendor returns an optional attribute for the "hw.vendor" semantic convention. It represents the vendor name of the hardware component.

func (PhysicalDiskSmart) Description

func (PhysicalDiskSmart) Description() string

Description returns the semantic convention description of the instrument

func (PhysicalDiskSmart) Inst

Inst returns the underlying metric instrument.

func (PhysicalDiskSmart) Name

func (PhysicalDiskSmart) Name() string

Name returns the semantic convention name of the instrument.

func (PhysicalDiskSmart) Record

func (m PhysicalDiskSmart) Record(
	ctx context.Context,
	val int64,
	id string,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (PhysicalDiskSmart) RecordSet

func (m PhysicalDiskSmart) RecordSet(ctx context.Context, val int64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (PhysicalDiskSmart) Unit

func (PhysicalDiskSmart) Unit() string

Unit returns the semantic convention unit of the instrument

type PhysicalDiskStateAttr

type PhysicalDiskStateAttr string

PhysicalDiskStateAttr is an attribute conforming to the hw.physical_disk.state semantic conventions. It represents the state of the physical disk endurance utilization.

var (
	// PhysicalDiskStateRemaining is the remaining.
	PhysicalDiskStateRemaining PhysicalDiskStateAttr = "remaining"
)

type Power

type Power struct {
	metric.Int64Gauge
}

Power is an instrument used to record metric values conforming to the "hw.power" semantic conventions. It represents the instantaneous power consumed by the component.

func NewPower

func NewPower(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (Power, error)

NewPower returns a new Power instrument.

func (Power) AttrName

func (Power) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (Power) AttrParent

func (Power) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (Power) Description

func (Power) Description() string

Description returns the semantic convention description of the instrument

func (Power) Inst

func (m Power) Inst() metric.Int64Gauge

Inst returns the underlying metric instrument.

func (Power) Name

func (Power) Name() string

Name returns the semantic convention name of the instrument.

func (Power) Record

func (m Power) Record(
	ctx context.Context,
	val int64,
	id string,
	hwType TypeAttr,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

The hwType is the type of the component

All additional attrs passed are included in the recorded value.

It is recommended to report `hw.energy` instead of `hw.power` when possible.

func (Power) RecordSet

func (m Power) RecordSet(ctx context.Context, val int64, set attribute.Set)

RecordSet records val to the current distribution for set.

It is recommended to report `hw.energy` instead of `hw.power` when possible.

func (Power) Unit

func (Power) Unit() string

Unit returns the semantic convention unit of the instrument

type PowerSupplyLimit

type PowerSupplyLimit struct {
	metric.Int64UpDownCounter
}

PowerSupplyLimit is an instrument used to record metric values conforming to the "hw.power_supply.limit" semantic conventions. It represents the maximum power output of the power supply.

func NewPowerSupplyLimit

func NewPowerSupplyLimit(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (PowerSupplyLimit, error)

NewPowerSupplyLimit returns a new PowerSupplyLimit instrument.

func (PowerSupplyLimit) Add

func (m PowerSupplyLimit) Add(
	ctx context.Context,
	incr int64,
	id string,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (PowerSupplyLimit) AddSet

func (m PowerSupplyLimit) AddSet(ctx context.Context, incr int64, set attribute.Set)

AddSet adds incr to the existing count for set.

func (PowerSupplyLimit) AttrLimitType

func (PowerSupplyLimit) AttrLimitType(val LimitTypeAttr) attribute.KeyValue

AttrLimitType returns an optional attribute for the "hw.limit_type" semantic convention. It represents the type of limit for hardware components.

func (PowerSupplyLimit) AttrModel

func (PowerSupplyLimit) AttrModel(val string) attribute.KeyValue

AttrModel returns an optional attribute for the "hw.model" semantic convention. It represents the descriptive model name of the hardware component.

func (PowerSupplyLimit) AttrName

func (PowerSupplyLimit) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (PowerSupplyLimit) AttrParent

func (PowerSupplyLimit) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (PowerSupplyLimit) AttrSerialNumber

func (PowerSupplyLimit) AttrSerialNumber(val string) attribute.KeyValue

AttrSerialNumber returns an optional attribute for the "hw.serial_number" semantic convention. It represents the serial number of the hardware component.

func (PowerSupplyLimit) AttrVendor

func (PowerSupplyLimit) AttrVendor(val string) attribute.KeyValue

AttrVendor returns an optional attribute for the "hw.vendor" semantic convention. It represents the vendor name of the hardware component.

func (PowerSupplyLimit) Description

func (PowerSupplyLimit) Description() string

Description returns the semantic convention description of the instrument

func (PowerSupplyLimit) Inst

Inst returns the underlying metric instrument.

func (PowerSupplyLimit) Name

func (PowerSupplyLimit) Name() string

Name returns the semantic convention name of the instrument.

func (PowerSupplyLimit) Unit

func (PowerSupplyLimit) Unit() string

Unit returns the semantic convention unit of the instrument

type PowerSupplyUsage

type PowerSupplyUsage struct {
	metric.Int64UpDownCounter
}

PowerSupplyUsage is an instrument used to record metric values conforming to the "hw.power_supply.usage" semantic conventions. It represents the current power output of the power supply.

func NewPowerSupplyUsage

func NewPowerSupplyUsage(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (PowerSupplyUsage, error)

NewPowerSupplyUsage returns a new PowerSupplyUsage instrument.

func (PowerSupplyUsage) Add

func (m PowerSupplyUsage) Add(
	ctx context.Context,
	incr int64,
	id string,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (PowerSupplyUsage) AddSet

func (m PowerSupplyUsage) AddSet(ctx context.Context, incr int64, set attribute.Set)

AddSet adds incr to the existing count for set.

func (PowerSupplyUsage) AttrModel

func (PowerSupplyUsage) AttrModel(val string) attribute.KeyValue

AttrModel returns an optional attribute for the "hw.model" semantic convention. It represents the descriptive model name of the hardware component.

func (PowerSupplyUsage) AttrName

func (PowerSupplyUsage) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (PowerSupplyUsage) AttrParent

func (PowerSupplyUsage) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (PowerSupplyUsage) AttrSerialNumber

func (PowerSupplyUsage) AttrSerialNumber(val string) attribute.KeyValue

AttrSerialNumber returns an optional attribute for the "hw.serial_number" semantic convention. It represents the serial number of the hardware component.

func (PowerSupplyUsage) AttrVendor

func (PowerSupplyUsage) AttrVendor(val string) attribute.KeyValue

AttrVendor returns an optional attribute for the "hw.vendor" semantic convention. It represents the vendor name of the hardware component.

func (PowerSupplyUsage) Description

func (PowerSupplyUsage) Description() string

Description returns the semantic convention description of the instrument

func (PowerSupplyUsage) Inst

Inst returns the underlying metric instrument.

func (PowerSupplyUsage) Name

func (PowerSupplyUsage) Name() string

Name returns the semantic convention name of the instrument.

func (PowerSupplyUsage) Unit

func (PowerSupplyUsage) Unit() string

Unit returns the semantic convention unit of the instrument

type PowerSupplyUtilization

type PowerSupplyUtilization struct {
	metric.Int64Gauge
}

PowerSupplyUtilization is an instrument used to record metric values conforming to the "hw.power_supply.utilization" semantic conventions. It represents the utilization of the power supply as a fraction of its maximum output.

func NewPowerSupplyUtilization

func NewPowerSupplyUtilization(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (PowerSupplyUtilization, error)

NewPowerSupplyUtilization returns a new PowerSupplyUtilization instrument.

func (PowerSupplyUtilization) AttrModel

AttrModel returns an optional attribute for the "hw.model" semantic convention. It represents the descriptive model name of the hardware component.

func (PowerSupplyUtilization) AttrName

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (PowerSupplyUtilization) AttrParent

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (PowerSupplyUtilization) AttrSerialNumber

func (PowerSupplyUtilization) AttrSerialNumber(val string) attribute.KeyValue

AttrSerialNumber returns an optional attribute for the "hw.serial_number" semantic convention. It represents the serial number of the hardware component.

func (PowerSupplyUtilization) AttrVendor

AttrVendor returns an optional attribute for the "hw.vendor" semantic convention. It represents the vendor name of the hardware component.

func (PowerSupplyUtilization) Description

func (PowerSupplyUtilization) Description() string

Description returns the semantic convention description of the instrument

func (PowerSupplyUtilization) Inst

Inst returns the underlying metric instrument.

func (PowerSupplyUtilization) Name

Name returns the semantic convention name of the instrument.

func (PowerSupplyUtilization) Record

func (m PowerSupplyUtilization) Record(
	ctx context.Context,
	val int64,
	id string,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (PowerSupplyUtilization) RecordSet

func (m PowerSupplyUtilization) RecordSet(ctx context.Context, val int64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (PowerSupplyUtilization) Unit

Unit returns the semantic convention unit of the instrument

type StateAttr

type StateAttr string

StateAttr is an attribute conforming to the hw.state semantic conventions. It represents the current state of the component.

var (
	// StateDegraded is the degraded.
	StateDegraded StateAttr = "degraded"
	// StateFailed is the failed.
	StateFailed StateAttr = "failed"
	// StateNeedsCleaning is the needs Cleaning.
	StateNeedsCleaning StateAttr = "needs_cleaning"
	// StateOk is the OK.
	StateOk StateAttr = "ok"
	// StatePredictedFailure is the predicted Failure.
	StatePredictedFailure StateAttr = "predicted_failure"
)

type Status

type Status struct {
	metric.Int64UpDownCounter
}

Status is an instrument used to record metric values conforming to the "hw.status" semantic conventions. It represents the operational status: `1` (true) or `0` (false) for each of the possible states.

func NewStatus

func NewStatus(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (Status, error)

NewStatus returns a new Status instrument.

func (Status) Add

func (m Status) Add(
	ctx context.Context,
	incr int64,
	id string,
	state StateAttr,
	hwType TypeAttr,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

The state is the the current state of the component

The hwType is the type of the component

All additional attrs passed are included in the recorded value.

`hw.status` is currently specified as an *UpDownCounter* but would ideally be represented using a [*StateSet* as defined in OpenMetrics]. This semantic convention will be updated once *StateSet* is specified in OpenTelemetry. This planned change is not expected to have any consequence on the way users query their timeseries backend to retrieve the values of `hw.status` over time.

func (Status) AddSet

func (m Status) AddSet(ctx context.Context, incr int64, set attribute.Set)

AddSet adds incr to the existing count for set.

`hw.status` is currently specified as an *UpDownCounter* but would ideally be represented using a [*StateSet* as defined in OpenMetrics]. This semantic convention will be updated once *StateSet* is specified in OpenTelemetry. This planned change is not expected to have any consequence on the way users query their timeseries backend to retrieve the values of `hw.status` over time.

func (Status) AttrName

func (Status) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (Status) AttrParent

func (Status) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (Status) Description

func (Status) Description() string

Description returns the semantic convention description of the instrument

func (Status) Inst

func (m Status) Inst() metric.Int64UpDownCounter

Inst returns the underlying metric instrument.

func (Status) Name

func (Status) Name() string

Name returns the semantic convention name of the instrument.

func (Status) Unit

func (Status) Unit() string

Unit returns the semantic convention unit of the instrument

type TapeDriveOperationTypeAttr

type TapeDriveOperationTypeAttr string

TapeDriveOperationTypeAttr is an attribute conforming to the hw.tape_drive.operation_type semantic conventions. It represents the type of tape drive operation.

var (
	// TapeDriveOperationTypeMount is the mount.
	TapeDriveOperationTypeMount TapeDriveOperationTypeAttr = "mount"
	// TapeDriveOperationTypeUnmount is the unmount.
	TapeDriveOperationTypeUnmount TapeDriveOperationTypeAttr = "unmount"
	// TapeDriveOperationTypeClean is the clean.
	TapeDriveOperationTypeClean TapeDriveOperationTypeAttr = "clean"
)

type TapeDriveOperations

type TapeDriveOperations struct {
	metric.Int64Counter
}

TapeDriveOperations is an instrument used to record metric values conforming to the "hw.tape_drive.operations" semantic conventions. It represents the operations performed by the tape drive.

func NewTapeDriveOperations

func NewTapeDriveOperations(
	m metric.Meter,
	opt ...metric.Int64CounterOption,
) (TapeDriveOperations, error)

NewTapeDriveOperations returns a new TapeDriveOperations instrument.

func (TapeDriveOperations) Add

func (m TapeDriveOperations) Add(
	ctx context.Context,
	incr int64,
	id string,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (TapeDriveOperations) AddSet

func (m TapeDriveOperations) AddSet(ctx context.Context, incr int64, set attribute.Set)

AddSet adds incr to the existing count for set.

func (TapeDriveOperations) AttrModel

AttrModel returns an optional attribute for the "hw.model" semantic convention. It represents the descriptive model name of the hardware component.

func (TapeDriveOperations) AttrName

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (TapeDriveOperations) AttrParent

func (TapeDriveOperations) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (TapeDriveOperations) AttrSerialNumber

func (TapeDriveOperations) AttrSerialNumber(val string) attribute.KeyValue

AttrSerialNumber returns an optional attribute for the "hw.serial_number" semantic convention. It represents the serial number of the hardware component.

func (TapeDriveOperations) AttrTapeDriveOperationType

func (TapeDriveOperations) AttrTapeDriveOperationType(val TapeDriveOperationTypeAttr) attribute.KeyValue

AttrTapeDriveOperationType returns an optional attribute for the "hw.tape_drive.operation_type" semantic convention. It represents the type of tape drive operation.

func (TapeDriveOperations) AttrVendor

func (TapeDriveOperations) AttrVendor(val string) attribute.KeyValue

AttrVendor returns an optional attribute for the "hw.vendor" semantic convention. It represents the vendor name of the hardware component.

func (TapeDriveOperations) Description

func (TapeDriveOperations) Description() string

Description returns the semantic convention description of the instrument

func (TapeDriveOperations) Inst

Inst returns the underlying metric instrument.

func (TapeDriveOperations) Name

func (TapeDriveOperations) Name() string

Name returns the semantic convention name of the instrument.

func (TapeDriveOperations) Unit

func (TapeDriveOperations) Unit() string

Unit returns the semantic convention unit of the instrument

type Temperature

type Temperature struct {
	metric.Int64Gauge
}

Temperature is an instrument used to record metric values conforming to the "hw.temperature" semantic conventions. It represents the temperature in degrees Celsius.

func NewTemperature

func NewTemperature(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (Temperature, error)

NewTemperature returns a new Temperature instrument.

func (Temperature) AttrName

func (Temperature) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (Temperature) AttrParent

func (Temperature) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (Temperature) AttrSensorLocation

func (Temperature) AttrSensorLocation(val string) attribute.KeyValue

AttrSensorLocation returns an optional attribute for the "hw.sensor_location" semantic convention. It represents the location of the sensor.

func (Temperature) Description

func (Temperature) Description() string

Description returns the semantic convention description of the instrument

func (Temperature) Inst

func (m Temperature) Inst() metric.Int64Gauge

Inst returns the underlying metric instrument.

func (Temperature) Name

func (Temperature) Name() string

Name returns the semantic convention name of the instrument.

func (Temperature) Record

func (m Temperature) Record(
	ctx context.Context,
	val int64,
	id string,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (Temperature) RecordSet

func (m Temperature) RecordSet(ctx context.Context, val int64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (Temperature) Unit

func (Temperature) Unit() string

Unit returns the semantic convention unit of the instrument

type TemperatureLimit

type TemperatureLimit struct {
	metric.Int64Gauge
}

TemperatureLimit is an instrument used to record metric values conforming to the "hw.temperature.limit" semantic conventions. It represents the temperature limit in degrees Celsius.

func NewTemperatureLimit

func NewTemperatureLimit(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (TemperatureLimit, error)

NewTemperatureLimit returns a new TemperatureLimit instrument.

func (TemperatureLimit) AttrLimitType

func (TemperatureLimit) AttrLimitType(val LimitTypeAttr) attribute.KeyValue

AttrLimitType returns an optional attribute for the "hw.limit_type" semantic convention. It represents the type of limit for hardware components.

func (TemperatureLimit) AttrName

func (TemperatureLimit) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (TemperatureLimit) AttrParent

func (TemperatureLimit) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (TemperatureLimit) AttrSensorLocation

func (TemperatureLimit) AttrSensorLocation(val string) attribute.KeyValue

AttrSensorLocation returns an optional attribute for the "hw.sensor_location" semantic convention. It represents the location of the sensor.

func (TemperatureLimit) Description

func (TemperatureLimit) Description() string

Description returns the semantic convention description of the instrument

func (TemperatureLimit) Inst

Inst returns the underlying metric instrument.

func (TemperatureLimit) Name

func (TemperatureLimit) Name() string

Name returns the semantic convention name of the instrument.

func (TemperatureLimit) Record

func (m TemperatureLimit) Record(
	ctx context.Context,
	val int64,
	id string,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (TemperatureLimit) RecordSet

func (m TemperatureLimit) RecordSet(ctx context.Context, val int64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (TemperatureLimit) Unit

func (TemperatureLimit) Unit() string

Unit returns the semantic convention unit of the instrument

type TypeAttr

type TypeAttr string

TypeAttr is an attribute conforming to the hw.type semantic conventions. It represents the type of the component.

var (
	// TypeBattery is the battery.
	TypeBattery TypeAttr = "battery"
	// TypeCPU is the CPU.
	TypeCPU TypeAttr = "cpu"
	// TypeDiskController is the disk controller.
	TypeDiskController TypeAttr = "disk_controller"
	// TypeEnclosure is the enclosure.
	TypeEnclosure TypeAttr = "enclosure"
	// TypeFan is the fan.
	TypeFan TypeAttr = "fan"
	// TypeGpu is the GPU.
	TypeGpu TypeAttr = "gpu"
	// TypeLogicalDisk is the logical disk.
	TypeLogicalDisk TypeAttr = "logical_disk"
	// TypeMemory is the memory.
	TypeMemory TypeAttr = "memory"
	// TypeNetwork is the network.
	TypeNetwork TypeAttr = "network"
	// TypePhysicalDisk is the physical disk.
	TypePhysicalDisk TypeAttr = "physical_disk"
	// TypePowerSupply is the power supply.
	TypePowerSupply TypeAttr = "power_supply"
	// TypeTapeDrive is the tape drive.
	TypeTapeDrive TypeAttr = "tape_drive"
	// TypeTemperature is the temperature.
	TypeTemperature TypeAttr = "temperature"
	// TypeVoltage is the voltage.
	TypeVoltage TypeAttr = "voltage"
)

type Voltage

type Voltage struct {
	metric.Int64Gauge
}

Voltage is an instrument used to record metric values conforming to the "hw.voltage" semantic conventions. It represents the voltage measured by the sensor.

func NewVoltage

func NewVoltage(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (Voltage, error)

NewVoltage returns a new Voltage instrument.

func (Voltage) AttrName

func (Voltage) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (Voltage) AttrParent

func (Voltage) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (Voltage) AttrSensorLocation

func (Voltage) AttrSensorLocation(val string) attribute.KeyValue

AttrSensorLocation returns an optional attribute for the "hw.sensor_location" semantic convention. It represents the location of the sensor.

func (Voltage) Description

func (Voltage) Description() string

Description returns the semantic convention description of the instrument

func (Voltage) Inst

func (m Voltage) Inst() metric.Int64Gauge

Inst returns the underlying metric instrument.

func (Voltage) Name

func (Voltage) Name() string

Name returns the semantic convention name of the instrument.

func (Voltage) Record

func (m Voltage) Record(
	ctx context.Context,
	val int64,
	id string,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (Voltage) RecordSet

func (m Voltage) RecordSet(ctx context.Context, val int64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (Voltage) Unit

func (Voltage) Unit() string

Unit returns the semantic convention unit of the instrument

type VoltageLimit

type VoltageLimit struct {
	metric.Int64Gauge
}

VoltageLimit is an instrument used to record metric values conforming to the "hw.voltage.limit" semantic conventions. It represents the voltage limit in Volts.

func NewVoltageLimit

func NewVoltageLimit(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (VoltageLimit, error)

NewVoltageLimit returns a new VoltageLimit instrument.

func (VoltageLimit) AttrLimitType

func (VoltageLimit) AttrLimitType(val LimitTypeAttr) attribute.KeyValue

AttrLimitType returns an optional attribute for the "hw.limit_type" semantic convention. It represents the type of limit for hardware components.

func (VoltageLimit) AttrName

func (VoltageLimit) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (VoltageLimit) AttrParent

func (VoltageLimit) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (VoltageLimit) AttrSensorLocation

func (VoltageLimit) AttrSensorLocation(val string) attribute.KeyValue

AttrSensorLocation returns an optional attribute for the "hw.sensor_location" semantic convention. It represents the location of the sensor.

func (VoltageLimit) Description

func (VoltageLimit) Description() string

Description returns the semantic convention description of the instrument

func (VoltageLimit) Inst

func (m VoltageLimit) Inst() metric.Int64Gauge

Inst returns the underlying metric instrument.

func (VoltageLimit) Name

func (VoltageLimit) Name() string

Name returns the semantic convention name of the instrument.

func (VoltageLimit) Record

func (m VoltageLimit) Record(
	ctx context.Context,
	val int64,
	id string,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (VoltageLimit) RecordSet

func (m VoltageLimit) RecordSet(ctx context.Context, val int64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (VoltageLimit) Unit

func (VoltageLimit) Unit() string

Unit returns the semantic convention unit of the instrument

type VoltageNominal

type VoltageNominal struct {
	metric.Int64Gauge
}

VoltageNominal is an instrument used to record metric values conforming to the "hw.voltage.nominal" semantic conventions. It represents the nominal (expected) voltage.

func NewVoltageNominal

func NewVoltageNominal(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (VoltageNominal, error)

NewVoltageNominal returns a new VoltageNominal instrument.

func (VoltageNominal) AttrName

func (VoltageNominal) AttrName(val string) attribute.KeyValue

AttrName returns an optional attribute for the "hw.name" semantic convention. It represents an easily-recognizable name for the hardware component.

func (VoltageNominal) AttrParent

func (VoltageNominal) AttrParent(val string) attribute.KeyValue

AttrParent returns an optional attribute for the "hw.parent" semantic convention. It represents the unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller).

func (VoltageNominal) AttrSensorLocation

func (VoltageNominal) AttrSensorLocation(val string) attribute.KeyValue

AttrSensorLocation returns an optional attribute for the "hw.sensor_location" semantic convention. It represents the location of the sensor.

func (VoltageNominal) Description

func (VoltageNominal) Description() string

Description returns the semantic convention description of the instrument

func (VoltageNominal) Inst

func (m VoltageNominal) Inst() metric.Int64Gauge

Inst returns the underlying metric instrument.

func (VoltageNominal) Name

func (VoltageNominal) Name() string

Name returns the semantic convention name of the instrument.

func (VoltageNominal) Record

func (m VoltageNominal) Record(
	ctx context.Context,
	val int64,
	id string,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The id is the an identifier for the hardware component, unique within the monitored host

All additional attrs passed are included in the recorded value.

func (VoltageNominal) RecordSet

func (m VoltageNominal) RecordSet(ctx context.Context, val int64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (VoltageNominal) Unit

func (VoltageNominal) Unit() string

Unit returns the semantic convention unit of the instrument

Source Files

metric.go

Version
v1.43.0 (latest)
Published
Apr 3, 2026
Platform
linux/amd64
Imports
5 packages
Last checked
1 hour ago

Tools for package owners.