Versions in this module Expand all Collapse all v0 v0.11.0 Aug 24, 2026 Changes in this version + const DefaultSinkQueueDepth + func ApplyGoMemLimit(pct int) (int64, error) + func BreadcrumbStreamInterceptor() grpclib.StreamServerInterceptor + func BreadcrumbUnaryInterceptor() grpclib.UnaryServerInterceptor + func DefaultArtifactRoot() string + func DefaultMaxArtifacts() int + func ForkMutableBreadcrumbs(ctx context.Context) context.Context + func GRPCRecoveryHandler(log *logger.Logger, component string) func(context.Context, any) error + func GoWithRecovery(ctx context.Context, opts RecoveryOptions, reporter Reporter, ...) + func PruneArtifacts(rootDir string, maxArtifacts int) error + func SetDefaultAbortFunc(f AbortFunc) + func SetDefaultArtifactRoot(root string) + func SetDefaultArtifactSink(s *ArtifactSink) + func SetDefaultMaxArtifacts(n int) + func SetDefaultPanicCounter(counter meter.Counter) + func SetDefaultReporter(r Reporter) + func WithBreadcrumb(ctx context.Context, stage string, component string, fields map[string]string) context.Context + func WithMutableBreadcrumbs(ctx context.Context) context.Context + type AbortFunc func(context.Context, RecoveryResult) + type ArtifactJob struct + Done chan<- struct{} + HasStateDump bool + Logger *logger.Logger + Record *PanicRecord + RootDir string + StateDump any + StateErr error + StateLimit int64 + type ArtifactSink struct + func DefaultArtifactSink() *ArtifactSink + func NewArtifactSink(queueDepth int) *ArtifactSink + func (s *ArtifactSink) Close(ctx context.Context) error + func (s *ArtifactSink) QueueDepth() int + func (s *ArtifactSink) Start() + func (s *ArtifactSink) Submit(job ArtifactJob) bool + type ArtifactWriter struct + func NewArtifactWriter(rootDir string) *ArtifactWriter + func (aw *ArtifactWriter) ArtifactDirPath(record *PanicRecord) string + func (aw *ArtifactWriter) MkdirArtifact(record *PanicRecord) (string, error) + func (aw *ArtifactWriter) Write(record *PanicRecord) (string, error) + func (aw *ArtifactWriter) WriteRecord(artifactDir string, record *PanicRecord) error + func (aw *ArtifactWriter) WriteStateDump(artifactDir string, value any, limitBytes int64) (bool, string, error) + type BoundedStateWriter interface + WriteJSON func(path string, value any, limitBytes int64) (truncated bool, err error) + func NewBoundedStateWriter() BoundedStateWriter + type Breadcrumb struct + Component string + Fields map[string]string + Stage string + Time time.Time + func BreadcrumbsFromContext(ctx context.Context) []Breadcrumb + type Collection struct + ArtifactDir string + Files []string + Record *PanicRecord + func ListCollections(root string) ([]Collection, error) + type CrashOutputConfig struct + Dir string + Enabled bool + GoMemLimitPct int + MaxArtifacts int + func NewCrashOutputConfig() CrashOutputConfig + func (c *CrashOutputConfig) RegisterFlags(flags *pflag.FlagSet) + func (c CrashOutputConfig) InstallGlobalCrashOutput() error + type PanicRecord struct + Breadcrumbs []Breadcrumb + Component string + GoroutineStack string + OccurredAt time.Time + PanicValue string + ProcessMetadata map[string]string + Recovered bool + StateDump *StateDumpStatus + type RecoveryOptions struct + ArtifactRoot string + Component string + Counter meter.Counter + Logger *logger.Logger + ProcessMetadata map[string]string + StateDumper StateDumper + StateLimitBytes int64 + type RecoveryOutcome struct + ArtifactDone <-chan struct{} + PanicValue any + Panicked bool + Result RecoveryResult + func WithRecovery(ctx context.Context, opts RecoveryOptions, reporter Reporter, ...) (outcome *RecoveryOutcome) + type RecoveryResult struct + ArtifactDir string + Record *PanicRecord + func RecoverExternal(ctx context.Context, opts RecoveryOptions, reporter Reporter, panicValue any, ...) (result RecoveryResult) + type Reporter func(context.Context, RecoveryResult) + type StateDumpStatus struct + Error string + Path string + Truncated bool + type StateDumper interface + DumpState func(context.Context) (any, error) + type StateDumperFunc func(context.Context) (any, error) + func (f StateDumperFunc) DumpState(ctx context.Context) (any, error)