Capture Go errors with Airbrake

Recently, an increasing number of people have been asking how we use Airbrake to track errors from our Go services. The Go language is seeing a huge growth in popularity, and it's no surprise to the Airbrake team who have been using (and loving!) Go since before 1.0.

We offer 2 very easy ways to send Go errors to Airbrake:

1. Capture Go errors with gobrake

Sending Go errors to Airbrake is incredibly simple using our gobrake library.

airbrake.Notify(errors.New("Hello Airbrake!"), nil)

// Or the familiar Go pattern.
if err != nil {

2. Capture Go errors with glog

At Airbrake, we're fans of the Google glog library, providing simple, levelled logging. So much so, that we built our own glog fork which uses gobrake to seamlessly send error logs to Airbrake. Having Airbrake error reporting built into our logging is incredibly simple, and elegant:

glog.Errorf("Hello Airbrake!")

// Or the familiar Go pattern.
if err != nil {
glog.Errorf("Something broke: %s", err)

We've been capturing production errors with gobrake since 2012, and glog since 2013. These libraries are mature, and have been heavily battle tested! The best part is they are incredibly easy to integrate with your application.

Check out the gobrake & glog READMEs, and take them for a spin! I promise you'll be capturing Go errors in Airbrake in no time!

New to Airbrake? Start your 14-day free trial today and you’ll be organizing and tracking all your application’s errors in just a few minutes.