Closed mjudeikis closed 4 years ago
In addition, we would need to ship golang runtime metrics, like:
func memStats() map[string]float64 {
m := runtime.MemStats{}
runtime.ReadMemStats(&m)
metrics := map[string]float64{
"memory.objects.HeapObjects": float64(m.HeapObjects),
"memory.summary.Alloc": float64(m.Alloc),
"memory.counters.Mallocs": perSecondCounter("mallocs", int64(m.Mallocs)),
"memory.counters.Frees": perSecondCounter("frees", int64(m.Frees)),
"memory.summary.System": float64(m.HeapSys),
"memory.heap.Idle": float64(m.HeapIdle),
"memory.heap.InUse": float64(m.HeapInuse),
}
return metrics
}
Tracked in Google doc.
RP should emit statsd metrics (compatibility with geneva).
We have 2 ways to achieve this goal:
StatsD client example: https://github.com/statsd/statsd/blob/master/examples/go/statsd.go https://godoc.org/github.com/etsy/statsd/examples/go
The proposal would be to create subpackage
pkg/metrics
with methods to record different metrics with configured dimensions/tags.By initiating RP some dimensions would need to be provided. Like
region
,name
,location
.Metrics recording would be recorded as statsD as example below:
Examle metrics:
Proposed metrics: Where we use dymensions to add metadata like:
rp_ame
,location
,region
,environement
@jim-minter @m1kola @asalkeld WDYT?