Documentation ¶
Overview ¶
Package metrics is for instrumentation and debugging
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSet ¶
func IsSet() bool
IsSet lets you know if the DefaultMetricsReporter has been set already:
func SetDefaultMetricsReporter ¶
func SetDefaultMetricsReporter(defaultReporter Reporter)
SetDefaultMetricsReporter allows other packages (such as profiles) to set the DefaultMetricsReporter The "initialized" flag prevents this from being overwritten (because other packages may already be using it)
Types ¶
type Option ¶
type Option func(*Options)
Option powers the configuration for metrics implementations:
func Percentiles ¶
Percentiles defines the desired spread of statistics for histogram / timing metrics:
type Reporter ¶
type Reporter interface { Count(id string, value int64, tags Tags) error Gauge(id string, value float64, tags Tags) error Timing(id string, value time.Duration, tags Tags) error }
Reporter is an interface for collecting and instrumenting metrics
var ( // DefaultMetricsReporter implementation DefaultMetricsReporter Reporter )
Click to show internal directories.
Click to hide internal directories.