Skip to content

camel-jbang - TUI circuit breaker improvements and trace enhancements#23335

Merged
davsclaus merged 6 commits into
mainfrom
worktree-more-tui-2
May 20, 2026
Merged

camel-jbang - TUI circuit breaker improvements and trace enhancements#23335
davsclaus merged 6 commits into
mainfrom
worktree-more-tui-2

Conversation

@davsclaus
Copy link
Copy Markdown
Contributor

Summary

  • Add circuit breaker state machine diagram to TUI showing CLOSED/OPEN/HALF_OPEN transitions with allowed/rejected/probe terminology
  • Add live circuit breaker chart with failure rate bar, throughput sparkline (success/fail), and metrics panel showing total/fail/inflight/reject/mean/min/max and since-last success/fail
  • Add INFLIGHT column to circuit breaker table, route processor panel, and consumer tab (shows 0 when idle)
  • Add SINCE-LAST column to circuit breaker table
  • Rename PENDING to WINDOW in circuit breaker table
  • Fix badge indices for HTTP and circuit breaker tabs
  • Right-align ELAPSED and STEPS columns in trace tables
  • Unescape JSON values in inspect tab to avoid rendering garbage characters
  • Mark synthetic backlog tracer events as done immediately so elapsed doesn't keep growing

Test plan

  • Build succeeds with mvn install -DskipTests -q -pl dsl/camel-jbang/camel-jbang-plugin-tui
  • Run TUI monitor against a Camel integration with circuit breakers and verify:
    • Circuit breaker table shows WINDOW, INFLIGHT, SUCCESS, FAIL, RATE%, REJECT, SINCE-LAST columns
    • State diagram displays correctly with allowed/rejected/probe labels
    • Live chart shows failure rate bar and throughput sparkline
    • Metrics panel shows inflight counter and since-last durations
  • Verify processor panel on route tab shows INFLIGHT column with 0 values
  • Verify consumer tab shows 0 for inflight when idle
  • Verify trace tab ELAPSED and STEPS columns are right-aligned
  • Verify inspect tab shows unescaped JSON values

Claude Code on behalf of Claus Ibsen

🤖 Generated with Claude Code

davsclaus and others added 6 commits May 19, 2026 20:44
…ing garbage characters

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…does not keep growing

Synthetic trace events created by traceFirstNode/traceLastNode never had
doneProcessing() called, leaving the stopwatch running indefinitely. This
caused the elapsed value in message history to increase on every periodic
status dump, making the TUI inspect tab show a constantly updating elapsed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Shows an ASCII art state diagram below the circuit breaker table for the
selected entry, illustrating the three states (CLOSED/OPEN/HALF_OPEN),
their transitions, and what each state means. The active state is
highlighted in color. Metrics are shown below the diagram.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… bar, throughput sparkline, and metrics

Splits the circuit breaker detail panel horizontally: state diagram on the
left, live chart on the right. The chart includes a failure rate progress bar
(color-coded green/yellow/red), a mirrored sparkline showing success and fail
throughput over 60 seconds, and a metrics summary with total/fail/reject counts
and mean/min/max latency from processor statistics.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add inflight counter and since-last metrics to circuit breaker table
and chart metrics panel. Add inflight column to route processor panel
and consumer tab. Rename PENDING to WINDOW, update state diagram
terminology to use allowed/rejected/probe, and show 0 instead of
blank for inflight counters.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@davsclaus davsclaus force-pushed the worktree-more-tui-2 branch from efadd8e to 905d318 Compare May 19, 2026 18:44
@github-actions
Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions
Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • core/camel-base-engine
  • dsl/camel-jbang/camel-jbang-plugin-tui

ℹ️ Dependent modules were not tested because the total number of affected modules exceeded the threshold (50). Use the test-dependents label to force testing all dependents.

Build reactor — dependencies compiled but only changed modules were tested (2 modules)
  • Camel :: Base Engine
  • Camel :: JBang :: Plugin :: TUI

⚙️ View full build and test results

@davsclaus davsclaus merged commit 87911a1 into main May 20, 2026
6 checks passed
@davsclaus davsclaus deleted the worktree-more-tui-2 branch May 20, 2026 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant