davsclaus opened a new pull request, #29381:
URL: https://github.com/apache/camel/pull/29381
Stacked on #29379 (the Timeline screen), which is stacked on #29378 (the
timeline dev console). This PR targets the branch of #29379.
## What
The timeline dev console (#29378) records the routes, errors and exchanges
inside the integration. The chaos part was still sampled by the TUI from the
chaos state in the status. So a TUI started after an outage had the faults of
the last minute but not the seconds a rule had a route down, and `camel get
timeline` and the MCP tool had no chaos part at all.
- **camel-console:** when a `chaos` dev console is present, the timeline
sampler asks it each second for its rules, with the new option `report=false`,
so without the report. It records per second:
- the faults of each rule (from `faultsPerSecond`, the seconds that are
over);
- the routes a stall or lifecycle rule has down.
The JSON gets `chaos` (id, rule text and faults per second) and a `down`
series per route, both only with camel-chaos. camel-console does not depend on
camel-chaos: it finds the console by id.
- **camel-chaos:** the `chaos` dev console has the option `report` (default
`true`).
- **TUI:** the Timeline takes the 🎲 layers and the shaded seconds from the
integration's recording once the integration has them, and keeps the labels of
the rules from the status.
- **CLI:** `camel get timeline` has a `DOWN` column (only with chaos), and
`--errors` lists the faults of each rule as `chaos faults: <rule>`. The table
shows the simple name of an exception (the JSON keeps the full name).
- **MCP:** the descriptions of `camel_runtime_timeline` and `get_timeline`
mention the chaos part.
- **Docs:** diagnostics, the TUI help and the observe page. The catalog
copies of the console JSONs and the openapi are regenerated.
Tried live with the chaos demo: an outage of the stock service plus a
stalled shipping route. After the outage, `camel get timeline` showed
`shipping` down for 15s and both rules' faults. A TUI started after the outage
shaded the 15 seconds and showed both 🎲 layers.
## Tests
- `TimelineRecorderTest`: the faults of the seconds that are over replace
the earlier ones, and the routes down.
- `TimelineDevConsoleTest`: a stand-in `chaos` console (camel-chaos is not
on that classpath), asked without the report: the `chaos` series and the `down`
series of the route.
- `ChaosDevConsoleTest`: `report=false` gives only the rules.
- `ListTimelineTest`: the DOWN column, only with chaos, and the faults of
the rules in `--errors`.
- `TimelineTest` (TUI): the layers and down seconds from the integration,
the status then only labels the rules, and the label of a rule from its text.
- Ran locally: camel-console (281), camel-chaos (658), camel-jbang-mcp
(540), the TUI (2356) and the timeline CLI and golden tests.
JIRA: https://issues.apache.org/jira/browse/CAMEL-26713
_Claude Code on behalf of Claus Ibsen_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]