Suspect Commits via Git Blame
Errors are part of building software. Even if you are one of the fabled 10X engineers, errors are still going to happen. When an error does occur, typically you are going to look at the stack trace to understand the why and who for triaging. But figuring out who to assign an issue to just based on the stack trace can be difficult.
How many times do you see a stack trace in a Sentry issue, head to GitHub, and try to figure out who changed the line of code in question? Often would be our guess. Referencing the stack trace and your GitHub/GitLab repo helps you understand why and how an issue was introduced and gives you context on possible ways to fix it - You don’t want to simply revert the change.
With major improvements to Suspect Commits, cross-referencing a stack trace with your source code is now going to be easier. A lot easier.
Updates to Suspect Commits
Suspect Commits used to just show you who last modified the file with the offending code. By integrating with the Git Blame API, Sentry will now identify who changed the specific lines of code and the associated pull requests in question. Another improvement is that we removed the need to associate a commit with a release. This will increase the number of issues with a Suspect Commit and commit accuracy.
Suspect Commits = Less Time Triaging
Suspect Commits help you quickly triage an issue and learn if the issue was caused by a recent code change. If you are the author of the latest commit to edit the line of code in question you likely have the most context to resolve the issue as well. With Suspect Commits enabled, Sentry can save you time by automatically assigning the issue to the person who last modified the errant code. You can change the auto-assignment settings in your Project Settings- Simply navigate to Project Settings→Issue Owners
Suspect Commits will help you triage issues faster as well as help you
annoy alert the person/team most likely to know how to fix it.
How to Setup Suspect Commits
You need to link your Github/GitLab repositories to Sentry and ensure you have Code Mappings in place for these repositories in your Github/GitLab integration. There’s nothing else that you need to set up for Suspect Commits.
Integrating your Github/GitLab repositories with Sentry can unlock a ton of valuable triage context for you such as stack trace links to your source code, automatic release management, issue resolution via commits or pull requests, and more.
View this video series to learn how to connect GitHub or GitLab to Sentry.