sentry log list
List and stream logs from Sentry projects. Supports real-time streaming with the--follow flag and filtering by trace ID with the --trace flag.
Usage
Target Patterns
Trace Filtering
When--trace is provided, only organization resolution is needed (the trace-logs endpoint is org-scoped). The positional target is treated as an org slug, not an org/project pair.
Flags
Number of log entries to retrieve (1-1000)Alias:
-nExample:Filter query using Sentry search syntaxAlias:
-qExample:Stream logs in real-time. Optionally specify poll interval in seconds (default: 2s).When enabled, continuously polls for new logs. Press Ctrl+C to stop.Alias:
-fExample:Filter logs by trace ID (32-character hex string)When provided, switches to org-scoped trace-logs endpoint.Example:
Output as JSON (one log entry per line in single-fetch mode, or array in streaming mode)Example:
Examples
Basic Usage
Streaming Mode
Filtering
JSON Output
Sample Output
Human-Readable Format
Streaming Mode
JSON Format
Notes
- By default, logs are displayed in chronological order (oldest first) with the most recent 100 entries
- The API returns logs newest-first; the CLI automatically reverses them for tail-like behavior
- In streaming mode, the command polls every 2 seconds by default (configurable with
-f <seconds>) - Press Ctrl+C to stop streaming mode cleanly
- When using
--trace, the endpoint searches logs from the last 14 days across all projects in the org - Standard (project-scoped) mode shows logs from the last 90 days by default
- The trace column shows a short suffix of the trace ID; use
--traceto filter to a specific trace
See Also
- sentry log view - View details of a specific log entry
- sentry trace logs - Alternative command for trace-filtered logs
- sentry trace view - View trace details with span tree