From b11bd31144383206e1e7a6660f68ae9fafb89bf0 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 21 Nov 2023 07:46:29 -0800 Subject: [PATCH] fix deprecations --- node/modules/lp2p/rcmgr.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/node/modules/lp2p/rcmgr.go b/node/modules/lp2p/rcmgr.go index 0035ed05b..f2b284986 100644 --- a/node/modules/lp2p/rcmgr.go +++ b/node/modules/lp2p/rcmgr.go @@ -15,7 +15,6 @@ import ( "github.com/libp2p/go-libp2p/core/peer" "github.com/libp2p/go-libp2p/core/protocol" rcmgr "github.com/libp2p/go-libp2p/p2p/host/resource-manager" - rcmgrObs "github.com/libp2p/go-libp2p/p2p/host/resource-manager/obs" "github.com/prometheus/client_golang/prometheus" "go.opencensus.io/stats" "go.opencensus.io/tag" @@ -113,13 +112,13 @@ func ResourceManager(connMgrHi uint) func(lc fx.Lifecycle, repo repo.LockedRepo) return nil, err } - str, err := rcmgrObs.NewStatsTraceReporter() + str, err := rcmgr.NewStatsTraceReporter() if err != nil { return nil, fmt.Errorf("error creating resource manager stats reporter: %w", err) } rcmgrMetricsOnce.Do(func() { - rcmgrObs.MustRegisterWith(prometheus.DefaultRegisterer) + rcmgr.MustRegisterWith(prometheus.DefaultRegisterer) }) // Metrics