Documentation ¶
Index ¶
- type Measure
- func (m *Measure) AddCounter(counter metrics.Counter)
- func (m *Measure) AddGauge(gauge metrics.Gauge)
- func (m *Measure) AddGaugeFloat64(gauge metrics.GaugeFloat64)
- func (m *Measure) AddHistogram(histogram metrics.Histogram, percentiles []float64)
- func (m *Measure) AddMeter(meter metrics.Meter)
- func (m *Measure) AddTimer(timer metrics.Timer, percentiles []float64)
- type Reporter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Measure ¶
type Measure map[string]interface{}
Measure is a map that represents the contract to be send to measures
func NewMeasure ¶
NewMeasure creates a new Measure and adds name and default information to the structure
func (*Measure) AddCounter ¶
func (m *Measure) AddCounter(counter metrics.Counter)
AddCounter adds a counter to the structure
func (*Measure) AddGauge ¶
func (m *Measure) AddGauge(gauge metrics.Gauge)
AddGauge adds an int gauge to the structure
func (*Measure) AddGaugeFloat64 ¶
func (m *Measure) AddGaugeFloat64(gauge metrics.GaugeFloat64)
AddGaugeFloat64 adds an int gauge64 to the structure
func (*Measure) AddHistogram ¶
AddHistogram adds a histogram to the structure
type Reporter ¶
type Reporter struct { // Registry map is used to hold metrics that will be sent to logstash. Registry metrics.Registry // Conn is a UDP connection to logstash. Conn *net.UDPConn // DefaultValues are the values that will be sent in all submits. DefaultValues map[string]interface{} Version string // Percentiles to be sent on histograms and timers Percentiles []float64 }
Reporter represents a metrics registry.
func NewReporter ¶
func NewReporter(r metrics.Registry, addr string, defaultValues map[string]interface{}) (*Reporter, error)
NewReporter creates a new Reporter for the register r, with an UDP client to the given logstash address addr and with the given default values. If defaultValues is nil, only the metrics will be sent.
Click to show internal directories.
Click to hide internal directories.