ethereum / go-ethereum

Go implementation of the Ethereum protocol
https://geth.ethereum.org
GNU Lesser General Public License v3.0
47.73k stars 20.21k forks source link

Metrics options are ignored in config.toml #28303

Open VladStarr opened 1 year ago

VladStarr commented 1 year ago

System information

Geth version: 1.13.2-stable CL client & version: prysm v4.0.8 OS & Version: Linux Commit hash :

Expected behaviour

Options specified in config should enable metrics collection.

[Metrics]
Enabled = true
EnabledExpensive = true

Actual behaviour

These options are ignored. Metrics server starts on 6060 port, but metrics are all zeroes, unless --metrics CLI arg is specified.

Steps to reproduce the behaviour

Add this lines to config.toml

[Metrics]
Enabled = true
EnabledExpensive = true
HTTP = "0.0.0.0"
Port = 6060

Start geth with flags --pprof --pprof.port=6060 --pprof.addr=0.0.0.0

Go to /debug/metrics/prometheus endpoint and all metrics will be zeroes.

Backtrace

[backtrace]
holiman commented 1 year ago

Yes, this is a known issue. See for example https://github.com/ethereum/go-ethereum/issues/24178

wangyifan commented 1 year ago

I'll investigate the issue.