Documentation ¶
Overview ¶
Package airbrake provides Airbrake/Errbit integration.
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 Airbrake/Errbit.
func New ¶
New creates a new handler.
Example ¶
package main import ( "emperror.dev/handler/airbrake" ) func main() { projectID := int64(1) projectKey := "key" handler := airbrake.New(projectID, projectKey) defer handler.Close() // Make sure to close the handler to flush all error reporting in progress }
Output:
func NewFromNotifier ¶
NewFromNotifier creates a new handler from a notifier instance.
Example ¶
package main import ( "github.com/airbrake/gobrake" "emperror.dev/handler/airbrake" ) func main() { projectID := int64(1) projectKey := "key" notifier := gobrake.NewNotifier(projectID, projectKey) handler := airbrake.NewFromNotifier(notifier) 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 ¶
package main import ( "emperror.dev/handler/airbrake" ) func main() { projectID := int64(1) projectKey := "key" handler := airbrake.NewSync(projectID, projectKey) defer handler.Close() }
Output:
func NewSyncFromNotifier ¶
NewSyncFromNotifier creates a new handler from a notifier instance that sends errors synchronously.
Example ¶
package main import ( "github.com/airbrake/gobrake" "emperror.dev/handler/airbrake" ) func main() { projectID := int64(1) projectKey := "key" notifier := gobrake.NewNotifier(projectID, projectKey) handler := airbrake.NewSyncFromNotifier(notifier) defer handler.Close() }
Output:
Click to show internal directories.
Click to hide internal directories.