metrics

package
v0.0.0-...-7e372e6 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2015 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FBAdapter

type FBAdapter struct {
	// contains filtered or unexported fields
}

FBAdapter provides a facebookgo/stats client interface that sends metrics via a StatsD client

func NewFBAdapter

func NewFBAdapter(stats statsd.Statter, prefix string, clock clock.Clock) FBAdapter

NewFBAdapter returns a new adapter

func (FBAdapter) BumpAvg

func (fba FBAdapter) BumpAvg(key string, val float64)

BumpAvg is essentially statsd.Statter.Gauge

func (FBAdapter) BumpHistogram

func (fba FBAdapter) BumpHistogram(_ string, _ float64)

BumpHistogram isn't used by facebookgo/httpdown

func (FBAdapter) BumpSum

func (fba FBAdapter) BumpSum(key string, val float64)

BumpSum is essentially statsd.Statter.Inc (httpdown only ever uses positive deltas)

func (FBAdapter) BumpTime

func (fba FBAdapter) BumpTime(key string) interface {
	End()
}

BumpTime is essentially a (much better) statsd.Statter.TimingDuration

type HTTPMonitor

type HTTPMonitor struct {
	// contains filtered or unexported fields
}

HTTPMonitor stores some server state

func NewHTTPMonitor

func NewHTTPMonitor(stats statsd.Statter, handler http.Handler, prefix string) HTTPMonitor

NewHTTPMonitor returns a new initialized HTTPMonitor

func (*HTTPMonitor) Handle

func (h *HTTPMonitor) Handle() http.Handler

Handle wraps handlers and records various metrics about requests to these handlers and sends them to StatsD

Jump to

Keyboard shortcuts

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