Sentry Prevent AI
Get error predictions, code reviews and new tests for better code and coverage using Sentry Prevent AI.
Sentry Prevent AI is a generative AI assistant developed by Sentry. It helps you generate new tests for uncovered code and reviews your code changes, predicting errors and offering suggestions for improvement before merging pull requests.
Sentry Prevent AI is currently in beta. Beta features are still a work in progress and may have bugs. Please join the Discord conversation to share your feedback.
To enable Sentry Prevent AI in your GitHub organization or on specific repositories, you need to install the Seer by Sentry app. This allows the assistant to analyze pull requests, provide insights, and write tests. You must also have the Sentry Github integration enabled.
If you're not an admin, copy the Seer by Sentry GitHub App Integration link and share it with your organization's admin or owner to install it.
Note: Both Show Generative AI Features
and Enable PR Review and Test Generation
settings must be enabled in your organization settings to run Sentry Prevent AI on your pull requests.
After installing the app, Sentry Prevent AI can help you in three ways:
Error Prediction - When you create a pull request and set it to
Ready for Review
, Sentry Prevent AI will check for errors in your code. If no error is found, you will see a 🎉 emoji as a reaction to your PR description. Otherwise, Sentry Prevent AI will add comments to your PR.@sentry review
- Use this command in a PR comment, and the assistant will review the PR and predict errors, as well as make suggestions.@sentry generate-test
- Use this command in a PR commnent, and the assistant will generate tests for your PR.
Once you have added a comment, the assistant will reply, acknowledging the request. For code reviews, you will then see comments added to your PR. For test generation, you will see a comment with a link to the generated tests.
What data does Sentry Prevent AI need access to for the AI system to function, and what information is sent to third-party AI providers?
Sentry Prevent AI requires access to your pull requests, including PR metadata, repository information, file names, directory structures, and code diffs. The file names, code diffs, and PR descriptions are sent to the AI provider for analysis.
Does Sentry Prevent AI run anywhere outside of GitHub, and does it run in the background?
Sentry Prevent AI only runs on GitHub, and only runs when triggered by a comment.
You can learn more about AI privacy and security here.
Why aren't
@sentry
commands working?Sentry Prevent AI will respond with a message to enable the
Show Generative AI Features
andEnable PR Review and Test Generation
settings in your organization settings, if you have not already enabled them. Once enabled, try@sentry review
or@sentry generate-test
again to run Sentry Prevent AI.
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").