Summarize log entries with Gemini assistance

This document describes how you can use Gemini, an AI-powered collaborator in Google Cloud, to summarize a log entry in Cloud Logging. When you are investigating an issue, log entry summaries can help you to interpret activity in a log.

This documentation assumes that your Google Cloud project already collects the logs that you want to explore.

Gemini doesn't use your prompts or its responses as data to train its models. For more information, see How Gemini for Google Cloud uses your data.

Before you begin

  1. Ensure that Gemini is set up for your Google Cloud user account and project.
  2. In the Google Cloud console, on the project selector page, select your Google Cloud project.

    Go to project selector

Summarize a log entry

Logging only sends the text of a log entry to Gemini, so responses are based only on that text and don't include context from other log entries or other resources in your Google Cloud project. For information about how Gemini handles data, see Data governance in Gemini.

To summarize a log entry, do the following:

  1. In the Google Cloud console, go to the Logs Explorer page:

    Go to Logs Explorer

    If you use the search bar to find this page, then select the result whose subheading is Logging.

  2. Find the log that you want to review.

    • If needed, refine the scope. By default, the Logs Explorer displays logs that are generated in the project or routed directly to the project, but not logs that are routed to log buckets in the project.
    • Use the query editor to adjust the time range and specify criteria for finding the log.
  3. Select the log entry that you want to summarize.

  4. Click Explain this log entry.

    Logging sends the text of the log entry to Gemini with a prompt to summarize the contents of the log entry. Gemini responds with a generated summary in the Gemini pane. The summary is based only on the text of the log entry without any additional context.

What's next