Skip to content
1 change: 0 additions & 1 deletion bitswap/network/httpnet/httpnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ func New(host host.Host, opts ...Option) network.BitSwapNetwork {
opt(htnet)
}

// TODO: take allowlist into account!
htnet.metrics = newMetrics(htnet.allowlist)

reqTracker := newRequestTracker()
Expand Down
7 changes: 3 additions & 4 deletions bitswap/network/httpnet/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,9 @@ func newMetrics(endpoints map[string]struct{}) *metrics {

func (m *metrics) updateStatusCounter(method string, statusCode int, host string) {
m.RequestsTotal.Inc()
// Track all for the moment.
// if _, ok := m.trackedEndpoints[host]; !ok {
// host = "other"
// }
if _, ok := m.trackedEndpoints[host]; !ok {
host = "other"
}

var statusStr string

Expand Down
Loading