Skip to content

Commit

Permalink
add prometheus sink debug info
Browse files Browse the repository at this point in the history
Signed-off-by: zirain <[email protected]>
  • Loading branch information
zirain committed Sep 18, 2024
1 parent 28b1629 commit e608d62
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/stats/prom/prometheus_sink.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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),
Expand All @@ -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,
Expand Down

0 comments on commit e608d62

Please sign in to comment.