---
title: How to View Logs (public)
description: Search, filter, and inspect logs across supported DigitalOcean resources.
product: Insights
url: https://docs.digitalocean.com/products/insights/how-to/view-logs/
last_updated: "2026-10-09"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# How to View Logs (public)

DigitalOcean Insights provides observability for supported resources through metrics, logs, traces, custom dashboards, and metric alerts.

**Note**:

  This feature is in [public preview](https://docs.digitalocean.com/platform/product-lifecycle/index.html.md#public-preview). To use it, opt in from the [**Feature Preview** page](https://cloud.digitalocean.com/account/feature-preview).

Logs help you investigate activity and troubleshoot issues across supported DigitalOcean resources. You can search and filter log entries, inspect structured attributes, and adjust the time range and refresh interval to monitor recent events.

## Enable Insights During Resource Creation

After you opt in to the public preview, you can enable the available Insights telemetry from the resource creation page when you create a supported DigitalOcean resource. For Droplets and GPU Droplets, select **Install the Observability agent** to install the agent during resource creation.

For supported managed resources that do not require the Observability agent, the resource creation page displays the available logs and traces options directly. When creating [Managed Agents](https://docs.digitalocean.com/products/managed-agents/index.html.md) resources, Insights is enabled by default.

## View Logs Using the Control Panel

Use the **Logs** tab to select a region and time range, filter log data, and inspect individual log entries.

To view logs, go to the [DigitalOcean Control Panel](https://cloud.digitalocean.com/), in the left menu, click **DATA & LEARNING**, click **Insights**, and then click the **Logs** tab.

### Set the Region

At the top of the **Logs** tab, click the **Region** dropdown menu to select the region whose logs you want to view. Log queries return data from one region at a time.

### Set the Time Range and Refresh Interval

The time range, timezone, and refresh interval apply to the logs displayed on the **Logs** tab.

### Set the Time Range

To set the time range, in the top-right corner, click the **Time range** dropdown menu to select a relative range from **Last 5 minutes** through **Last 7 days**, or specify an absolute **From** and **To** range.

Use the **Timezone** field to select the timezone used to display metric timestamps. The default is your local browser timezone.

### Set the Refresh Interval

To set the refresh interval, in the top-right corner, click the **Refresh interval** dropdown menu to select **Off**, **15 sec**, **30 sec**, or **60 sec**.

Click the refresh icon to refresh the metric data immediately.

### Filter Logs

The **Logs** tab displays logs from supported resources. Use the **Filters** panel on the left to narrow the results by severity and other available fields. To the right, the results area displays the number of matching logs, a chart of log volume by severity, and a list of log entries. Each entry includes its **Timestamp**, **ServiceName**, **SeverityText**, and **Body**.

Select one or more checkboxes within a filter section to narrow the results. Click **Clear** to remove selections from that section, or click **Clear all filters** to remove all applied filters.

### View a Log Entry

You can find a log entry by entering its **Body**, **Service Name**, or **Resource Type** in the search field. To view the entry, click **>** on the left side of the entry. The expanded entry contains the following tabs:

- **Overview** displays the log body and attributes. Use **Filter attributes…** to search for the attributes you need to see. For example, `SpanId`.

  If available, click **Span Details** or **Trace Details** to open the related trace in the **Traces** tab. To share the trace, click **Share trace** in the top-right corner to copy a shareable URL to your clipboard. Click **View all logs** to open the **Logs** tab and view all logs associated with the trace.

  You can add the value to your filters by clicking **+ Add to filters**.

  You can add the value as a column in your logs by clicking **+ Add Column**. You can also remove it by clicking **- Remove Column**, if needed.

  You can copy the value on the right of it by clicking **Copy Value**.
- **JSON** displays the structured data, including its timestamp, trace and span IDs, parent span ID, span name and kind, service name, duration, status code, and status message. If available, expand attributes to inspect their contents.

## View Logs Using Automation

To view logs via the API, send a request to the [Search Logs](https://docs.digitalocean.com/reference/api/reference/insights/index.html.md#insights_post_logsSearch) endpoint with the region and search criteria.

## How to Search Logs Using the DigitalOcean API

[Create a personal access token](https://docs.digitalocean.com/reference/api/create-personal-access-token/index.html.md) and save it for use with the API.

### cURL

Send a POST request to [`https://api.digitalocean.com/v2/insights/query/{region}/logs/search`](https://docs.digitalocean.com/reference/api/reference/insights/index.html.md#insights_post_logsSearch).

Using cURL:

```shell
curl -X POST \
  -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "time_range": {
      "from": {"absolute": "2026-09-30T00:00:00Z"},
      "to": {"absolute": "2026-09-30T01:00:00Z"}
    },
    "filter": {
      "condition": {
        "field": {"name": "severity_text"},
        "operator": "FILTER_OPERATOR_EQ",
        "value": {"string_value": "Error"}
      }
    },
    "order_by": [
      {"field": {"name": "timestamp"}, "direction": "SORT_DIRECTION_DESC"}
    ],
    "pagination": {"limit": 100}
  }' \
  "https://api.digitalocean.com/v2/insights/query/nyc3/logs/search"
```