package containerconv
import "go.opentelemetry.io/otel/semconv/v1.39.0/containerconv"
Package containerconv provides types and functionality for OpenTelemetry semantic conventions in the "container" namespace.
Index ¶
- type CPUModeAttr
- type CPUTime
- func NewCPUTime( m metric.Meter, opt ...metric.Float64CounterOption, ) (CPUTime, error)
- func (m CPUTime) Add( ctx context.Context, incr float64, attrs ...attribute.KeyValue, )
- func (m CPUTime) AddSet(ctx context.Context, incr float64, set attribute.Set)
- func (CPUTime) AttrCPUMode(val CPUModeAttr) attribute.KeyValue
- func (CPUTime) Description() string
- func (m CPUTime) Inst() metric.Float64Counter
- func (CPUTime) Name() string
- func (CPUTime) Unit() string
- type CPUUsage
- func NewCPUUsage( m metric.Meter, opt ...metric.Int64GaugeOption, ) (CPUUsage, error)
- func (CPUUsage) AttrCPUMode(val CPUModeAttr) attribute.KeyValue
- func (CPUUsage) Description() string
- func (m CPUUsage) Inst() metric.Int64Gauge
- func (CPUUsage) Name() string
- func (m CPUUsage) Record( ctx context.Context, val int64, attrs ...attribute.KeyValue, )
- func (m CPUUsage) RecordSet(ctx context.Context, val int64, set attribute.Set)
- func (CPUUsage) Unit() string
- type DiskIO
- func NewDiskIO( m metric.Meter, opt ...metric.Int64CounterOption, ) (DiskIO, error)
- func (m DiskIO) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
- func (m DiskIO) AddSet(ctx context.Context, incr int64, set attribute.Set)
- func (DiskIO) AttrDiskIODirection(val DiskIODirectionAttr) attribute.KeyValue
- func (DiskIO) AttrSystemDevice(val string) attribute.KeyValue
- func (DiskIO) Description() string
- func (m DiskIO) Inst() metric.Int64Counter
- func (DiskIO) Name() string
- func (DiskIO) Unit() string
- type DiskIODirectionAttr
- type FilesystemAvailable
- func NewFilesystemAvailable( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (FilesystemAvailable, error)
- func (m FilesystemAvailable) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)
- func (m FilesystemAvailable) AddSet(ctx context.Context, incr int64, set attribute.Set)
- func (FilesystemAvailable) Description() string
- func (m FilesystemAvailable) Inst() metric.Int64UpDownCounter
- func (FilesystemAvailable) Name() string
- func (FilesystemAvailable) Unit() string
- type FilesystemCapacity
- func NewFilesystemCapacity( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (FilesystemCapacity, error)
- func (m FilesystemCapacity) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)
- func (m FilesystemCapacity) AddSet(ctx context.Context, incr int64, set attribute.Set)
- func (FilesystemCapacity) Description() string
- func (m FilesystemCapacity) Inst() metric.Int64UpDownCounter
- func (FilesystemCapacity) Name() string
- func (FilesystemCapacity) Unit() string
- type FilesystemUsage
- func NewFilesystemUsage( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (FilesystemUsage, error)
- func (m FilesystemUsage) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)
- func (m FilesystemUsage) AddSet(ctx context.Context, incr int64, set attribute.Set)
- func (FilesystemUsage) Description() string
- func (m FilesystemUsage) Inst() metric.Int64UpDownCounter
- func (FilesystemUsage) Name() string
- func (FilesystemUsage) Unit() string
- type MemoryAvailable
- func NewMemoryAvailable( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (MemoryAvailable, error)
- func (m MemoryAvailable) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)
- func (m MemoryAvailable) AddSet(ctx context.Context, incr int64, set attribute.Set)
- func (MemoryAvailable) Description() string
- func (m MemoryAvailable) Inst() metric.Int64UpDownCounter
- func (MemoryAvailable) Name() string
- func (MemoryAvailable) Unit() string
- type MemoryPagingFaults
- func NewMemoryPagingFaults( m metric.Meter, opt ...metric.Int64CounterOption, ) (MemoryPagingFaults, error)
- func (m MemoryPagingFaults) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
- func (m MemoryPagingFaults) AddSet(ctx context.Context, incr int64, set attribute.Set)
- func (MemoryPagingFaults) AttrSystemPagingFaultType(val SystemPagingFaultTypeAttr) attribute.KeyValue
- func (MemoryPagingFaults) Description() string
- func (m MemoryPagingFaults) Inst() metric.Int64Counter
- func (MemoryPagingFaults) Name() string
- func (MemoryPagingFaults) Unit() string
- type MemoryRss
- func NewMemoryRss( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (MemoryRss, error)
- func (m MemoryRss) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)
- func (m MemoryRss) AddSet(ctx context.Context, incr int64, set attribute.Set)
- func (MemoryRss) Description() string
- func (m MemoryRss) Inst() metric.Int64UpDownCounter
- func (MemoryRss) Name() string
- func (MemoryRss) Unit() string
- type MemoryUsage
- func NewMemoryUsage( m metric.Meter, opt ...metric.Int64CounterOption, ) (MemoryUsage, error)
- func (m MemoryUsage) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)
- func (m MemoryUsage) AddSet(ctx context.Context, incr int64, set attribute.Set)
- func (MemoryUsage) Description() string
- func (m MemoryUsage) Inst() metric.Int64Counter
- func (MemoryUsage) Name() string
- func (MemoryUsage) Unit() string
- type MemoryWorkingSet
- func NewMemoryWorkingSet( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (MemoryWorkingSet, error)
- func (m MemoryWorkingSet) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)
- func (m MemoryWorkingSet) AddSet(ctx context.Context, incr int64, set attribute.Set)
- func (MemoryWorkingSet) Description() string
- func (m MemoryWorkingSet) Inst() metric.Int64UpDownCounter
- func (MemoryWorkingSet) Name() string
- func (MemoryWorkingSet) Unit() string
- type NetworkIO
- func NewNetworkIO( m metric.Meter, opt ...metric.Int64CounterOption, ) (NetworkIO, error)
- func (m NetworkIO) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
- func (m NetworkIO) AddSet(ctx context.Context, incr int64, set attribute.Set)
- func (NetworkIO) AttrNetworkIODirection(val NetworkIODirectionAttr) attribute.KeyValue
- func (NetworkIO) AttrNetworkInterfaceName(val string) attribute.KeyValue
- func (NetworkIO) Description() string
- func (m NetworkIO) Inst() metric.Int64Counter
- func (NetworkIO) Name() string
- func (NetworkIO) Unit() string
- type NetworkIODirectionAttr
- type SystemPagingFaultTypeAttr
- type Uptime
- func NewUptime( m metric.Meter, opt ...metric.Float64GaugeOption, ) (Uptime, error)
- func (Uptime) Description() string
- func (m Uptime) Inst() metric.Float64Gauge
- func (Uptime) Name() string
- func (m Uptime) Record(ctx context.Context, val float64, attrs ...attribute.KeyValue)
- func (m Uptime) RecordSet(ctx context.Context, val float64, set attribute.Set)
- func (Uptime) Unit() string
Types ¶
type CPUModeAttr ¶
type CPUModeAttr string
CPUModeAttr is an attribute conforming to the cpu.mode semantic conventions. It represents the CPU mode for this data point. A container's CPU metric SHOULD be characterized *either* by data points with no `mode` labels, *or only* data points with `mode` labels.
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 CPUTime ¶
type CPUTime struct {
metric.Float64Counter
}
CPUTime is an instrument used to record metric values conforming to the "container.cpu.time" semantic conventions. It represents the total CPU time consumed.
func NewCPUTime ¶
NewCPUTime returns a new CPUTime instrument.
func (CPUTime) Add ¶
Add adds incr to the existing count for attrs.
All additional attrs passed are included in the recorded value.
Total CPU time consumed by the specific container on all available CPU cores
func (CPUTime) AddSet ¶
AddSet adds incr to the existing count for set.
Total CPU time consumed by the specific container on all available CPU cores
func (CPUTime) AttrCPUMode ¶
func (CPUTime) AttrCPUMode(val CPUModeAttr) attribute.KeyValue
AttrCPUMode returns an optional attribute for the "cpu.mode" semantic convention. It represents the CPU mode for this data point. A container's CPU metric SHOULD be characterized *either* by data points with no `mode` labels, *or only* data points with `mode` labels.
func (CPUTime) Description ¶
Description returns the semantic convention description of the instrument
func (CPUTime) Inst ¶
func (m CPUTime) Inst() metric.Float64Counter
Inst returns the underlying metric instrument.
func (CPUTime) Name ¶
Name returns the semantic convention name of the instrument.
func (CPUTime) Unit ¶
Unit returns the semantic convention unit of the instrument
type CPUUsage ¶
type CPUUsage struct {
metric.Int64Gauge
}
CPUUsage is an instrument used to record metric values conforming to the "container.cpu.usage" semantic conventions. It represents the container's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs.
func NewCPUUsage ¶
NewCPUUsage returns a new CPUUsage instrument.
func (CPUUsage) AttrCPUMode ¶
func (CPUUsage) AttrCPUMode(val CPUModeAttr) attribute.KeyValue
AttrCPUMode returns an optional attribute for the "cpu.mode" semantic convention. It represents the CPU mode for this data point. A container's CPU metric SHOULD be characterized *either* by data points with no `mode` labels, *or only* data points with `mode` labels.
func (CPUUsage) Description ¶
Description returns the semantic convention description of the instrument
func (CPUUsage) Inst ¶
func (m CPUUsage) Inst() metric.Int64Gauge
Inst returns the underlying metric instrument.
func (CPUUsage) Name ¶
Name returns the semantic convention name of the instrument.
func (CPUUsage) Record ¶
Record records val to the current distribution for attrs.
All additional attrs passed are included in the recorded value.
CPU usage of the specific container on all available CPU cores, averaged over the sample window
func (CPUUsage) RecordSet ¶
RecordSet records val to the current distribution for set.
CPU usage of the specific container on all available CPU cores, averaged over the sample window
func (CPUUsage) Unit ¶
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 "container.disk.io" semantic conventions. It represents the disk bytes for the container.
func NewDiskIO ¶
NewDiskIO returns a new DiskIO instrument.
func (DiskIO) Add ¶
Add adds incr to the existing count for attrs.
All additional attrs passed are included in the recorded value.
The total number of bytes read/written successfully (aggregated from all disks).
func (DiskIO) AddSet ¶
AddSet adds incr to the existing count for set.
The total number of bytes read/written successfully (aggregated from all disks).
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) AttrSystemDevice ¶
AttrSystemDevice returns an optional attribute for the "system.device" semantic convention. It represents the device identifier.
func (DiskIO) Description ¶
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 ¶
Name returns the semantic convention name of the instrument.
func (DiskIO) Unit ¶
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 FilesystemAvailable ¶
type FilesystemAvailable struct {
metric.Int64UpDownCounter
}
FilesystemAvailable is an instrument used to record metric values conforming to the "container.filesystem.available" semantic conventions. It represents the container filesystem available bytes.
func NewFilesystemAvailable ¶
func NewFilesystemAvailable( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (FilesystemAvailable, error)
NewFilesystemAvailable returns a new FilesystemAvailable instrument.
func (FilesystemAvailable) Add ¶
Add adds incr to the existing count for attrs.
In K8s, this metric is derived from the FsStats.AvailableBytes field of the ContainerStats.Rootfs of the Kubelet's stats API.
func (FilesystemAvailable) AddSet ¶
AddSet adds incr to the existing count for set.
In K8s, this metric is derived from the FsStats.AvailableBytes field of the ContainerStats.Rootfs of the Kubelet's stats API.
func (FilesystemAvailable) Description ¶
func (FilesystemAvailable) Description() string
Description returns the semantic convention description of the instrument
func (FilesystemAvailable) Inst ¶
func (m FilesystemAvailable) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (FilesystemAvailable) Name ¶
func (FilesystemAvailable) Name() string
Name returns the semantic convention name of the instrument.
func (FilesystemAvailable) Unit ¶
func (FilesystemAvailable) Unit() string
Unit returns the semantic convention unit of the instrument
type FilesystemCapacity ¶
type FilesystemCapacity struct {
metric.Int64UpDownCounter
}
FilesystemCapacity is an instrument used to record metric values conforming to the "container.filesystem.capacity" semantic conventions. It represents the container filesystem capacity.
func NewFilesystemCapacity ¶
func NewFilesystemCapacity( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (FilesystemCapacity, error)
NewFilesystemCapacity returns a new FilesystemCapacity instrument.
func (FilesystemCapacity) Add ¶
Add adds incr to the existing count for attrs.
In K8s, this metric is derived from the FsStats.CapacityBytes field of the ContainerStats.Rootfs of the Kubelet's stats API.
func (FilesystemCapacity) AddSet ¶
AddSet adds incr to the existing count for set.
In K8s, this metric is derived from the FsStats.CapacityBytes field of the ContainerStats.Rootfs of the Kubelet's stats API.
func (FilesystemCapacity) Description ¶
func (FilesystemCapacity) Description() string
Description returns the semantic convention description of the instrument
func (FilesystemCapacity) Inst ¶
func (m FilesystemCapacity) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (FilesystemCapacity) Name ¶
func (FilesystemCapacity) Name() string
Name returns the semantic convention name of the instrument.
func (FilesystemCapacity) Unit ¶
func (FilesystemCapacity) Unit() string
Unit returns the semantic convention unit of the instrument
type FilesystemUsage ¶
type FilesystemUsage struct {
metric.Int64UpDownCounter
}
FilesystemUsage is an instrument used to record metric values conforming to the "container.filesystem.usage" semantic conventions. It represents the container filesystem usage.
func NewFilesystemUsage ¶
func NewFilesystemUsage( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (FilesystemUsage, error)
NewFilesystemUsage returns a new FilesystemUsage instrument.
func (FilesystemUsage) Add ¶
Add adds incr to the existing count for attrs.
This may not equal capacity - available.
In K8s, this metric is derived from the FsStats.UsedBytes field of the ContainerStats.Rootfs of the Kubelet's stats API.
func (FilesystemUsage) AddSet ¶
AddSet adds incr to the existing count for set.
This may not equal capacity - available.
In K8s, this metric is derived from the FsStats.UsedBytes field of the ContainerStats.Rootfs of the Kubelet's stats API.
func (FilesystemUsage) Description ¶
func (FilesystemUsage) Description() string
Description returns the semantic convention description of the instrument
func (FilesystemUsage) Inst ¶
func (m FilesystemUsage) Inst() metric.Int64UpDownCounter
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 MemoryAvailable ¶
type MemoryAvailable struct {
metric.Int64UpDownCounter
}
MemoryAvailable is an instrument used to record metric values conforming to the "container.memory.available" semantic conventions. It represents the container memory available.
func NewMemoryAvailable ¶
func NewMemoryAvailable( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (MemoryAvailable, error)
NewMemoryAvailable returns a new MemoryAvailable instrument.
func (MemoryAvailable) Add ¶
Add adds incr to the existing count for attrs.
Available memory for use. This is defined as the memory limit - workingSetBytes. If memory limit is undefined, the available bytes is omitted. In general, this metric can be derived from cadvisor and by subtracting the `container_memory_working_set_bytes` metric from the `container_spec_memory_limit_bytes` metric. In K8s, this metric is derived from the MemoryStats.AvailableBytes field of the PodStats.Memory of the Kubelet's stats API.
func (MemoryAvailable) AddSet ¶
AddSet adds incr to the existing count for set.
Available memory for use. This is defined as the memory limit - workingSetBytes. If memory limit is undefined, the available bytes is omitted. In general, this metric can be derived from cadvisor and by subtracting the `container_memory_working_set_bytes` metric from the `container_spec_memory_limit_bytes` metric. In K8s, this metric is derived from the MemoryStats.AvailableBytes field of the PodStats.Memory of the Kubelet's stats API.
func (MemoryAvailable) Description ¶
func (MemoryAvailable) Description() string
Description returns the semantic convention description of the instrument
func (MemoryAvailable) Inst ¶
func (m MemoryAvailable) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (MemoryAvailable) Name ¶
func (MemoryAvailable) Name() string
Name returns the semantic convention name of the instrument.
func (MemoryAvailable) Unit ¶
func (MemoryAvailable) Unit() string
Unit returns the semantic convention unit of the instrument
type MemoryPagingFaults ¶
type MemoryPagingFaults struct {
metric.Int64Counter
}
MemoryPagingFaults is an instrument used to record metric values conforming to the "container.memory.paging.faults" semantic conventions. It represents the container memory paging faults.
func NewMemoryPagingFaults ¶
func NewMemoryPagingFaults( m metric.Meter, opt ...metric.Int64CounterOption, ) (MemoryPagingFaults, error)
NewMemoryPagingFaults returns a new MemoryPagingFaults instrument.
func (MemoryPagingFaults) Add ¶
Add adds incr to the existing count for attrs.
All additional attrs passed are included in the recorded value.
In general, this metric can be derived from cadvisor and specifically the `container_memory_failures_total{failure_type=pgfault, scope=container}` and `container_memory_failures_total{failure_type=pgmajfault, scope=container}` metric. In K8s, this metric is derived from the MemoryStats.PageFaults and MemoryStats.MajorPageFaults field of the PodStats.Memory of the Kubelet's stats API.
func (MemoryPagingFaults) AddSet ¶
AddSet adds incr to the existing count for set.
In general, this metric can be derived from cadvisor and specifically the `container_memory_failures_total{failure_type=pgfault, scope=container}` and `container_memory_failures_total{failure_type=pgmajfault, scope=container}` metric. In K8s, this metric is derived from the MemoryStats.PageFaults and MemoryStats.MajorPageFaults field of the PodStats.Memory of the Kubelet's stats API.
func (MemoryPagingFaults) AttrSystemPagingFaultType ¶
func (MemoryPagingFaults) AttrSystemPagingFaultType(val SystemPagingFaultTypeAttr) attribute.KeyValue
AttrSystemPagingFaultType returns an optional attribute for the "system.paging.fault.type" semantic convention. It represents the paging fault type.
func (MemoryPagingFaults) Description ¶
func (MemoryPagingFaults) Description() string
Description returns the semantic convention description of the instrument
func (MemoryPagingFaults) Inst ¶
func (m MemoryPagingFaults) Inst() metric.Int64Counter
Inst returns the underlying metric instrument.
func (MemoryPagingFaults) Name ¶
func (MemoryPagingFaults) Name() string
Name returns the semantic convention name of the instrument.
func (MemoryPagingFaults) Unit ¶
func (MemoryPagingFaults) Unit() string
Unit returns the semantic convention unit of the instrument
type MemoryRss ¶
type MemoryRss struct {
metric.Int64UpDownCounter
}
MemoryRss is an instrument used to record metric values conforming to the "container.memory.rss" semantic conventions. It represents the container memory RSS.
func NewMemoryRss ¶
NewMemoryRss returns a new MemoryRss instrument.
func (MemoryRss) Add ¶
Add adds incr to the existing count for attrs.
In general, this metric can be derived from cadvisor and specifically the `container_memory_rss` metric. In K8s, this metric is derived from the MemoryStats.RSSBytes field of the PodStats.Memory of the Kubelet's stats API.
func (MemoryRss) AddSet ¶
AddSet adds incr to the existing count for set.
In general, this metric can be derived from cadvisor and specifically the `container_memory_rss` metric. In K8s, this metric is derived from the MemoryStats.RSSBytes field of the PodStats.Memory of the Kubelet's stats API.
func (MemoryRss) Description ¶
Description returns the semantic convention description of the instrument
func (MemoryRss) Inst ¶
func (m MemoryRss) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (MemoryRss) Name ¶
Name returns the semantic convention name of the instrument.
func (MemoryRss) Unit ¶
Unit returns the semantic convention unit of the instrument
type MemoryUsage ¶
type MemoryUsage struct {
metric.Int64Counter
}
MemoryUsage is an instrument used to record metric values conforming to the "container.memory.usage" semantic conventions. It represents the memory usage of the container.
func NewMemoryUsage ¶
func NewMemoryUsage( m metric.Meter, opt ...metric.Int64CounterOption, ) (MemoryUsage, error)
NewMemoryUsage returns a new MemoryUsage instrument.
func (MemoryUsage) Add ¶
Add adds incr to the existing count for attrs.
Memory usage of the container.
func (MemoryUsage) AddSet ¶
AddSet adds incr to the existing count for set.
Memory usage of the container.
func (MemoryUsage) Description ¶
func (MemoryUsage) Description() string
Description returns the semantic convention description of the instrument
func (MemoryUsage) Inst ¶
func (m MemoryUsage) Inst() metric.Int64Counter
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 MemoryWorkingSet ¶
type MemoryWorkingSet struct {
metric.Int64UpDownCounter
}
MemoryWorkingSet is an instrument used to record metric values conforming to the "container.memory.working_set" semantic conventions. It represents the container memory working set.
func NewMemoryWorkingSet ¶
func NewMemoryWorkingSet( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (MemoryWorkingSet, error)
NewMemoryWorkingSet returns a new MemoryWorkingSet instrument.
func (MemoryWorkingSet) Add ¶
Add adds incr to the existing count for attrs.
In general, this metric can be derived from cadvisor and specifically the `container_memory_working_set_bytes` metric. In K8s, this metric is derived from the MemoryStats.WorkingSetBytes field of the PodStats.Memory of the Kubelet's stats API.
func (MemoryWorkingSet) AddSet ¶
AddSet adds incr to the existing count for set.
In general, this metric can be derived from cadvisor and specifically the `container_memory_working_set_bytes` metric. In K8s, this metric is derived from the MemoryStats.WorkingSetBytes field of the PodStats.Memory of the Kubelet's stats API.
func (MemoryWorkingSet) Description ¶
func (MemoryWorkingSet) Description() string
Description returns the semantic convention description of the instrument
func (MemoryWorkingSet) Inst ¶
func (m MemoryWorkingSet) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (MemoryWorkingSet) Name ¶
func (MemoryWorkingSet) Name() string
Name returns the semantic convention name of the instrument.
func (MemoryWorkingSet) Unit ¶
func (MemoryWorkingSet) Unit() string
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 "container.network.io" semantic conventions. It represents the network bytes for the container.
func NewNetworkIO ¶
NewNetworkIO returns a new NetworkIO instrument.
func (NetworkIO) Add ¶
Add adds incr to the existing count for attrs.
All additional attrs passed are included in the recorded value.
The number of bytes sent/received on all network interfaces by the container.
func (NetworkIO) AddSet ¶
AddSet adds incr to the existing count for set.
The number of bytes sent/received on all network interfaces by the container.
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 ¶
AttrNetworkInterfaceName returns an optional attribute for the "network.interface.name" semantic convention. It represents the network interface name.
func (NetworkIO) Description ¶
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 ¶
Name returns the semantic convention name of the instrument.
func (NetworkIO) Unit ¶
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 SystemPagingFaultTypeAttr ¶
type SystemPagingFaultTypeAttr string
SystemPagingFaultTypeAttr is an attribute conforming to the system.paging.fault.type semantic conventions. It represents the paging fault type.
var ( // SystemPagingFaultTypeMajor is the standardized value "major" of // SystemPagingFaultTypeAttr. SystemPagingFaultTypeMajor SystemPagingFaultTypeAttr = "major" // SystemPagingFaultTypeMinor is the standardized value "minor" of // SystemPagingFaultTypeAttr. SystemPagingFaultTypeMinor SystemPagingFaultTypeAttr = "minor" )
type Uptime ¶
type Uptime struct {
metric.Float64Gauge
}
Uptime is an instrument used to record metric values conforming to the "container.uptime" semantic conventions. It represents the time the container has been running.
func NewUptime ¶
NewUptime returns a new Uptime instrument.
func (Uptime) Description ¶
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 ¶
Name returns the semantic convention name of the instrument.
func (Uptime) Record ¶
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 ¶
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 ¶
Unit returns the semantic convention unit of the instrument
Source Files ¶
metric.go
- Version
- v1.41.0
- Published
- Mar 2, 2026
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 39 minutes ago –
Tools for package owners.