Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is responsible for sending errors to Sentry.
func New ¶
New creates a new handler.
Example ¶
dsn := "https://user:password@sentry.io/1234" handler, err := New(dsn) if err != nil { panic(err) } defer handler.Close() // Make sure to close the handler to flush all error reporting in progress
Output:
func NewFromClient ¶
func NewFromClient(client *raven.Client) *Handler
NewFromClient creates a new handler from a client instance.
Example ¶
dsn := "https://user:password@sentry.io/1234" client, err := raven.New(dsn) if err != nil { panic(err) } handler := NewFromClient(client) defer handler.Close() // Make sure to close the handler to flush all error reporting in progress
Output:
func NewSync ¶
NewSync creates a new handler that sends errors synchronously.
Example ¶
dsn := "https://user:password@sentry.io/1234" handler, err := NewSync(dsn) if err != nil { panic(err) } defer handler.Close()
Output:
func NewSyncFromClient ¶
func NewSyncFromClient(client *raven.Client) *Handler
NewSyncFromClient creates a new handler from a client instance that sends errors synchronously.
Example ¶
dsn := "https://user:password@sentry.io/1234" client, err := raven.New(dsn) if err != nil { panic(err) } handler := NewSyncFromClient(client) defer handler.Close()
Output:
Click to show internal directories.
Click to hide internal directories.