|
1 | 1 | ---
|
2 | 2 | title: Issue Fix
|
3 |
| -description: "Use Seer's Issue Fix to automatically find the root cause of issues and generate code fixes." |
| 3 | +description: "Use Seer's issue fix to automatically find the root cause of issues and generate code fixes." |
4 | 4 | sidebar_order: 20
|
5 | 5 | ---
|
6 | 6 |
|
7 |
| -**Issue Fix** is Seer's collaborative workflow to find the root cause of and solution to issues. It uses Sentry's context (issue details, tracing data, logs, and profiles), your codebases (integrated through GitHub), and its interactions with you to identify and reason through problems in your code. |
| 7 | +**Issue fix** is Seer's collaborative workflow to find the root cause of and solution to issues. It uses Sentry's context (issue details, tracing data, logs, and profiles), your codebases (integrated through GitHub), and its interactions with you to identify and reason through problems in your code. |
| 8 | + |
| 9 | +Issue fix can be automated, allowing it to populate root cause analysis, solutions, and even pull requests as issues occur. |
8 | 10 |
|
9 | 11 | <Alert>
|
10 |
| -Issue Fix replace Suggested Fix (an earlier feature that has been sunset) and builds upon the capabilities previously known as Autofix. |
| 12 | +Issue fix builds upon the capabilities previously known as Autofix. |
11 | 13 | </Alert>
|
12 | 14 |
|
13 | 15 | ## How Issue Fix Works
|
14 | 16 |
|
15 |
| -When you start an Issue Fix run, you'll see the following screen, with an option to share any additional context: |
| 17 | +Seer's issue fix flow follows a three step process: |
| 18 | + |
| 19 | +1. [Root Cause Analysis](#root-cause-analysis): Analyze the issue using Sentry's context and your codebases and determine the root cause |
| 20 | +2. [Solution Identification](#solution-identification): Identify a solution based on the analysis |
| 21 | +3. [Code Generation](#code-generation): Generate a code fix and open a PR |
| 22 | + |
| 23 | +When you begin debugging an issue with Seer, you will see a screen like this, which includes the high-level issue summary and a button to start the issue fix flow: |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | +### Root Cause Analysis |
| 28 | + |
| 29 | +Seer will then analyze the issue and relevant code to help identify the root cause and propose a solution. You'll see a live stream of Seer's thought process in real time as it works through the problem. Seer will share key insights as they come up and you'll have the option to expand each. You'll see the event data and code that support Seer's conclusions, building a clear chain of reasoning back to the root cause. |
| 30 | + |
| 31 | +While Seer is reasoning through your problem, you can step in to add context or feedback; collaboration tends to lead to the best results. If Seer encounters gaps in its understanding, it will ask for your input. |
| 32 | + |
| 33 | +The final root cause analysis will show you the sequence of events that led to the issue, and a detailed analysis of the most likely culprit. This analysis includes helpful annotations, such as links back to the exact lines of code or Sentry telemetry that are relevant to the analysis. |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | +### Solution Identification |
16 | 38 |
|
17 |
| -{/* IMG */} |
| 39 | +Once Seer has completed its root cause analysis, it will begin searching for a solution. The process will be familiar: you will see a chain of reasoning appear as it begins working through the problem, and you are free to collaborate with Seer at any point. |
18 | 40 |
|
19 |
| -Issue Fix will then analyze the issue and relevant code to help identify the root cause and a solution. You'll see a live stream of Seer's thought process in real time as it works through the problem. Seer will share key insights as they come up and you'll have the option to expand each. You'll see the event data and code that support Seer's conclusions, building a clear chain of reasoning back to the root cause. |
| 41 | +When it's finished, you will see the recommended solution. From here, you can: |
20 | 42 |
|
21 |
| -While Issue Fix is reasoning through your problem, you can step in to add context or feedback; collaboration tends to lead to the best results. If Issue Fix encounters gaps in its understanding, it will ask for your input. |
| 43 | +1. Remove any steps or actions that you disagree with |
| 44 | +2. Add any additional steps or instructions, for example request additional unit tests to prevent regressions of the original error |
22 | 45 |
|
23 |
| -The output will be a clearly defined root cause of the Sentry issue, and a detailed solution for how to resolve it: |
| 46 | +Once you are ready to proceed, you can select "Code It Up" to generate code resolving the bug. |
24 | 47 |
|
25 |
| -{/* IMG */} |
| 48 | +### Code Generation |
26 | 49 |
|
27 |
| -You are free to edit or adjust this solution based on your own requirements and preferences. Once you are ready to proceed, you can select "Code It Up" to generate code resolving the bug. From there you'll have three options: |
| 50 | +During the coding step, Seer will identify the code patch(or patches) needed to implement the solution. When it's done, you'll see a preview showing the suggested diffs across your codebase. If the fix involves service dependencies, you may see edits spanning across multiple repositories. |
28 | 51 |
|
29 |
| -- Write a fix |
30 |
| -- Write a unit test reproducing the issue |
31 |
| -- Write both |
| 52 | +From here, you can choose to draft a PR, or checkout the code changes locally for further iteration. If you choose to checkout the code locally, Seer will make a new branch for you. |
32 | 53 |
|
33 |
| -{/* IMG */} |
| 54 | + |
34 | 55 |
|
35 |
| -Once the coding step is complete, you can either create a Pull Request (PR) in GitHub directly from Seer, or create a branch and checkout the code locally if you would like to iterate further. |
| 56 | +## What Issue Fix Uses |
36 | 57 |
|
37 |
| -## Prerequisites |
| 58 | +Seer is a powerful debugging agent, with access to a wide variety of data sources and tools. While debugging issues, it may examine: |
38 | 59 |
|
39 |
| -To use Issue Fix, you'll need to have the following: |
| 60 | +- **Issue details**: Error messages, stack traces, and event metadata from your [Issues](/product/issues/) |
| 61 | +- **Tracing data**: Distributed [traces](/concepts/key-terms/tracing/#whats-a-trace) and span information |
| 62 | +- **Logs**: Structured [Logs](/product/explore/logs/) from your application (beta) |
| 63 | +- **Your codebases**: Relevant code from linked GitHub repositories, with support for multiple repos for distributed services |
| 64 | +- **Performance data**: Profiles and performance metrics |
| 65 | +- **Interactive feedback**: Your input and guidance during the process |
40 | 66 |
|
41 |
| -1. A Sentry project with issues that have sufficient context (issue details, tracing data, logs, and profiles). |
| 67 | +This context is crucial to Seer's capabilities, and it allows it to do things like investigate a backend service that may be the true root cause for a frontend bug you are trying to troubleshoot. |
42 | 68 |
|
43 |
| -2. GitHub integration set up in your Sentry project. This allows Seer to access your codebase and generate code fixes. See the [Sentry GitHub integration](/organization/integrations/source-code-mgmt/github/) to learn more. |
| 69 | +## Settings |
44 | 70 |
|
45 |
| -3. Working knowledge of the issue you want to fix. Seer will help you identify the root cause and suggest a solution, but you should have a general understanding of the problem you're trying to solve. |
| 71 | +Issue fix's default behavior can be customized in several ways: |
| 72 | + |
| 73 | +1. You can manually customize the repositories it has access to |
| 74 | +2. You can define the default branch it should use in each repository |
| 75 | +3. You can add any additional custom context that that may be useful within the scope of each individual repository |
| 76 | + |
| 77 | +<Alert> |
| 78 | +Seer already automatically parses rules files from [Cursor](https://docs.cursor.com/context/rules), [Windsurf](https://windsurf.com/editor/directory), [Cline](https://docs.cline.bot/features/cline-rules), and [Claude Code](https://docs.anthropic.com/en/docs/claude-code/tutorials#create-an-effective-claude-md-file) |
| 79 | +</Alert> |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | +## Best Practices |
| 84 | + |
| 85 | +- Setup the GitHub integration, allowing Seer access to your codebase and enabling it to generate code fixes. Enabling the GitHub integration will help Seer to provide better results. See the [Sentry GitHub integration](/organization/integrations/source-code-mgmt/github/) to learn how |
| 86 | +- The more Sentry context you have, the better equipped Seer will be to help: consider instrumenting your application to collect traces, profiles and logs, and send them to Sentry. |
| 87 | +- For JavaScript / TypeScript projects that are minified in production, upload [source maps](/platforms/javascript/sourcemaps/) to Sentry for the best results |
| 88 | + |
| 89 | +<Alert> |
| 90 | +Currently, GitHub is the only SCM supported by Seer. We are currently working to add support for other services including GitLab and Bitbucket. |
| 91 | +</Alert> |
46 | 92 |
|
0 commit comments