Skip to content

feat(metrics): refine block_transaction_count buckets, add changelog#6730

Open
warku123 wants to merge 2 commits intotronprotocol:developfrom
warku123:feat/metrics-changelog
Open

feat(metrics): refine block_transaction_count buckets, add changelog#6730
warku123 wants to merge 2 commits intotronprotocol:developfrom
warku123:feat/metrics-changelog

Conversation

@warku123
Copy link
Copy Markdown
Contributor

@warku123 warku123 commented Apr 29, 2026

What does this PR do?

Two changes related to the metrics added in #6624:

  1. Refines the default histogram buckets for tron:block_transaction_count from [0, 10, 50, 100, 200, 500, 1000, 2000, 5000, 10000] to [0, 20, 50, 80, 100, 120, 140, 160, 180, 200, 230, 260, 300, 500, 2000], densifying the 0–300 range so percentile interpolation in the typical per-SR TPS range is more accurate. Per @Sunny6889's review on feat(metrics): add block transaction count and SR set change monitoring #6624.
  2. Introduces METRICS_CHANGELOG.md to track Prometheus metric additions, changes, and removals going forward, with a Pre-4.8.2 baseline snapshot of currently emitted metrics. Closes one of the post-merge follow-ups noted by @halibobo1205 on feat(metrics): add block transaction count and SR set change monitoring #6624.

Why are these changes required?

The bucket change makes the histogram useful for the workload it was designed to observe — most blocks fall under 300 tx, and the previous bucket layout was too coarse there to interpolate percentiles meaningfully. The changelog gives operators a single in-repo place to see what metrics each release adds or removes; today this information is scattered across release notes and the tron-docker metric_monitor/README.md.

Related to #6590 (closed when #6624 merged).

This PR has been tested by:

  • Unit Tests

Follow up

  • Update tron-docker metric_monitor/README.md to mirror the new metrics and the bucket change.

Extra details

The existing PrometheusApiServiceTest only queries the le="0.0" bucket (empty-block detection), which exists in both the old and new bucket arrays, so no test changes are needed.

Comment thread METRICS_CHANGELOG.md Outdated
Comment thread METRICS_CHANGELOG.md Outdated
Comment thread METRICS_CHANGELOG.md Outdated
@warku123 warku123 force-pushed the feat/metrics-changelog branch from afbeb57 to 7416f46 Compare May 6, 2026 03:07
…_CHANGELOG.md

Densify the default histogram buckets around 0-300 (the typical TPS
range) so percentile interpolation for per-SR throughput is more
accurate. New buckets: [0, 20, 50, 80, 100, 120, 140, 160, 180, 200,
230, 260, 300, 500, 2000].

Also introduce METRICS_CHANGELOG.md to track Prometheus metric
additions, changes, and removals going forward, with a Pre-4.8.2
baseline snapshot of currently emitted metrics.
@warku123 warku123 force-pushed the feat/metrics-changelog branch from 7416f46 to 4252888 Compare May 6, 2026 03:18
@warku123 warku123 changed the title docs(metrics): add METRICS_CHANGELOG.md feat(metrics): refine block_transaction_count buckets and add METRICS_CHANGELOG.md May 6, 2026
@warku123 warku123 changed the title feat(metrics): refine block_transaction_count buckets and add METRICS_CHANGELOG.md feat(metrics): refine block_transaction_count buckets, add changelog May 6, 2026
Comment thread METRICS_CHANGELOG.md Outdated
Replace the grafana.com/dashboards/16567 link with the maintained
JSON in tron-docker, per @Sunny6889's review on tronprotocol#6730. The community
dashboard 16567 is no longer being updated; the in-org JSON is the
current source of truth.
warku123 added a commit to warku123/tron-docker that referenced this pull request May 6, 2026
The block_transaction_count histogram buckets in java-tron are being
refined to [0, 20, 50, 80, 100, 120, 140, 160, 180, 200, 230, 260,
300, 500, 2000] (tronprotocol/java-tron#6730), densifying the 0-300
range for percentile interpolation in the typical per-SR TPS range.

Update the Block Transaction Count Distribution panel to match: the
old le="10.0" and le="1000.0" boundaries no longer exist in the
refined array, so those queries would return nothing. Adopt 9 legend
buckets aligned to the new boundaries (0, 1-20, 21-50, 51-100,
101-200, 201-300, 301-500, 501-2000, 2000+) so the panel makes use
of the added 0-300 resolution.
warku123 added a commit to warku123/tron-docker that referenced this pull request May 6, 2026
Update the documented bucket array for tron:block_transaction_count
to match the refined buckets in tronprotocol/java-tron#6730:
[0, 20, 50, 80, 100, 120, 140, 160, 180, 200, 230, 260, 300, 500,
2000]. Per @Sunny6889's review on this PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants