Search and commands

↑ ↓ to select · Enter to open · Esc to close

Type to search packages.

systemconv

v1.47.0
go.opentelemetry.io/otel/semconv/v1.33.0/systemconv

Documentation

pkg.go.dev ↗

Table of contents

↓ to select · Enter to jump· Shift+Enter for source

293 matches

Top ↑

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

Types

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.

NewCPULogicalCount

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

NewCPULogicalCount returns a new CPULogicalCount instrument.

CPULogicalCount.Add

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

Add adds incr to the existing count.

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

CPULogicalCount.Description

func (CPULogicalCount) Description() string

Description returns the semantic convention description of the instrument

CPULogicalCount.Inst

func (m CPULogicalCount) Inst() metric.Int64UpDownCounter

Inst returns the underlying metric instrument.

CPULogicalCount.Name

func (CPULogicalCount) Name() string

Name returns the semantic convention name of the instrument.

CPULogicalCount.Unit

func (CPULogicalCount) Unit() string

Unit returns the semantic convention unit of the instrument

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.

NewCPUPhysicalCount

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

NewCPUPhysicalCount returns a new CPUPhysicalCount instrument.

CPUPhysicalCount.Add

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

Add adds incr to the existing count.

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

CPUPhysicalCount.Description

func (CPUPhysicalCount) Description() string

Description returns the semantic convention description of the instrument

CPUPhysicalCount.Inst

func (m CPUPhysicalCount) Inst() metric.Int64UpDownCounter

Inst returns the underlying metric instrument.

CPUPhysicalCount.Name

func (CPUPhysicalCount) Name() string

Name returns the semantic convention name of the instrument.

CPUPhysicalCount.Unit

func (CPUPhysicalCount) Unit() string

Unit returns the semantic convention unit of the instrument

DiskIO

type DiskIO struct {
	metric.Int64Counter
}

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

NewDiskIO

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

NewDiskIO returns a new DiskIO instrument.

DiskIO.Add

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

Add adds incr to the existing count.

All additional attrs passed are included in the recorded value.

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.

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.

DiskIO.Inst

func (m DiskIO) Inst() metric.Int64Counter

Inst returns the underlying metric instrument.

DiskIO.Name

func (DiskIO) Name() string

Name returns the semantic convention name of the instrument.

DiskIO.Unit

func (DiskIO) Unit() string

Unit returns the semantic convention unit of the instrument

DiskIODirectionAttr

type DiskIODirectionAttr string

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

DiskIODirectionRead (2 declarations)

var (
	// DiskIODirectionRead is the none.
	DiskIODirectionRead DiskIODirectionAttr = "read"
	// DiskIODirectionWrite is the none.
	DiskIODirectionWrite DiskIODirectionAttr = "write"
)

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.

NewDiskIOTime

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

NewDiskIOTime returns a new DiskIOTime instrument.

DiskIOTime.Add

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

Add adds incr to the existing count.

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:

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.

DiskIOTime.Description

func (DiskIOTime) Description() string

Description returns the semantic convention description of the instrument

DiskIOTime.Inst

func (m DiskIOTime) Inst() metric.Float64Counter

Inst returns the underlying metric instrument.

DiskIOTime.Name

func (DiskIOTime) Name() string

Name returns the semantic convention name of the instrument.

DiskIOTime.Unit

func (DiskIOTime) Unit() string

Unit returns the semantic convention unit of the instrument

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.

NewDiskLimit

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

NewDiskLimit returns a new DiskLimit instrument.

DiskLimit.Add

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

Add adds incr to the existing count.

All additional attrs passed are included in the recorded value.

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.

DiskLimit.Description

func (DiskLimit) Description() string

Description returns the semantic convention description of the instrument

DiskLimit.Inst

func (m DiskLimit) Inst() metric.Int64UpDownCounter

Inst returns the underlying metric instrument.

DiskLimit.Name

func (DiskLimit) Name() string

Name returns the semantic convention name of the instrument.

DiskLimit.Unit

func (DiskLimit) Unit() string

Unit returns the semantic convention unit of the instrument

DiskMerged

type DiskMerged struct {
	metric.Int64Counter
}

DiskMerged is an instrument used to record metric values conforming to the "system.disk.merged" semantic conventions.

NewDiskMerged

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

NewDiskMerged returns a new DiskMerged instrument.

DiskMerged.Add

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

Add adds incr to the existing count.

All additional attrs passed are included in the recorded value.

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.

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.

