Troubleshoot failed execution logs using AI
Application Integration provides AI-powered troubleshooting for failed executions. This feature uses Google Gemini to analyze execution logs, determine root causes, and generate actionable recommendations. You can access this feature from the Execution Logs page within Application Integration.
Key benefits
By using the Gemini AI-powered troubleshooting feature, you can:
- Gain a clear understanding of complex error messages. AI turns technical logs into clear, actionable insights.
- Receive precise resolution steps tailored to your unique integration logic and specific errors encountered.
- Reduce debugging time by identifying root causes and remediation steps for the fixes.
Before you begin
Before you can use the Gemini AI troubleshooting feature, you must:
- Enable AI capabilities for the specific Google Cloud region where you deploy your integration. For more information on how to enable AI capabilities for a new or existing region, see Enable AI capabilities for troubleshooting.
Enable AI capabilities for troubleshooting
To use Gemini AI for troubleshooting failed executions, enable AI capabilities for the specific Google Cloud region where you deploy your integration.
Enable AI for a new region
To enable AI for a new region in Application Integration, perform the following steps:
- In the Google Cloud console, go to the Application Integration page.
- In the navigation menu, click Regions. The Regions page appears listing all the regions provisioned in your project.
- Click Provision new region.
- Expand Advanced settings.
- Click the Enable AI features toggle under AI Features.
Enable AI in an existing region
To enable AI for an existing region in Application Integration, perform the following steps:
- In the Google Cloud console, go to the Application Integration page.
- In the navigation menu, click Regions. The Regions page appears listing all the regions provisioned in your project.
- For the existing region you want to edit, in the Actions column, click Region actions and select Edit.
The Edit region pane appears.
- Expand the Advanced settings section.
- Click the Enable AI features toggle under AI Features.
Troubleshoot failed executions using AI
To troubleshoot a failed execution log using Gemini AI, do the following:
- In the Google Cloud console, go to the Application Integration page.
- In the navigation menu, click Logs.
The Execution Logs page appears listing the execution logs generated for the integrations in the default region.
- On the Execution Logs page, locate an entry that shows a error Failed status.
- Click the chat_spark icon next to the failed log entry.
- Alternatively, expand the specific row and click Explain this log entry.
This opens the Error Summary page, which displays the Gemini-generated error summary, including the following sections:
- Error message: Displays the technical error description and points to where the error occurs in the code.
- Root cause: Explains why the error occurred.
- Detailed analysis: (Expand this section) Provides more details about the error's impact, specific code areas involved, and how to fix it.
- Steps to fix the error: Provides remediation instructions specific to the identified root cause.
- After you review the error summary and understand the issue, click Close to return to the Execution Logs page.
Resolve issues using AI recommendations
After reviewing the error summary, resolve the issue by completing the following steps:
- Follow recommendations: Implement the recommended steps and make all necessary changes to your integration logic or connector configuration as advised in the Steps to fix the error section in the Error Summary page.
- Test and republish: After completing the modifications, test and republish the updated integration to confirm that the issue is fully resolved.
Example error summary
The following example describes an AI-generated error summary of a failed execution:
-
Error message:
RUNTIME ERROR: Index 0 out of bounds, not within [0, 0) template:16:2-59 function template:17:40-78 function :259:50-62 function :259:55-61 thunk from> template:20:39-40 thunk from> :1613:20-21 thunk from> :32:25-26 thunk from> :32:16-27 function :1613:8-22 function -
Root cause: The error
Index 0 out of bounds, not within [0, 0)indicates an attempt to access the first element (index 0) of an empty array. This issue occurs on line 16 of your code, specifically within these parts of your script:getMergedObject(orderId)function: This function returns an empty array[]when it cannot find a matching order inordersSalesforce.local orders = std.map(...);line: This line causes anindex 0 out of boundserror when it tries to access the first element of the result returned bygetMergedObject(orderId)because the result is an empty array[].
-
Detailed analysis:
getMergedObject(orderId)function: This function looks for a matching order in theordersSalesforcearray. If no match is found, it returns an empty array[]. This is an expected behavior when theorderIdis not found in theordersSalesforcearray.local orders = std.map (...);line: This line uses thestd.mapfunction to process data. However, it directly attempts to access the first element of the array returned bygetMergedObject(orderId)without checking if the array is empty. When the array is empty, this results in anindex 0 out of boundserror.
-
Steps to fix the error:
- Go to the Authentication section in your Salesforce connection.
- Verify the access token and secret version.
- Provide valid values for the access token and secret version.
- Test and republish the integration to apply the changes.