rcmgr: move StatsTraceReporter to rcmgr package (#2388)

This commit is contained in:
Sukun
2023-06-28 11:23:44 +05:30
committed by GitHub
parent 1e31d70533
commit 173fef8a2e
8 changed files with 77 additions and 65 deletions

View File

@@ -26,7 +26,7 @@ import (
blankhost "github.com/libp2p/go-libp2p/p2p/host/blank"
"github.com/libp2p/go-libp2p/p2p/host/eventbus"
"github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem"
rcmgrObs "github.com/libp2p/go-libp2p/p2p/host/resource-manager/obs"
rcmgr "github.com/libp2p/go-libp2p/p2p/host/resource-manager"
routed "github.com/libp2p/go-libp2p/p2p/host/routed"
"github.com/libp2p/go-libp2p/p2p/net/swarm"
tptu "github.com/libp2p/go-libp2p/p2p/net/upgrader"
@@ -301,7 +301,7 @@ func (cfg *Config) NewNode() (host.Host, error) {
}
if !cfg.DisableMetrics {
rcmgrObs.MustRegisterWith(cfg.PrometheusRegisterer)
rcmgr.MustRegisterWith(cfg.PrometheusRegisterer)
}
h, err := bhost.NewHost(swrm, &bhost.HostOpts{