tally
tally copied to clipboard
Feature request: dynamic gauge
In many cases it is necessary to report the current value of a certain variable. Other metric systems (such as Dropwizard one on Java) allow an user to bind a metric name to a function. That function gets called on every metric aggregation scan and its returned value is applied directly as momentary metric value.
Something to the tune of:
func measureChannel() float64 {
return float64(len(someChan))
}
//....
g := tallyScope.DynamicGauge("channel_gauge", measureChannel)
Whereupon, channel_gauge metric will be set to a value returned by measureChannel function, when called on metric reporter defined intervals.