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
This commit is contained in:
Marcin Rataj 2025-07-08 21:02:57 +02:00
parent f17f89eefc
commit 9d19996dbd
No known key found for this signature in database
GPG Key ID: 222B6784D5A79E42

View File

@ -111,6 +111,7 @@ func Bitswap(serverEnabled, libp2pEnabled, httpEnabled bool) interface{} {
httpnet.WithInsecureSkipVerify(httpCfg.TLSInsecureSkipVerify.WithDefault(config.DefaultHTTPRetrievalTLSInsecureSkipVerify)),
httpnet.WithMaxBlockSize(int64(maxBlockSize)),
httpnet.WithUserAgent(version.GetUserAgentVersion()),
httpnet.WithMetricsLabelsForEndpoints(httpCfg.Allowlist),
)
bitswapNetworks = network.New(in.Host.Peerstore(), bitswapLibp2p, bitswapHTTP)
} else if libp2pEnabled {