Documentation
¶
Overview ¶
Package httpconv provides types and functionality for OpenTelemetry semantic conventions in the "container" namespace.
Index ¶
- type CPUModeAttr
- type CPUTime
- type CPUUsage
- type DiskIO
- func (m DiskIO) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)
- 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 MemoryUsage
- type NetworkIO
- func (m NetworkIO) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)
- 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 Uptime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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 none. CPUModeUser CPUModeAttr = "user" // CPUModeSystem is the none. CPUModeSystem CPUModeAttr = "system" // CPUModeNice is the none. CPUModeNice CPUModeAttr = "nice" // CPUModeIdle is the none. CPUModeIdle CPUModeAttr = "idle" // CPUModeIOWait is the none. CPUModeIOWait CPUModeAttr = "iowait" // CPUModeInterrupt is the none. CPUModeInterrupt CPUModeAttr = "interrupt" // CPUModeSteal is the none. CPUModeSteal CPUModeAttr = "steal" // CPUModeKernel is the none. 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.
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) 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.
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.
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 (DiskIO) Add ¶
Add adds incr to the existing count.
All additional attrs passed are included in the recorded value.
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.
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 none. DiskIODirectionRead DiskIODirectionAttr = "read" // DiskIODirectionWrite is the none. DiskIODirectionWrite DiskIODirectionAttr = "write" )
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) 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 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.
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) 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.
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 none. NetworkIODirectionTransmit NetworkIODirectionAttr = "transmit" // NetworkIODirectionReceive is the none. NetworkIODirectionReceive NetworkIODirectionAttr = "receive" )
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 (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.