Documentation
¶
Overview ¶
Package observability provides dependency-free crash capture for the CLI: a recovered panic is written to a local crash report (timestamp, label, stack) and surfaced to the user as a brief notice instead of a raw stack trace. It is the fail-open foundation for remote crash/metrics reporting — a Sentry/OTEL adapter can hook the same Recover/report path when configured — without pulling those dependencies into the base build.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultCrashDir ¶
func DefaultCrashDir() string
DefaultCrashDir is where crash reports are written by default.
func FormatCrashReport ¶
FormatCrashReport renders a human-readable crash report.
func Recover ¶
Recover is deferred at a top-level entrypoint. On a panic it captures the stack, writes a crash report under dir, prints a brief notice to stderr, and sets *code to a crash exit code. It is fail-open: if the report can't be written it still reports the crash with the stack inline. No panic escapes.
Types ¶
This section is empty.