feat(httpnet): gather metrics for allowlist
this wires up https://github.com/ipfs/boxo/pull/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
Marcin Rataj committed
Jul 8, 2025 at 21:02 UTC
9d19996dbd3efd0aaef98a6ab32985221f7bf7cc
1 file changed
+1
core/node/bitswap.go
+1
@@ -111,6 +111,7 @@ func Bitswap(serverEnabled, libp2pEnabled, httpEnabled bool) interface{} {
111
httpnet.WithInsecureSkipVerify(httpCfg.TLSInsecureSkipVerify.WithDefault(config.DefaultHTTPRetrievalTLSInsecureSkipVerify)),
112
httpnet.WithMaxBlockSize(int64(maxBlockSize)),
113
httpnet.WithUserAgent(version.GetUserAgentVersion()),
114
+ httpnet.WithMetricsLabelsForEndpoints(httpCfg.Allowlist),
115
)
116
bitswapNetworks = network.New(in.Host.Peerstore(), bitswapLibp2p, bitswapHTTP)
117
} else if libp2pEnabled {