logcrash

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ReportSensitiveDetails enables reporting of unanonymized data.
	//
	// This should not be used by anyone unwilling to share the whole cluster
	// data with Cockroach Labs and various cloud services.
	ReportSensitiveDetails = envutil.EnvOrDefaultBool("COCKROACH_REPORT_SENSITIVE_DETAILS", false)
)

Functions

func SendReport

func SendReport(
	ctx context.Context,
	crashReportType ReportType,
	event *sentry.Event,
	extraDetails map[string]interface{},
)

SendReport uploads a detailed error report to sentry. Note that there can be at most one reportable object of each type in the report. For more messages, use extraDetails. The crashReportType parameter adds a tag to the event that shows if the cluster did indeed crash or not.

func SetupCrashReporter

func SetupCrashReporter(ctx context.Context, cmd string)

SetupCrashReporter sets the crash reporter info.

Types

type ReportType

type ReportType int

ReportType is used to differentiate between an actual crash/panic and just reporting an error. This data is useful for stability purposes.

const (
	// ReportTypePanic signifies that this is an actual panic.
	ReportTypePanic ReportType = iota
	// ReportTypeError signifies that this is just a report of an error but it
	// still may include an exception and stack trace.
	ReportTypeError
	// ReportTypeLogFatal signifies that this is an error report that
	// was generated via a log.Fatal call.
	ReportTypeLogFatal
)

Jump to

Keyboard shortcuts

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