Skip to main content
One-command support bundle builder. Assembles a single, redacted .tar.gz archive a customer can attach to a support request. The bundle gathers the diagnostic snapshot (bioptimus.observability.probes.snapshot), any configured log files, and a manifest describing the archive, runs every text artifact through the PII anonymizer, and writes the result to disk. Nothing is transmitted: the builder only produces a local file the user chooses to share. By default every artifact is anonymized — identifier and path fields are replaced by stable one-way hashes, slide paths embedded in free text are redacted, and the user name in home-directory paths is masked. This redaction is best-effort, not a guarantee (see bioptimus.observability.anonymize), so audit the archive before sharing it outside your environment. The archive lays out as:

build_support_bundle

Builds a redacted support-bundle archive and returns its path. Captures a diagnostic snapshot, collects the configured log files (including rotated ones), optionally fetches the running server’s /diagnostics, and writes a gzip-compressed tar archive. By default this preserves the historical full diagnostics bundle. Passing categories=["usage"] builds a usage-only bundle with model-request records from logs and omits the diagnostic snapshot, ledger, and raw logs. Every text artifact is anonymized by default. The operation is read-only with respect to the environment apart from writing the archive itself.
Destination for the archive. A directory receives a timestamped bioptimus-support-<timestamp>.tar.gz file; None writes that default name into the current working directory; any other path is used verbatim.
Path to the active log file to include. When omitted, the BIOPTIMUS_LOG_FILE environment variable is used and, if unset, the default temp-directory log file (see bioptimus.observability.logging.default_log_file); rotated files sharing the same base name are included automatically. When file logging is disabled with an empty BIOPTIMUS_LOG_FILE, no log files are added.
Optional mapping of model name to .pt2 checkpoint path, forwarded to the snapshot so checkpoint compatibility is captured.
Optional mapping of model name to loaded model object, forwarded to the snapshot so loaded-model state is captured.
Optional path to an SDK cohort manifest (usually manifest.yaml). When supplied, an anonymized compact ledger.yaml with per-slide status, outputs, timestamps, and error codes is included in the bundle.
Optional SDK workspace directory. When supplied and ledger_file is omitted, <workspace>/manifest.yaml is used as the ledger source. Missing or malformed manifests are recorded in the ledger artifact instead of aborting bundle creation.
Optional base URL of a running model server (for example "http://localhost:8080"). When given, the server’s /diagnostics payload (its own snapshot and recent logs) is fetched and included as server_diagnostics.json, so the bundle covers both the SDK and the server. The server applies its own redaction, so this artifact is included verbatim. Fetch failures are captured in the artifact rather than aborting the bundle.
Optional keyword arguments for bioptimus.observability.healthcheck.verify_endpoint, for example {"model": "h1", "backend": "remote", "base_url": "..."}. When supplied, the endpoint is verified with a synthetic tile and the resulting report is included as healthcheck.json, so a support request carries evidence of whether the endpoint answered at all. This issues a real inference request, which is why it is opt-in. Verification failures are captured in the artifact rather than aborting the bundle. Ignored for a usage-only bundle (categories=["usage"]), which omits the diagnostics section that healthcheck.json belongs to.
When True (the default), redacts PII from the SDK snapshot and every log line before writing. When False, those artifacts are written verbatim. The server-side artifact always reflects the server’s own redaction policy.
Optional data categories to include. Omit it for the historical full diagnostics bundle. Use "usage" or ["usage"] to include only anonymized model-request usage records, or combine "usage" and "diagnostics" to include both.
Returns: The path to the written .tar.gz archive.