Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rcmgr: use default libp2p rcmgr metrics #9947

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 7 additions & 6 deletions core/node/libp2p/rcmgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
"os"
"path/filepath"

"github.com/ipfs/kubo/config"
"github.com/ipfs/kubo/core/node/helpers"
"github.com/ipfs/kubo/repo"

"github.com/benbjohnson/clock"
logging "github.com/ipfs/go-log/v2"
"github.com/libp2p/go-libp2p"
Expand All @@ -15,11 +19,8 @@
"github.com/libp2p/go-libp2p/core/protocol"
rcmgr "github.com/libp2p/go-libp2p/p2p/host/resource-manager"
"github.com/multiformats/go-multiaddr"
"github.com/prometheus/client_golang/prometheus"
"go.uber.org/fx"

"github.com/ipfs/kubo/config"
"github.com/ipfs/kubo/core/node/helpers"
"github.com/ipfs/kubo/repo"
)

var rcmgrLogger = logging.Logger("rcmgr")
Expand Down Expand Up @@ -73,8 +74,8 @@
if err != nil {
return nil, opts, err
}

ropts := []rcmgr.Option{rcmgr.WithMetrics(createRcmgrMetrics()), rcmgr.WithTraceReporter(str)}
rcmgrObs.MustRegisterWith(prometheus.DefaultRegisterer)

Check failure on line 77 in core/node/libp2p/rcmgr.go

View workflow job for this annotation

GitHub Actions / go-test

undefined: rcmgrObs

Check failure on line 77 in core/node/libp2p/rcmgr.go

View workflow job for this annotation

GitHub Actions / go-build

undefined: rcmgrObs

Check failure on line 77 in core/node/libp2p/rcmgr.go

View workflow job for this annotation

GitHub Actions / interop-prep

undefined: rcmgrObs

Check failure on line 77 in core/node/libp2p/rcmgr.go

View workflow job for this annotation

GitHub Actions / go-check

undefined: rcmgrObs

Check failure on line 77 in core/node/libp2p/rcmgr.go

View workflow job for this annotation

GitHub Actions / go-check

undefined: rcmgrObs

Check failure on line 77 in core/node/libp2p/rcmgr.go

View workflow job for this annotation

GitHub Actions / docker-build

undefined: rcmgrObs

Check failure on line 77 in core/node/libp2p/rcmgr.go

View workflow job for this annotation

GitHub Actions / go-lint

undefined: rcmgrObs) (typecheck)

Check failure on line 77 in core/node/libp2p/rcmgr.go

View workflow job for this annotation

GitHub Actions / go-lint

undefined: rcmgrObs) (typecheck)

Check failure on line 77 in core/node/libp2p/rcmgr.go

View workflow job for this annotation

GitHub Actions / go-lint

undefined: rcmgrObs) (typecheck)
ropts := []rcmgr.Option{rcmgr.WithTraceReporter(str)}

if len(cfg.ResourceMgr.Allowlist) > 0 {
var mas []multiaddr.Multiaddr
Expand Down
251 changes: 0 additions & 251 deletions core/node/libp2p/rcmgr_metrics.go

This file was deleted.