metrics

package
v0.0.0-...-8e94ecf Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

func Disable

func Disable()

func Init

func Init(addr string, prefix string, cfg *StatterConfig) error

func ReportClosureFuncCall

func ReportClosureFuncCall(name string, tags ...Tags)

func ReportClosureFuncError

func ReportClosureFuncError(name string, tags ...Tags)

func ReportClosureFuncStatus

func ReportClosureFuncStatus(name string, tags ...Tags)

func ReportFuncCall

func ReportFuncCall(tags ...Tags)

func ReportFuncError

func ReportFuncError(tags ...Tags)

func ReportFuncStatus

func ReportFuncStatus(tags ...Tags)

Types

type Statter

type Statter interface {
	Count(bucket string, n interface{})
	Increment(bucket string)
	Gauge(bucket string, value interface{})
	Timing(bucket string, value interface{})
	Histogram(bucket string, value interface{})
	Unique(bucket string, value string)
	Close()
}

type StatterConfig

type StatterConfig struct {
	EnvName              string
	HostName             string
	StuckFunctionTimeout time.Duration
	MockingEnabled       bool
}

func (*StatterConfig) BaseTags

func (m *StatterConfig) BaseTags() []string

type StopTimerFunc

type StopTimerFunc func()

func ReportClosureFuncTiming

func ReportClosureFuncTiming(name string, tags ...Tags) StopTimerFunc

func ReportFuncTiming

func ReportFuncTiming(tags ...Tags) StopTimerFunc

type Tags

type Tags map[string]string

func (Tags) With

func (t Tags) With(k, v string) Tags

Jump to

Keyboard shortcuts

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