graphprotocol / graphprotocol/graph-node
[Bug] No rpc metrics for non-`eth_getLogs` calls
Nessuno ha ancora preso questa issue.
- Lingua principale
- Rust
- Stelle
- 3.2k
- Fork
- 1.1k
- Merge medio
- 4g 1h
- PR unite (30g)
- 1
Descrizione
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
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia leggendo docs/metrics.md e riproduci il report con il metrics endpoint, confrontando eth_rpc_request_duration con gli endpoint_request samples mostrati qui. Traccia il modo in cui queste metriche rappresentano le chiamate RPC diverse da eth_getLogs; il lavoro è completato quando l’attività RPC rilevante è esposta in modo coerente e le metriche documentate corrispondono all’output dell’endpoint.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- observability
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 30/100