mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Use prometheus-compatible metric naming
This commit is contained in:
parent
d3db48a1fd
commit
2de8060f2c
1 changed files with 3 additions and 0 deletions
|
|
@ -100,6 +100,7 @@ func (c *prometheusClient) Count(name string, value int64, rate float64) {
|
|||
|
||||
var counter prometheus.Counter
|
||||
var ok bool
|
||||
name = strings.Replace(name, ".", "_", -1)
|
||||
labels := c.labels()
|
||||
opts := prometheus.CounterOpts{
|
||||
Namespace: namespace,
|
||||
|
|
@ -148,6 +149,7 @@ func (c *prometheusClient) Gauge(name string, value float64, rate float64) {
|
|||
|
||||
var gauge prometheus.Gauge
|
||||
var ok bool
|
||||
name = strings.Replace(name, ".", "_", -1)
|
||||
labels := c.labels()
|
||||
opts := prometheus.GaugeOpts{
|
||||
Namespace: namespace,
|
||||
|
|
@ -187,6 +189,7 @@ func (c *prometheusClient) Histogram(name string, value float64, rate float64) {
|
|||
|
||||
var observer prometheus.Observer
|
||||
var ok bool
|
||||
name = strings.Replace(name, ".", "_", -1)
|
||||
labels := c.labels()
|
||||
opts := prometheus.SummaryOpts{
|
||||
Namespace: namespace,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue