package systemconv

import "go.opentelemetry.io/otel/semconv/v1.38.0/systemconv"

Package systemconv provides types and functionality for OpenTelemetry semantic conventions in the "system" namespace.

Index

Types

type CPUFrequency

type CPUFrequency struct {
	metric.Int64Gauge
}

CPUFrequency is an instrument used to record metric values conforming to the "system.cpu.frequency" semantic conventions. It represents the operating frequency of the logical CPU in Hertz.

func NewCPUFrequency

func NewCPUFrequency(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (CPUFrequency, error)

NewCPUFrequency returns a new CPUFrequency instrument.

func (CPUFrequency) AttrCPULogicalNumber

func (CPUFrequency) AttrCPULogicalNumber(val int) attribute.KeyValue

AttrCPULogicalNumber returns an optional attribute for the "cpu.logical_number" semantic convention. It represents the logical CPU number [0..n-1].

func (CPUFrequency) Description

func (CPUFrequency) Description() string

Description returns the semantic convention description of the instrument

func (CPUFrequency) Inst

func (m CPUFrequency) Inst() metric.Int64Gauge

Inst returns the underlying metric instrument.

func (CPUFrequency) Name

func (CPUFrequency) Name() string

Name returns the semantic convention name of the instrument.

func (CPUFrequency) Record

func (m CPUFrequency) Record(
	ctx context.Context,
	val int64,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

All additional attrs passed are included in the recorded value.

func (CPUFrequency) RecordSet

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

RecordSet records val to the current distribution for set.

func (CPUFrequency) Unit

func (CPUFrequency) Unit() string

Unit returns the semantic convention unit of the instrument

type CPULogicalCount

type CPULogicalCount struct {
	metric.Int64UpDownCounter
}

CPULogicalCount is an instrument used to record metric values conforming to the "system.cpu.logical.count" semantic conventions. It represents the reports the number of logical (virtual) processor cores created by the operating system to manage multitasking.

func NewCPULogicalCount

func NewCPULogicalCount(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (CPULogicalCount, error)

NewCPULogicalCount returns a new CPULogicalCount instrument.

func (CPULogicalCount) Add

func (m CPULogicalCount) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count for attrs.

Calculated by multiplying the number of sockets by the number of cores per socket, and then by the number of threads per core

func (CPULogicalCount) AddSet

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

AddSet adds incr to the existing count for set.

Calculated by multiplying the number of sockets by the number of cores per socket, and then by the number of threads per core

func (CPULogicalCount) Description

func (CPULogicalCount) Description() string

Description returns the semantic convention description of the instrument

func (CPULogicalCount) Inst

Inst returns the underlying metric instrument.

func (CPULogicalCount) Name

func (CPULogicalCount) Name() string

Name returns the semantic convention name of the instrument.

func (CPULogicalCount) Unit

func (CPULogicalCount) Unit() string

Unit returns the semantic convention unit of the instrument

type CPUModeAttr

type CPUModeAttr string

CPUModeAttr is an attribute conforming to the cpu.mode semantic conventions. It represents the mode of the CPU.

var (
	// CPUModeUser is the user.
	CPUModeUser CPUModeAttr = "user"
	// CPUModeSystem is the system.
	CPUModeSystem CPUModeAttr = "system"
	// CPUModeNice is the nice.
	CPUModeNice CPUModeAttr = "nice"
	// CPUModeIdle is the idle.
	CPUModeIdle CPUModeAttr = "idle"
	// CPUModeIOWait is the IO Wait.
	CPUModeIOWait CPUModeAttr = "iowait"
	// CPUModeInterrupt is the interrupt.
	CPUModeInterrupt CPUModeAttr = "interrupt"
	// CPUModeSteal is the steal.
	CPUModeSteal CPUModeAttr = "steal"
	// CPUModeKernel is the kernel.
	CPUModeKernel CPUModeAttr = "kernel"
)

type CPUPhysicalCount

type CPUPhysicalCount struct {
	metric.Int64UpDownCounter
}

CPUPhysicalCount is an instrument used to record metric values conforming to the "system.cpu.physical.count" semantic conventions. It represents the reports the number of actual physical processor cores on the hardware.

func NewCPUPhysicalCount

func NewCPUPhysicalCount(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (CPUPhysicalCount, error)

NewCPUPhysicalCount returns a new CPUPhysicalCount instrument.

func (CPUPhysicalCount) Add

func (m CPUPhysicalCount) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count for attrs.

Calculated by multiplying the number of sockets by the number of cores per socket

func (CPUPhysicalCount) AddSet

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

AddSet adds incr to the existing count for set.

Calculated by multiplying the number of sockets by the number of cores per socket

func (CPUPhysicalCount) Description

func (CPUPhysicalCount) Description() string

Description returns the semantic convention description of the instrument

func (CPUPhysicalCount) Inst

Inst returns the underlying metric instrument.

func (CPUPhysicalCount) Name

func (CPUPhysicalCount) Name() string

Name returns the semantic convention name of the instrument.

func (CPUPhysicalCount) Unit

func (CPUPhysicalCount) Unit() string

Unit returns the semantic convention unit of the instrument

type CPUTime

type CPUTime struct {
	metric.Float64ObservableCounter
}

CPUTime is an instrument used to record metric values conforming to the "system.cpu.time" semantic conventions. It represents the seconds each logical CPU spent on each mode.

func NewCPUTime

func NewCPUTime(
	m metric.Meter,
	opt ...metric.Float64ObservableCounterOption,
) (CPUTime, error)

NewCPUTime returns a new CPUTime instrument.

func (CPUTime) AttrCPULogicalNumber

func (CPUTime) AttrCPULogicalNumber(val int) attribute.KeyValue

AttrCPULogicalNumber returns an optional attribute for the "cpu.logical_number" semantic convention. It represents the logical CPU number [0..n-1].

func (CPUTime) AttrCPUMode

func (CPUTime) AttrCPUMode(val CPUModeAttr) attribute.KeyValue

AttrCPUMode returns an optional attribute for the "cpu.mode" semantic convention. It represents the mode of the CPU.

func (CPUTime) Description

func (CPUTime) Description() string

Description returns the semantic convention description of the instrument

func (CPUTime) Inst

Inst returns the underlying metric instrument.

func (CPUTime) Name

func (CPUTime) Name() string

Name returns the semantic convention name of the instrument.

func (CPUTime) Unit

func (CPUTime) Unit() string

Unit returns the semantic convention unit of the instrument

type CPUUtilization

type CPUUtilization struct {
	metric.Int64Gauge
}

CPUUtilization is an instrument used to record metric values conforming to the "system.cpu.utilization" semantic conventions. It represents the for each logical CPU, the utilization is calculated as the change in cumulative CPU time (cpu.time) over a measurement interval, divided by the elapsed time.

func NewCPUUtilization

func NewCPUUtilization(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (CPUUtilization, error)

NewCPUUtilization returns a new CPUUtilization instrument.

func (CPUUtilization) AttrCPULogicalNumber

func (CPUUtilization) AttrCPULogicalNumber(val int) attribute.KeyValue

AttrCPULogicalNumber returns an optional attribute for the "cpu.logical_number" semantic convention. It represents the logical CPU number [0..n-1].

func (CPUUtilization) AttrCPUMode

func (CPUUtilization) AttrCPUMode(val CPUModeAttr) attribute.KeyValue

AttrCPUMode returns an optional attribute for the "cpu.mode" semantic convention. It represents the mode of the CPU.

func (CPUUtilization) Description

func (CPUUtilization) Description() string

Description returns the semantic convention description of the instrument

func (CPUUtilization) Inst

func (m CPUUtilization) Inst() metric.Int64Gauge

Inst returns the underlying metric instrument.

func (CPUUtilization) Name

func (CPUUtilization) Name() string

Name returns the semantic convention name of the instrument.

func (CPUUtilization) Record

func (m CPUUtilization) Record(
	ctx context.Context,
	val int64,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

All additional attrs passed are included in the recorded value.

func (CPUUtilization) RecordSet

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

RecordSet records val to the current distribution for set.

func (CPUUtilization) Unit

func (CPUUtilization) Unit() string

Unit returns the semantic convention unit of the instrument

type DiskIO

type DiskIO struct {
	metric.Int64Counter
}

DiskIO is an instrument used to record metric values conforming to the "system.disk.io" semantic conventions. It represents the disk bytes transferred.

func NewDiskIO

func NewDiskIO(
	m metric.Meter,
	opt ...metric.Int64CounterOption,
) (DiskIO, error)

NewDiskIO returns a new DiskIO instrument.

func (DiskIO) Add

func (m DiskIO) Add(
	ctx context.Context,
	incr int64,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

All additional attrs passed are included in the recorded value.

func (DiskIO) AddSet

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

AddSet adds incr to the existing count for set.

func (DiskIO) AttrDevice

func (DiskIO) AttrDevice(val string) attribute.KeyValue

AttrDevice returns an optional attribute for the "system.device" semantic convention. It represents the device identifier.

func (DiskIO) AttrDiskIODirection

func (DiskIO) AttrDiskIODirection(val DiskIODirectionAttr) attribute.KeyValue

AttrDiskIODirection returns an optional attribute for the "disk.io.direction" semantic convention. It represents the disk IO operation direction.

func (DiskIO) Description

func (DiskIO) Description() string

Description returns the semantic convention description of the instrument

func (DiskIO) Inst

func (m DiskIO) Inst() metric.Int64Counter

Inst returns the underlying metric instrument.

func (DiskIO) Name

func (DiskIO) Name() string

Name returns the semantic convention name of the instrument.

func (DiskIO) Unit

func (DiskIO) Unit() string

Unit returns the semantic convention unit of the instrument

type DiskIODirectionAttr

type DiskIODirectionAttr string

DiskIODirectionAttr is an attribute conforming to the disk.io.direction semantic conventions. It represents the disk IO operation direction.

var (
	// DiskIODirectionRead is the standardized value "read" of DiskIODirectionAttr.
	DiskIODirectionRead DiskIODirectionAttr = "read"
	// DiskIODirectionWrite is the standardized value "write" of
	// DiskIODirectionAttr.
	DiskIODirectionWrite DiskIODirectionAttr = "write"
)

type DiskIOTime

type DiskIOTime struct {
	metric.Float64Counter
}

DiskIOTime is an instrument used to record metric values conforming to the "system.disk.io_time" semantic conventions. It represents the time disk spent activated.

func NewDiskIOTime

func NewDiskIOTime(
	m metric.Meter,
	opt ...metric.Float64CounterOption,
) (DiskIOTime, error)

NewDiskIOTime returns a new DiskIOTime instrument.

func (DiskIOTime) Add

func (m DiskIOTime) Add(
	ctx context.Context,
	incr float64,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

All additional attrs passed are included in the recorded value.

The real elapsed time ("wall clock") used in the I/O path (time from operations running in parallel are not counted). Measured as:

func (DiskIOTime) AddSet

func (m DiskIOTime) AddSet(ctx context.Context, incr float64, set attribute.Set)

AddSet adds incr to the existing count for set.

The real elapsed time ("wall clock") used in the I/O path (time from operations running in parallel are not counted). Measured as:

func (DiskIOTime) AttrDevice

func (DiskIOTime) AttrDevice(val string) attribute.KeyValue

AttrDevice returns an optional attribute for the "system.device" semantic convention. It represents the device identifier.

func (DiskIOTime) Description

func (DiskIOTime) Description() string

Description returns the semantic convention description of the instrument

func (DiskIOTime) Inst

func (m DiskIOTime) Inst() metric.Float64Counter

Inst returns the underlying metric instrument.

func (DiskIOTime) Name

func (DiskIOTime) Name() string

Name returns the semantic convention name of the instrument.

func (DiskIOTime) Unit

func (DiskIOTime) Unit() string

Unit returns the semantic convention unit of the instrument

type DiskLimit

type DiskLimit struct {
	metric.Int64UpDownCounter
}

DiskLimit is an instrument used to record metric values conforming to the "system.disk.limit" semantic conventions. It represents the total storage capacity of the disk.

func NewDiskLimit

func NewDiskLimit(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (DiskLimit, error)

NewDiskLimit returns a new DiskLimit instrument.

func (DiskLimit) Add

func (m DiskLimit) Add(
	ctx context.Context,
	incr int64,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

All additional attrs passed are included in the recorded value.

func (DiskLimit) AddSet

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

AddSet adds incr to the existing count for set.

func (DiskLimit) AttrDevice

func (DiskLimit) AttrDevice(val string) attribute.KeyValue

AttrDevice returns an optional attribute for the "system.device" semantic convention. It represents the device identifier.

func (DiskLimit) Description

func (DiskLimit) Description() string

Description returns the semantic convention description of the instrument

func (DiskLimit) Inst

Inst returns the underlying metric instrument.

func (DiskLimit) Name

func (DiskLimit) Name() string

Name returns the semantic convention name of the instrument.

func (DiskLimit) Unit

func (DiskLimit) Unit() string

Unit returns the semantic convention unit of the instrument

type DiskMerged

type DiskMerged struct {
	metric.Int64Counter
}

DiskMerged is an instrument used to record metric values conforming to the "system.disk.merged" semantic conventions. It represents the number of disk reads/writes merged into single physical disk access operations.

func NewDiskMerged

func NewDiskMerged(
	m metric.Meter,
	opt ...metric.Int64CounterOption,
) (DiskMerged, error)

NewDiskMerged returns a new DiskMerged instrument.

func (DiskMerged) Add

func (m DiskMerged) Add(
	ctx context.Context,
	incr int64,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

All additional attrs passed are included in the recorded value.

func (DiskMerged) AddSet

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

AddSet adds incr to the existing count for set.

func (DiskMerged) AttrDevice

func (DiskMerged) AttrDevice(val string) attribute.KeyValue

AttrDevice returns an optional attribute for the "system.device" semantic convention. It represents the device identifier.

func (DiskMerged) AttrDiskIODirection

func (DiskMerged) AttrDiskIODirection(val DiskIODirectionAttr) attribute.KeyValue

AttrDiskIODirection returns an optional attribute for the "disk.io.direction" semantic convention. It represents the disk IO operation direction.

func (DiskMerged) Description

func (DiskMerged) Description() string

Description returns the semantic convention description of the instrument

func (DiskMerged) Inst

func (m DiskMerged) Inst() metric.Int64Counter

Inst returns the underlying metric instrument.

func (DiskMerged) Name

func (DiskMerged) Name() string

Name returns the semantic convention name of the instrument.

func (DiskMerged) Unit

func (DiskMerged) Unit() string

Unit returns the semantic convention unit of the instrument

type DiskOperationTime

type DiskOperationTime struct {
	metric.Float64Counter
}

DiskOperationTime is an instrument used to record metric values conforming to the "system.disk.operation_time" semantic conventions. It represents the sum of the time each operation took to complete.

func NewDiskOperationTime

func NewDiskOperationTime(
	m metric.Meter,
	opt ...metric.Float64CounterOption,
) (DiskOperationTime, error)

NewDiskOperationTime returns a new DiskOperationTime instrument.

func (DiskOperationTime) Add

func (m DiskOperationTime) Add(
	ctx context.Context,
	incr float64,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

All additional attrs passed are included in the recorded value.

Because it is the sum of time each request took, parallel-issued requests each contribute to make the count grow. Measured as:

func (DiskOperationTime) AddSet

func (m DiskOperationTime) AddSet(ctx context.Context, incr float64, set attribute.Set)

AddSet adds incr to the existing count for set.

Because it is the sum of time each request took, parallel-issued requests each contribute to make the count grow. Measured as:

func (DiskOperationTime) AttrDevice

func (DiskOperationTime) AttrDevice(val string) attribute.KeyValue

AttrDevice returns an optional attribute for the "system.device" semantic convention. It represents the device identifier.

func (DiskOperationTime) AttrDiskIODirection

func (DiskOperationTime) AttrDiskIODirection(val DiskIODirectionAttr) attribute.KeyValue

AttrDiskIODirection returns an optional attribute for the "disk.io.direction" semantic convention. It represents the disk IO operation direction.

func (DiskOperationTime) Description

func (DiskOperationTime) Description() string

Description returns the semantic convention description of the instrument

func (DiskOperationTime) Inst

Inst returns the underlying metric instrument.

func (DiskOperationTime) Name

func (DiskOperationTime) Name() string

Name returns the semantic convention name of the instrument.

func (DiskOperationTime) Unit

func (DiskOperationTime) Unit() string

Unit returns the semantic convention unit of the instrument

type DiskOperations

type DiskOperations struct {
	metric.Int64Counter
}

DiskOperations is an instrument used to record metric values conforming to the "system.disk.operations" semantic conventions. It represents the disk operations count.

func NewDiskOperations

func NewDiskOperations(
	m metric.Meter,
	opt ...metric.Int64CounterOption,
) (DiskOperations, error)

NewDiskOperations returns a new DiskOperations instrument.

func (DiskOperations) Add

func (m DiskOperations) Add(
	ctx context.Context,
	incr int64,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

All additional attrs passed are included in the recorded value.

func (DiskOperations) AddSet

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

AddSet adds incr to the existing count for set.

func (DiskOperations) AttrDevice

func (DiskOperations) AttrDevice(val string) attribute.KeyValue

AttrDevice returns an optional attribute for the "system.device" semantic convention. It represents the device identifier.

func (DiskOperations) AttrDiskIODirection

func (DiskOperations) AttrDiskIODirection(val DiskIODirectionAttr) attribute.KeyValue

AttrDiskIODirection returns an optional attribute for the "disk.io.direction" semantic convention. It represents the disk IO operation direction.

func (DiskOperations) Description

func (DiskOperations) Description() string

Description returns the semantic convention description of the instrument

func (DiskOperations) Inst

Inst returns the underlying metric instrument.

func (DiskOperations) Name

func (DiskOperations) Name() string

Name returns the semantic convention name of the instrument.

func (DiskOperations) Unit

func (DiskOperations) Unit() string

Unit returns the semantic convention unit of the instrument

type FilesystemLimit

type FilesystemLimit struct {
	metric.Int64UpDownCounter
}

FilesystemLimit is an instrument used to record metric values conforming to the "system.filesystem.limit" semantic conventions. It represents the total storage capacity of the filesystem.

func NewFilesystemLimit

func NewFilesystemLimit(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (FilesystemLimit, error)

NewFilesystemLimit returns a new FilesystemLimit instrument.

func (FilesystemLimit) Add

func (m FilesystemLimit) Add(
	ctx context.Context,
	incr int64,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

All additional attrs passed are included in the recorded value.

func (FilesystemLimit) AddSet

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

AddSet adds incr to the existing count for set.

func (FilesystemLimit) AttrDevice

func (FilesystemLimit) AttrDevice(val string) attribute.KeyValue

AttrDevice returns an optional attribute for the "system.device" semantic convention. It represents the identifier for the device where the filesystem resides.

func (FilesystemLimit) AttrFilesystemMode

func (FilesystemLimit) AttrFilesystemMode(val string) attribute.KeyValue

AttrFilesystemMode returns an optional attribute for the "system.filesystem.mode" semantic convention. It represents the filesystem mode.

func (FilesystemLimit) AttrFilesystemMountpoint

func (FilesystemLimit) AttrFilesystemMountpoint(val string) attribute.KeyValue

AttrFilesystemMountpoint returns an optional attribute for the "system.filesystem.mountpoint" semantic convention. It represents the filesystem mount path.

func (FilesystemLimit) AttrFilesystemType

func (FilesystemLimit) AttrFilesystemType(val FilesystemTypeAttr) attribute.KeyValue

AttrFilesystemType returns an optional attribute for the "system.filesystem.type" semantic convention. It represents the filesystem type.

func (FilesystemLimit) Description

func (FilesystemLimit) Description() string

Description returns the semantic convention description of the instrument

func (FilesystemLimit) Inst

Inst returns the underlying metric instrument.

func (FilesystemLimit) Name

func (FilesystemLimit) Name() string

Name returns the semantic convention name of the instrument.

func (FilesystemLimit) Unit

func (FilesystemLimit) Unit() string

Unit returns the semantic convention unit of the instrument

type FilesystemStateAttr

type FilesystemStateAttr string

FilesystemStateAttr is an attribute conforming to the system.filesystem.state semantic conventions. It represents the filesystem state.

var (
	// FilesystemStateUsed is the standardized value "used" of FilesystemStateAttr.
	FilesystemStateUsed FilesystemStateAttr = "used"
	// FilesystemStateFree is the standardized value "free" of FilesystemStateAttr.
	FilesystemStateFree FilesystemStateAttr = "free"
	// FilesystemStateReserved is the standardized value "reserved" of
	// FilesystemStateAttr.
	FilesystemStateReserved FilesystemStateAttr = "reserved"
)

type FilesystemTypeAttr

type FilesystemTypeAttr string

FilesystemTypeAttr is an attribute conforming to the system.filesystem.type semantic conventions. It represents the filesystem type.

var (
	// FilesystemTypeFat32 is the standardized value "fat32" of FilesystemTypeAttr.
	FilesystemTypeFat32 FilesystemTypeAttr = "fat32"
	// FilesystemTypeExfat is the standardized value "exfat" of FilesystemTypeAttr.
	FilesystemTypeExfat FilesystemTypeAttr = "exfat"
	// FilesystemTypeNtfs is the standardized value "ntfs" of FilesystemTypeAttr.
	FilesystemTypeNtfs FilesystemTypeAttr = "ntfs"
	// FilesystemTypeRefs is the standardized value "refs" of FilesystemTypeAttr.
	FilesystemTypeRefs FilesystemTypeAttr = "refs"
	// FilesystemTypeHfsplus is the standardized value "hfsplus" of
	// FilesystemTypeAttr.
	FilesystemTypeHfsplus FilesystemTypeAttr = "hfsplus"
	// FilesystemTypeExt4 is the standardized value "ext4" of FilesystemTypeAttr.
	FilesystemTypeExt4 FilesystemTypeAttr = "ext4"
)

type FilesystemUsage

type FilesystemUsage struct {
	metric.Int64UpDownCounter
}

FilesystemUsage is an instrument used to record metric values conforming to the "system.filesystem.usage" semantic conventions. It represents the reports a filesystem's space usage across different states.

func NewFilesystemUsage

func NewFilesystemUsage(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (FilesystemUsage, error)

NewFilesystemUsage returns a new FilesystemUsage instrument.

func (FilesystemUsage) Add

func (m FilesystemUsage) Add(
	ctx context.Context,
	incr int64,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

All additional attrs passed are included in the recorded value.

The sum of all `system.filesystem.usage` values over the different `system.filesystem.state` attributes SHOULD equal the total storage capacity of the filesystem, that is `system.filesystem.limit`.

func (FilesystemUsage) AddSet

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

AddSet adds incr to the existing count for set.

The sum of all `system.filesystem.usage` values over the different `system.filesystem.state` attributes SHOULD equal the total storage capacity of the filesystem, that is `system.filesystem.limit`.

func (FilesystemUsage) AttrDevice

func (FilesystemUsage) AttrDevice(val string) attribute.KeyValue

AttrDevice returns an optional attribute for the "system.device" semantic convention. It represents the identifier for the device where the filesystem resides.

func (FilesystemUsage) AttrFilesystemMode

func (FilesystemUsage) AttrFilesystemMode(val string) attribute.KeyValue

AttrFilesystemMode returns an optional attribute for the "system.filesystem.mode" semantic convention. It represents the filesystem mode.

func (FilesystemUsage) AttrFilesystemMountpoint

func (FilesystemUsage) AttrFilesystemMountpoint(val string) attribute.KeyValue

AttrFilesystemMountpoint returns an optional attribute for the "system.filesystem.mountpoint" semantic convention. It represents the filesystem mount path.

func (FilesystemUsage) AttrFilesystemState

func (FilesystemUsage) AttrFilesystemState(val FilesystemStateAttr) attribute.KeyValue

AttrFilesystemState returns an optional attribute for the "system.filesystem.state" semantic convention. It represents the filesystem state.

func (FilesystemUsage) AttrFilesystemType

func (FilesystemUsage) AttrFilesystemType(val FilesystemTypeAttr) attribute.KeyValue

AttrFilesystemType returns an optional attribute for the "system.filesystem.type" semantic convention. It represents the filesystem type.

func (FilesystemUsage) Description

func (FilesystemUsage) Description() string

Description returns the semantic convention description of the instrument

func (FilesystemUsage) Inst

Inst returns the underlying metric instrument.

func (FilesystemUsage) Name

func (FilesystemUsage) Name() string

Name returns the semantic convention name of the instrument.

func (FilesystemUsage) Unit

func (FilesystemUsage) Unit() string

Unit returns the semantic convention unit of the instrument

type FilesystemUtilization

type FilesystemUtilization struct {
	metric.Int64Gauge
}

FilesystemUtilization is an instrument used to record metric values conforming to the "system.filesystem.utilization" semantic conventions. It represents the fraction of filesystem bytes used.

func NewFilesystemUtilization

func NewFilesystemUtilization(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (FilesystemUtilization, error)

NewFilesystemUtilization returns a new FilesystemUtilization instrument.

func (FilesystemUtilization) AttrDevice

AttrDevice returns an optional attribute for the "system.device" semantic convention. It represents the identifier for the device where the filesystem resides.

func (FilesystemUtilization) AttrFilesystemMode

func (FilesystemUtilization) AttrFilesystemMode(val string) attribute.KeyValue

AttrFilesystemMode returns an optional attribute for the "system.filesystem.mode" semantic convention. It represents the filesystem mode.

func (FilesystemUtilization) AttrFilesystemMountpoint

func (FilesystemUtilization) AttrFilesystemMountpoint(val string) attribute.KeyValue

AttrFilesystemMountpoint returns an optional attribute for the "system.filesystem.mountpoint" semantic convention. It represents the filesystem mount path.

func (FilesystemUtilization) AttrFilesystemState

AttrFilesystemState returns an optional attribute for the "system.filesystem.state" semantic convention. It represents the filesystem state.

func (FilesystemUtilization) AttrFilesystemType

AttrFilesystemType returns an optional attribute for the "system.filesystem.type" semantic convention. It represents the filesystem type.

func (FilesystemUtilization) Description

func (FilesystemUtilization) Description() string

Description returns the semantic convention description of the instrument

func (FilesystemUtilization) Inst

Inst returns the underlying metric instrument.

func (FilesystemUtilization) Name

Name returns the semantic convention name of the instrument.

func (FilesystemUtilization) Record

func (m FilesystemUtilization) Record(
	ctx context.Context,
	val int64,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

All additional attrs passed are included in the recorded value.

func (FilesystemUtilization) RecordSet

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

RecordSet records val to the current distribution for set.

func (FilesystemUtilization) Unit

Unit returns the semantic convention unit of the instrument

type LinuxMemoryAvailable

type LinuxMemoryAvailable struct {
	metric.Int64UpDownCounter
}

LinuxMemoryAvailable is an instrument used to record metric values conforming to the "system.linux.memory.available" semantic conventions. It represents an estimate of how much memory is available for starting new applications, without causing swapping.

func NewLinuxMemoryAvailable

func NewLinuxMemoryAvailable(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (LinuxMemoryAvailable, error)

NewLinuxMemoryAvailable returns a new LinuxMemoryAvailable instrument.

func (LinuxMemoryAvailable) Add

func (m LinuxMemoryAvailable) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count for attrs.

This is an alternative to `system.memory.usage` metric with `state=free`. Linux starting from 3.14 exports "available" memory. It takes "free" memory as a baseline, and then factors in kernel-specific values. This is supposed to be more accurate than just "free" memory. For reference, see the calculations here. See also `MemAvailable` in /proc/meminfo.

func (LinuxMemoryAvailable) AddSet

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

AddSet adds incr to the existing count for set.

This is an alternative to `system.memory.usage` metric with `state=free`. Linux starting from 3.14 exports "available" memory. It takes "free" memory as a baseline, and then factors in kernel-specific values. This is supposed to be more accurate than just "free" memory. For reference, see the calculations here. See also `MemAvailable` in /proc/meminfo.

func (LinuxMemoryAvailable) Description

func (LinuxMemoryAvailable) Description() string

Description returns the semantic convention description of the instrument

func (LinuxMemoryAvailable) Inst

Inst returns the underlying metric instrument.

func (LinuxMemoryAvailable) Name

Name returns the semantic convention name of the instrument.

func (LinuxMemoryAvailable) Unit

Unit returns the semantic convention unit of the instrument

type LinuxMemorySlabStateAttr

type LinuxMemorySlabStateAttr string

LinuxMemorySlabStateAttr is an attribute conforming to the linux.memory.slab.state semantic conventions. It represents the Linux Slab memory state.

var (
	// LinuxMemorySlabStateReclaimable is the standardized value "reclaimable" of
	// LinuxMemorySlabStateAttr.
	LinuxMemorySlabStateReclaimable LinuxMemorySlabStateAttr = "reclaimable"
	// LinuxMemorySlabStateUnreclaimable is the standardized value "unreclaimable"
	// of LinuxMemorySlabStateAttr.
	LinuxMemorySlabStateUnreclaimable LinuxMemorySlabStateAttr = "unreclaimable"
)

type LinuxMemorySlabUsage

type LinuxMemorySlabUsage struct {
	metric.Int64UpDownCounter
}

LinuxMemorySlabUsage is an instrument used to record metric values conforming to the "system.linux.memory.slab.usage" semantic conventions. It represents the reports the memory used by the Linux kernel for managing caches of frequently used objects.

func NewLinuxMemorySlabUsage

func NewLinuxMemorySlabUsage(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (LinuxMemorySlabUsage, error)

NewLinuxMemorySlabUsage returns a new LinuxMemorySlabUsage instrument.

func (LinuxMemorySlabUsage) Add

func (m LinuxMemorySlabUsage) Add(
	ctx context.Context,
	incr int64,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

All additional attrs passed are included in the recorded value.

The sum over the `reclaimable` and `unreclaimable` state values in `linux.memory.slab.usage` SHOULD be equal to the total slab memory available on the system. Note that the total slab memory is not constant and may vary over time. See also the Slab allocator and `Slab` in /proc/meminfo.

func (LinuxMemorySlabUsage) AddSet

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

AddSet adds incr to the existing count for set.

The sum over the `reclaimable` and `unreclaimable` state values in `linux.memory.slab.usage` SHOULD be equal to the total slab memory available on the system. Note that the total slab memory is not constant and may vary over time. See also the Slab allocator and `Slab` in /proc/meminfo.

func (LinuxMemorySlabUsage) AttrLinuxMemorySlabState

func (LinuxMemorySlabUsage) AttrLinuxMemorySlabState(val LinuxMemorySlabStateAttr) attribute.KeyValue

AttrLinuxMemorySlabState returns an optional attribute for the "linux.memory.slab.state" semantic convention. It represents the Linux Slab memory state.

func (LinuxMemorySlabUsage) Description

func (LinuxMemorySlabUsage) Description() string

Description returns the semantic convention description of the instrument

func (LinuxMemorySlabUsage) Inst

Inst returns the underlying metric instrument.

func (LinuxMemorySlabUsage) Name

Name returns the semantic convention name of the instrument.

func (LinuxMemorySlabUsage) Unit

Unit returns the semantic convention unit of the instrument

type MemoryLimit

type MemoryLimit struct {
	metric.Int64UpDownCounter
}

MemoryLimit is an instrument used to record metric values conforming to the "system.memory.limit" semantic conventions. It represents the total virtual memory available in the system.

func NewMemoryLimit

func NewMemoryLimit(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (MemoryLimit, error)

NewMemoryLimit returns a new MemoryLimit instrument.

func (MemoryLimit) Add

func (m MemoryLimit) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count for attrs.

func (MemoryLimit) AddSet

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

AddSet adds incr to the existing count for set.

func (MemoryLimit) Description

func (MemoryLimit) Description() string

Description returns the semantic convention description of the instrument

func (MemoryLimit) Inst

Inst returns the underlying metric instrument.

func (MemoryLimit) Name

func (MemoryLimit) Name() string

Name returns the semantic convention name of the instrument.

func (MemoryLimit) Unit

func (MemoryLimit) Unit() string

Unit returns the semantic convention unit of the instrument

type MemoryShared

type MemoryShared struct {
	metric.Int64UpDownCounter
}

MemoryShared is an instrument used to record metric values conforming to the "system.memory.shared" semantic conventions. It represents the shared memory used (mostly by tmpfs).

func NewMemoryShared

func NewMemoryShared(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (MemoryShared, error)

NewMemoryShared returns a new MemoryShared instrument.

func (MemoryShared) Add

func (m MemoryShared) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count for attrs.

Equivalent of `shared` from `free` command or `Shmem` from `/proc/meminfo`"

func (MemoryShared) AddSet

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

AddSet adds incr to the existing count for set.

Equivalent of `shared` from `free` command or `Shmem` from `/proc/meminfo`"

func (MemoryShared) Description

func (MemoryShared) Description() string

Description returns the semantic convention description of the instrument

func (MemoryShared) Inst

Inst returns the underlying metric instrument.

func (MemoryShared) Name

func (MemoryShared) Name() string

Name returns the semantic convention name of the instrument.

func (MemoryShared) Unit

func (MemoryShared) Unit() string

Unit returns the semantic convention unit of the instrument

type MemoryStateAttr

type MemoryStateAttr string

MemoryStateAttr is an attribute conforming to the system.memory.state semantic conventions. It represents the memory state.

var (
	// MemoryStateUsed is the actual used virtual memory in bytes.
	MemoryStateUsed MemoryStateAttr = "used"
	// MemoryStateFree is the standardized value "free" of MemoryStateAttr.
	MemoryStateFree MemoryStateAttr = "free"
	// MemoryStateBuffers is the standardized value "buffers" of MemoryStateAttr.
	MemoryStateBuffers MemoryStateAttr = "buffers"
	// MemoryStateCached is the standardized value "cached" of MemoryStateAttr.
	MemoryStateCached MemoryStateAttr = "cached"
)

type MemoryUsage

type MemoryUsage struct {
	metric.Int64ObservableUpDownCounter
}

MemoryUsage is an instrument used to record metric values conforming to the "system.memory.usage" semantic conventions. It represents the reports memory in use by state.

func NewMemoryUsage

NewMemoryUsage returns a new MemoryUsage instrument.

func (MemoryUsage) AttrMemoryState

func (MemoryUsage) AttrMemoryState(val MemoryStateAttr) attribute.KeyValue

AttrMemoryState returns an optional attribute for the "system.memory.state" semantic convention. It represents the memory state.

func (MemoryUsage) Description

func (MemoryUsage) Description() string

Description returns the semantic convention description of the instrument

func (MemoryUsage) Inst

Inst returns the underlying metric instrument.

func (MemoryUsage) Name

func (MemoryUsage) Name() string

Name returns the semantic convention name of the instrument.

func (MemoryUsage) Unit

func (MemoryUsage) Unit() string

Unit returns the semantic convention unit of the instrument

type MemoryUtilization

type MemoryUtilization struct {
	metric.Float64ObservableGauge
}

MemoryUtilization is an instrument used to record metric values conforming to the "system.memory.utilization" semantic conventions. It represents the percentage of memory bytes in use.

func NewMemoryUtilization

func NewMemoryUtilization(
	m metric.Meter,
	opt ...metric.Float64ObservableGaugeOption,
) (MemoryUtilization, error)

NewMemoryUtilization returns a new MemoryUtilization instrument.

func (MemoryUtilization) AttrMemoryState

func (MemoryUtilization) AttrMemoryState(val MemoryStateAttr) attribute.KeyValue

AttrMemoryState returns an optional attribute for the "system.memory.state" semantic convention. It represents the memory state.

func (MemoryUtilization) Description

func (MemoryUtilization) Description() string

Description returns the semantic convention description of the instrument

func (MemoryUtilization) Inst

Inst returns the underlying metric instrument.

func (MemoryUtilization) Name

func (MemoryUtilization) Name() string

Name returns the semantic convention name of the instrument.

func (MemoryUtilization) Unit

func (MemoryUtilization) Unit() string

Unit returns the semantic convention unit of the instrument

type NetworkConnectionCount

type NetworkConnectionCount struct {
	metric.Int64UpDownCounter
}

NetworkConnectionCount is an instrument used to record metric values conforming to the "system.network.connection.count" semantic conventions. It represents the number of connections.

func NewNetworkConnectionCount

func NewNetworkConnectionCount(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (NetworkConnectionCount, error)

NewNetworkConnectionCount returns a new NetworkConnectionCount instrument.

func (NetworkConnectionCount) Add

func (m NetworkConnectionCount) Add(
	ctx context.Context,
	incr int64,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

All additional attrs passed are included in the recorded value.

func (NetworkConnectionCount) AddSet

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

AddSet adds incr to the existing count for set.

func (NetworkConnectionCount) AttrNetworkConnectionState

func (NetworkConnectionCount) AttrNetworkConnectionState(val NetworkConnectionStateAttr) attribute.KeyValue

AttrNetworkConnectionState returns an optional attribute for the "network.connection.state" semantic convention. It represents the state of network connection.

func (NetworkConnectionCount) AttrNetworkInterfaceName

func (NetworkConnectionCount) AttrNetworkInterfaceName(val string) attribute.KeyValue

AttrNetworkInterfaceName returns an optional attribute for the "network.interface.name" semantic convention. It represents the network interface name.

func (NetworkConnectionCount) AttrNetworkTransport

AttrNetworkTransport returns an optional attribute for the "network.transport" semantic convention. It represents the OSI transport layer or inter-process communication method.

func (NetworkConnectionCount) Description

func (NetworkConnectionCount) Description() string

Description returns the semantic convention description of the instrument

func (NetworkConnectionCount) Inst

Inst returns the underlying metric instrument.

func (NetworkConnectionCount) Name

Name returns the semantic convention name of the instrument.

func (NetworkConnectionCount) Unit

Unit returns the semantic convention unit of the instrument

type NetworkConnectionStateAttr

type NetworkConnectionStateAttr string

NetworkConnectionStateAttr is an attribute conforming to the network.connection.state semantic conventions. It represents the state of network connection.

var (
	// NetworkConnectionStateClosed is the standardized value "closed" of
	// NetworkConnectionStateAttr.
	NetworkConnectionStateClosed NetworkConnectionStateAttr = "closed"
	// NetworkConnectionStateCloseWait is the standardized value "close_wait" of
	// NetworkConnectionStateAttr.
	NetworkConnectionStateCloseWait NetworkConnectionStateAttr = "close_wait"
	// NetworkConnectionStateClosing is the standardized value "closing" of
	// NetworkConnectionStateAttr.
	NetworkConnectionStateClosing NetworkConnectionStateAttr = "closing"
	// NetworkConnectionStateEstablished is the standardized value "established" of
	// NetworkConnectionStateAttr.
	NetworkConnectionStateEstablished NetworkConnectionStateAttr = "established"
	// NetworkConnectionStateFinWait1 is the standardized value "fin_wait_1" of
	// NetworkConnectionStateAttr.
	NetworkConnectionStateFinWait1 NetworkConnectionStateAttr = "fin_wait_1"
	// NetworkConnectionStateFinWait2 is the standardized value "fin_wait_2" of
	// NetworkConnectionStateAttr.
	NetworkConnectionStateFinWait2 NetworkConnectionStateAttr = "fin_wait_2"
	// NetworkConnectionStateLastAck is the standardized value "last_ack" of
	// NetworkConnectionStateAttr.
	NetworkConnectionStateLastAck NetworkConnectionStateAttr = "last_ack"
	// NetworkConnectionStateListen is the standardized value "listen" of
	// NetworkConnectionStateAttr.
	NetworkConnectionStateListen NetworkConnectionStateAttr = "listen"
	// NetworkConnectionStateSynReceived is the standardized value "syn_received" of
	// NetworkConnectionStateAttr.
	NetworkConnectionStateSynReceived NetworkConnectionStateAttr = "syn_received"
	// NetworkConnectionStateSynSent is the standardized value "syn_sent" of
	// NetworkConnectionStateAttr.
	NetworkConnectionStateSynSent NetworkConnectionStateAttr = "syn_sent"
	// NetworkConnectionStateTimeWait is the standardized value "time_wait" of
	// NetworkConnectionStateAttr.
	NetworkConnectionStateTimeWait NetworkConnectionStateAttr = "time_wait"
)

type NetworkErrors

type NetworkErrors struct {
	metric.Int64Counter
}

NetworkErrors is an instrument used to record metric values conforming to the "system.network.errors" semantic conventions. It represents the count of network errors detected.

func NewNetworkErrors

func NewNetworkErrors(
	m metric.Meter,
	opt ...metric.Int64CounterOption,
) (NetworkErrors, error)

NewNetworkErrors returns a new NetworkErrors instrument.

func (NetworkErrors) Add

func (m NetworkErrors) Add(
	ctx context.Context,
	incr int64,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

All additional attrs passed are included in the recorded value.

Measured as:

func (NetworkErrors) AddSet

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

AddSet adds incr to the existing count for set.

Measured as:

func (NetworkErrors) AttrNetworkIODirection

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

AttrNetworkIODirection returns an optional attribute for the "network.io.direction" semantic convention. It represents the network IO operation direction.

func (NetworkErrors) AttrNetworkInterfaceName

func (NetworkErrors) AttrNetworkInterfaceName(val string) attribute.KeyValue

AttrNetworkInterfaceName returns an optional attribute for the "network.interface.name" semantic convention. It represents the network interface name.

func (NetworkErrors) Description

func (NetworkErrors) Description() string

Description returns the semantic convention description of the instrument

func (NetworkErrors) Inst

Inst returns the underlying metric instrument.

func (NetworkErrors) Name

func (NetworkErrors) Name() string

Name returns the semantic convention name of the instrument.

func (NetworkErrors) Unit

func (NetworkErrors) Unit() string

Unit returns the semantic convention unit of the instrument

type NetworkIO

type NetworkIO struct {
	metric.Int64ObservableCounter
}

NetworkIO is an instrument used to record metric values conforming to the "system.network.io" semantic conventions. It represents the number of bytes transmitted and received.

func NewNetworkIO

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

NewNetworkIO returns a new NetworkIO instrument.

func (NetworkIO) AttrNetworkIODirection

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

AttrNetworkIODirection returns an optional attribute for the "network.io.direction" semantic convention. It represents the network IO operation direction.

func (NetworkIO) AttrNetworkInterfaceName

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

AttrNetworkInterfaceName returns an optional attribute for the "network.interface.name" semantic convention. It represents the network interface name.

func (NetworkIO) Description

func (NetworkIO) Description() string

Description returns the semantic convention description of the instrument

func (NetworkIO) Inst

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 network IO operation direction.

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

type NetworkPacketCount

type NetworkPacketCount struct {
	metric.Int64Counter
}

NetworkPacketCount is an instrument used to record metric values conforming to the "system.network.packet.count" semantic conventions. It represents the number of packets transferred.

func NewNetworkPacketCount

func NewNetworkPacketCount(
	m metric.Meter,
	opt ...metric.Int64CounterOption,
) (NetworkPacketCount, error)

NewNetworkPacketCount returns a new NetworkPacketCount instrument.

func (NetworkPacketCount) Add

func (m NetworkPacketCount) Add(
	ctx context.Context,
	incr int64,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

All additional attrs passed are included in the recorded value.

func (NetworkPacketCount) AddSet

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

AddSet adds incr to the existing count for set.

func (NetworkPacketCount) AttrDevice

func (NetworkPacketCount) AttrDevice(val string) attribute.KeyValue

AttrDevice returns an optional attribute for the "system.device" semantic convention. It represents the device identifier.

func (NetworkPacketCount) AttrNetworkIODirection

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

AttrNetworkIODirection returns an optional attribute for the "network.io.direction" semantic convention. It represents the network IO operation direction.

func (NetworkPacketCount) Description

func (NetworkPacketCount) Description() string

Description returns the semantic convention description of the instrument

func (NetworkPacketCount) Inst

Inst returns the underlying metric instrument.

func (NetworkPacketCount) Name

func (NetworkPacketCount) Name() string

Name returns the semantic convention name of the instrument.

func (NetworkPacketCount) Unit

func (NetworkPacketCount) Unit() string

Unit returns the semantic convention unit of the instrument

type NetworkPacketDropped

type NetworkPacketDropped struct {
	metric.Int64Counter
}

NetworkPacketDropped is an instrument used to record metric values conforming to the "system.network.packet.dropped" semantic conventions. It represents the count of packets that are dropped or discarded even though there was no error.

func NewNetworkPacketDropped

func NewNetworkPacketDropped(
	m metric.Meter,
	opt ...metric.Int64CounterOption,
) (NetworkPacketDropped, error)

NewNetworkPacketDropped returns a new NetworkPacketDropped instrument.

func (NetworkPacketDropped) Add

func (m NetworkPacketDropped) Add(
	ctx context.Context,
	incr int64,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

All additional attrs passed are included in the recorded value.

Measured as:

func (NetworkPacketDropped) AddSet

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

AddSet adds incr to the existing count for set.

Measured as:

func (NetworkPacketDropped) AttrNetworkIODirection

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

AttrNetworkIODirection returns an optional attribute for the "network.io.direction" semantic convention. It represents the network IO operation direction.

func (NetworkPacketDropped) AttrNetworkInterfaceName

func (NetworkPacketDropped) AttrNetworkInterfaceName(val string) attribute.KeyValue

AttrNetworkInterfaceName returns an optional attribute for the "network.interface.name" semantic convention. It represents the network interface name.

func (NetworkPacketDropped) Description

func (NetworkPacketDropped) Description() string

Description returns the semantic convention description of the instrument

func (NetworkPacketDropped) Inst

Inst returns the underlying metric instrument.

func (NetworkPacketDropped) Name

Name returns the semantic convention name of the instrument.

func (NetworkPacketDropped) Unit

Unit returns the semantic convention unit of the instrument

type NetworkTransportAttr

type NetworkTransportAttr string

NetworkTransportAttr is an attribute conforming to the network.transport semantic conventions. It represents the OSI transport layer or inter-process communication method.

var (
	// NetworkTransportTCP is the TCP.
	NetworkTransportTCP NetworkTransportAttr = "tcp"
	// NetworkTransportUDP is the UDP.
	NetworkTransportUDP NetworkTransportAttr = "udp"
	// NetworkTransportPipe is the named or anonymous pipe.
	NetworkTransportPipe NetworkTransportAttr = "pipe"
	// NetworkTransportUnix is the unix domain socket.
	NetworkTransportUnix NetworkTransportAttr = "unix"
	// NetworkTransportQUIC is the QUIC.
	NetworkTransportQUIC NetworkTransportAttr = "quic"
)

type PagingDirectionAttr

type PagingDirectionAttr string

PagingDirectionAttr is an attribute conforming to the system.paging.direction semantic conventions. It represents the paging access direction.

var (
	// PagingDirectionIn is the standardized value "in" of PagingDirectionAttr.
	PagingDirectionIn PagingDirectionAttr = "in"
	// PagingDirectionOut is the standardized value "out" of PagingDirectionAttr.
	PagingDirectionOut PagingDirectionAttr = "out"
)

type PagingFaultTypeAttr

type PagingFaultTypeAttr string

PagingFaultTypeAttr is an attribute conforming to the system.paging.fault.type semantic conventions. It represents the paging fault type.

var (
	// PagingFaultTypeMajor is the standardized value "major" of
	// PagingFaultTypeAttr.
	PagingFaultTypeMajor PagingFaultTypeAttr = "major"
	// PagingFaultTypeMinor is the standardized value "minor" of
	// PagingFaultTypeAttr.
	PagingFaultTypeMinor PagingFaultTypeAttr = "minor"
)

type PagingFaults

type PagingFaults struct {
	metric.Int64Counter
}

PagingFaults is an instrument used to record metric values conforming to the "system.paging.faults" semantic conventions. It represents the number of page faults.

func NewPagingFaults

func NewPagingFaults(
	m metric.Meter,
	opt ...metric.Int64CounterOption,
) (PagingFaults, error)

NewPagingFaults returns a new PagingFaults instrument.

func (PagingFaults) Add

func (m PagingFaults) Add(
	ctx context.Context,
	incr int64,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

All additional attrs passed are included in the recorded value.

func (PagingFaults) AddSet

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

AddSet adds incr to the existing count for set.

func (PagingFaults) AttrPagingFaultType

func (PagingFaults) AttrPagingFaultType(val PagingFaultTypeAttr) attribute.KeyValue

AttrPagingFaultType returns an optional attribute for the "system.paging.fault.type" semantic convention. It represents the paging fault type.

func (PagingFaults) Description

func (PagingFaults) Description() string

Description returns the semantic convention description of the instrument

func (PagingFaults) Inst

func (m PagingFaults) Inst() metric.Int64Counter

Inst returns the underlying metric instrument.

func (PagingFaults) Name

func (PagingFaults) Name() string

Name returns the semantic convention name of the instrument.

func (PagingFaults) Unit

func (PagingFaults) Unit() string

Unit returns the semantic convention unit of the instrument

type PagingOperations

type PagingOperations struct {
	metric.Int64Counter
}

PagingOperations is an instrument used to record metric values conforming to the "system.paging.operations" semantic conventions. It represents the number of paging operations.

func NewPagingOperations

func NewPagingOperations(
	m metric.Meter,
	opt ...metric.Int64CounterOption,
) (PagingOperations, error)

NewPagingOperations returns a new PagingOperations instrument.

func (PagingOperations) Add

func (m PagingOperations) Add(
	ctx context.Context,
	incr int64,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

All additional attrs passed are included in the recorded value.

func (PagingOperations) AddSet

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

AddSet adds incr to the existing count for set.

func (PagingOperations) AttrPagingDirection

func (PagingOperations) AttrPagingDirection(val PagingDirectionAttr) attribute.KeyValue

AttrPagingDirection returns an optional attribute for the "system.paging.direction" semantic convention. It represents the paging access direction.

func (PagingOperations) AttrPagingFaultType

func (PagingOperations) AttrPagingFaultType(val PagingFaultTypeAttr) attribute.KeyValue

AttrPagingFaultType returns an optional attribute for the "system.paging.fault.type" semantic convention. It represents the paging fault type.

func (PagingOperations) Description

func (PagingOperations) Description() string

Description returns the semantic convention description of the instrument

func (PagingOperations) Inst

Inst returns the underlying metric instrument.

func (PagingOperations) Name

func (PagingOperations) Name() string

Name returns the semantic convention name of the instrument.

func (PagingOperations) Unit

func (PagingOperations) Unit() string

Unit returns the semantic convention unit of the instrument

type PagingStateAttr

type PagingStateAttr string

PagingStateAttr is an attribute conforming to the system.paging.state semantic conventions. It represents the memory paging state.

var (
	// PagingStateUsed is the standardized value "used" of PagingStateAttr.
	PagingStateUsed PagingStateAttr = "used"
	// PagingStateFree is the standardized value "free" of PagingStateAttr.
	PagingStateFree PagingStateAttr = "free"
)

type PagingUsage

type PagingUsage struct {
	metric.Int64UpDownCounter
}

PagingUsage is an instrument used to record metric values conforming to the "system.paging.usage" semantic conventions. It represents the unix swap or windows pagefile usage.

func NewPagingUsage

func NewPagingUsage(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (PagingUsage, error)

NewPagingUsage returns a new PagingUsage instrument.

func (PagingUsage) Add

func (m PagingUsage) Add(
	ctx context.Context,
	incr int64,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

All additional attrs passed are included in the recorded value.

func (PagingUsage) AddSet

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

AddSet adds incr to the existing count for set.

func (PagingUsage) AttrDevice

func (PagingUsage) AttrDevice(val string) attribute.KeyValue

AttrDevice returns an optional attribute for the "system.device" semantic convention. It represents the unique identifier for the device responsible for managing paging operations.

func (PagingUsage) AttrPagingState

func (PagingUsage) AttrPagingState(val PagingStateAttr) attribute.KeyValue

AttrPagingState returns an optional attribute for the "system.paging.state" semantic convention. It represents the memory paging state.

func (PagingUsage) Description

func (PagingUsage) Description() string

Description returns the semantic convention description of the instrument

func (PagingUsage) Inst

Inst returns the underlying metric instrument.

func (PagingUsage) Name

func (PagingUsage) Name() string

Name returns the semantic convention name of the instrument.

func (PagingUsage) Unit

func (PagingUsage) Unit() string

Unit returns the semantic convention unit of the instrument

type PagingUtilization

type PagingUtilization struct {
	metric.Int64Gauge
}

PagingUtilization is an instrument used to record metric values conforming to the "system.paging.utilization" semantic conventions. It represents the swap (unix) or pagefile (windows) utilization.

func NewPagingUtilization

func NewPagingUtilization(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (PagingUtilization, error)

NewPagingUtilization returns a new PagingUtilization instrument.

func (PagingUtilization) AttrDevice

func (PagingUtilization) AttrDevice(val string) attribute.KeyValue

AttrDevice returns an optional attribute for the "system.device" semantic convention. It represents the unique identifier for the device responsible for managing paging operations.

func (PagingUtilization) AttrPagingState

func (PagingUtilization) AttrPagingState(val PagingStateAttr) attribute.KeyValue

AttrPagingState returns an optional attribute for the "system.paging.state" semantic convention. It represents the memory paging state.

func (PagingUtilization) Description

func (PagingUtilization) Description() string

Description returns the semantic convention description of the instrument

func (PagingUtilization) Inst

Inst returns the underlying metric instrument.

func (PagingUtilization) Name

func (PagingUtilization) Name() string

Name returns the semantic convention name of the instrument.

func (PagingUtilization) Record

func (m PagingUtilization) Record(
	ctx context.Context,
	val int64,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

All additional attrs passed are included in the recorded value.

func (PagingUtilization) RecordSet

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

RecordSet records val to the current distribution for set.

func (PagingUtilization) Unit

func (PagingUtilization) Unit() string

Unit returns the semantic convention unit of the instrument

type ProcessCount

type ProcessCount struct {
	metric.Int64UpDownCounter
}

ProcessCount is an instrument used to record metric values conforming to the "system.process.count" semantic conventions. It represents the total number of processes in each state.

func NewProcessCount

func NewProcessCount(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (ProcessCount, error)

NewProcessCount returns a new ProcessCount instrument.

func (ProcessCount) Add

func (m ProcessCount) Add(
	ctx context.Context,
	incr int64,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

All additional attrs passed are included in the recorded value.

func (ProcessCount) AddSet

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

AddSet adds incr to the existing count for set.

func (ProcessCount) AttrProcessState

func (ProcessCount) AttrProcessState(val ProcessStateAttr) attribute.KeyValue

AttrProcessState returns an optional attribute for the "process.state" semantic convention. It represents the process state, e.g., Linux Process State Codes.

func (ProcessCount) Description

func (ProcessCount) Description() string

Description returns the semantic convention description of the instrument

func (ProcessCount) Inst

Inst returns the underlying metric instrument.

func (ProcessCount) Name

func (ProcessCount) Name() string

Name returns the semantic convention name of the instrument.

func (ProcessCount) Unit

func (ProcessCount) Unit() string

Unit returns the semantic convention unit of the instrument

type ProcessCreated

type ProcessCreated struct {
	metric.Int64Counter
}

ProcessCreated is an instrument used to record metric values conforming to the "system.process.created" semantic conventions. It represents the total number of processes created over uptime of the host.

func NewProcessCreated

func NewProcessCreated(
	m metric.Meter,
	opt ...metric.Int64CounterOption,
) (ProcessCreated, error)

NewProcessCreated returns a new ProcessCreated instrument.

func (ProcessCreated) Add

func (m ProcessCreated) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count for attrs.

func (ProcessCreated) AddSet

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

AddSet adds incr to the existing count for set.

func (ProcessCreated) Description

func (ProcessCreated) Description() string

Description returns the semantic convention description of the instrument

func (ProcessCreated) Inst

Inst returns the underlying metric instrument.

func (ProcessCreated) Name

func (ProcessCreated) Name() string

Name returns the semantic convention name of the instrument.

func (ProcessCreated) Unit

func (ProcessCreated) Unit() string

Unit returns the semantic convention unit of the instrument

type ProcessStateAttr

type ProcessStateAttr string

ProcessStateAttr is an attribute conforming to the process.state semantic conventions. It represents the process state, e.g., Linux Process State Codes.

var (
	// ProcessStateRunning is the standardized value "running" of ProcessStateAttr.
	ProcessStateRunning ProcessStateAttr = "running"
	// ProcessStateSleeping is the standardized value "sleeping" of
	// ProcessStateAttr.
	ProcessStateSleeping ProcessStateAttr = "sleeping"
	// ProcessStateStopped is the standardized value "stopped" of ProcessStateAttr.
	ProcessStateStopped ProcessStateAttr = "stopped"
	// ProcessStateDefunct is the standardized value "defunct" of ProcessStateAttr.
	ProcessStateDefunct ProcessStateAttr = "defunct"
)

type Uptime

type Uptime struct {
	metric.Float64Gauge
}

Uptime is an instrument used to record metric values conforming to the "system.uptime" semantic conventions. It represents the time the system has been running.

func NewUptime

func NewUptime(
	m metric.Meter,
	opt ...metric.Float64GaugeOption,
) (Uptime, error)

NewUptime returns a new Uptime instrument.

func (Uptime) Description

func (Uptime) Description() string

Description returns the semantic convention description of the instrument

func (Uptime) Inst

func (m Uptime) Inst() metric.Float64Gauge

Inst returns the underlying metric instrument.

func (Uptime) Name

func (Uptime) Name() string

Name returns the semantic convention name of the instrument.

func (Uptime) Record

func (m Uptime) Record(ctx context.Context, val float64, attrs ...attribute.KeyValue)

Record records val to the current distribution for attrs.

Instrumentations SHOULD use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available. The actual accuracy would depend on the instrumentation and operating system.

func (Uptime) RecordSet

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

RecordSet records val to the current distribution for set.

Instrumentations SHOULD use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available. The actual accuracy would depend on the instrumentation and operating system.

func (Uptime) Unit

func (Uptime) 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
53 minutes ago

Tools for package owners.