Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Name string `toml:"-"` ID string `toml:"-"` Version string `toml:"-"` Revision string `toml:"-"` Interval time.Duration `toml:"interval" default:"20s" comment:"Refresh interval for runtime metrics update"` }
Config holds the runtime metric exporter informations
type Publisher ¶
type Publisher interface {
Publish(rs *Stats)
}
Publisher defines metric publisher contract
func OpenCensus ¶
OpenCensus initialize an opencensus metric publisher
type Stats ¶
type Stats struct { // Go Goarch string `json:"runtime.arch"` Goos string `json:"runtime.os"` Version string `json:"runtime.go_version"` // CPU NumCPU int64 `json:"runtime.cpu"` NumGoRoutine int64 `json:"runtime.goroutines"` NumCGOCall int64 `json:"runtime.cgo_calls"` // Memory MemAlloc int64 `json:"mem.alloc"` MemTotalAlloc int64 `json:"mem.total"` MemSys int64 `json:"mem.sys"` MemLookups int64 `json:"mem.lookups"` MemMallocs int64 `json:"mem.malloc"` MemFrees int64 `json:"mem.free"` // Heap HeapAlloc int64 `json:"mem.heap.alloc"` HeapSys int64 `json:"mem.heap.sys"` HeapIdle int64 `json:"mem.heap.idle"` HeapInuse int64 `json:"mem.heap.inuse"` HeapReleased int64 `json:"mem.heap.released"` HeapObjects int64 `json:"mem.heap.objects"` // Stack StackInuse int64 `json:"mem.stack.inuse"` StackSys int64 `json:"mem.stack.sys"` MSpanInuse int64 `json:"mem.stack.mspan_inuse"` MSpanSys int64 `json:"mem.stack.mspan_sys"` MCacheInuse int64 `json:"mem.stack.mcache_inuse"` MCacheSys int64 `json:"mem.stack.mcache_sys"` OtherSys int64 `json:"mem.othersys"` // GC GCSys int64 `json:"mem.gc.sys"` NextGC int64 `json:"mem.gc.next"` LastGC int64 `json:"mem.gc.last"` PauseTotalNs int64 `json:"mem.gc.pause_total"` PauseNs int64 `json:"mem.gc.pause"` NumGC int64 `json:"mem.gc.count"` GCCPUFraction float64 `json:"mem.gc.cpu_fraction"` }
Stats represents collected statistics
Click to show internal directories.
Click to hide internal directories.