Blog |

Introducing Git Blame Support for GitHub Integration

Introducing Git Blame Support for GitHub Integration
Table of Contents

At Rollbar, we care about reducing the time it takes developers to find and fix errors. This is why we’re making our integration with GitHub even stronger to provide more context around errors and reduce the mean time it takes to resolve them MTTR.

Last year, we launched Code Context to show additional lines of code within each frame of the stack trace, reducing the back and forth between GitHub and Rollbar. Now, we’re excited to support git blame to help you identify the last person to write or edit the line of code that caused the error, directly within the Rollbar UI.

Get More Context to Debug Faster

Let’s say a new error pops up in Rollbar that you would like to investigate. As you click on the Traceback in the Item details page, you can see the exact line of the code that caused the error in each frame of the stack trace directly within the Rollbar UI.

Now, you may want to get more context on who should be assigned to the error or why some changes to the code were made. You don’t have to go to GitHub anymore to get this information. You can directly see the GitHub User Avatar of the last person to edit the offending line of code in Rollbar. If you hover over the Avatar, you can directly visit the pull request and the commit for that code. No more switching back and forth between Rollbar and GitHub!

gitblame+stacktrace-2 (1)

In a nutshell, you can -

  • See who the last author was to edit the line of code that caused the error
  • Correlate when the code was written to the date and time of the item occurrence to help triage the error
  • Get context on the history of the code and why, how the code was added
  • Assign the error to the last author if needed

While ‘git blame’ might suggest you can blame someone and go about your work, we strongly recommend using it for getting more context on the code and assigning someone to the error when it makes sense.

Code Context with Git blame in a Rollbar Item - An Example

gitblame-python

In the example above, we can see at a glance in the first trace that the line of code that caused the error was written by Jon. However, after looking at the pull request and commit information, we notice that that code is performing as it should, and the problem is stemming from Jon's code getting incorrect values - in this case, an empty list - from a different part of the code, which we see when we expand the third frame.

We have enough information to say that we should improve the code that was passing the incorrect or missing data as well as edit Jon's code to be able to handle such cases.

Try it Now

We hope you find this new addition useful to your workflow! With a single click you can get the context you need to help you debug faster.

Git blame is available for all users with our GitHub integration. Visit our docs to learn more. You can also read more on how to set up our Github integration.

"Rollbar allows us to go from alerting to impact analysis and resolution in a matter of minutes. Without it we would be flying blind."

Error Monitoring

Start continuously improving your code today.

Get Started Shape