graphprotocol / graphprotocol/graph-node

[Bug] No rpc metrics for non-`eth_getLogs` calls

Open
#4,690 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Stale
Dominant language
Rust
Stars
3.2k
Forks
1.1k
Avg merge
4d 1h
Merged PRs (30d)
1

Description

Bug report

I'm running graph node version 0.31.0 (recently upgraded from 0.29.0) and I don't see any metrics for rpc calls other than getLogs over the past month

image

I'm running 15+ indexers with ~3k subgraphs.

I tried checking my datadog agent to see if there's some rate limiting happening at the agent level and nothing stood out to me. I tried curl-ing the metrics endpoints for a few of my graph nodes, and none of them had non-eth_getLogs values. I see the following when I curl the metrics endpoint

# HELP eth_rpc_request_duration Measures eth rpc request duration
# TYPE eth_rpc_request_duration histogram
eth_rpc_request_duration_bucket{method="eth_getLogs",provider="arbitrum-one-default",le="0.05"} 597
eth_rpc_request_duration_bucket{method="eth_getLogs",provider="arbitrum-one-default",le="0.1"} 1224
eth_rpc_request_duration_bucket{method="eth_getLogs",provider="arbitrum-one-default",le="0.2"} 3323
eth_rpc_request_duration_bucket{method="eth_getLogs",provider="arbitrum-one-default",le="0.4"} 3506
eth_rpc_request_duration_bucket{method="eth_getLogs",provider="arbitrum-one-default",le="0.8"} 3631
eth_rpc_request_duration_bucket{method="eth_getLogs",provider="arbitrum-one-default",le="1.6"} 3634
eth_rpc_request_duration_bucket{method="eth_getLogs",provider="arbitrum-one-default",le="3.2"} 3634
eth_rpc_request_duration_bucket{method="eth_getLogs",provider="arbitrum-one-default",le="6.4"} 3634
eth_rpc_request_duration_bucket{method="eth_getLogs",provider="arbitrum-one-default",le="12.8"} 3634
eth_rpc_request_duration_bucket{method="eth_getLogs",provider="arbitrum-one-default",le="25.6"} 3634
eth_rpc_request_duration_bucket{method="eth_getLogs",provider="arbitrum-one-default",le="+Inf"} 3634
eth_rpc_request_duration_sum{method="eth_getLogs",provider="arbitrum-one-default"} 472.76402704999924
eth_rpc_request_duration_count{method="eth_getLogs",provider="arbitrum-one-default"} 3634

I did more digging and I found another metric, endpoint_request which isn't documented in the metrics doc which seems to have more up to date info like the following

# HELP endpoint_request successfull request
# TYPE endpoint_request counter
endpoint_request{conn_type="firehose",provider="goldsky-firehose-goerli",req_type="unknown",result="success"} 1859
endpoint_request{conn_type="firehose",provider="goldsky-firehose-mainnet",req_type="unknown",result="success"} 141
endpoint_request{conn_type="firehose",provider="streamingfast-firehose-bsc",req_type="unknown",result="success"} 23
endpoint_request{conn_type="firehose",provider="streamingfast-firehose-goerli",req_type="unknown",result="success"} 20
endpoint_request{conn_type="firehose",provider="streamingfast-firehose-mainnet",req_type="unknown",result="failure"} 1
endpoint_request{conn_type="firehose",provider="streamingfast-firehose-mainnet",req_type="unknown",result="success"} 228
endpoint_request{conn_type="firehose",provider="streamingfast-firehose-matic",req_type="unknown",result="success"} 25
endpoint_request{conn_type="rpc",provider="arbitrum-goerli-archive",req_type="eth_getBlockByNumber",result="success"} 1
endpoint_request{conn_type="rpc",provider="arbitrum-goerli-archive",req_type="net_version",result="success"} 1
endpoint_request{conn_type="rpc",provider="arbitrum-goerli-archive",req_type="web3_clientVersion",result="success"} 1
endpoint_request{conn_type="rpc",provider="arbitrum-goerli-default",req_type="eth_chainId",result="success"} 2
endpoint_request{conn_type="rpc",provider="arbitrum-goerli-default",req_type="eth_getBlockByHash",result="failure"} 68
endpoint_request{conn_type="rpc",provider="arbitrum-goerli-default",req_type="eth_getBlockByHash",result="success"} 9582
endpoint_request{conn_type="rpc",provider="arbitrum-goerli-default",req_type="eth_getBlockByNumber",result="failure"} 26
endpoint_request{conn_type="rpc",provider="arbitrum-goerli-default",req_type="eth_getBlockByNumber",result="success"} 3420
endpoint_request{conn_type="rpc",provider="arbitrum-goerli-default",req_type="eth_getTransactionReceipt",result="failure"} 100
endpoint_request{conn_type="rpc",provider="arbitrum-goerli-default",req_type="eth_getTransactionReceipt",result="success"} 24571
endpoint_request{conn_type="rpc",provider="arbitrum-goerli-default",req_type="net_version",result="success"} 1
endpoint_request{conn_type="rpc",provider="arbitrum-goerli-default",req_type="web3_clientVersion",result="success"} 1
endpoint_request{conn_type="rpc",provider="arbitrum-goerli-traces",req_type="eth_getBlockByNumber",result="success"} 1
endpoint_request{conn_type="rpc",provider="arbitrum-goerli-traces",req_type="net_version",result="success"} 1
endpoint_request{conn_type="rpc",provider="arbitrum-goerli-traces",req_type="web3_clientVersion",result="success"} 1
endpoint_request{conn_type="rpc",provider="arbitrum-nova",req_type="eth_getBlockByHash",result="success"} 8394
endpoint_request{conn_type="rpc",provider="arbitrum-nova",req_type="eth_getBlockByNumber",result="success"} 4065
endpoint_request{conn_type="rpc",provider="arbitrum-nova",req_type="eth_getTransactionReceipt",result="success"} 17247
endpoint_request{conn_type="rpc",provider="arbitrum-nova",req_type="net_version",result="success"} 1
endpoint_request{conn_type="rpc",provider="arbitrum-nova",req_type="web3_clientVersion",result="success"} 1
endpoint_request{conn_type="rpc",provider="arbitrum-nova-archive",req_type="eth_getBlockByNumber",result="success"} 1
endpoint_request{conn_type="rpc",provider="arbitrum-nova-archive",req_type="net_version",result="success"} 1
endpoint_request{conn_type="rpc",provider="arbitrum-nova-archive",req_type="web3_clientVersion",result="success"} 1
Relevant log output

No response

IPFS hash

No response

Subgraph name or link to explorer

No response

Some information to help us out
  • Tick this box if this bug is caused by a regression found in the latest release.
  • Tick this box if this bug is specific to the hosted service.
  • I have searched the issue tracker to make sure this issue is not a duplicate.
OS information

None

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading docs/metrics.md and reproducing the report with the metrics endpoint, comparing eth_rpc_request_duration with the endpoint_request samples shown here. Trace how these metrics represent non-eth_getLogs RPC calls; done means the relevant RPC activity is exposed consistently and the documented metrics match the endpoint output.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.