Documentation ¶
Overview ¶
Package monitoring provides means to collect different types of metrics. The collected metrics should be exported later e.g. using the package exporter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics struct { // System metrics. System SystemStats // Metrics of Go runtime. Runtime RuntimeStats // Some random value required by Praktikum tasks. RandomValue metrics.Gauge // Count of metrics polling attempts. PollCount metrics.Counter // contains filtered or unexported fields }
Metrics represent set of metrics collected by the agent.
func NewMetrics ¶
func NewMetrics() *Metrics
type RuntimeStats ¶
type RuntimeStats struct { Alloc metrics.Gauge BuckHashSys metrics.Gauge Frees metrics.Gauge GCCPUFraction metrics.Gauge GCSys metrics.Gauge HeapAlloc metrics.Gauge HeapIdle metrics.Gauge HeapInuse metrics.Gauge HeapObjects metrics.Gauge HeapReleased metrics.Gauge HeapSys metrics.Gauge LastGC metrics.Gauge Lookups metrics.Gauge MCacheInuse metrics.Gauge MCacheSys metrics.Gauge MSpanInuse metrics.Gauge MSpanSys metrics.Gauge Mallocs metrics.Gauge NextGC metrics.Gauge NumForcedGC metrics.Gauge NumGC metrics.Gauge OtherSys metrics.Gauge PauseTotalNs metrics.Gauge StackInuse metrics.Gauge StackSys metrics.Gauge Sys metrics.Gauge TotalAlloc metrics.Gauge }
RuntimeStats represents Go runtime metrics. Regarding puurpose of each value see: https://pkg.go.dev/runtime#MemStats
Click to show internal directories.
Click to hide internal directories.