remove prometheus namespace references, copy paste error
This commit is contained in:
parent
b14b149930
commit
59305998f6
|
@ -4,25 +4,23 @@ import (
|
|||
"runtime"
|
||||
"runtime/debug"
|
||||
"time"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
type goCollector struct {
|
||||
goroutines Gauge
|
||||
gcDesc *Desc
|
||||
alloc prometheus.Gauge
|
||||
totalAlloc prometheus.Gauge
|
||||
sys prometheus.Gauge
|
||||
lookups prometheus.Gauge
|
||||
mallocs prometheus.Gauge
|
||||
frees prometheus.Gauge
|
||||
heapAlloc prometheus.Gauge
|
||||
heapSys prometheus.Gauge
|
||||
heapIdle prometheus.Gauge
|
||||
heapInuse prometheus.Gauge
|
||||
heapReleased prometheus.Gauge
|
||||
heapObjects prometheus.Gauge
|
||||
alloc Gauge
|
||||
totalAlloc Gauge
|
||||
sys Gauge
|
||||
lookups Gauge
|
||||
mallocs Gauge
|
||||
frees Gauge
|
||||
heapAlloc Gauge
|
||||
heapSys Gauge
|
||||
heapIdle Gauge
|
||||
heapInuse Gauge
|
||||
heapReleased Gauge
|
||||
heapObjects Gauge
|
||||
}
|
||||
|
||||
// NewGoCollector returns a collector which exports metrics about the current
|
||||
|
@ -37,73 +35,73 @@ func NewGoCollector() *goCollector {
|
|||
"go_gc_duration_seconds",
|
||||
"A summary of the GC invocation durations.",
|
||||
nil, nil),
|
||||
alloc: prometheus.NewGauge(prometheus.GaugeOpts{
|
||||
alloc: NewGauge(GaugeOpts{
|
||||
Namespace: "go",
|
||||
Subsystem: "memstats",
|
||||
Name: "alloc_bytes",
|
||||
Help: "Number of bytes allocated and still in use.",
|
||||
}),
|
||||
totalAlloc: prometheus.NewCounter(prometheus.CounterOpts{
|
||||
totalAlloc: NewCounter(CounterOpts{
|
||||
Namespace: "go",
|
||||
Subsystem: "memstats",
|
||||
Name: "alloc_bytes_total",
|
||||
Help: "Total number of bytes allocated, even if freed.",
|
||||
}),
|
||||
sys: prometheus.NewGauge(prometheus.GaugeOpts{
|
||||
sys: NewGauge(GaugeOpts{
|
||||
Namespace: "go",
|
||||
Subsystem: "memstats",
|
||||
Name: "sys_bytes",
|
||||
Help: "Number of bytes obtained from system",
|
||||
}),
|
||||
lookups: prometheus.NewCounter(prometheus.CounterOpts{
|
||||
lookups: NewCounter(CounterOpts{
|
||||
Namespace: "go",
|
||||
Subsystem: "memstats",
|
||||
Name: "lookups_total",
|
||||
Help: "Total number of pointer lookups.",
|
||||
}),
|
||||
mallocs: prometheus.NewCounter(prometheus.CounterOpts{
|
||||
mallocs: NewCounter(CounterOpts{
|
||||
Namespace: "go",
|
||||
Subsystem: "memstats",
|
||||
Name: "mallocs_total",
|
||||
Help: "Total number of mallocs.",
|
||||
}),
|
||||
frees: prometheus.NewCounter(prometheus.CounterOpts{
|
||||
frees: NewCounter(CounterOpts{
|
||||
Namespace: "go",
|
||||
Subsystem: "memstats",
|
||||
Name: "frees_total",
|
||||
Help: "Total number of frees.",
|
||||
}),
|
||||
heapAlloc: prometheus.NewGauge(prometheus.GaugeOpts{
|
||||
heapAlloc: NewGauge(GaugeOpts{
|
||||
Namespace: "go",
|
||||
Subsystem: "memstats",
|
||||
Name: "heap_alloc_bytes",
|
||||
Help: "Number heap bytes allocated and still in use.",
|
||||
}),
|
||||
heapSys: prometheus.NewCounter(prometheus.GaugeOpts{
|
||||
heapSys: NewCounter(GaugeOpts{
|
||||
Namespace: "go",
|
||||
Subsystem: "memstats",
|
||||
Name: "heap_sys_bytes",
|
||||
Help: "Total bytes in heap obtained from system.",
|
||||
}),
|
||||
heapIdle: prometheus.NewGauge(prometheus.GaugeOpts{
|
||||
heapIdle: NewGauge(GaugeOpts{
|
||||
Namespace: "go",
|
||||
Subsystem: "memstats",
|
||||
Name: "heap_idle_bytes",
|
||||
Help: "Number bytes in heap waiting to be used.",
|
||||
}),
|
||||
heapInuse: prometheus.NewGauge(prometheus.GaugeOpts{
|
||||
heapInuse: NewGauge(GaugeOpts{
|
||||
Namespace: "go",
|
||||
Subsystem: "memstats",
|
||||
Name: "heap_inuse_bytes",
|
||||
Help: "Number of bytes in heap that are in use.",
|
||||
}),
|
||||
heapReleased: prometheus.NewGauge(prometheus.GaugeOpts{
|
||||
heapReleased: NewGauge(GaugeOpts{
|
||||
Namespace: "go",
|
||||
Subsystem: "memstats",
|
||||
Name: "heap_released_bytes",
|
||||
Help: "Number of bytes in heap released to OS.",
|
||||
}),
|
||||
heapObjects: prometheus.NewGauge(prometheus.GaugeOpts{
|
||||
heapObjects: NewGauge(GaugeOpts{
|
||||
Namespace: "go",
|
||||
Subsystem: "memstats",
|
||||
Name: "heap_objects",
|
||||
|
|
Loading…
Reference in New Issue