Summary
tools/prometheus/rustchain_exporter.py parses EXPORTER_PORT, SCRAPE_INTERVAL, and REQUEST_TIMEOUT with module-level int(os.getenv(...)) calls.
If any of those environment variables are present but malformed, importing the exporter crashes before the service can start or report a useful configuration problem.
Impact
A single typo such as EXPORTER_PORT=not-a-port or REQUEST_TIMEOUT=NaN can turn a monitoring configuration mistake into an import-time crash. This is avoidable for an ops/monitoring tool where safe defaults already exist.
Expected
Numeric environment variables should fall back to the existing defaults when missing, empty, or malformed, without changing normal valid configuration behavior.
Scope
Small monitoring-tool hardening only. No node, wallet, transfer, reward, payout, admin-key, or production behavior changes.
Summary
tools/prometheus/rustchain_exporter.pyparsesEXPORTER_PORT,SCRAPE_INTERVAL, andREQUEST_TIMEOUTwith module-levelint(os.getenv(...))calls.If any of those environment variables are present but malformed, importing the exporter crashes before the service can start or report a useful configuration problem.
Impact
A single typo such as
EXPORTER_PORT=not-a-portorREQUEST_TIMEOUT=NaNcan turn a monitoring configuration mistake into an import-time crash. This is avoidable for an ops/monitoring tool where safe defaults already exist.Expected
Numeric environment variables should fall back to the existing defaults when missing, empty, or malformed, without changing normal valid configuration behavior.
Scope
Small monitoring-tool hardening only. No node, wallet, transfer, reward, payout, admin-key, or production behavior changes.