Records registered with .observe() publish live domain-signal gauges
(last/min/max/mean plus a unit) and the AimX protocol already delivers them:
RecordMetadata.signal_stats is populated when the observability feature is
on and the CLI enables that feature, so aimdb record list --format json
includes the stats today. But the default human-readable table drops them: it
only prints Name, Type ID, Buffer Type, Producers, Consumers and Writable.
The most useful live information the protocol carries never reaches the
terminal.
Where to look
- tools/aimdb-cli/src/output/table.rs —
format_records_table, the columns to extend (there's a unit test at the bottom of the file to grow with it)
- aimdb-core/src/remote/metadata.rs —
RecordMetadata.signal_stats (Option<Vec<SignalStatsInfo>>)
- tools/aimdb-cli/src/commands/record.rs —
list_records, where table vs JSON output is chosen
cargo run -p remote-access-demo --bin server — a live test instance at /tmp/aimdb-demo.sock; its Temperature record is registered with .observe(), so aimdb record list --format json shows its gauge and the other records make good - cases
What to do
- Extend
format_records_table with a compact signal column, e.g.
Signal rendering last unit (min…max, ⌀mean) — records without gauges
show a dimmed -. Keep the table readable at typical terminal widths;
a record can carry more than one gauge, so pick a sensible compact form
(first gauge + count, or one line per gauge).
- No feature-gating needed on your side: the CLI always builds aimdb-core
with observability on, so signal_stats is a regular Option field —
match on Some/None and render the dimmed - for None.
Done when
aimdb record list against the remote-access-demo server shows live
stats for server::Temperature and - for the rest
- JSON output is unchanged
make check is green
Records registered with
.observe()publish live domain-signal gauges(last/min/max/mean plus a unit) and the AimX protocol already delivers them:
RecordMetadata.signal_statsis populated when theobservabilityfeature ison and the CLI enables that feature, so
aimdb record list --format jsonincludes the stats today. But the default human-readable table drops them: it
only prints Name, Type ID, Buffer Type, Producers, Consumers and Writable.
The most useful live information the protocol carries never reaches the
terminal.
Where to look
format_records_table, the columns to extend (there's a unit test at the bottom of the file to grow with it)RecordMetadata.signal_stats(Option<Vec<SignalStatsInfo>>)list_records, where table vs JSON output is chosencargo run -p remote-access-demo --bin server— a live test instance at/tmp/aimdb-demo.sock; itsTemperaturerecord is registered with.observe(), soaimdb record list --format jsonshows its gauge and the other records make good-casesWhat to do
format_records_tablewith a compact signal column, e.g.Signalrenderinglast unit (min…max, ⌀mean)— records without gaugesshow a dimmed
-. Keep the table readable at typical terminal widths;a record can carry more than one gauge, so pick a sensible compact form
(first gauge + count, or one line per gauge).
with
observabilityon, sosignal_statsis a regularOptionfield —match on
Some/Noneand render the dimmed-forNone.Done when
aimdb record listagainst the remote-access-demo server shows livestats for
server::Temperatureand-for the restmake checkis green