Skip to content

Commit

Permalink
fix: bring back metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
tchardin committed Feb 27, 2024
1 parent 0bcd84b commit f486863
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions op-node/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/ethereum/go-ethereum/params"

"github.com/ethereum-optimism/optimism/op-node/p2p/store"
plasma "github.com/ethereum-optimism/optimism/op-plasma"

// plasma "github.com/ethereum-optimism/optimism/op-plasma"
ophttp "github.com/ethereum-optimism/optimism/op-service/httputil"
"github.com/ethereum-optimism/optimism/op-service/metrics"

Expand Down Expand Up @@ -124,7 +124,7 @@ type Metrics struct {

TransactionsSequencedTotal prometheus.Counter

// PlasmaMetrics plasma.Metricer
PlasmaMetrics plasma.Metricer

// Channel Bank Metrics
headChannelOpenedEvent *metrics.Event
Expand Down Expand Up @@ -388,7 +388,7 @@ func NewMetrics(procName string) *Metrics {
"required",
}),

// PlasmaMetrics: plasma.MakeMetrics(ns, factory),
PlasmaMetrics: plasma.MakeMetrics(ns, factory),

registry: registry,
factory: factory,
Expand Down
2 changes: 1 addition & 1 deletion op-node/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ func (n *OpNode) initL2(ctx context.Context, cfg *Config, snapshotLog log.Logger
if cfg.Plasma.Enabled && err != nil {
return fmt.Errorf("failed to get plasma config: %w", err)
}
plasmaDA := plasma.NewPlasmaDA(n.log, cfg.Plasma, rpCfg, n.l1Source, &plasma.NoopMetrics{})
plasmaDA := plasma.NewPlasmaDA(n.log, cfg.Plasma, rpCfg, n.l1Source, n.metrics.PlasmaMetrics)
if cfg.Plasma.Enabled {
n.log.Info("Plasma DA enabled", "da_server", cfg.Plasma.DAServerURL)
// Plasma takes control of the engine finalization signal callback only when enabled
Expand Down

0 comments on commit f486863

Please sign in to comment.