From f4868632a5b13fa24a15f75469f15ad6a9be8c13 Mon Sep 17 00:00:00 2001 From: tchardin Date: Tue, 27 Feb 2024 13:29:14 -0600 Subject: [PATCH] fix: bring back metrics --- op-node/metrics/metrics.go | 6 +++--- op-node/node/node.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/op-node/metrics/metrics.go b/op-node/metrics/metrics.go index 81a16e462585..e44020f7894b 100644 --- a/op-node/metrics/metrics.go +++ b/op-node/metrics/metrics.go @@ -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" @@ -124,7 +124,7 @@ type Metrics struct { TransactionsSequencedTotal prometheus.Counter - // PlasmaMetrics plasma.Metricer + PlasmaMetrics plasma.Metricer // Channel Bank Metrics headChannelOpenedEvent *metrics.Event @@ -388,7 +388,7 @@ func NewMetrics(procName string) *Metrics { "required", }), - // PlasmaMetrics: plasma.MakeMetrics(ns, factory), + PlasmaMetrics: plasma.MakeMetrics(ns, factory), registry: registry, factory: factory, diff --git a/op-node/node/node.go b/op-node/node/node.go index dacea23e0f8f..565eca16e772 100644 --- a/op-node/node/node.go +++ b/op-node/node/node.go @@ -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