Skip to content

Commit

Permalink
Merge pull request #141 from ethpandaops/fix/processor-metrics
Browse files Browse the repository at this point in the history
fix(processor): dropped metrics
  • Loading branch information
Savid authored Jul 14, 2023
2 parents 78bd31f + 64e297b commit 019710e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/processor/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type Metrics struct {
name string

itemsQueued *prometheus.GaugeVec
itemsDropped *prometheus.CounterVec
itemsDropped *prometheus.GaugeVec
itemsExported *prometheus.CounterVec
}

Expand All @@ -23,7 +23,7 @@ func NewMetrics(namespace, name string) (*Metrics, error) {
Namespace: namespace,
Help: "Number of items queued",
}, []string{"processor"}),
itemsDropped: prometheus.NewCounterVec(prometheus.CounterOpts{
itemsDropped: prometheus.NewGaugeVec(prometheus.GaugeOpts{
Name: "items_dropped_total",
Namespace: namespace,
Help: "Number of items dropped",
Expand Down Expand Up @@ -59,7 +59,7 @@ func (m *Metrics) SetItemsQueued(count float64) {
}

func (m *Metrics) SetItemsDropped(count float64) {
m.itemsDropped.WithLabelValues(m.name).Add(count)
m.itemsDropped.WithLabelValues(m.name).Set(count)
}

func (m *Metrics) IncItemsExportedBy(count float64) {
Expand Down

0 comments on commit 019710e

Please sign in to comment.