Skip to main content

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
default:"100"
Number of log entries to retrieve (1-1000)Alias: -nExample:
string
Filter query using Sentry search syntaxAlias: -qExample:
number
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:
string
Filter logs by trace ID (32-character hex string)When provided, switches to org-scoped trace-logs endpoint.Example:
boolean
default:"false"
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 --trace to filter to a specific trace

See Also