Expand description
Process-local tracing subscriber (binary path only; libraries only emit). Process-local tracing setup for the ssh-cli binary path.
§Why this module was renamed from telemetry
The old name described a category of thing this product forbids. It never did any
of it — the “out of scope” list below has been accurate since the first commit —
but a reader auditing the tree for a telemetry ban found a module called
telemetry and had to read it to learn it was innocent. A name that costs every
reader a verification is a name that is wrong, however defensible its history.
The wire field "telemetry": false in vps doctor is a different thing and keeps
its name. There the word is the claim being denied, and denying it in the
operator’s own vocabulary is the point.
This rename is breaking for anyone importing ssh_cli::telemetry as a
library. There is no deprecated alias: an alias would keep the name this rename
exists to remove, and leave the audit exactly where it started.
§Product identity (Rules Rust — logs / tracing / rotation)
ssh-cli is a one-shot agent CLI, not a long-lived server:
| Signal | Policy |
|---|---|
| Facade | tracing only (no println! / env_logger / dual log consumer) |
| Sink | stderr text (data JSON stays on stdout) |
| Default filter | error (agent-first quiet stderr) |
| Override | CLI only: -v → debug; ambient RUST_LOG is ignored; -q does not change the filter |
| Reload | reload::Layer so bootstrap (pre-parse) can reconfigure after argv |
| Bridge | tracing-log::LogTracer for deps that emit via the log crate (russh, keyring) |
| Errors | tracing_error::ErrorLayer for SpanTrace capture |
§Explicitly out of scope
- OpenTelemetry / OTLP / metrics backends (product: zero telemetry)
tracing-appenderfile rotation +WorkerGuard(no local log files; short process)- Admin HTTP
/admin/log-level(no daemon / no network control plane) tokio-console/ Chrome tracing / journald / Docker log drivers as product features- Encrypted log-at-rest (no log files written by this binary)
Libraries that depend on ssh_cli as a crate should not call these
installers; only the binary entry (run → bootstrap_logs) installs the
global subscriber. Product modules only emit events/spans.
§Lifecycle
crate::tracing_setup::bootstrap_logs— before clap parse (phase 1b).crate::tracing_setup::initialize_logs— after parse, reloadsEnvFilterfrom-vonly (G-E2E-09).- Process exit —
mainflushes stderr; no file worker to join.
Functions§
- bootstrap_
logs - Installs stderr tracing before clap parse (one-shot lifecycle phase 1b).
- build_
env_ filter - Builds the process-local tracing filter from CLI
-vcount only (G-AUD-22 / G14). - has_
reload_ handle - Returns whether the process owns a reloadable global filter (binary path).
- initialize_
logs - Initializes or reloads
tracing-subscriberfrom the verbose CLI count (G14).