Skip to content

Commit

Permalink
pass subscribe labels
Browse files Browse the repository at this point in the history
  • Loading branch information
pkieltyka committed Mar 30, 2024
1 parent d14166e commit 1eed224
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ethgas/ethgas.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ func (g *GasGauge) SuggestedPaidGasPrice() SuggestedGasPrice {
}

func (g *GasGauge) Subscribe() ethmonitor.Subscription {
return g.monitor.Subscribe()
return g.monitor.Subscribe("ethgas")
}

func (g *GasGauge) run() error {
sub := g.monitor.Subscribe()
sub := g.monitor.Subscribe("ethgas:run")
defer sub.Unsubscribe()

bidEMA := newEMAs(0.5)
Expand Down
3 changes: 2 additions & 1 deletion ethreceipts/ethreceipts.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ func (l *ReceiptsListener) Subscribe(filterQueries ...FilterQuery) Subscription
ch: channel.NewUnboundedChan[Receipt](2, 5000, channel.Options{
Logger: l.log,
Alerter: l.alert,
Label: "ethreceipts:subscriber",
}),
done: make(chan struct{}),
finalizer: &finalizer{
Expand Down Expand Up @@ -458,7 +459,7 @@ func (l *ReceiptsListener) fetchTransactionReceipt(ctx context.Context, txnHash
}

func (l *ReceiptsListener) listener() error {
monitor := l.monitor.Subscribe()
monitor := l.monitor.Subscribe("ethreceipts")
defer monitor.Unsubscribe()

latestBlockNum := l.latestBlockNum().Uint64()
Expand Down

0 comments on commit 1eed224

Please sign in to comment.