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

DEVOPS-829 format fix for prometheus metrics #881

Merged
merged 2 commits into from
Jun 1, 2023

Conversation

rekibnikufesin
Copy link
Contributor

Description

This PR changes the format of summary and histogram metrics as exposed by the metrics endpoint to adhere to the Prometheus metric type definitions as seen here

Prior to this change, a summary type metric would be exposed on the endpoint as two distinct metrics:

# TYPE chain_validation_count counter
chain_validation_count 397884

# TYPE chain_validation summary
chain_validation {quantile="0.5"} 199349
chain_validation {quantile="0.75"} 270883.5
chain_validation {quantile="0.95"} 460101.04999999993
chain_validation {quantile="0.99"} 641909.1200000001
chain_validation {quantile="0.999"} 1.0424829650000001e+06
chain_validation {quantile="0.9999"} 1.043075e+06

This PR updates the metric to display as:

# TYPE chain_validation summary
chain_validation {quantile="0.5"} 199349
chain_validation {quantile="0.75"} 270883.5
chain_validation {quantile="0.95"} 460101.04999999993
chain_validation {quantile="0.99"} 641909.1200000001
chain_validation {quantile="0.999"} 1.0424829650000001e+06
chain_validation {quantile="0.9999"} 1.043075e+06
chain_validation_sum some_sum_of_the_values_measured
chain_validation_count 397884

These metrics are affected by the change: chain_account, chain_account_hashes, chain_account_reads, chain_account_updates, chain_execution, chain_inserts, chain_prefetch_executes, chain_snapshot_account_reads, chain_snapshot_commits, chain_snapshot_storage_reads, chain_storage_commits, chain_storage_hashes, chain_storage_reads, chain_storage_updates, chain_validation, chain_write, client_requests_checkpoint_duration, client_requests_checkpointcount_duration, client_requests_span_duration, client_requests_statesync_duration, eth_downloader_bodies_req, eth_downloader_headers_req, eth_downloader_receipts_req, eth_fetcher_block_announces_out, eth_fetcher_block_broadcasts_out, les_client_req_rtt, les_client_req_sendDelay, les_connection_duration, les_misc_serve_body, les_misc_serve_code, les_misc_serve_header, les_misc_serve_helperTrie, les_misc_serve_proof, les_misc_serve_receipt, les_misc_serv_txStatus, les_misc_serve_txs, les_server_blockProcessingTime, les_server_req_estimatedTime, les_server_req_relative, les_server_req_relative_body, les_server_req_relative_code, les_server_req_relative_header, les_server_req_relative_helperTrie, les_server_req_relative_proof, les_server_req_relative_receipt, les_server_req_relative_txStatus, les_server_req_relative_txs, les_server_req_servedTime, p2p_handle_eth_66_0x01-p2p_handle_eth_66_0x0a, rpc_duration_all, rpc_duration_eth_getBlockByNumber, rpc_duration_eth_getRootHash_success, state_snapshot_bloom_index, state_snapshot_dirty_account_hit_depth, state_snapshot_dirty_storage_hit_depth, trie_memcache_gc_time, txpool_dropbetweenreorg, txpool_reheap, txpool_reorgtime

Changes

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)
  • Changes only for a subset of nodes

Checklist

  • I have added at least 2 reviewer or the whole pos-v1 team
  • I have added sufficient documentation in code
  • I will be resolving comments - if any - by pushing each fix in a separate commit and linking the commit hash in the comment reply

Testing

  • I have added unit tests
  • I have added tests to CI
  • I have tested this code manually on local environment
  • I have tested this code manually on remote devnet using express-cli
  • I have tested this code manually on mumbai
  • I have created new e2e tests into express-cli

@rekibnikufesin rekibnikufesin requested a review from a team May 31, 2023 21:55
@codecov
Copy link

codecov bot commented May 31, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.41 🎉

Comparison is base (c404b3f) 56.82% compared to head (9c1b905) 57.24%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #881      +/-   ##
===========================================
+ Coverage    56.82%   57.24%   +0.41%     
===========================================
  Files          617      617              
  Lines        73592   105323   +31731     
===========================================
+ Hits         41820    60293   +18473     
- Misses       28228    41396   +13168     
- Partials      3544     3634      +90     
Impacted Files Coverage Δ
metrics/prometheus/collector.go 100.00% <100.00%> (ø)

... and 614 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@rekibnikufesin rekibnikufesin merged commit f1c8226 into develop Jun 1, 2023
@rekibnikufesin rekibnikufesin deleted the DEVOPS-829/prometheus-metrics-format branch June 1, 2023 14:42
@pratikspatil024 pratikspatil024 restored the DEVOPS-829/prometheus-metrics-format branch June 6, 2023 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants