Skip to content

Commit

Permalink
REVERT ME cleanup [goreleaser]
Browse files Browse the repository at this point in the history
  • Loading branch information
trajan0x committed Jun 29, 2024
1 parent 689120a commit 41410d0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ethergo/submitter/submitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import (
"context"
"errors"
"fmt"
"github.com/brianvoe/gofakeit/v6"
"go.opentelemetry.io/otel/metric"
"math"
"math/big"
"reflect"
Expand Down Expand Up @@ -132,6 +134,17 @@ func (t *txSubmitterImpl) Start(parentCtx context.Context) (err error) {
return fmt.Errorf("could not create otel recorder: %w", err)
}

yo := t.metrics.Meter("submitter")
r, err := yo.Int64ObservableGauge("num_pending_txes")
if err != nil {
return fmt.Errorf("could not create num pending txes gauge: %w", err)
}

yo.RegisterCallback(func(ctx context.Context, observer metric.Observer) error {
observer.ObserveInt64(r, gofakeit.Int64())
return nil
}, r)

// start reaper process
ctx, cancel := context.WithCancel(parentCtx)
go func() {
Expand Down

0 comments on commit 41410d0

Please sign in to comment.