package goconv
import "go.opentelemetry.io/otel/semconv/v1.38.0/goconv"
Package goconv provides types and functionality for OpenTelemetry semantic conventions in the "go" namespace.
Index ¶
- type ConfigGogc
- func NewConfigGogc( m metric.Meter, opt ...metric.Int64ObservableUpDownCounterOption, ) (ConfigGogc, error)
- func (ConfigGogc) Description() string
- func (m ConfigGogc) Inst() metric.Int64ObservableUpDownCounter
- func (ConfigGogc) Name() string
- func (ConfigGogc) Unit() string
- type GoroutineCount
- func NewGoroutineCount( m metric.Meter, opt ...metric.Int64ObservableUpDownCounterOption, ) (GoroutineCount, error)
- func (GoroutineCount) Description() string
- func (m GoroutineCount) Inst() metric.Int64ObservableUpDownCounter
- func (GoroutineCount) Name() string
- func (GoroutineCount) Unit() string
- type MemoryAllocated
- func NewMemoryAllocated( m metric.Meter, opt ...metric.Int64ObservableCounterOption, ) (MemoryAllocated, error)
- func (MemoryAllocated) Description() string
- func (m MemoryAllocated) Inst() metric.Int64ObservableCounter
- func (MemoryAllocated) Name() string
- func (MemoryAllocated) Unit() string
- type MemoryAllocations
- func NewMemoryAllocations( m metric.Meter, opt ...metric.Int64ObservableCounterOption, ) (MemoryAllocations, error)
- func (MemoryAllocations) Description() string
- func (m MemoryAllocations) Inst() metric.Int64ObservableCounter
- func (MemoryAllocations) Name() string
- func (MemoryAllocations) Unit() string
- type MemoryGCGoal
- func NewMemoryGCGoal( m metric.Meter, opt ...metric.Int64ObservableUpDownCounterOption, ) (MemoryGCGoal, error)
- func (MemoryGCGoal) Description() string
- func (m MemoryGCGoal) Inst() metric.Int64ObservableUpDownCounter
- func (MemoryGCGoal) Name() string
- func (MemoryGCGoal) Unit() string
- type MemoryLimit
- func NewMemoryLimit( m metric.Meter, opt ...metric.Int64ObservableUpDownCounterOption, ) (MemoryLimit, error)
- func (MemoryLimit) Description() string
- func (m MemoryLimit) Inst() metric.Int64ObservableUpDownCounter
- func (MemoryLimit) Name() string
- func (MemoryLimit) Unit() string
- type MemoryTypeAttr
- type MemoryUsed
- func NewMemoryUsed( m metric.Meter, opt ...metric.Int64ObservableUpDownCounterOption, ) (MemoryUsed, error)
- func (MemoryUsed) AttrMemoryType(val MemoryTypeAttr) attribute.KeyValue
- func (MemoryUsed) Description() string
- func (m MemoryUsed) Inst() metric.Int64ObservableUpDownCounter
- func (MemoryUsed) Name() string
- func (MemoryUsed) Unit() string
- type ProcessorLimit
- func NewProcessorLimit( m metric.Meter, opt ...metric.Int64ObservableUpDownCounterOption, ) (ProcessorLimit, error)
- func (ProcessorLimit) Description() string
- func (m ProcessorLimit) Inst() metric.Int64ObservableUpDownCounter
- func (ProcessorLimit) Name() string
- func (ProcessorLimit) Unit() string
- type ScheduleDuration
- func NewScheduleDuration( m metric.Meter, opt ...metric.Float64HistogramOption, ) (ScheduleDuration, error)
- func (ScheduleDuration) Description() string
- func (m ScheduleDuration) Inst() metric.Float64Histogram
- func (ScheduleDuration) Name() string
- func (m ScheduleDuration) Record(ctx context.Context, val float64, attrs ...attribute.KeyValue)
- func (m ScheduleDuration) RecordSet(ctx context.Context, val float64, set attribute.Set)
- func (ScheduleDuration) Unit() string
Types ¶
type ConfigGogc ¶
type ConfigGogc struct {
metric.Int64ObservableUpDownCounter
}
ConfigGogc is an instrument used to record metric values conforming to the "go.config.gogc" semantic conventions. It represents the heap size target percentage configured by the user, otherwise 100.
func NewConfigGogc ¶
func NewConfigGogc( m metric.Meter, opt ...metric.Int64ObservableUpDownCounterOption, ) (ConfigGogc, error)
NewConfigGogc returns a new ConfigGogc instrument.
func (ConfigGogc) Description ¶
func (ConfigGogc) Description() string
Description returns the semantic convention description of the instrument
func (ConfigGogc) Inst ¶
func (m ConfigGogc) Inst() metric.Int64ObservableUpDownCounter
Inst returns the underlying metric instrument.
func (ConfigGogc) Name ¶
func (ConfigGogc) Name() string
Name returns the semantic convention name of the instrument.
func (ConfigGogc) Unit ¶
func (ConfigGogc) Unit() string
Unit returns the semantic convention unit of the instrument
type GoroutineCount ¶
type GoroutineCount struct {
metric.Int64ObservableUpDownCounter
}
GoroutineCount is an instrument used to record metric values conforming to the "go.goroutine.count" semantic conventions. It represents the count of live goroutines.
func NewGoroutineCount ¶
func NewGoroutineCount( m metric.Meter, opt ...metric.Int64ObservableUpDownCounterOption, ) (GoroutineCount, error)
NewGoroutineCount returns a new GoroutineCount instrument.
func (GoroutineCount) Description ¶
func (GoroutineCount) Description() string
Description returns the semantic convention description of the instrument
func (GoroutineCount) Inst ¶
func (m GoroutineCount) Inst() metric.Int64ObservableUpDownCounter
Inst returns the underlying metric instrument.
func (GoroutineCount) Name ¶
func (GoroutineCount) Name() string
Name returns the semantic convention name of the instrument.
func (GoroutineCount) Unit ¶
func (GoroutineCount) Unit() string
Unit returns the semantic convention unit of the instrument
type MemoryAllocated ¶
type MemoryAllocated struct {
metric.Int64ObservableCounter
}
MemoryAllocated is an instrument used to record metric values conforming to the "go.memory.allocated" semantic conventions. It represents the memory allocated to the heap by the application.
func NewMemoryAllocated ¶
func NewMemoryAllocated( m metric.Meter, opt ...metric.Int64ObservableCounterOption, ) (MemoryAllocated, error)
NewMemoryAllocated returns a new MemoryAllocated instrument.
func (MemoryAllocated) Description ¶
func (MemoryAllocated) Description() string
Description returns the semantic convention description of the instrument
func (MemoryAllocated) Inst ¶
func (m MemoryAllocated) Inst() metric.Int64ObservableCounter
Inst returns the underlying metric instrument.
func (MemoryAllocated) Name ¶
func (MemoryAllocated) Name() string
Name returns the semantic convention name of the instrument.
func (MemoryAllocated) Unit ¶
func (MemoryAllocated) Unit() string
Unit returns the semantic convention unit of the instrument
type MemoryAllocations ¶
type MemoryAllocations struct {
metric.Int64ObservableCounter
}
MemoryAllocations is an instrument used to record metric values conforming to the "go.memory.allocations" semantic conventions. It represents the count of allocations to the heap by the application.
func NewMemoryAllocations ¶
func NewMemoryAllocations( m metric.Meter, opt ...metric.Int64ObservableCounterOption, ) (MemoryAllocations, error)
NewMemoryAllocations returns a new MemoryAllocations instrument.
func (MemoryAllocations) Description ¶
func (MemoryAllocations) Description() string
Description returns the semantic convention description of the instrument
func (MemoryAllocations) Inst ¶
func (m MemoryAllocations) Inst() metric.Int64ObservableCounter
Inst returns the underlying metric instrument.
func (MemoryAllocations) Name ¶
func (MemoryAllocations) Name() string
Name returns the semantic convention name of the instrument.
func (MemoryAllocations) Unit ¶
func (MemoryAllocations) Unit() string
Unit returns the semantic convention unit of the instrument
type MemoryGCGoal ¶
type MemoryGCGoal struct {
metric.Int64ObservableUpDownCounter
}
MemoryGCGoal is an instrument used to record metric values conforming to the "go.memory.gc.goal" semantic conventions. It represents the heap size target for the end of the GC cycle.
func NewMemoryGCGoal ¶
func NewMemoryGCGoal( m metric.Meter, opt ...metric.Int64ObservableUpDownCounterOption, ) (MemoryGCGoal, error)
NewMemoryGCGoal returns a new MemoryGCGoal instrument.
func (MemoryGCGoal) Description ¶
func (MemoryGCGoal) Description() string
Description returns the semantic convention description of the instrument
func (MemoryGCGoal) Inst ¶
func (m MemoryGCGoal) Inst() metric.Int64ObservableUpDownCounter
Inst returns the underlying metric instrument.
func (MemoryGCGoal) Name ¶
func (MemoryGCGoal) Name() string
Name returns the semantic convention name of the instrument.
func (MemoryGCGoal) Unit ¶
func (MemoryGCGoal) Unit() string
Unit returns the semantic convention unit of the instrument
type MemoryLimit ¶
type MemoryLimit struct {
metric.Int64ObservableUpDownCounter
}
MemoryLimit is an instrument used to record metric values conforming to the "go.memory.limit" semantic conventions. It represents the go runtime memory limit configured by the user, if a limit exists.
func NewMemoryLimit ¶
func NewMemoryLimit( m metric.Meter, opt ...metric.Int64ObservableUpDownCounterOption, ) (MemoryLimit, error)
NewMemoryLimit returns a new MemoryLimit instrument.
func (MemoryLimit) Description ¶
func (MemoryLimit) Description() string
Description returns the semantic convention description of the instrument
func (MemoryLimit) Inst ¶
func (m MemoryLimit) Inst() metric.Int64ObservableUpDownCounter
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 MemoryTypeAttr ¶
type MemoryTypeAttr string
MemoryTypeAttr is an attribute conforming to the go.memory.type semantic conventions. It represents the type of memory.
var ( // MemoryTypeStack is the memory allocated from the heap that is reserved for // stack space, whether or not it is currently in-use. MemoryTypeStack MemoryTypeAttr = "stack" // MemoryTypeOther is the memory used by the Go runtime, excluding other // categories of memory usage described in this enumeration. MemoryTypeOther MemoryTypeAttr = "other" )
type MemoryUsed ¶
type MemoryUsed struct {
metric.Int64ObservableUpDownCounter
}
MemoryUsed is an instrument used to record metric values conforming to the "go.memory.used" semantic conventions. It represents the memory used by the Go runtime.
func NewMemoryUsed ¶
func NewMemoryUsed( m metric.Meter, opt ...metric.Int64ObservableUpDownCounterOption, ) (MemoryUsed, error)
NewMemoryUsed returns a new MemoryUsed instrument.
func (MemoryUsed) AttrMemoryType ¶
func (MemoryUsed) AttrMemoryType(val MemoryTypeAttr) attribute.KeyValue
AttrMemoryType returns an optional attribute for the "go.memory.type" semantic convention. It represents the type of memory.
func (MemoryUsed) Description ¶
func (MemoryUsed) Description() string
Description returns the semantic convention description of the instrument
func (MemoryUsed) Inst ¶
func (m MemoryUsed) Inst() metric.Int64ObservableUpDownCounter
Inst returns the underlying metric instrument.
func (MemoryUsed) Name ¶
func (MemoryUsed) Name() string
Name returns the semantic convention name of the instrument.
func (MemoryUsed) Unit ¶
func (MemoryUsed) Unit() string
Unit returns the semantic convention unit of the instrument
type ProcessorLimit ¶
type ProcessorLimit struct {
metric.Int64ObservableUpDownCounter
}
ProcessorLimit is an instrument used to record metric values conforming to the "go.processor.limit" semantic conventions. It represents the number of OS threads that can execute user-level Go code simultaneously.
func NewProcessorLimit ¶
func NewProcessorLimit( m metric.Meter, opt ...metric.Int64ObservableUpDownCounterOption, ) (ProcessorLimit, error)
NewProcessorLimit returns a new ProcessorLimit instrument.
func (ProcessorLimit) Description ¶
func (ProcessorLimit) Description() string
Description returns the semantic convention description of the instrument
func (ProcessorLimit) Inst ¶
func (m ProcessorLimit) Inst() metric.Int64ObservableUpDownCounter
Inst returns the underlying metric instrument.
func (ProcessorLimit) Name ¶
func (ProcessorLimit) Name() string
Name returns the semantic convention name of the instrument.
func (ProcessorLimit) Unit ¶
func (ProcessorLimit) Unit() string
Unit returns the semantic convention unit of the instrument
type ScheduleDuration ¶
type ScheduleDuration struct {
metric.Float64Histogram
}
ScheduleDuration is an instrument used to record metric values conforming to the "go.schedule.duration" semantic conventions. It represents the time goroutines have spent in the scheduler in a runnable state before actually running.
func NewScheduleDuration ¶
func NewScheduleDuration( m metric.Meter, opt ...metric.Float64HistogramOption, ) (ScheduleDuration, error)
NewScheduleDuration returns a new ScheduleDuration instrument.
func (ScheduleDuration) Description ¶
func (ScheduleDuration) Description() string
Description returns the semantic convention description of the instrument
func (ScheduleDuration) Inst ¶
func (m ScheduleDuration) Inst() metric.Float64Histogram
Inst returns the underlying metric instrument.
func (ScheduleDuration) Name ¶
func (ScheduleDuration) Name() string
Name returns the semantic convention name of the instrument.
func (ScheduleDuration) Record ¶
Record records val to the current distribution for attrs.
Computed from `/sched/latencies:seconds`. Bucket boundaries are provided by the runtime, and are subject to change.
func (ScheduleDuration) RecordSet ¶
RecordSet records val to the current distribution for set.
Computed from `/sched/latencies:seconds`. Bucket boundaries are provided by the runtime, and are subject to change.
func (ScheduleDuration) Unit ¶
func (ScheduleDuration) Unit() string
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
- 1 hour ago –
Tools for package owners.