It’s that time of year again… The leaves have fallen from the trees, every department store is playing “All I Want for Christmas is You” on a loop, and I can finally justify wearing that hand-knit beanie I bought on Etsy (even though I live in California).
To celebrate, Sentry is highlighting twelve of our many integrations with an ornament hung with care each day on our festive Sen-Tree. We hope you return every day to enjoy these GIFs with your holiday feast, egg nog, Manischewitz, or pour-over artisan coffee.
Our sixth featured integration is Bitbucket.
Bitbucket has perhaps the most wonderfully literal name in all of tech. Their service is a great big digital bucket of bits, so they’re a Bitbucket. We could use more of that across the whole industry, with a few less Beplys and Thamps and Malks to go around. (Note: You’d be amazed at how many names like these we tested before finding some that weren’t actually in use.)
What would be a good name for Sentry if our name was more literal? TheBugDetective? Hmmmm. No. Sentry is already literal enough.
Bitbucket is a distributed version control system designed for collaboration across teams of any size. That you likely already knew. It’s also an Atlassian service, which means it easily integrates with their other popular services like Jira and Trello. You probably knew that too. What you may not know is exactly how Sentry integrates with Bitbucket.
There are two major features of our integration:
- You can link production errors to Bitbucket Issues with a single click from within Sentry. This gives your team more context beyond the enigmatic
With our Releases tracking, you can configure Bitbucket Pipelines to notify Sentry of new commits and deploys.
This added context helps you track which commits go where and when, connecting errors to the commit in which they originated. You’ll see a complete picture of the changeset’s lifecycle, with author details, informative deploy emails, and suggested assignees who may be best suited to deal with the error.
This also allows you to quickly resolve errors and issues in Sentry by including
fixes <SHORT-ID>in your commit message.
How does it work?
To set up Bitbucket Issue creation:
- This is a Project level feature, so you’ll to the Project settings page for any Project that you’d like to link with Bitbucket
- Click All Integrations, find the Bitbucket integration in the list, and click configure
- Click Enable Plugin
- Fill in the required information and save
- The option to create Bitbucket issues will be displayed from your Sentry issue pages
To set up release tracking with Bitbucket Pipelines
- This is connected to the entire Organization, so go to your Organizations settings page in Sentry
- Click API Keys > New API Key to create a key with ‘project:releases’ permissions
- Go to Bitbucket and enable Bitbucket Pipelines
- Create a bitbucket-pipelines.yml config at the base level of your repository and add a step that issues a POST request (with the Sentry API key generated in step 2) to Sentry’s release endpoint
As is fairly clear from the steps above, setting up this second integration is a little more involved. Take a look at this example repo if you need more context.
Connect Sentry with Bitbucket, and you’ll soon find your own bucket of bits is better than ever before.