Skip to main content
The Bitbucket integration connects your Sentry organization to Bitbucket, enabling commit tracking, issue linking, stack trace linking, and code owners.

Features

Suspect commits

Sentry identifies the Bitbucket commits most likely to have introduced an error.

Stack trace linking

Navigate from a stack frame directly to the corresponding line in your Bitbucket repository.

Issue linking

Create or link Bitbucket issues directly from a Sentry issue.

Code owners

Import your CODEOWNERS file to automatically assign Sentry issues.

Auto-resolve via commit

Include Fixes PROJ-ID in a commit message to resolve the linked Sentry issue automatically.

Installation

1

Navigate to integrations

In Sentry, go to Settings > Integrations and find Bitbucket in the Source Control group. Click Install.
2

Authorize with Bitbucket

Sentry redirects you to Bitbucket to complete the OAuth flow. Sign in with the Bitbucket account that has admin access to the workspace you want to connect.
3

Select repositories

After authorization, choose the Bitbucket repositories to link to your Sentry projects.
Bitbucket Server (self-hosted) is supported through the separate Bitbucket Server integration, which uses a different OAuth configuration. The Bitbucket integration described on this page is for Bitbucket Cloud only.

Bitbucket Server (self-hosted)

For self-managed Bitbucket Server instances, use the Bitbucket Server integration instead. It requires you to create an application link in Bitbucket Server and provide the base URL and credentials during setup. To install the Bitbucket Server integration:
1

Navigate to integrations

Go to Settings > Integrations and find Bitbucket Server. Click Install.
2

Enter your server URL

Provide the base URL of your Bitbucket Server instance, for example https://bitbucket.example.com.
3

Create an application link in Bitbucket Server

Follow the on-screen instructions to create an application link in your Bitbucket Server instance and paste the generated consumer key and secret into Sentry.
4

Authorize via OAuth

Sentry redirects you to Bitbucket Server to complete the authorization.

Issue linking

  1. Open a Sentry issue.
  2. In the Linked Issues sidebar section, click Link a Bitbucket issue.
  3. Search for an existing issue or fill in the form to create a new one.

Code owners

Sentry can import your Bitbucket CODEOWNERS file and use it to assign issues automatically.
1

Go to your project settings

Navigate to Settings > Projects > [your project] > Code Owners.
2

Sync the CODEOWNERS file

Click Sync CODEOWNERS. Sentry fetches the file from the default branch of the linked repository.
3

Map Bitbucket users to Sentry users

Sentry prompts you to map Bitbucket user accounts to Sentry members to enable auto-assignment.

Auto-resolve via commit message

You can resolve a Sentry issue by including a reference in a Bitbucket commit message:
Fixes PROJ-123
Replace PROJ-123 with the short ID of the Sentry issue. When the commit is pushed to the default branch, Sentry resolves the issue automatically.

Build docs developers (and LLMs) love