DiskMerged.Inst

func (m DiskMerged) Inst() metric.Int64Counter

Inst returns the underlying metric instrument.

DiskMerged.Name

func (DiskMerged) Name() string

Name returns the semantic convention name of the instrument.

DiskMerged.Unit

func (DiskMerged) Unit() string

Unit returns the semantic convention unit of the instrument

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.

NewDiskOperationTime

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

NewDiskOperationTime returns a new DiskOperationTime instrument.

DiskOperationTime.Add

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

Add adds incr to the existing count.

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:

  • Linux: Fields 7 & 11 from procfs-diskstats
  • Windows: "Avg. Disk sec/Read" perf counter multiplied by "Disk Reads/sec" perf counter (similar for Writes)

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.

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.

DiskOperationTime.Description

func (DiskOperationTime) Description() string

Description returns the semantic convention description of the instrument

DiskOperationTime.Inst

func (m DiskOperationTime) Inst() metric.Float64Counter

Inst returns the underlying metric instrument.

DiskOperationTime.Name

func (DiskOperationTime) Name() string

Name returns the semantic convention name of the instrument.

DiskOperationTime.Unit

func (DiskOperationTime) Unit() string

Unit returns the semantic convention unit of the instrument

DiskOperations

type DiskOperations struct {
	metric.Int64Counter
}

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

NewDiskOperations

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

NewDiskOperations returns a new DiskOperations instrument.

DiskOperations.Add

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

Add adds incr to the existing count.

All additional attrs passed are included in the recorded value.

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.

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.

DiskOperations.Inst

func (m DiskOperations) Inst() metric.Int64Counter

Inst returns the underlying metric instrument.

DiskOperations.Name

func (DiskOperations) Name() string

Name returns the semantic convention name of the instrument.

DiskOperations.Unit

func (DiskOperations) Unit() string

Unit returns the semantic convention unit of the instrument

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.

NewFilesystemLimit

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

NewFilesystemLimit returns a new FilesystemLimit instrument.

FilesystemLimit.Add

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

Add adds incr to the existing count.

All additional attrs passed are included in the recorded value.

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.

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.

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.

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.

FilesystemLimit.Description

func (FilesystemLimit) Description() string

Description returns the semantic convention description of the instrument

FilesystemLimit.Inst

func (m FilesystemLimit) Inst() metric.Int64UpDownCounter

Inst returns the underlying metric instrument.

FilesystemLimit.Name

func (FilesystemLimit) Name() string

Name returns the semantic convention name of the instrument.

FilesystemLimit.Unit

func (FilesystemLimit) Unit() string

Unit returns the semantic convention unit of the instrument

FilesystemStateAttr

type FilesystemStateAttr string

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

FilesystemStateUsed (3 declarations)

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

FilesystemTypeAttr

type FilesystemTypeAttr string

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

FilesystemTypeFat32 (6 declarations)

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

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.

NewFilesystemUsage

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

NewFilesystemUsage returns a new FilesystemUsage instrument.

FilesystemUsage.Add

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

