Share on Twitter
Share on Facebook
Share on HackerNews
Share on LinkedIn

AI-powered Autofix debugs & fixes your code in minutes

Sentry knows a lot about the inner workings of an application’s codebase. So we got to thinking, how can we use this rich dataset to make debugging with Sentry even faster?

Many generative AI (GenAI) tools (e.g. GitHub Copilot) improve developer productivity in their dev environment, though few have the contextual data Sentry has to help fix errors in production. Our new AI-enabled Autofix feature understands what your users are doing when an error occurs, analyzes the error, generates a fix and even opens a pull request for your review. It’s like having a junior developer ready to help on-demand.

Autofix is meant to help you debug errors in production, but if you find yourself wanting that assistance while in development too, you might want to try Codecov’s new AI code review.

How AI-powered Autofix works

Autofix uses an agent-based architecture to break the process of evaluating and fixing a Sentry issue into manageable units of work.

  1. The first step in this process is the problem discovery agent, which provides a preliminary assessment of the problem and decides whether it’s fixable with a code change.
  2. Next, our planning agent uses relevant contextual information from the error message and your codebase to build an execution plan to resolve the underlying problem.
  3. The plan is passed to Autofix’s execution agents responsible for generating the fix and any accompanying unit tests.
  4. Finally, all of the changes are reviewed a final time before we generate a PR.

This process is designed to be iterative and transparent - the system will proactively ask for context and feedback as it proceeds and the result of each step is presented in a CI-like interface that should feel familiar to developers.

More context means better results

Autofix can leverage your Sentry data to work smarter. This goes beyond simply finding relevant context while fixing issues - we also use it to generate unit tests informed by real production errors. This trivializes an important but easily overlooked element of the triage process - reliably reproducing the problem in a CI environment.

We’re also aware that developers often have the best context when it comes to their code. As Autofix proceeds, it identifies areas where additional information will help it in its solution, and it asks the user specific questions. This feedback loop continues even after Autofix has generated a pull request for you to review. It’s able to respond to feedback from your CI environment or even comments on the PR.

Keeping privacy top of mind

Throughout Sentry’s history, we’ve operated under privacy by default. With open-source values at the core of our identity, it’s important that our work in the AI/ML space stays true to who we are. This means we will ask for your explicit consent before Autofix can be used by your team. If you want to use the new AI-enabled Autofix feature, your organization will have to consent to using our new sub-processors. If you opt-in, keep in mind that your data will not be used to train the sub-processor model and that your data will remain SOC 2 Type 2 and ISO 27001 compliant.

We’ve already released our primary repo, which supports all of our ML & AI features, under the Functional Source License, and will publicly release our own fine-tuned models as we continue to develop our product. At the end of the day, our focus is on making Sentry better for you, in keeping with open-source and privacy by default as our values.

Resolve issues with Autofix

We’re excited to use AI to streamline the Sentry experience and make it easier for our users to build and fix applications. Autofix can do the heavy lifting of not only figuring out what went wrong but also proposing solutions unique to your application.

If you’re interested in joining the beta, please join the waitlist here.

As we bring new AI features to Sentry, we’ll be transparent and privacy-focused, and listen to your feedback. If you want to weigh in on AI-based features in Sentry, let us know what you think on GitHub and Discord.

Your code is broken. Let's Fix it.
Get Started

More from the Sentry blog

ChangelogCodecovDashboardsDiscoverDogfooding ChroniclesEcosystemError MonitoringEventsGuest PostsMobileOpen SourcePerformance MonitoringRelease HealthResourceSDK UpdatesSentry
© 2024 • Sentry is a registered Trademark
of Functional Software, Inc.