File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,10 @@ pub struct TransactionServiceMetrics {
44
44
pub blocks_until_inclusion : Histogram ,
45
45
/// How long transactions have spent in queue before being sent.
46
46
pub time_in_queue : Histogram ,
47
+ /// Maximum estimated fee per gas, in wei.
48
+ pub max_fee_per_gas : Histogram ,
49
+ /// Maximum estimated priority fee per gas, in wei.
50
+ pub max_priority_fee_per_gas : Histogram ,
47
51
}
48
52
49
53
/// Metrics of an individual signer, should be labeled with the signer address and chain ID.
Original file line number Diff line number Diff line change @@ -269,7 +269,10 @@ impl Signer {
269
269
/// See also [`FeeConfig::adjusted_eip1559_estimation`]
270
270
async fn estimate_eip1559_fees ( & self ) -> TransportResult < Eip1559Estimation > {
271
271
let fees = self . provider . estimate_eip1559_fees ( ) . await ?;
272
- Ok ( self . fees . adjusted_eip1559_estimation ( fees) )
272
+ let adjusted_fees = self . fees . adjusted_eip1559_estimation ( fees) ;
273
+ self . metrics . max_fee_per_gas . record ( adjusted_fees. max_fee_per_gas as f64 ) ;
274
+ self . metrics . max_priority_fee_per_gas . record ( adjusted_fees. max_priority_fee_per_gas as f64 ) ;
275
+ Ok ( adjusted_fees)
273
276
}
274
277
275
278
/// Invoked when a transaction is confirmed.
You can’t perform that action at this time.
0 commit comments