@@ -98,6 +98,9 @@ type ExecutionCollector struct {
9898 evmTransactionGasUsed prometheus.Histogram
9999 evmBlockTxCount prometheus.Histogram
100100 evmBlockGasUsed prometheus.Histogram
101+ callbacksExecutedCount prometheus.Histogram
102+ callbacksProcessGasUsed prometheus.Histogram
103+ callbacksExecuteGasLimits prometheus.Histogram
101104}
102105
103106func NewExecutionCollector (tracer module.Tracer ) * ExecutionCollector {
@@ -793,6 +796,30 @@ func NewExecutionCollector(tracer module.Tracer) *ExecutionCollector {
793796 Name : "evm_block_total_supply" ,
794797 Help : "the total amount of flow deposited to EVM (in FLOW)" ,
795798 }),
799+
800+ callbacksExecutedCount : promauto .NewHistogram (prometheus.HistogramOpts {
801+ Namespace : namespaceExecution ,
802+ Subsystem : subsystemRuntime ,
803+ Name : "callbacks_executed_count" ,
804+ Help : "the number of callbacks executed" ,
805+ Buckets : prometheus .ExponentialBuckets (1 , 2 , 8 ),
806+ }),
807+
808+ callbacksProcessGasUsed : promauto .NewHistogram (prometheus.HistogramOpts {
809+ Namespace : namespaceExecution ,
810+ Subsystem : subsystemRuntime ,
811+ Name : "callbacks_process_gas_used" ,
812+ Help : "the gas used by the process callback transaction" ,
813+ Buckets : prometheus .ExponentialBuckets (10_000 , 2 , 12 ),
814+ }),
815+
816+ callbacksExecuteGasLimits : promauto .NewHistogram (prometheus.HistogramOpts {
817+ Namespace : namespaceExecution ,
818+ Subsystem : subsystemRuntime ,
819+ Name : "callbacks_execute_gas_limits" ,
820+ Help : "the total gas limits for execute callback transactions" ,
821+ Buckets : prometheus .ExponentialBuckets (10_000 , 2 , 12 ),
822+ }),
796823 }
797824
798825 return ec
@@ -883,6 +910,13 @@ func (ec *ExecutionCollector) ExecutionScriptExecuted(dur time.Duration, compUse
883910 ec .scriptMemoryDifference .Observe (float64 (memoryEstimated ) - float64 (memoryUsed ))
884911}
885912
913+ // ExecutionCallbacksExecuted reports callback execution metrics
914+ func (ec * ExecutionCollector ) ExecutionCallbacksExecuted (callbackCount int , processGasUsed , executeGasLimits uint64 ) {
915+ ec .callbacksExecutedCount .Observe (float64 (callbackCount ))
916+ ec .callbacksProcessGasUsed .Observe (float64 (processGasUsed ))
917+ ec .callbacksExecuteGasLimits .Observe (float64 (executeGasLimits ))
918+ }
919+
886920// ExecutionStateStorageDiskTotal reports the total storage size of the execution state on disk in bytes
887921func (ec * ExecutionCollector ) ExecutionStateStorageDiskTotal (bytes int64 ) {
888922 ec .stateStorageDiskTotal .Set (float64 (bytes ))
0 commit comments