Documentation ¶
Index ¶
- Variables
- func CreateGauge(metricName string, value func() int64)
- func CreateMetricsRegistry() metrics.Registry
- func CreateTopicMeterMap(fmtString string, topics []string) map[string]metrics.Meter
- func GetCounter(metricsName string) metrics.Counter
- func GetGauge(metricName string) metrics.Gauge
- func GetHistogram(metricName string) metrics.Histogram
- func GetHostAddr(host string) *net.TCPAddr
- func GetHostname() string
- func GetMeter(metricName string) metrics.Meter
- func InitGraylog(ip, port, facility string)
- func MeterMapToSlice(meterMap map[string]metrics.Meter) []metrics.Meter
- func SetGlobalMetricsPrefix(name string)
- func StartReporter(graphiteHost string, appName string)
Constants ¶
This section is empty.
Variables ¶
var GlobalMetricsPrefix string
var Logger *log.Logger
Logger ...
Functions ¶
func CreateGauge ¶
CreateGauge creates a new gauge that reports values returned by the given function.
func CreateMetricsRegistry ¶
func CreateMetricsRegistry() metrics.Registry
CreateMetricsRegistry creates a Child Registry with the hostname as prefix
func CreateTopicMeterMap ¶
CreateTopicMeterMap creates a map of Meters (topic -> Meter).
func GetCounter ¶
func GetCounter(metricsName string) metrics.Counter
GetCounter creates a new counter or returns the existing counter with the given name from the default registry.
func GetGauge ¶
func GetGauge(metricName string) metrics.Gauge
CreateGauge creates a new gauge or returns the existing gauge with the given name from the default registry.
func GetHistogram ¶
func GetHistogram(metricName string) metrics.Histogram
GetHistogram creates a new histogram (or returns an existing one with the given name) with an exponential decay sample with default parameters.
func GetHostAddr ¶
GetHostAddr returns the TCPAddr for the given host
func GetHostname ¶
func GetHostname() string
GetHostname returns the machine's host name, either as determined by the system, or by using the first IP address of the first non-loopback network interface. If the hostname can not be determined, “unkown-ip-address” is returned.
func GetMeter ¶
func GetMeter(metricName string) metrics.Meter
GetMeter creates a new meter or returns the existing meter with the given name from the default registry.
func InitGraylog ¶
func InitGraylog(ip, port, facility string)
func MeterMapToSlice ¶
func MeterMapToSlice(meterMap map[string]metrics.Meter) []metrics.Meter
func SetGlobalMetricsPrefix ¶
func SetGlobalMetricsPrefix(name string)
SetGlobalMetricsPrefix set prefix for graphite metrics Should be called on application init phase
func StartReporter ¶
StartReporter starts the graphite reporter
Types ¶
This section is empty.