Merge pull request #497 from prometheus/remove-persist-error-labels

Remove labels on persist error counter.
pull/499/head
juliusv 10 years ago
commit 3012de7f5e

@ -81,7 +81,7 @@ type memorySeriesStorage struct {
evictStopping, evictStopped chan struct{} evictStopping, evictStopped chan struct{}
persistLatency prometheus.Summary persistLatency prometheus.Summary
persistErrors *prometheus.CounterVec persistErrors prometheus.Counter
persistQueueLength prometheus.Gauge persistQueueLength prometheus.Gauge
numSeries prometheus.Gauge numSeries prometheus.Gauge
seriesOps *prometheus.CounterVec seriesOps *prometheus.CounterVec
@ -151,15 +151,12 @@ func NewMemorySeriesStorage(o *MemorySeriesStorageOptions) (Storage, error) {
Name: "persist_latency_microseconds", Name: "persist_latency_microseconds",
Help: "A summary of latencies for persisting each chunk.", Help: "A summary of latencies for persisting each chunk.",
}), }),
persistErrors: prometheus.NewCounterVec( persistErrors: prometheus.NewCounter(prometheus.CounterOpts{
prometheus.CounterOpts{ Namespace: namespace,
Namespace: namespace, Subsystem: subsystem,
Subsystem: subsystem, Name: "persist_errors_total",
Name: "persist_errors_total", Help: "The total number of errors while persisting chunks.",
Help: "A counter of errors persisting chunks.", }),
},
[]string{"error"},
),
persistQueueLength: prometheus.NewGauge(prometheus.GaugeOpts{ persistQueueLength: prometheus.NewGauge(prometheus.GaugeOpts{
Namespace: namespace, Namespace: namespace,
Subsystem: subsystem, Subsystem: subsystem,
@ -536,7 +533,7 @@ func (s *memorySeriesStorage) handlePersistQueue() {
s.fpLocker.Unlock(req.fingerprint) s.fpLocker.Unlock(req.fingerprint)
s.persistLatency.Observe(float64(time.Since(start)) / float64(time.Microsecond)) s.persistLatency.Observe(float64(time.Since(start)) / float64(time.Microsecond))
if err != nil { if err != nil {
s.persistErrors.WithLabelValues(err.Error()).Inc() s.persistErrors.Inc()
glog.Error("Error persisting chunk: ", err) glog.Error("Error persisting chunk: ", err)
s.persistence.setDirty(true) s.persistence.setDirty(true)
continue continue
@ -857,7 +854,7 @@ func (s *memorySeriesStorage) Describe(ch chan<- *prometheus.Desc) {
s.persistence.Describe(ch) s.persistence.Describe(ch)
ch <- s.persistLatency.Desc() ch <- s.persistLatency.Desc()
s.persistErrors.Describe(ch) ch <- s.persistErrors.Desc()
ch <- s.persistQueueLength.Desc() ch <- s.persistQueueLength.Desc()
ch <- s.numSeries.Desc() ch <- s.numSeries.Desc()
s.seriesOps.Describe(ch) s.seriesOps.Describe(ch)
@ -874,7 +871,7 @@ func (s *memorySeriesStorage) Collect(ch chan<- prometheus.Metric) {
s.persistence.Collect(ch) s.persistence.Collect(ch)
ch <- s.persistLatency ch <- s.persistLatency
s.persistErrors.Collect(ch) ch <- s.persistErrors
ch <- s.persistQueueLength ch <- s.persistQueueLength
ch <- s.numSeries ch <- s.numSeries
s.seriesOps.Collect(ch) s.seriesOps.Collect(ch)

Loading…
Cancel
Save