Skip to content

[metrics] Add gas fee telemetry series to charon-metrics exporter #301

@obchain

Description

@obchain

Tracking issue filed from PR #54 dashboard review (#283).

Scope

The Grafana dashboard (deploy/grafana/charon.json) omits a gas-fee panel because backing series do not exist. Add:

  • charon_gas_base_fee_wei (gauge) — latest observed EIP-1559 baseFee per block, labeled by chain
  • charon_gas_priority_fee_wei (gauge) — priority fee bid used for the last submission attempt
  • charon_gas_max_fee_wei (gauge) — maxFeePerGas on the last submission
  • charon_gas_ceiling_skips_total (counter) — opportunities dropped because gas cost exceeded the configured ceiling, labeled by reason

Emission site: crates/charon-executor/src/gas.rs (GasOracle::decide). Already returns GasDecision; wire metric updates inline.

Acceptance

  • New series registered in charon-metrics
  • GasOracle::decide updates series on every call
  • Dashboard panel added post-merge referencing these series

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlayer:rustRust crates (core / scanner / protocols / executor / cli)priority:p2-polishNice-to-have / polishstatus:readyScoped and ready to pick uptype:featureNew capability or deliverable

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions