Explorar el Código

add missing counter for timers

mihasya hace 12 años
padre
commit
3d4887b893
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      librato/librato.go

+ 3 - 0
librato/librato.go

@@ -137,6 +137,9 @@ func (self *Reporter) BuildRequest(now time.Time, r metrics.Registry) (snapshot
 				},
 			)
 		case metrics.Timer:
+			measurement[Name] = name
+			measurement[Value] = float64(m.Count())
+			snapshot.Counters = append(snapshot.Counters, measurement)
 			if m.Count() > 0 {
 				libratoName := fmt.Sprintf("%s.%s", name, "timer.mean")
 				gauges := make([]Measurement, histogramGaugeCount, histogramGaugeCount)