Sentry error tracking
DETAILS: Tier: Free, Premium, Ultimate Offering: GitLab.com, Self-managed, GitLab Dedicated
Sentry is an open source error tracking system. GitLab enables administrators to connect Sentry to GitLab, so users can view a list of Sentry errors in GitLab.
GitLab integrates with both the cloud-hosted Sentry and Sentry deployed in your on-premise instance.
Enable Sentry integration for a project
GitLab provides a way to connect Sentry to your project.
Prerequisites:
- You must have at least the Maintainer role for the project.
To enable the Sentry integration:
- Sign up to Sentry.io, or deploy your own on-premise Sentry instance.
- Create a new Sentry project. For each GitLab project that you want to integrate, create a new Sentry project.
- Find or generate a Sentry auth token.
For the SaaS version of Sentry, you can find or generate the auth token at https://sentry.io/api/.
Give the token at least the following scopes:
project:read
,event:read
, andevent:write
(for resolving events). - In GitLab, enable and configure Error Tracking:
- On the left sidebar, select Search or go to and find your project.
- Select Settings > Monitor, then expand Error Tracking.
- For Enable error tracking, select Active.
- For Error tracking backend, select Sentry.
- For Sentry API URL, enter your Sentry hostname. For example,
enter
https://sentry.example.com
. For the SaaS version of Sentry, the hostname ishttps://sentry.io
. For the SaaS version of Sentry hosted in the EU, the hostname ishttps://de.sentry.io
. - For Auth Token, enter the token you generated previously.
- To test the connection to Sentry and populate the Project dropdown list, select Connect.
- From the Project list, choose a Sentry project to link to your GitLab project.
- Select Save changes.
To view a list of Sentry errors, on your project's sidebar, go to Monitor > Error Tracking.
Enable Sentry's integration with GitLab
You might also want to enable Sentry's GitLab integration by following the steps in the Sentry documentation.
Troubleshooting
When working with Error Tracking, you might encounter the following issues.
Connection failed. Check auth token and try again
Error If the Monitor feature is disabled in the
project settings,
you might see an error when you try to enable Sentry integration for a project.
The resulting request to /project/path/-/error_tracking/projects.json?api_host=https:%2F%2Fsentry.example.com%2F&token=<token>
returns a 404 error.
To fix this issue, enable the Monitor feature for the project.