Log Search, Dataset Ingestion, Custom Fields, and Dashboards
How Cloudflare Log Explorer stores logs, configures datasets and custom fields, runs SQL search, and ties into Observability Logs and custom dashboards.
This page summarizes Cloudflare documentation on Log Explorer (Legacy) and Observability Logs: storing edge and Zero Trust logs in the dashboard, choosing what to ingest, searching with filters or SQL, and charting unsampled data on custom dashboards. Log Explorer is a paid add-on; datasets and queries are increasingly unified under Observability > Logs.
Log Explorer and Observability Logs: where to search stored logs
Section titled “Log Explorer and Observability Logs: where to search stored logs”Log Explorer lets you store and explore Cloudflare logs in the dashboard or API without forwarding everything to a third-party SIEM. Logs are kept on Cloudflare’s network (using Logpush and R2 behind the scenes), and investigation happens in Log Search, now reached from the shared Logs experience under Observability.
Log Explorer datasets are now queried from the Logs page under Observability in the Cloudflare dashboard. The Logs page brings Log Explorer and Workers Observability datasets together with a shared filter builder, SQL editor, and visualizations.
— Cloudflare, Query Log Explorer datasets from Observability Logs
Store and explore your Cloudflare logs directly within the Cloudflare dashboard or API.
— Cloudflare, Log Explorer (Legacy)
The product is labeled Legacy because it is merging into Observability Logs; subscriptions, enabled datasets, saved queries, and API access continue to work. The older Log Search UI may still be available at its direct URL; navigation no longer shows a separate Log Explorer menu item. For live tailing (not long-term storage), Instant Logs is integrated into Observability > Logs as a streaming mode.
When to use Log Search vs Trace vs sampled analytics
Section titled “When to use Log Search vs Trace vs sampled analytics”Use Log Explorer when you need actual production traffic: historical trends, post-incident forensics, pattern search across many requests, or evidence tied to a Ray ID. Use Rule simulator (Cloudflare Trace) for simulated “what-if” rule behavior—not the same as Log Explorer or Workers Traces.
Use Log Explorer when you need to investigate what actually happened with real production traffic… The key difference is that Log Explorer shows actual traffic, while Cloudflare Trace shows simulated “what-if” scenarios.
— Cloudflare, Log Search
On Observability Logs, you can also query sampled analytics datasets for a zone without enabling Log Explorer ingestion—useful for trends, not for every-event forensics.
| Need | Typical choice |
|---|---|
| Every logged event, SQL, long retention | Log Explorer datasets |
| Fast trends on high volume | GraphQL analytics datasets on Logs |
| Live stream, no add-on storage | Instant Logs mode |
| Exact counts in a dashboard chart | Log Explorer dataset as chart source (Custom dashboards) |
Manage datasets: enable ingestion, fields, filters, and deletion
Section titled “Manage datasets: enable ingestion, fields, filters, and deletion”Manage datasets controls which Log Explorer streams are stored, which fields are ingested, and whether ingestion filters apply. Ingestion is billed by volume; queries after ingest are not charged separately (see Pricing and managing usage).
You can enable, disable, or delete the Log Explorer datasets available to query in Logs.
— Cloudflare, Manage datasets
- Open Manage datasets from Observability > Logs (dataset selector → Configure next to Log Explorer datasets) or the linked dashboard entry.
- Select Add dataset, pick a dataset (and zone for zone-scoped datasets).
- Under Select fields, choose fields to ingest; under Filter logs, choose all events or filtered events.
- Select Add. Expect a few minutes before new logs are queryable.
Ingestion starts from the moment you enable the dataset. Logs for events that occurred before you enabled the dataset are not available.
— Cloudflare, FAQ
Ingest field selection and dataset configuration
Section titled “Ingest field selection and dataset configuration”Ingest field selection replaces an “all or nothing” field list: you pick recommended or specific fields, update an enabled stream later, and keep querying fields for periods when they were captured. Timestamp stays mandatory.
Core fields, such as Timestamp, are automatically retained to ensure your logs remain searchable and chronologically accurate.
— Cloudflare, Ingest field selection for Log Explorer
The refreshed configuration UI adds grouped field selection, field types, deprecated markers, bulk select/reset, and ingestion filters (all events vs conditions). See Improved dataset configuration in Log Explorer and Manage datasets — Configure fields and filters.
Example API-style configuration from the changelog:
{ "dataset": "firewall_events", "enabled": true, "fields": [ "Timestamp", "ClientRequestHost", "ClientIP", "Action", "EdgeResponseStatus", "OriginResponseStatus" ]}Account- and zone-level datasets can be enabled via the dashboard or API (see Manage datasets — API). Datasets lists products, enablement locations, and estimates; Zero Trust sets such as access_requests, gateway_http, and gateway_dns are documented under Zero Trust logs.
Delete datasets and turn off Log Explorer
Section titled “Delete datasets and turn off Log Explorer”Dataset deletion is permanent, asynchronous, and protected by default (deletion_protection). You cannot recreate the same dataset while deletion runs.
Dataset deletion is irreversible and runs asynchronously. You cannot recreate the same dataset while deletion is in progress.
— Cloudflare, Delete Log Explorer datasets
To stop charges you must stop ingestion (disable account- and zone-level datasets) and cancel the Log Explorer subscription on Billing—canceling the subscription alone does not stop ingestion during the current cycle (FAQ — How do I turn off Log Explorer?, Pricing and managing usage).
Monitor ingested data volume at the top of Log Search and Manage Datasets screens (Usage tracking).
Log Search and SQL: filter by Ray ID, date, and status codes
Section titled “Log Search and SQL: filter by Ray ID, date, and status codes”Open Observability > Logs, choose a Log Explorer dataset, set time range, then use the filter builder or Open SQL editor. SQL applies to Log Explorer datasets only; always narrow on the date column (YYYY-MM-DD) for faster scans.
All Log Explorer datasets contain a special column called date, which helps to narrow down the amount of data that is scanned to respond to your query, resulting in faster query response times.
— Cloudflare, Log Search
For HTTP errors, documentation points investigators to filter by Ray ID—for example when troubleshooting 4xx client errors or Cloudflare 5xx errors—via Observability > Logs (Cloudflare Ray ID).
Example Ray ID lookup:
SELECT clientRequestScheme, clientRequestHost, clientRequestMethod, edgeResponseStatus, clientRequestUserAgentFROM http_requestsWHERE RayID = '806c30a3cec56817'LIMIT 1Workflow aids include saved searches, query cancellation, a query results distribution chart over the selected window, resizable SQL editor, and multiple query tabs with filter pivots (Tabs and pivots, Query cancellation, Query result distribution). From results you can contextually pivot—for example right-click IP or JA3 to Investigate, open docs from EdgeResponseStatus, or open a Gateway policy from policyid (Contextual pivots).
Security Analytics can hand off filters to Log Explorer; raw logs in Security Analytics share the same underlying store when volume is low enough. To exclude Early Hints probe traffic from queries, use ClientRequestSource != "earlyHintsCache" (Early Hints).
Custom fields: log headers and cookies for Logpush and Log Explorer
Section titled “Custom fields: log headers and cookies for Logpush and Log Explorer”The HTTP requests dataset does not include arbitrary headers or cookies until you configure custom fields per zone. Configuration applies to all Logpush jobs in that zone that include request headers, response headers, or cookies—including account-scoped jobs (each zone still needs its own custom field rules).
You can add custom fields to your HTTP request log entries in the form of HTTP request headers, HTTP response headers, and cookies.
— Cloudflare, API configuration — Custom fields
Create a custom field to log desired header or cookie values into the http_requests dataset and Log Explorer will import these as searchable fields.
— Cloudflare, Logging headers and cookies using custom fields
Defaults: request headers log as raw values; response headers as transformed values. Each header is logged in only one format—not both. Choosing raw vs transformed for overrides is API-only, not the dashboard UI (Custom fields raw and transformed values, Custom fields).
There is no “log all headers” switch: each header or cookie must be named explicitly. After enabling fields, query them in SQL (for example requestheaders."x-test-header" in Log Search — Headers and cookies).
Custom dashboards: sampled GraphQL vs unsampled Log Explorer charts
Section titled “Custom dashboards: sampled GraphQL vs unsampled Log Explorer charts”Custom dashboards are available to all Cloudflare customers (up to 100 dashboards per account). Charts can use 100+ GraphQL analytics datasets, Workers Observability logs/traces, and—if you have Log Explorer—Log Explorer datasets for raw, unsampled series.
Log Explorer customers can create charts and dashboards using their raw, unsampled log data. This is useful when precision matters — for example, when monitoring for specific error conditions… Standard analytics datasets use sampled data…
— Cloudflare, Custom dashboards — Log Explorer data
Log Explorer is GA with dashboard, Log Search, saved queries, and account/zone access (Log Explorer is GA). You cannot turn an ad-hoc Log Search query directly into a dashboard chart; build the chart from a dataset in the dashboard UI (FAQ). For hostname-level SaaS analytics (pageviews, bots, speed), GraphQL filters on clientRequestHTTPHost are described in Hostname analytics.
Pricing, retention, limits, and permissions
Section titled “Pricing, retention, limits, and permissions”| Item | Documented value |
|---|---|
| Ingestion | About $1 per GB ingested (Log Explorer line item; see pricing detail) |
| Default retention | 30 days (Pricing) |
| Extended retention | Up to 2 years for contract customers, $0.10 per GB per month (Extended retention) |
| Query cost | No additional charge once data is stored (Pricing and managing usage) |
| Ingest rate cap | Up to 50,000 records per second (contact account team if higher) (FAQ) |
| Availability | Paid add-on with Application Services or Zero Trust; no free tier (FAQ) |
Roles matter: Log Share Reader (or equivalent) for search; Administrator / Logs Edit for saved queries and dataset management; Analytics for dashboards; extra roles for Zero Trust PII and audit datasets (Log Explorer — Permissions). R2 buckets used for Log Explorer storage are not visible in your account’s R2 UI; storage is included in Log Explorer usage (FAQ).
Common mistakes when enabling log search
Section titled “Common mistakes when enabling log search”- Enabling a dataset and querying before new traffic arrives—only events after enablement are stored (FAQ).
- Running wide SQL without a
date(or tight time) predicate, causing slow or costly scans (Log Search). - Expecting custom headers in Log Explorer without Custom fields and without including header fields in the Logpush job.
- Assuming cancel subscription alone stops ingestion—it does not until datasets are disabled (Manage datasets, FAQ).
- Confusing sampled Security Analytics with Log Explorer’s full store (Security Analytics).
How to check this on your site
Section titled “How to check this on your site”- In the Cloudflare dashboard, open Observability > Logs and confirm your Log Explorer datasets appear in the dataset selector after Manage datasets enablement.
- Run a narrow SQL query on
http_requestswith adatefilter and a known Ray ID from an error page (Log Search, Cloudflare Ray ID). - On Manage datasets, verify monthly ingested data matches expectations (Usage tracking).
- If you configured headers, confirm a Logpush job includes header fields and that SQL can filter a test header (Custom fields, Log Search — Headers and cookies).
- You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page does not match your account behavior or the linked Cloudflare docs, email yimasynthetic@gmail.com with the page URL and the exact statement you are questioning so it can be corrected or clarified.