Skip to content

Commit 9d19996

Browse files
committed
feat(httpnet): gather metrics for allowlist
this wires up ipfs/boxo#971 to make sure explicitly allowlisted hosts have their own metric label if we ever need more flexibility here, this can be exposed as a separate config
1 parent f17f89e commit 9d19996

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/node/bitswap.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ func Bitswap(serverEnabled, libp2pEnabled, httpEnabled bool) interface{} {
111111
httpnet.WithInsecureSkipVerify(httpCfg.TLSInsecureSkipVerify.WithDefault(config.DefaultHTTPRetrievalTLSInsecureSkipVerify)),
112112
httpnet.WithMaxBlockSize(int64(maxBlockSize)),
113113
httpnet.WithUserAgent(version.GetUserAgentVersion()),
114+
httpnet.WithMetricsLabelsForEndpoints(httpCfg.Allowlist),
114115
)
115116
bitswapNetworks = network.New(in.Host.Peerstore(), bitswapLibp2p, bitswapHTTP)
116117
} else if libp2pEnabled {

0 commit comments

Comments
 (0)