Sentry Prevent AI

Get 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, offering suggestions for improvement before merging pull requests.

To enable the Sentry Prevent AI assistant in your GitHub organization or on specific repositories, you need to install the Sentry Prevent AI GitHub App Integration. This allows the assistant to analyze pull requests and provide insights.

If you're not an admin, copy the Sentry Prevent AI GitHub App Integration link and share it with your organization's admin or owner to install it.

After installing the app, use these commands in your pull request comments:

  • @sentry-prevent-ai-reviewer review — The assistant will review the PR and make suggestions.
  • @sentry-prevent-ai-reviewer test — 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 need access to for the AI system to function, and what information is sent to third-party AI providers?

Sentry Prevent 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.

Have feedback? Drop us a line on GitHub Issues or contact Sentry support.


For more information, see the Sentry Prevent documentation.

Was this helpful?
Help improve this content
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").