Documentation ¶
Overview ¶
Package monitor provides an embedded HTTP server to expose metrics for monitoring
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VarsToString ¶
func VarsToString() string
VarsToString gives a string with all exported variables the returned string is in a pretty format.
Types ¶
type LatencyHistogram ¶
type LatencyHistogram struct {
// contains filtered or unexported fields
}
LatencyHistogram contains the data needed to properly export itself to expvar and provide a pretty printed version
func NewLatencyHistogram ¶
func NewLatencyHistogram(name string, latencyUnit time.Duration, numBuckets int, growth float64, smallest float64, minValue int64) *LatencyHistogram
NewLatencyHistogram creates a new histogram and registers an HTTP handler for it.
func (*LatencyHistogram) Print ¶
func (h *LatencyHistogram) Print() string
Print returns the histogram as a chart
func (*LatencyHistogram) String ¶
func (h *LatencyHistogram) String() string
String returns the histogram as JSON.
func (*LatencyHistogram) UpdateLatencyValues ¶
func (h *LatencyHistogram) UpdateLatencyValues(delta time.Duration)
UpdateLatencyValues updates the LatencyHistogram's buckets with the new datapoint and updates the string associated with the expvar.String
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
Map is a string-to-Var map variable that satisfies the Var interface. This a streamlined, more efficient version of expvar.Map, that also supports deletion.
func (*Map) Do ¶
Do calls f for each entry in the map. The map is locked during the iteration, but existing entries may be concurrently updated.
type PrintableHistogram ¶
type PrintableHistogram interface {
Print() string
}
PrintableHistogram represents a Histogram that can be printed as a chart.