# gobrake **Repository Path**: mirrors_TIBCOSoftware/gobrake ## Basic Information - **Project Name**: gobrake - **Description**: Airbrake notifier for Golang - **Primary Language**: Unknown - **License**: BSD-3-Clause - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-26 - **Last Updated**: 2026-04-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Airbrake Golang Notifier [![Build Status](https://circleci.com/gh/airbrake/gobrake.png?circle-token=4cbcbf1a58fa8275217247351a2db7250c1ef976)](https://circleci.com/gh/airbrake/gobrake) # Example ```go package main import ( "errors" "gopkg.in/airbrake/gobrake.v2" ) var airbrake = gobrake.NewNotifier(1234567, "FIXME") func init() { airbrake.AddFilter(func(notice *gobrake.Notice) *gobrake.Notice { notice.Context["environment"] = "production" return notice }) } func main() { defer func() { if v := recover(); v != nil { airbrake.Notify(v, nil) panic(v) } }() defer airbrake.Flush() airbrake.Notify(errors.New("operation failed"), nil) } ``` ## Ignoring notices ```go airbrake.AddFilter(func(notice *gobrake.Notice) *gobrake.Notice { if notice.Context["environment"] == "development" { // Ignore notices in development environment. return nil } return notice }) ``` ## Logging You can use [glog fork](https://github.com/airbrake/glog) to send your logs to Airbrake.