Skip to main content
The GitHub integration connects your Sentry organization to your GitHub organization or user account. It enriches Sentry issues with commit data, links stack frames directly to your source files on GitHub, and lets you create or link GitHub issues from within Sentry.

What you can do

  • Suspect commits: Sentry automatically identifies the commit most likely responsible for a regression and shows it on the issue detail page.
  • Stack trace linking: Click any frame in a Sentry stack trace to open the exact line of code in GitHub.
  • CODEOWNERS import: Import your CODEOWNERS file to automatically assign Sentry issues to the team or individual responsible for the affected code.
  • GitHub issue creation: Create a GitHub issue directly from a Sentry issue, or link to an existing one.
  • Assignee sync: Syncing assignees between Sentry and GitHub keeps both systems consistent without manual updates.
  • Status sync: Optionally resolve or unresolve a Sentry issue when the linked GitHub issue is closed or reopened.
  • PR comments: When a pull request is merged, Sentry posts a comment listing the issues attributed to commits in that PR.
  • Ticket rules: Use alert rules to automatically create GitHub issues when new Sentry issues meet specific conditions.

Install the GitHub integration

1

Open Integrations

In Sentry, go to Settings > Integrations and find GitHub.
2

Start installation

Click Install. A setup dialog opens.
3

Authorize with GitHub

You are redirected to GitHub. Choose the GitHub organization or user account you want to connect, then click Install to install the Sentry GitHub App.
You need to be an owner of the GitHub organization to install the app. If you are not an owner, you can request installation and a GitHub admin will need to approve it.
4

Grant repository access

Select which repositories the app can access—either all repositories or specific ones. Sentry uses this access to read commit data and link stack frames.
5

Return to Sentry

After installing the GitHub App, you are redirected back to Sentry. The integration is now active for your organization.
After installation, you need to tell Sentry which repositories belong to your projects.
1

Open the integration settings

Go to Settings > Integrations > GitHub and click Configure.
2

Add repositories

Click Add Repository and search for the repositories you want to link. Sentry begins importing commit history from the default branch.

Set up commit tracking

Commit tracking lets Sentry identify the exact commit that introduced a bug. To get the most accurate suspect commit data:
  1. Create a Sentry release in your CI/CD pipeline using the Sentry CLI or one of the Sentry SDKs. See Releases for details.
  2. Associate commits with the release using sentry-cli releases set-commits or the setCommits SDK method.
When a new issue is created in a release that has commit data, Sentry compares the stack trace against the changed files in each commit to identify the most likely culprit.
If you use GitHub Actions or another CI system, the Sentry release action handles this automatically.

Configure code mappings

Code mappings tell Sentry how the file paths in your stack traces map to files in your GitHub repository. Without a code mapping, stack trace links and suspect commits may not work correctly.
1

Open code mappings

Go to Settings > Integrations > GitHub > Configure, then scroll to Code Mappings.
2

Add a mapping

Click Add Code Mapping and fill in:
  • Repository: The GitHub repository that contains your source code
  • Branch: The default branch (for example, main)
  • Stack trace root: The path prefix that appears in your stack frames (for example, src/)
  • Source code root: The corresponding path in the repository (for example, src/)

Import CODEOWNERS

If your repository has a CODEOWNERS file, Sentry can use it to automatically assign issues to the correct team or person. Go to Settings > Integrations > GitHub > Configure and click Sync CODEOWNERS. Sentry reads the file from the locations CODEOWNERS, .github/CODEOWNERS, or docs/CODEOWNERS.
CODEOWNERS-based assignment works alongside your Sentry ownership rules. Sentry ownership rules take priority if both apply.
From any Sentry issue detail page:
  1. Click Link GitHub Issue in the sidebar.
  2. Choose to create a new issue or search for an existing one.
  3. Select the repository and fill in the issue details.
Once linked, the Sentry issue shows the GitHub issue status, and the GitHub issue includes a link back to the Sentry issue.

Sync settings

You can configure bidirectional status and assignee syncing from Settings > Integrations > GitHub > Configure:
SettingWhat it does
Sync GitHub Status to SentryResolves or unresolves the Sentry issue when the linked GitHub issue is closed or reopened
Sync GitHub Assignment to SentryAssigns the Sentry issue when the GitHub issue is assigned
Sync Sentry Assignment to GitHubAssigns the GitHub issue when the Sentry issue is assigned
Sync Sentry Comments to GitHubPosts Sentry comments to the linked GitHub issue
Sync Sentry Status to GitHubChanges the GitHub issue status when the Sentry issue status changes

Automatic GitHub issue creation with alert rules

You can configure alert rules to automatically create a GitHub issue whenever a new Sentry issue matches certain conditions.
  1. Go to Settings > [Project] > Alerts and create or edit an alert rule.
  2. Under Actions, select Create a GitHub issue.
  3. Choose the repository, title template, and any other fields.
Each alert rule action creates a new GitHub issue every time it fires. Combine this with appropriate alert conditions (such as “issue is new”) to avoid duplicate tickets.