report

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const SchemaVersion = 1

SchemaVersion is the report document version.

Variables

This section is empty.

Functions

This section is empty.

Types

type CriticalPathSegment

type CriticalPathSegment struct {
	Service  string `json:"service"`
	Phase    string `json:"phase,omitempty"`
	Duration string `json:"duration"`
}

CriticalPathSegment is JSON-friendly critical path data.

type Report

type Report struct {
	SchemaVersion   int                   `json:"schema_version"`
	GeneratedAt     time.Time             `json:"generated_at"`
	RunID           string                `json:"run_id"`
	Project         string                `json:"project,omitempty"`
	Summary         string                `json:"summary"`
	RootCause       string                `json:"root_cause,omitempty"`
	Confidence      string                `json:"confidence,omitempty"`
	Service         string                `json:"service,omitempty"`
	BlockedServices []string              `json:"blocked_services,omitempty"`
	CausalChain     []string              `json:"causal_chain,omitempty"`
	Findings        []model.Finding       `json:"findings,omitempty"`
	CriticalPath    []CriticalPathSegment `json:"critical_path,omitempty"`
	Timeline        []TimelineEntry       `json:"timeline,omitempty"`
	LogWindows      []logs.Window         `json:"log_windows,omitempty"`
	Redaction       []string              `json:"redaction_summary,omitempty"`
	Reproduction    string                `json:"reproduction,omitempty"`
	SuggestedFixes  []string              `json:"suggested_fixes,omitempty"`
	Versions        map[string]string     `json:"versions,omitempty"`
}

Report is a format-agnostic incident report.

func Build

func Build(run *model.Run, findings []model.Finding) *Report

Build constructs a Report from a recorded run (findings should already be attached).

type TimelineEntry

type TimelineEntry struct {
	Service   string    `json:"service"`
	Phase     string    `json:"phase"`
	Timestamp time.Time `json:"timestamp"`
	Message   string    `json:"message,omitempty"`
}

TimelineEntry is a compact service phase marker.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL