graph-node icon indicating copy to clipboard operation
graph-node copied to clipboard

Add IPFS usage metrics / extend logging / extend supported content path formats

Open isum opened this issue 6 months ago • 0 comments

This PR introduces the following improvements to IPFS:

  • Adds 4 new metrics grouped by deployment hashes:
    • ipfs_request_count - shows the total number of IPFS requests
    • ipfs_error_count - shows the total number of failed IPFS requests
    • ipfs_not_found_count - shows the total number of IPFS requests that timed out
    • ipfs_request_duration - shows the duration of successful IPFS requests
  • Fixes a minor bug that could cause the IPFS gateway client to fail during initialization
  • The IPFS content path parser now supports the following formats:
    • <CID>[/<path>]
    • /ipfs/<CID>[/<path>]
    • ipfs://<CID>[/<path>]
    • http[s]://.../ipfs/<CID>[/<path>]
    • http[s]://.../api/v0/cat?arg=<CID>[/<path>]
    • http[s]://.../<CID>[/<path>]
  • IPFS error logs now include more context, such as deployment hash and the requested IPFS path

Closes https://github.com/graphprotocol/graph-node/issues/6036

isum avatar Jun 12 '25 10:06 isum