metrics

package
v0.0.0-...-afc2af5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PathSeparator is separator of groups in app name
	PathSeparator = "/"
	// MetricSeparator is separator of groups in metrics system
	MetricSeparator = "."
)

Variables

This section is empty.

Functions

func FilterOutEmptyStrings

func FilterOutEmptyStrings(data []string) []string

FilterOutEmptyStrings filters empty strings

func Init

func Init(cfg Config) error

Init Metrics

func Mark

func Mark(name string)

Mark or register Meter on graphite

func MarkApp

func MarkApp(name string)

MarkApp marks or register Meter on graphite

func Time

func Time(name string, function func())

Time execution of function

func UpdateGauge

func UpdateGauge(name string, value int64)

UpdateGauge for provided metric

Types

type Config

type Config struct {
	Target string
	//Prefix is the begining of metric, it is prepended
	// in each and every published metric.
	Prefix   string
	Interval time.Duration
	Addr     string
	Instance string
	// SystemSubPrefix it is part of a metric that is appended to the
	// main Prefix, representing appcop internal metrics
	// essential to appcop admins, e.g runtime metrics, event processing time,
	// event queue size etc.
	SystemSubPrefix string
	// AppSubPrefix it is part of a metric that is appended to the
	// main Prefix, representing applications specific metric, e.g task_running,
	// task_staging, task_failed.
	AppSubPrefix string
}

Config specific to metrics package

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL