Skip to content

Commit

Permalink
chore(monitor/xfeemngr): add gas price buffer updates counter metric
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinhalliday committed Nov 14, 2024
1 parent 283c20e commit 0a1278e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions monitor/xfeemngr/gasprice/buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ func guageLive(chainID uint64, price uint64) {
// guageBuffered updates "buffered" guages for a chain's gas price.
func guageBuffered(chainID uint64, price uint64) {
bufferedGasPrice.WithLabelValues(chainName(chainID)).Set(float64(price))
bufferUpdates.WithLabelValues(chainName(chainID)).Inc()
}

// setPrice sets the buffered gas price for the given chainID.
Expand Down
7 changes: 7 additions & 0 deletions monitor/xfeemngr/gasprice/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ var (
Help: "Live gas price",
}, []string{"chain"})

bufferUpdates = promauto.NewCounterVec(prometheus.CounterOpts{
Namespace: "monitor",
Subsystem: "xfeemngr",
Name: "buffer_updates_total",
Help: "The total number of buffer updates",
}, []string{"chain"})

bufferedGasPrice = promauto.NewGaugeVec(prometheus.GaugeOpts{
Namespace: "monitor",
Subsystem: "xfeemngr",
Expand Down

0 comments on commit 0a1278e

Please sign in to comment.