Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AcceptableFields = map[string]struct{}{
"ProblemType": struct{}{},
"Date": struct{}{},
"Traceback": struct{}{},
"Signal": struct{}{},
"PythonArgs": struct{}{},
"Package": struct{}{},
"SourcePackage": struct{}{},
"PackageArchitecture": struct{}{},
"Dependencies": struct{}{},
"MachineType": struct{}{},
"StacktraceAddressSignature": struct{}{},
"ApportVersion": struct{}{},
"DuplicateSignature": struct{}{},
"DistroRelease": struct{}{},
"Uname": struct{}{},
"Architecture": struct{}{},
"NonfreeKernelModules": struct{}{},
"LiveMediaBuild": struct{}{},
"UserGroups": struct{}{},
"ExecutablePath": struct{}{},
"InterpreterPath": struct{}{},
"ExecutableTimestamp": struct{}{},
"ProcCwd": struct{}{},
"ProcEnviron": struct{}{},
"ProcCmdline": struct{}{},
"ProcStatus": struct{}{},
"ProcMaps": struct{}{},
"ProcAttrCurrent": struct{}{},
"Registers": struct{}{},
"Disassembly": struct{}{},
"StacktraceTop": struct{}{},
"AssertionMessage": struct{}{},
"CoreDump": struct{}{},
"VmCore": struct{}{},
"Tags": struct{}{},
"OopsText": struct{}{},
"UpgradeStatus": struct{}{},
"InstallationDate": struct{}{},
"InstallationMedia": struct{}{},
"IwlFwDump": struct{}{},
"SystemImageInfo": struct{}{},
}
All the fields we will unconditionally accept for upload, no matter their size.
var UnacceptableFields = map[string]struct{}{
"Stacktrace": struct{}{},
"ThreadStacktrace": struct{}{},
"UnreportableReason": struct{}{},
"CrashCounter": struct{}{},
"_MarkForUpload": struct{}{},
"Title": struct{}{},
}
We always filter out these fields and do not submit them to the cloud.
Functions ¶
func ForEachReportInDir ¶
func ForEachReportInDir(dir string, visitor ReportVisitor)
ForEachReportInDir iterates over all crash reports in dir, parses it and reports back to visitor.
Types ¶
type ErrorFailedToParseCrashReport ¶
type ErrorFailedToParseCrashReport struct { Name string // Name of the report that failed parsing Next error // Error reported by the parser. }
ErrorFailedToParseCrashReport indicates an issue trying to parse a crash report.
func (ErrorFailedToParseCrashReport) Error ¶
func (self ErrorFailedToParseCrashReport) Error() string
Error pretty prints the given ErrorFailedToParseCrashReport instance.
type ErrorFailedToReadCrashDir ¶
type ErrorFailedToReadCrashDir struct { CrashDir string // The crash dir that we failed to read. Next error // The error reported when trying to read the directory. }
ErrorFailedToReadCrashDir indicates an issue when trying to read entries of the given crash dir.
func (ErrorFailedToReadCrashDir) Error ¶
func (self ErrorFailedToReadCrashDir) Error() string
Error pretty prints the given ErrorFailedToReadCrashDir instance.
type HttpReportPersister ¶
type HttpReportPersister struct { SubmitURL url.URL // URL for sending the crash report to Identifier machine.Identifier // Identifier helps in generating a globally unique device id Client *http.Client // HTTP client instance for reaching out to the crash db service }
HttpReporterPersister persists incoming crash reports to launchpad.
func (HttpReportPersister) Persist ¶
func (self HttpReportPersister) Persist(report Report) error
type NewLineReader ¶
NewLineReader reads a final \n if the contained Reader reports EOF.
type ReportPersister ¶
type ReportPersister interface { // Persist stores report for future processing Persist(report Report) error }
ReportPersister abstracts persisting of Report instances.
type ReportVisitor ¶
type ReportVisitor interface { // NewReport is invoked for every report that has been successfully loaded NewReport(name string, report Report) // NewError is invoked for issues encountered while processing individual entries. NewError(err error) }
ReportVisitor abstracts handling of individual Report instances.