vendor go-metrics

This commit is contained in:
Chelsea Holland Komlo
2017-09-13 19:31:26 +00:00
parent d11a5da147
commit 34ff818cbb
2 changed files with 6 additions and 7 deletions

View File

@@ -66,8 +66,7 @@ func (p *PrometheusSink) SetGaugeWithLabels(parts []string, val float32, labels
ConstLabels: prometheusLabels(labels),
})
prometheus.MustRegister(g)
p.gauges[key] = g
panic("we shold be registering labels globally! " + key)
p.gauges[hash] = g
}
g.Set(float64(val))
}
@@ -89,7 +88,7 @@ func (p *PrometheusSink) AddSampleWithLabels(parts []string, val float32, labels
ConstLabels: prometheusLabels(labels),
})
prometheus.MustRegister(g)
p.summaries[key] = g
p.summaries[hash] = g
}
g.Observe(float64(val))
}
@@ -116,7 +115,7 @@ func (p *PrometheusSink) IncrCounterWithLabels(parts []string, val float32, labe
ConstLabels: prometheusLabels(labels),
})
prometheus.MustRegister(g)
p.counters[key] = g
p.counters[hash] = g
}
g.Add(float64(val))
}

6
vendor/vendor.json vendored
View File

@@ -87,10 +87,10 @@
"revisionTime": "2017-08-09T01:16:44Z"
},
{
"checksumSHA1": "sLK17mCfroZDH/jcaaEEodDWwjw=",
"checksumSHA1": "NER1U5W8xgC+tAxVUuEckTffFsE=",
"path": "github.com/armon/go-metrics/prometheus",
"revision": "023a4bbe4bb9bfb23ee7e1afc8d0abad217641f3",
"revisionTime": "2017-08-09T01:16:44Z"
"revision": "0a12dc6f6b9da6da644031a1b9b5a85478c5ee27",
"revisionTime": "2017-09-13T18:48:37Z"
},
{
"checksumSHA1": "gNO0JNpLzYOdInGeq7HqMZUzx9M=",