Skip to content

feat(dashboard): improve java-tron Grafana dashboards usability - #126

Open
warku123 wants to merge 2 commits into
tronprotocol:developfrom
warku123:feature/sync-grafana-dashboards
Open

feat(dashboard): improve java-tron Grafana dashboards usability#126
warku123 wants to merge 2 commits into
tronprotocol:developfrom
warku123:feature/sync-grafana-dashboards

Conversation

@warku123

Copy link
Copy Markdown

What does this PR do?

Improves the java-tron Grafana dashboard templates with more useful panels, expression fixes, and removal of panels that don't work well in practice.

java-tron-server.json (46 → 69 panels):

  • Adds 24 new panels across existing rows: Tx TPS breakdown (broadcast/block), Block fork count, Block miss change, SR block latency, Block process latency from broadcast, Block fetch latency, Transaction process latency by smart contract, a low-transaction-block table (blocks with ≤20 txs per miner in the selected range), per-DB level panels, JVM memory usage rate, storage overview, etc.
  • Fixes Transaction Process Latency panel: switches iraterate (irate only uses the last two scrape points and produces spiky, noisy curves), restores the type="block" filter (without it, every contract renders two same-named series — the trx broadcast pre-execution path and the block in-block path — making the legend unreadable), and adds group/instance scoping.
  • Fixes Block Push Latency panel: the average query was missing its / rate(..._count[...]) divisor, so the "avg" series was actually avg × block rate.
  • Reworks SR Set panels: expands the SR Set row and changes both panels from cumulative-since-process-start to $__range-windowed semantics (increase(...)[$__range]), so they show SR changes within the selected time range instead of monotonically growing counters; drops the arbitrary 5/10 thresholds.
  • Removes panels that don't hold up in practice: P95/P99 Block Transaction Count (per-miner quantiles degenerate to single-sample noise — each SR produces ~1 block per 81s, shorter than the typical rate window — and the 300/500/2000 bucket granularity makes P99 interpolation meaningless), Avg Transactions per Block (redundant with Transaction Cnt Per Block), 4 legacy Transaction TPS panels (replaced by the TPS breakdown), the old Block Process Latency panel (replaced by "From Broadcast"), and the System row (OS metrics are covered by the Node Exporter Full dashboard).
  • DB size panels: drops the type="LEVELDB" filter (9 panels) so RocksDB-backed instances render data.
  • TCP Traffic Rate/s: adds group/instance scoping to avoid cross-instance legend mixing.

java-tron-api.json / java-tron-mechanism.json: instance variable now cascades from group (label_values({group="$group"}, instance)); api panel 99 scrape interval fixed from 1s to 60s.

java-tron-api-statistic.json: adds an instance variable for parity with the other dashboards.

Why are these changes required?

Several existing panels have expression bugs (missing divisor, missing filters, noisy irate) or rely on metric semantics that don't produce useful output (per-miner quantiles, cumulative counters). The new panels cover gaps operators frequently need: per-miner block quality, TPS composition, DB growth per level, and SR set churn.

This PR has been tested by:

  • Live Prometheus queries against mainnet fullnode/SR instances confirming every new/fixed panel returns expected data
  • JSON validity + layout checks (no duplicate panel ids, no overlapping grid positions)

Extra details

  • All PromQL queries follow the existing dashboard conventions ($group, $instance, $__rate_interval).
  • All panels use metric families already exported by java-tron (tron:block_transaction_count, tron:sr_set_change, tron:db_size_bytes, etc.) — no java-tron changes required.

…boards

- java-tron-server: add 24 panels (TPS breakdown, block fork/miss
  change, SR block latency, block process latency from broadcast,
  block fetch latency, transaction process latency by contract,
  low-transaction-block table, per-DB level panels, JVM memory usage
  rate, storage overview); fix Transaction Process Latency expression
  (rate + type=block + group/instance filters); fix Block Push Latency
  avg (add missing /rate(count)); expand SR Set row with range-based
  add/remove semantics; drop panels superseded by better equivalents
  (P95/P99 Block Transaction Count, Avg Transactions per Block, legacy
  Transaction TPS, Block Process Latency, Memory Usage Rate, System
  section)
- java-tron-api/mechanism: cascade instance variable by group
- java-tron-api: panel 99 HTTP QPS interval 1s -> 60s
- java-tron-api-statistic: add instance variable for parity
…e filter to TCP Traffic

- DB size panels: remove type="LEVELDB" so RocksDB-backed instances render
- TCP Traffic Rate/s: scope by group+instance to avoid cross-instance legend mixing
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.

1 participant