Add adds incr to the existing count.

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`.

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.

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.

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.

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.

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.

FilesystemUsage.Description

func (FilesystemUsage) Description() string

Description returns the semantic convention description of the instrument

FilesystemUsage.Inst

func (m FilesystemUsage) Inst() metric.Int64UpDownCounter

Inst returns the underlying metric instrument.

FilesystemUsage.Name

func (FilesystemUsage) Name() string

Name returns the semantic convention name of the instrument.

FilesystemUsage.Unit

func (FilesystemUsage) Unit() string

Unit returns the semantic convention unit of the instrument

FilesystemUtilization

type FilesystemUtilization struct {
	metric.Int64Gauge
}

FilesystemUtilization is an instrument used to record metric values conforming to the "system.filesystem.utilization" semantic conventions.

NewFilesystemUtilization

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

NewFilesystemUtilization returns a new FilesystemUtilization instrument.

FilesystemUtilization.AttrDevice

func (FilesystemUtilization) 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.

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.

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.

FilesystemUtilization.AttrFilesystemState

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

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

FilesystemUtilization.AttrFilesystemType

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

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

FilesystemUtilization.Inst

func (m FilesystemUtilization) Inst() metric.Int64Gauge

Inst returns the underlying metric instrument.

FilesystemUtilization.Name

func (FilesystemUtilization) Name() string

Name returns the semantic convention name of the instrument.

FilesystemUtilization.Record

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

Record records val to the current distribution.

All additional attrs passed are included in the recorded value.

FilesystemUtilization.Unit

func (FilesystemUtilization) Unit() string

Unit returns the semantic convention unit of the instrument

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.

NewLinuxMemoryAvailable

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

NewLinuxMemoryAvailable returns a new LinuxMemoryAvailable instrument.

LinuxMemoryAvailable.Add

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

Add adds incr to the existing count.

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.

LinuxMemoryAvailable.Description

func (LinuxMemoryAvailable) Description() string

Description returns the semantic convention description of the instrument

LinuxMemoryAvailable.Inst

func (m LinuxMemoryAvailable) Inst() metric.Int64UpDownCounter

Inst returns the underlying metric instrument.

LinuxMemoryAvailable.Name

func (LinuxMemoryAvailable) Name() string

Name returns the semantic convention name of the instrument.

LinuxMemoryAvailable.Unit

func (LinuxMemoryAvailable) Unit() string

Unit returns the semantic convention unit of the instrument

LinuxMemorySlabStateAttr

type LinuxMemorySlabStateAttr string

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

LinuxMemorySlabStateReclaimable (2 declarations)

var (
	// LinuxMemorySlabStateReclaimable is the none.
	LinuxMemorySlabStateReclaimable LinuxMemorySlabStateAttr = "reclaimable"
	// LinuxMemorySlabStateUnreclaimable is the none.
	LinuxMemorySlabStateUnreclaimable LinuxMemorySlabStateAttr = "unreclaimable"
)

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.

NewLinuxMemorySlabUsage

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

NewLinuxMemorySlabUsage returns a new LinuxMemorySlabUsage instrument.

LinuxMemorySlabUsage.Add

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

Add adds incr to the existing count.

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.

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.

LinuxMemorySlabUsage.Description

func (LinuxMemorySlabUsage) Description() string

Description returns the semantic convention description of the instrument

LinuxMemorySlabUsage.Inst

func (m LinuxMemorySlabUsage) Inst() metric.Int64UpDownCounter

Inst returns the underlying metric instrument.

LinuxMemorySlabUsage.Name

func (LinuxMemorySlabUsage) Name() string

Name returns the semantic convention name of the instrument.

LinuxMemorySlabUsage.Unit

func (LinuxMemorySlabUsage) Unit() string

Unit returns the semantic convention unit of the instrument

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 memory available in the system.

NewMemoryLimit

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

NewMemoryLimit returns a new MemoryLimit instrument.

MemoryLimit.Add

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

Add adds incr to the existing count.

Its value SHOULD equal the sum of `system.memory.state` over all states.

MemoryLimit.Description

func (MemoryLimit) Description() string

Description returns the semantic convention description of the instrument

MemoryLimit.Inst

func (m MemoryLimit) Inst() metric.Int64UpDownCounter

Inst returns the underlying metric instrument.

MemoryLimit.Name

func (MemoryLimit) Name() string

Name returns the semantic convention name of the instrument.

MemoryLimit.Unit

func (MemoryLimit) Unit() string

Unit returns the semantic convention unit of the instrument

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).

NewMemoryShared

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

NewMemoryShared returns a new MemoryShared instrument.

MemoryShared.Add

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

Add adds incr to the existing count.

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

MemoryShared.Description

func (MemoryShared) Description() string

Description returns the semantic convention description of the instrument

MemoryShared.Inst

func (m MemoryShared) Inst() metric.Int64UpDownCounter

Inst returns the underlying metric instrument.

MemoryShared.Name

func (MemoryShared) Name() string

Name returns the semantic convention name of the instrument.

MemoryShared.Unit

func (MemoryShared) Unit() string

Unit returns the semantic convention unit of the instrument

MemoryStateAttr

type MemoryStateAttr string

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

MemoryStateUsed (4 declarations)

var (
	// MemoryStateUsed is the none.
	MemoryStateUsed MemoryStateAttr = "used"
	// MemoryStateFree is the none.
	MemoryStateFree MemoryStateAttr = "free"
	// MemoryStateBuffers is the none.
	MemoryStateBuffers MemoryStateAttr = "buffers"
	// MemoryStateCached is the none.
	MemoryStateCached MemoryStateAttr = "cached"
)

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.

NewMemoryUsage

func NewMemoryUsage(
	m metric.Meter,
	opt ...metric.Int64ObservableUpDownCounterOption,
) (MemoryUsage, error)

NewMemoryUsage returns a new MemoryUsage instrument.

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.

MemoryUsage.Description

func (MemoryUsage) Description() string

Description returns the semantic convention description of the instrument

MemoryUsage.Inst

func (m MemoryUsage) Inst() metric.Int64ObservableUpDownCounter

Inst returns the underlying metric instrument.

MemoryUsage.Name

func (MemoryUsage) Name() string

Name returns the semantic convention name of the instrument.

MemoryUsage.Unit

func (MemoryUsage) Unit() string

Unit returns the semantic convention unit of the instrument

MemoryUtilization

type MemoryUtilization struct {
	metric.Float64ObservableGauge
}

MemoryUtilization is an instrument used to record metric values conforming to the "system.memory.utilization" semantic conventions.

NewMemoryUtilization

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

NewMemoryUtilization returns a new MemoryUtilization instrument.

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.

MemoryUtilization.Inst

func (m MemoryUtilization) Inst() metric.Float64ObservableGauge

Inst returns the underlying metric instrument.

MemoryUtilization.Name

func (MemoryUtilization) Name() string

Name returns the semantic convention name of the instrument.

MemoryUtilization.Unit

func (MemoryUtilization) Unit() string

Unit returns the semantic convention unit of the instrument

NetworkConnectionStateAttr

type NetworkConnectionStateAttr string

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

NetworkConnectionStateClosed (11 declarations)

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

NetworkConnections

type NetworkConnections struct {
	metric.Int64UpDownCounter
}

NetworkConnections is an instrument used to record metric values conforming to the "system.network.connections" semantic conventions.

NewNetworkConnections

func NewNetworkConnections(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (NetworkConnections, error)

NewNetworkConnections returns a new NetworkConnections instrument.

NetworkConnections.Add

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

Add adds incr to the existing count.

All additional attrs passed are included in the recorded value.

NetworkConnections.AttrNetworkConnectionState

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

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

NetworkConnections.AttrNetworkInterfaceName

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

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

NetworkConnections.AttrNetworkTransport

func (NetworkConnections) AttrNetworkTransport(val NetworkTransportAttr) attribute.KeyValue

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

NetworkConnections.Inst

func (m NetworkConnections) Inst() metric.Int64UpDownCounter

Inst returns the underlying metric instrument.

NetworkConnections.Name

func (NetworkConnections) Name() string

Name returns the semantic convention name of the instrument.

NetworkConnections.Unit

func (NetworkConnections) Unit() string

Unit returns the semantic convention unit of the instrument

NetworkDropped

type NetworkDropped struct {
	metric.Int64Counter
}

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

NewNetworkDropped

func NewNetworkDropped(
	m metric.Meter,
	opt ...metric.Int64CounterOption,
) (NetworkDropped, error)

NewNetworkDropped returns a new NetworkDropped instrument.

NetworkDropped.Add

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

Add adds incr to the existing count.

All additional attrs passed are included in the recorded value.

Measured as:

NetworkDropped.AttrNetworkIODirection

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

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

NetworkDropped.AttrNetworkInterfaceName

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

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

NetworkDropped.Description

func (NetworkDropped) Description() string

Description returns the semantic convention description of the instrument

NetworkDropped.Inst

func (m NetworkDropped) Inst() metric.Int64Counter

Inst returns the underlying metric instrument.

NetworkDropped.Name

func (NetworkDropped) Name() string

Name returns the semantic convention name of the instrument.

NetworkDropped.Unit

func (NetworkDropped) Unit() string

Unit returns the semantic convention unit of the instrument

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.

NewNetworkErrors

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

NewNetworkErrors returns a new NetworkErrors instrument.

NetworkErrors.Add

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

Add adds incr to the existing count.

All additional attrs passed are included in the recorded value.

Measured as:

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.

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.

NetworkErrors.Description

func (NetworkErrors) Description() string

Description returns the semantic convention description of the instrument

NetworkErrors.Inst

func (m NetworkErrors) Inst() metric.Int64Counter

Inst returns the underlying metric instrument.

NetworkErrors.Name

func (NetworkErrors) Name() string

Name returns the semantic convention name of the instrument.

NetworkErrors.Unit

func (NetworkErrors) Unit() string

Unit returns the semantic convention unit of the instrument

NetworkIO

type NetworkIO struct {
	metric.Int64ObservableCounter
}

NetworkIO is an instrument used to record metric values conforming to the "system.network.io" semantic conventions.

NewNetworkIO

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

NewNetworkIO returns a new NetworkIO instrument.

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.

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.

NetworkIO.Inst

func (m NetworkIO) Inst() metric.Int64ObservableCounter

Inst returns the underlying metric instrument.

NetworkIO.Name

func (NetworkIO) Name() string

Name returns the semantic convention name of the instrument.

NetworkIO.Unit

func (NetworkIO) Unit() string

Unit returns the semantic convention unit of the instrument

NetworkIODirectionAttr

type NetworkIODirectionAttr string

NetworkIODirectionAttr is an attribute conforming to the network.io.direction semantic conventions. It represents the network IO operation direction.

NetworkIODirectionTransmit (2 declarations)

var (
	// NetworkIODirectionTransmit is the none.
	NetworkIODirectionTransmit NetworkIODirectionAttr = "transmit"
	// NetworkIODirectionReceive is the none.
	NetworkIODirectionReceive NetworkIODirectionAttr = "receive"
)

NetworkPackets

type NetworkPackets struct {
	metric.Int64Counter
}

NetworkPackets is an instrument used to record metric values conforming to the "system.network.packets" semantic conventions.

NewNetworkPackets

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

NewNetworkPackets returns a new NetworkPackets instrument.

NetworkPackets.Add

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

Add adds incr to the existing count.

All additional attrs passed are included in the recorded value.

NetworkPackets.AttrDevice

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

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

NetworkPackets.AttrNetworkIODirection

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

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

NetworkPackets.Inst

func (m NetworkPackets) Inst() metric.Int64Counter

Inst returns the underlying metric instrument.

NetworkPackets.Name

func (NetworkPackets) Name() string

Name returns the semantic convention name of the instrument.

NetworkPackets.Unit

func (NetworkPackets) Unit() string

Unit returns the semantic convention unit of the instrument

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.

NetworkTransportTCP (5 declarations)

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"
)

PagingDirectionAttr

type PagingDirectionAttr string

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

PagingDirectionIn (2 declarations)

var (
	// PagingDirectionIn is the none.
	PagingDirectionIn PagingDirectionAttr = "in"
	// PagingDirectionOut is the none.
	PagingDirectionOut PagingDirectionAttr = "out"
)

PagingFaults

type PagingFaults struct {
	metric.Int64Counter
}

PagingFaults is an instrument used to record metric values conforming to the "system.paging.faults" semantic conventions.

NewPagingFaults

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

NewPagingFaults returns a new PagingFaults instrument.

PagingFaults.Add

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

Add adds incr to the existing count.

All additional attrs passed are included in the recorded value.

PagingFaults.AttrPagingType

func (PagingFaults) AttrPagingType(val PagingTypeAttr) attribute.KeyValue

AttrPagingType returns an optional attribute for the "system.paging.type" semantic convention. It represents the memory paging type.

PagingFaults.Inst

func (m PagingFaults) Inst() metric.Int64Counter

Inst returns the underlying metric instrument.

PagingFaults.Name

func (PagingFaults) Name() string

Name returns the semantic convention name of the instrument.

PagingFaults.Unit

func (PagingFaults) Unit() string

Unit returns the semantic convention unit of the instrument

PagingOperations

type PagingOperations struct {
	metric.Int64Counter
}

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

NewPagingOperations

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

NewPagingOperations returns a new PagingOperations instrument.

PagingOperations.Add

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

Add adds incr to the existing count.

All additional attrs passed are included in the recorded value.

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.

PagingOperations.AttrPagingType

func (PagingOperations) AttrPagingType(val PagingTypeAttr) attribute.KeyValue

AttrPagingType returns an optional attribute for the "system.paging.type" semantic convention. It represents the memory paging type.

PagingOperations.Inst

func (m PagingOperations) Inst() metric.Int64Counter

Inst returns the underlying metric instrument.

PagingOperations.Name

func (PagingOperations) Name() string

Name returns the semantic convention name of the instrument.

PagingOperations.Unit

func (PagingOperations) Unit() string

Unit returns the semantic convention unit of the instrument

PagingStateAttr

type PagingStateAttr string

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

PagingStateUsed (2 declarations)

var (
	// PagingStateUsed is the none.
	PagingStateUsed PagingStateAttr = "used"
	// PagingStateFree is the none.
	PagingStateFree PagingStateAttr = "free"
)

PagingTypeAttr

type PagingTypeAttr string

PagingTypeAttr is an attribute conforming to the system.paging.type semantic conventions. It represents the memory paging type.

PagingTypeMajor (2 declarations)

var (
	// PagingTypeMajor is the none.
	PagingTypeMajor PagingTypeAttr = "major"
	// PagingTypeMinor is the none.
	PagingTypeMinor PagingTypeAttr = "minor"
)

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.

NewPagingUsage

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

NewPagingUsage returns a new PagingUsage instrument.

PagingUsage.Add

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

Add adds incr to the existing count.

All additional attrs passed are included in the recorded value.

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.

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.

PagingUsage.Description

func (PagingUsage) Description() string

Description returns the semantic convention description of the instrument

PagingUsage.Inst

func (m PagingUsage) Inst() metric.Int64UpDownCounter

Inst returns the underlying metric instrument.

PagingUsage.Name

func (PagingUsage) Name() string

Name returns the semantic convention name of the instrument.

PagingUsage.Unit

func (PagingUsage) Unit() string

Unit returns the semantic convention unit of the instrument

PagingUtilization

type PagingUtilization struct {
	metric.Int64Gauge
}

PagingUtilization is an instrument used to record metric values conforming to the "system.paging.utilization" semantic conventions.

NewPagingUtilization

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

NewPagingUtilization returns a new PagingUtilization instrument.

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.

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.

PagingUtilization.Inst

func (m PagingUtilization) Inst() metric.Int64Gauge

Inst returns the underlying metric instrument.

PagingUtilization.Name

func (PagingUtilization) Name() string

Name returns the semantic convention name of the instrument.

PagingUtilization.Record

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

Record records val to the current distribution.

All additional attrs passed are included in the recorded value.

PagingUtilization.Unit

func (PagingUtilization) Unit() string

Unit returns the semantic convention unit of the instrument

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.

NewProcessCount

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

NewProcessCount returns a new ProcessCount instrument.

ProcessCount.Add

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

Add adds incr to the existing count.

All additional attrs passed are included in the recorded value.

ProcessCount.AttrProcessStatus

func (ProcessCount) AttrProcessStatus(val ProcessStatusAttr) attribute.KeyValue

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

ProcessCount.Description

func (ProcessCount) Description() string

Description returns the semantic convention description of the instrument

ProcessCount.Inst

func (m ProcessCount) Inst() metric.Int64UpDownCounter

Inst returns the underlying metric instrument.

ProcessCount.Name

func (ProcessCount) Name() string

Name returns the semantic convention name of the instrument.

ProcessCount.Unit

func (ProcessCount) Unit() string

Unit returns the semantic convention unit of the instrument

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.

NewProcessCreated

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

NewProcessCreated returns a new ProcessCreated instrument.

ProcessCreated.Add

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

Add adds incr to the existing count.

ProcessCreated.Description

func (ProcessCreated) Description() string

Description returns the semantic convention description of the instrument

ProcessCreated.Inst

func (m ProcessCreated) Inst() metric.Int64Counter

Inst returns the underlying metric instrument.

ProcessCreated.Name

func (ProcessCreated) Name() string

Name returns the semantic convention name of the instrument.

ProcessCreated.Unit

func (ProcessCreated) Unit() string

Unit returns the semantic convention unit of the instrument

ProcessStatusAttr

type ProcessStatusAttr string

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

ProcessStatusRunning (4 declarations)

var (
	// ProcessStatusRunning is the none.
	ProcessStatusRunning ProcessStatusAttr = "running"
	// ProcessStatusSleeping is the none.
	ProcessStatusSleeping ProcessStatusAttr = "sleeping"
	// ProcessStatusStopped is the none.
	ProcessStatusStopped ProcessStatusAttr = "stopped"
	// ProcessStatusDefunct is the none.
	ProcessStatusDefunct ProcessStatusAttr = "defunct"
)

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.

NewUptime

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

NewUptime returns a new Uptime instrument.

Uptime.Description

func (Uptime) Description() string

Description returns the semantic convention description of the instrument

Uptime.Inst

func (m Uptime) Inst() metric.Float64Gauge

Inst returns the underlying metric instrument.

Uptime.Name

func (Uptime) Name() string

Name returns the semantic convention name of the instrument.

Uptime.Record

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

Record records val to the current distribution.

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.

Uptime.Unit

func (Uptime) Unit() string

Unit returns the semantic convention unit of the instrument

Dependency graph