bugsnag

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DisplayName      = "Bugsnag"
	HandlerKey       = "bugsnag"
	MessageDirection = "out"
	MessageBodyType  = models.JSON
)

Variables

This section is empty.

Functions

func ExampleMessage

func ExampleMessage(cfg config.Configuration, data util.ExampleData, eventSlug string) (cc.Message, error)

func NewHandler

func NewHandler() handlers.Handler

func Normalize

func Normalize(cfg config.Configuration, hReq handlers.HandlerRequest) (cc.Message, error)

Types

type BugsnagAccount

type BugsnagAccount struct {
	Id   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
	URL  string `json:"url,omitempty"`
}

type BugsnagComment

type BugsnagComment struct{}

type BugsnagError

type BugsnagError struct {
	Id             string                   `json:"id,omitempty"`
	ErrorId        string                   `json:"errorId,omitempty"`
	ExceptionClass string                   `json:"exceptionClass,omitempty"`
	Message        string                   `json:"message,omitempty"`
	Context        string                   `json:"context,omitempty"`
	FirstReceived  time.Time                `json:"firstReceived,omitempty"`
	ReceivedAt     time.Time                `json:"receivedAt,omitempty"`
	RequestUrl     string                   `json:"requestUrl,omitempty"`
	AssignedUserId string                   `json:"assignedUserId,omitempty"`
	Url            string                   `json:"url,omitempty"`
	Severity       string                   `json:"severity,omitempty"`
	Status         string                   `json:"status,omitempty"`
	Unhandled      bool                     `json:"unhandled,omitempty"`
	CreatedIssue   BugsnagErrorIssue        `json:"createdIssue,omitempty"`
	User           BugsnagUser              `json:"user,omitempty"`
	App            BugsnaggErrorApp         `json:"app,omitempty"`
	Device         BugsnagErrorDevice       `json:"device,omitempty"`
	StackTrace     []BugsnagErrorStackTrace `json:"stackTrace,omitempty"`
}

type BugsnagErrorDevice

type BugsnagErrorDevice struct {
	Id             string    `json:"id,omitempty"`
	Manufacturer   string    `json:"manufacturer,omitempty"`
	Model          string    `json:"model,omitempty"`
	ModelNumber    string    `json:"modelNumber,omitempty"`
	OsName         string    `json:"osName,omitempty"`
	OsVersion      string    `json:"osVersion,omitempty"`
	FreeMemory     int       `json:"freeMemory,omitempty"`
	TotalMemory    int       `json:"totalMemory,omitempty"`
	FreeDisk       int       `json:"freeDisk,omitempty"`
	BrowserName    string    `json:"browserName,omitempty"`
	BrowserVersion string    `json:"browserVersion,omitempty"`
	Jailbroken     bool      `json:"jailbroken,omitempty"`
	Orientation    string    `json:"orientation,omitempty"`
	Locale         string    `json:"locale,omitempty"`
	Charging       bool      `json:"charging,omitempty"`
	BatteryLevel   float32   `json:"batteryLevel,omitempty"`
	Time           time.Time `json:"time,omitempty"`
	Timezone       string    `json:"timezone,omitempty"`
}

type BugsnagErrorIssue

type BugsnagErrorIssue struct {
	Id     string `json:"id,omitempty"`
	Number int    `json:"name,omitempty"`
	Type   string `json:"type,omitempty"`
	URL    string `json:"url,omitempty"`
}

type BugsnagErrorStackTrace

type BugsnagErrorStackTrace struct {
	InProject    bool              `json:"inProject,omitempty"`
	LineNumber   json.Number       `json:"lineNumber,omitempty"`
	ColumnNumber json.Number       `json:"columnNumber,omitempty"`
	File         string            `json:"file,omitempty"`
	Method       string            `json:"method,omitempty"`
	Code         map[string]string `json:"code,omitempty"`
}

func (*BugsnagErrorStackTrace) Location

func (st *BugsnagErrorStackTrace) Location() string

Location returns a string per the Slack integration

type BugsnagOutMessage

type BugsnagOutMessage struct {
	Account BugsnagAccount `json:"account,omitempty"`
	Project BugsnagProject `json:"project,omitempty"`
	Trigger BugsnagTrigger `json:"trigger,omitempty"`
	Comment BugsnagComment `json:"created_at,omitempty"`
	User    BugsnagUser    `json:"user,omitempty"`
	Error   BugsnagError   `json:"error,omitempty"`
	Release BugsnagRelease `json:"release,omitempty"`
}

func BugsnagOutMessageFromBytes

func BugsnagOutMessageFromBytes(bytes []byte) (BugsnagOutMessage, error)

func (*BugsnagOutMessage) ReleaseStage

func (msg *BugsnagOutMessage) ReleaseStage() string

type BugsnagProject

type BugsnagProject struct {
	Id   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
	URL  string `json:"url,omitempty"`
}
func (bp *BugsnagProject) MarkdownLink() string

type BugsnagRelease

type BugsnagRelease struct {
	Id            string               `json:"id,omitempty"`
	Version       string               `json:"version,omitempty"`
	VersionCode   string               `json:"versionCode,omitempty"`
	BundleVersion string               `json:"bundleVersion,omitempty"`
	ReleaseStage  string               `json:"releaseStage,omitempty"`
	URL           string               `json:"url,omitempty"`
	ReleaseTime   time.Time            `json:"releaseTime,omitempty"`
	ReleasedBy    string               `json:"releasedBy,omitempty"`
	SourceControl BugsnagSourceControl `json:"sourceControl,omitempty"`
	Metadata      map[string]string    `json:"metadata,omitempty"`
}

type BugsnagSnoozeRule

type BugsnagSnoozeRule struct {
	Type      string `json:"type,omitempty"`
	RuleValue int32  `json:"ruleValue,omitempty"`
}

type BugsnagSourceControl

type BugsnagSourceControl struct {
	Provider    string `json:"provider,omitempty"`
	Revision    string `json:"revision,omitempty"`
	RevisionURL string `json:"revisionUrl,omitempty"`
	DiffURL     string `json:"diffUrl,omitempty"`
}

type BugsnagTrigger

type BugsnagTrigger struct {
	Type        string            `json:"type,omitempty"`
	Message     string            `json:"message,omitempty"`
	SnoozeRule  BugsnagSnoozeRule `json:"snoozeRule,omitempty"`
	Rate        int32             `json:"rate,omitempty"`
	StateChange string            `json:"stateChange,omitempty"`
}

type BugsnagUser

type BugsnagUser struct {
	Id    string `json:"id,omitempty"`
	Name  string `json:"name,omitempty"`
	Email string `json:"email,omitempty"`
}

type BugsnaggErrorApp

type BugsnaggErrorApp struct {
	Id                   string   `json:"id,omitempty"`
	Version              string   `json:"version,omitempty"`
	VersionCode          string   `json:"versionCode,omitempty"`
	BundleVersion        string   `json:"bundleVersion,omitempty"`
	CodeBundleId         string   `json:"codeBundleId,omitempty"`
	BuildUUID            string   `json:"buildUUID,omitempty"`
	ReleaseStage         string   `json:"releaseStage,omitempty"`
	Type                 string   `json:"type,omitempty"`
	DsymUUIDs            []string `json:"dsymUUIDs,omitempty"`
	Duration             int      `json:"duration,omitempty"`
	DurationInForeground int      `json:"durationInForeground,omitempty"`
	InForeground         bool     `json:"inForeground,omitempty"`
}

Jump to

Keyboard shortcuts

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