FuelLabs / fuel-core

Rust full node implementation of the Fuel v2 protocol.
Other
58.07k stars 2.77k forks source link

Fuel-Executor Metrics #807

Open ControlCplusControlV opened 1 year ago

ControlCplusControlV commented 1 year ago

Scope changes:

The following metrics will be added

The following metric will not be added as a part of this issue. We will discuss if we want some more sophisticated mechanism to measure other operations that touch DB

The following metric will not be added

cc: @acerone85 @MitchTurner

rafal-ch commented 2 days ago

Question regarding "histogram: I/O (db) time per block" - what we actually try to measure here?

Are we interested in how much time was spent on the DB operations in Importer::execute_and_commit?

This would require measuring call-chain such as:

And then, next to

importer_metrics().execute_and_commit_duration.observe(time);

we can add

importer_metrics().execute_and_commit_db_duration.observe(time);

Alternatively, we might want to work on a generic method of opt-in for measured DB reads, like trait MeasuredStorageInspect or similar.


Any opinions? @xgreenx @acerone85

acerone85 commented 2 days ago

The gas price is not available from the block importer, but rather from the producer. Should we add metrics for the block producer too @MitchTurner?

rafal-ch commented 2 days ago

Also, what would be the suggested values for FEE_BUCKETS and GAS_PRICE_BUCKETS buckets.

rymnc commented 2 days ago

Also, what would be the suggested values for FEE_BUCKETS and GAS_PRICE_BUCKETS buckets.

cc: @MitchTurner

MitchTurner commented 2 days ago

The gas price is not available from the block importer, but rather from the producer. Should we add metrics for the block producer too @MitchTurner?

Perhaps we put the metrics on the gas-price-service since it holds the most context? It's available from the producer, the tx-pool, and graphql, but they all get it served from the gas price service.

rafal-ch commented 1 day ago

As for now, we're not gonna be doing the "gas price" metric. Rationale: Since we don't have DA gas price yet, we can derive the total gas price from gas used and fee.