mirror of
https://github.com/libp2p/go-libp2p-resource-manager.git
synced 2025-01-27 12:50:07 +08:00
Remove connid from scopename in blocked conns
This commit is contained in:
parent
1c172ace77
commit
2385a33f55
@ -323,6 +323,8 @@ func (r StatsTraceReporter) ConsumeEvent(evt rcmgr.TraceEvt) {
|
||||
|
||||
// Only the top scope. We don't want to get the peerid here.
|
||||
scope := strings.SplitN(evt.Scope, ":", 2)[0]
|
||||
// Drop the connection or stream id
|
||||
scope = strings.SplitN(scope, "-", 2)[0]
|
||||
|
||||
tags := []tag.Mutator{tag.Upsert(Scope, scope), tag.Upsert(Resource, resource)}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user