See the supported connectors for Application Integration.

View execution logs

Application Integration generates execution log messages for each run of an integration. The log messages contain information that can be helpful in determining the status of each step in an integration, or to troubleshoot a failed integration, task, or event. For more information about logging in Application Integration, see Introduction to logs.

View integration execution logs

To view the Execution Logs page, select one of the options:

Console

  1. In Application Integration, go to the Logs page.

    Go to Application Integration Logs

  2. In the navigation menu, click Logs. Alternatively, in the navigation menu, click Integration and select the integration for which you want to view logs. And then, click image showing the icon for execution logsView execution logs for this integration. The Execution Logs page appears.
  3. From the Region list, select the region to view region specific execution logs of the integration. You can also click refresh Refresh Logs to reload the current log list.

    The following image shows a sample Application Integration Execution Logs page.

    image showing the Application Integration Execution Logs page image showing the Application Integration Execution Logs page

    The following attributes are displayed for each execution log message.

    • Integration name: Name of the integration.
    • Execution ID: An unique identifier generated for each run of an integration.
    • Status: Status of the integration execution.
      • In process: Indicates that the integration is currently being executed.
      • Succeeded: Indicates that the integration executed successfully.
      • Failed: Indicates that the integration failed to execute.
      • Canceled: Indicates that the integration execution was canceled by the user.
      • On hold: Indicates that the integration execution is temporarily paused and is waiting for an event or action to be completed.
      • Retry on hold: Indicates that the integration execution failed and is waiting for a retry.
      • Suspended: Indicates that the integration execution is temporarily paused and requires manual intervention to resume the integration.
    • Start time: Timestamp of when the integration started execution.
    • Duration: Time taken for execution of the integration.
    • Integration Version: Version of the integration executed.
    • Trigger ID: ID value of the trigger.
    • Cloud Logging: Indicates whether the integration is configured to log to Cloud Logging. If Cloud Logging is enabled, this field provides a link to view logs in Cloud Logging. If Cloud Logging is not enabled, this field is set to Disabled.
    • Replayed from: If the integration execution is replayed, this field provides the execution ID of the execution that was replayed. You can replay a published integration execution when you want to rerun an integration with the same parameters as the previous execution. For example, you can replay an execution if an integration failed due to a timeout error or if the output of an integration is not as expected. To learn how to replay executions, see Replay executions.
  4. In the Filter field, add filters. You can filter the logs based on criteria such as, integration name, execution ID, date or time range, execution status, variable type, and variable name or value. For a more customized search, use the projects.locations.integrations.executions.list method as explained in the API tab.

    To add a filter for the test case executions, use the following format:

    Integration name:INTEGRATION_NAME:TEST_CASE_NAME.

    Replace the following:

    • INTEGRATION_NAME: the integration name that contains functional tests.
    • TEST_CASE_NAME: the name of the test case for which you want to list the test executions.
    • For example, Integration name:example-integration-name:example-test-case.

API

If the size of the execution logs is greater than 300 MB, Application Integration throws the Response too large error error and logs don't load on the Execution Logs page. In this case, you must use the projects.locations.integrations.executions.list method to get the logs. To view logs using the API method, follow these steps:

  1. To get the execution ID for which you want to view the execution logs, construct a GET request using the projects.locations.integrations.executions.list method with the snapshotMetadataWithoutParams parameter set to TRUE:
    curl -v -X -G GET
        -H "Content-Type: application/json"
        -H "Authorization: Bearer $(gcloud auth print-access-token)"
        -d 'snapshotMetadataWithoutParams=true'
        'https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/executions'
    

    Execution IDs are returned in the response. Copy the execution ID for which you want to view logs.

  2. To get the execution log for the execution ID, construct a POST request using the projects.locations.integrations.executions.list method with a filter on the execution ID that you copied in the previous step:
    curl -v -X -G GET 
        -H "Content-Type: application/json"
        -H "Authorization: Bearer $(gcloud auth print-access-token)"
        -d 'filter=execution_id="EXECUTION_ID"'
        'https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/executions'
    

    In the response, see the ExecutionDetails field to view the log details.

    Alternatively, in the Google Cloud console, you can filter execution logs by the execution ID.

  3. Example: Filter logs

    If you want to filter the response to list logs for all integrations expect for one integration, use the following format:

    curl -v -X -G GET 
        -H "Content-Type: application/json"
        -H "Authorization: Bearer $(gcloud auth print-access-token)"
        -d 'filter= workflowName!="INTEGRATION_NAME"'
        'https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/integrations/-/executions'
    

Use logs to troubleshoot

The following section explains how to troubleshoot failures using Application Integration execution log.

Troubleshoot integration failures

Execution log messages can be valuable resources when troubleshooting unsuccessful integration runs.

For example, if an integration failed to run in a specific timeframe, use these steps to access and filter the logs to troubleshoot the failure:

  1. Search for or select the integration to troubleshoot from the Integrations list and click to open the integration editor.
  2. Click Logs in the toolbar of the integration editor to view the log messages.
  3. In the Execution log filter field, select Integration name and enter the name of the integration for which you want to view the logs.
  4. Click Enter.
  5. To display failed integrations, in the Execution log filter field, select Execution status to display the status list and then select Failed.
  6. To display failed integrations between a specific time range, in the Execution log filter field, select Start date after and enter the desired time in the valid format. Then, select End date before and enter the desired time. Multiple filters are combined using the AND condition by default.

If the integration failed during the filtered time frame, the Execution Logs page displays a list of log messages. Each log message corresponds to a specific failed run of the integration.

View stack trace exceptions

To view the list of exceptions, click on any log message. Click the links in each exception message to view the complete stack trace of the exception.

image showing logs exception errors expanded image showing logs exception errors expanded

Trace connector failures

You can use the execution log messages to troubleshoot and trace failed connectors task executions. Log data of a failed connector task is stored using Cloud Logging and can be viewed in the Logs Explorer.

Perform the following steps to access the log data of a failed connector task from Application Integration:

  1. Go to the Execution Logs page of your desired integration.
  2. Expand the log message of your failed execution, and stack trace to the row containing the failed Connectors task.
  3. In the Status column, click Failed.

    image showing logs of a failed connector task image showing logs of a failed connector task

  4. Application Integration automatically runs the required query for the failed connectors task and opens the Logs Explorer page to display the detailed execution log data.

To manually retrieve the log data of a failed connectors task, you can run the following query in the Logs Explorer's Query page. For more information about how to use Logs Explorer, see Logs Explorer interface.

Query format

resource.type="connectors.googleapis.com/Connection"
jsonPayload.integration_connectors_trace_id="EXECUTION_ID_EXECUTION_TASK_ID_EXECUTION_ATTEMPT_NUMBER"

Example

resource.type="connectors.googleapis.com/Connection"
jsonPayload.integration_connectors_trace_id="9db51e4b-7d57-473d-931f-cc27b282dfad_1_2"

Limitation

  • If local logging is disabled for an integration, then the execution logs are not generated for that integration.

What's next