Access Commit Data for Each Release with Sentry and Heroku
Heroku is a fully managed, container-based, cloud platform for deploying and running modern apps. Heroku takes an app-centric approach to software delivery and integrates with today’s most popular developer tools and workflows. One of today’s (and yesterday’s and tomorrow’s) most popular developer tools is Sentry.
Our integration with Heroku brings Sentry directly into your release workflow, enabling us to automatically retrieve commit data each time you deploy a new version of your app in Heroku. Being able to access this commit data for each release can be extremely helpful in debugging new errors, as it adds the ability to see which files have changed most recently, and which members of an organization have been involved in pushing code since the last release.
When you enable this feature, you also gain access to deploy emails so that relevant team members can be alerted immediately when their code has gone out.
Start by going to your repository integration (GitHub, GitLab, Bitbucket, for example) in Settings > Integrations. From the Configurations tab, click “Configure”. On the Configure page, click “Add Repository” then select the repository you want to use.
With this done, find the Heroku integration in Settings > Integrations. Click “Add to Project” then select the project you want to use with Heroku.
Follow this by specifying which repository and deploy environment should be associated with the particular Sentry Project.
Then, copy the deploy hook command to your Heroku config.
You’ll now start seeing commit data in your Sentry account. With commit data for each release, you can see which files have changed most recently and who pushed code, which helps debug new errors as they occur.