Explore documentation
GitHub
Integrate Better Stack with GitHub to connect your repositories and enhance error context with git blame information. This integration allows you to quickly pinpoint the exact code changes and authors associated with errors, streamlining your debugging process.
Setting up the integration
- Navigate to Errors → Integrations.
- Find the GitHub integration and click Add.
- Follow the authorization steps to connect your GitHub account.
- Select the GitHub repositories you want to connect to Better Stack.
- Click Connect Selected.
Git blame
- Automatic
git blamedata: For errors with stack traces, Better Stack automatically fetchesgit blameinformation from your connected GitHub repositories. - Identify relevant code changes: See when and what code change introduced an error directly within the error details, including the commit hash and author.
- Faster debugging: Quickly navigate to the relevant line of code in GitHub to inspect the change that might be causing the issue.
Configure git code paths
If the reported path to the source file in your error stack trace doesn't match the path in your repository, you can set up a mapping to correct this. This ensures that git blame functionality works correctly.
To configure code path mapping:
- Go to Errors → Applications.
- Click Configure in the dropdown menu of the application.
- Navigate to the Advanced settings tab.
- Under Configure git code paths, you'll find two options:
- Stack trace root (prefix to match in stack traces): Enter the prefix of the file path as it appears in your stack traces (e.g.,
/usr/src/app). - Source code root (Replacement prefix for the repository): Enter the corresponding relative path to your source code within your repository (e.g.,
apps/backend).
- Stack trace root (prefix to match in stack traces): Enter the prefix of the file path as it appears in your stack traces (e.g.,