Skip to content

Commit

Permalink
feat: add support for exception mechanism metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
wyattanderson committed Feb 2, 2023
1 parent beca7e6 commit 17cbc3d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,24 @@ func NewRequest(r *http.Request) *Request {
}
}

// Mechanism is the mechanism by which an exception was generated and handled.
type Mechanism struct {
Type string `json:"type,omitempty"`
Synthetic *bool `json:"synthetic,omitempty"`
Description string `json:"description,omitempty"`
HelpLink string `json:"help_link,omitempty"`
Handled *bool `json:"handled,omitempty"`
Data map[string]interface{} `json:"data,omitempty"`
}

// Exception specifies an error that occurred.
type Exception struct {
Type string `json:"type,omitempty"` // used as the main issue title
Value string `json:"value,omitempty"` // used as the main issue subtitle
Module string `json:"module,omitempty"`
ThreadID string `json:"thread_id,omitempty"`
Stacktrace *Stacktrace `json:"stacktrace,omitempty"`
Mechanism *Mechanism `json:"mechanism,omitempty"`
}

// SDKMetaData is a struct to stash data which is needed at some point in the SDK's event processing pipeline
Expand Down

0 comments on commit 17cbc3d

Please sign in to comment.