Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prometheus: Add speculative block metrics #1502

Merged
merged 7 commits into from
Aug 18, 2023
Merged

Prometheus: Add speculative block metrics #1502

merged 7 commits into from
Aug 18, 2023

Conversation

heifner
Copy link
Member

@heifner heifner commented Aug 16, 2023

Added speculative block metrics:

total_time_us_produced_block - total time for produced block
idle_time_us_produced_block - idle time for produced block
num_success_trx_produced_block - number of successful transactions in produced block
success_trx_time_us_produced_block - time for successful transactions in produced block
num_failed_trx_produced_block - number of failed transactions during produced block
fail_trx_time_us_produced_block - time for failed transactions during produced block
num_transient_trx_produced_block - number of transient transactions during produced block
transient_trx_time_us_produced_block -time for transient transactions during produced block
other_time_us_produced_block - all other unaccounted time during produced block
block_num - current block number
blocks_speculative_num - number of speculative blocks created
total_time_us_speculative_block - total time for speculative block
idle_time_us_speculative_block - idle time for speculative block
num_success_trx_speculative_block - number of successful transactions in speculative block
success_trx_time_us_speculative_block - time for successful transactions in speculative block
num_failed_trx_speculative_block - number of failed transactions during speculative block
fail_trx_time_us_speculative_block - time for failed transactions during speculative block
num_transient_trx_speculative_block - number of transient transactions during speculative block
transient_trx_time_us_speculative_block - time for transient transactions during speculative block
other_time_us_speculative_block - all other unaccounted time during speculative block

Added the following to produced blocks:

nodeos_produced_elapsed_us_total - total produced blocks elapsed time
nodeos_produced_us_total - total produced blocks total time

Added the following to incoming blocks:

nodeos_incoming_elapsed_us_total - total incoming blocks elapsed time
nodeos_incoming_us_total - total incoming blocks total time
nodeos_incoming_us_block_latency - total incoming block latency

Resolves #1359

@heifner heifner added the OCI Work exclusive to OCI team label Aug 16, 2023
plugins/prometheus_plugin/metrics.hpp Outdated Show resolved Hide resolved
plugins/prometheus_plugin/metrics.hpp Outdated Show resolved Hide resolved
@@ -52,20 +52,42 @@ struct catalog_type {
Gauge& last_irreversible;
Gauge& head_block_num;

struct block_metrics {
Counter& num_blocks;
Gauge& block_num;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find block_num and num_blocks confusing naming. On lines 124 and 125 there is explanation. I suggest to name them accordingly to be self-descriptive. Something like that or maybe you have better ideas:
num_blocks -> produced_blocks_num
block_num -> cur_block_num

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed

@heifner heifner merged commit a640639 into main Aug 18, 2023
22 checks passed
@heifner heifner deleted the GH-1359-prometheus branch August 18, 2023 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add idle data to nodeos 5.0 prometheus exporter
3 participants