For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/logs/explorer/export.md. A documentation index is available at /llms.txt.

Export Logs

Overview

At any moment, and depending on your current aggregation, export or save your log exploration as a:

  • Saved View to use as an investigation starting point for future-yourself or your teammates.
  • Dashboard widget or Notebooks widget for reporting or consolidation purposes.
  • Monitor to trigger alerts on predefined thresholds.
  • Metric to aggregate your logs into long term KPIs, as they are ingested in Datadog.
  • cURL command to test your queries in the Log Explorer and then build custom reports using Datadog APIs.
  • CSV (for individual logs and transactions). You can export up to 100,000 logs at once for individual logs, 300 for Patterns, and 500 for Transactions. You can also download a timeseries, top list, or table view as a CSV file.
  • Share View: Share a link to the current view with your teammates through email, Slack, and more. See all of the Datadog notification integrations available for this feature.
Search Filter

You can also save individual logs to a notebook by selecting Save to notebook in the log event side panel. Logs saved to notebooks are displayed in a reader-friendly format, and this display is saved in the Notebook even after the log event itself has aged out of retention.

Save logs to notebooks

To retrieve a log list longer than the maximum 1000 logs limit returned by the Logs API, use the pagination feature.

CSV export formatting

To make exported logs compatible with spreadsheet applications, Datadog sanitizes CSV exports. Exported values and column names can therefore differ from the original logs. Datadog makes the following changes:

  • Removes line breaks (\n, \r\n, \r) without inserting spaces. For example, foo\nbar becomes foobar.
  • Replaces consecutive spaces with a single space.
  • Prefixes formula characters starting with =, +, -, @, a tab, or a carriage return with a single quote (') to prevent spreadsheet applications from interpreting them as formulas.
  • Adds numeric suffixes to duplicate column names, such as message(1).

Datadog also encloses values in double quotes and escapes double quotes within values as "", following standard CSV rules.

To retrieve logs without these CSV formatting changes, use the Log Search API or Log Archives.

Further Reading