Local diagnostics and support bundles¶
Private local diagnostics: rotating logs, crash reports and support bundles.
Nothing in this module opens a network connection. It gives an observer a useful, explicit way to collect evidence after a field failure without turning Argos into telemetry software. A support bundle is created only after an observer chooses its destination and is never uploaded by Argos.
- class argos.core.support_bundle.SupportBundle(path: Path, files: tuple[str, ...])[source]¶
Bases:
objectResult of a manually generated local support bundle.
- argos.core.support_bundle.configure_local_logging(level: str, directory: Path | None = None) Path | None[source]¶
Configure console plus bounded local logging, returning the log path.
A filesystem failure must never prevent the telescope application starting; console logging remains available in that case.
- argos.core.support_bundle.create_support_bundle(destination: Path | str, *, log_directory: Path | None = None, session_directory: Path | None = None, config_summary: Mapping[str, Any] | None = None, home: Path | None = None) SupportBundle[source]¶
Create a local ZIP with redacted logs and optional non-FITS session data.
The caller decides whether to pass
session_directory. FITS files, arbitrary binaries, location and network configuration are excluded or redacted by construction. The result remains on the observer’s computer.
- argos.core.support_bundle.diagnostics_directory(home: Path | None = None, system: str | None = None) Path[source]¶
Return the standard local directory for technical Argos diagnostics.
- argos.core.support_bundle.install_crash_reporter(directory: Path | None = None) None[source]¶
Persist uncaught main-thread and Python-thread tracebacks locally.
- argos.core.support_bundle.redact_text(text: str, home: Path | None = None) str[source]¶
Remove common local identifiers from a log before it enters a bundle.
- argos.core.support_bundle.write_crash_report(exc_type: type[BaseException], exc: BaseException, tb, directory: Path | None = None) Path | None[source]¶
Write a local traceback report and return its path; never raises.