From 24bb94f581d2a22f6164c35c2a3b82ce28bd6c11 Mon Sep 17 00:00:00 2001 From: zirain Date: Wed, 18 Sep 2024 13:17:18 +0800 Subject: [PATCH] add prometheus sink debug info --- src/stats/prom/prometheus_sink.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/stats/prom/prometheus_sink.go b/src/stats/prom/prometheus_sink.go index 58b27ece..2c93c49c 100644 --- a/src/stats/prom/prometheus_sink.go +++ b/src/stats/prom/prometheus_sink.go @@ -136,6 +136,7 @@ func NewPrometheusSink(opts ...prometheusSinkOption) gostats.Sink { } func (s *prometheusSink) FlushCounter(name string, value uint64) { + logrus.Debugf("FlushCounter: %s %d", name, value) s.events <- event.Events{&event.CounterEvent{ CMetricName: name, CValue: float64(value), @@ -144,6 +145,7 @@ func (s *prometheusSink) FlushCounter(name string, value uint64) { } func (s *prometheusSink) FlushGauge(name string, value uint64) { + logrus.Debugf("FlushGauge: %s %d", name, value) s.events <- event.Events{&event.GaugeEvent{ GMetricName: name, GValue: float64(value), @@ -152,6 +154,7 @@ func (s *prometheusSink) FlushGauge(name string, value uint64) { } func (s *prometheusSink) FlushTimer(name string, value float64) { + logrus.Debugf("FlushTimer: %s %v", name, value) s.events <- event.Events{&event.ObserverEvent{ OMetricName: name, OValue: value,