Commands
explore
Query aggregate event data (Explore)
sentry explore <target>
Section titled “sentry explore <target>”Query aggregate event data (Explore)
Arguments:
| Argument | Description |
|---|---|
<target> | Target: <org>/<project>, <org>/, or <project>. Auto-detected if omitted. |
Options:
| Option | Description |
|---|---|
-F, --field <field>... | API field or aggregate (repeatable). E.g., title, "count()", "p50(transaction.duration)" |
-d, --dataset <dataset> | Dataset to query (errors, spans, metrics, logs) (default: "errors") |
-q, --query <query> | Search query (Sentry search syntax) |
-s, --sort <sort> | Sort field (prefix with - for desc, e.g., "-count()") |
-n, --limit <limit> | Number of rows (1-100) (default: "25") |
-t, --period <period> | Time range: "7d", "2026-03-01..2026-04-01", ">=2026-03-01" (default: "24h") |
-f, --fresh | Bypass cache, re-detect projects, and fetch fresh data |
-c, --cursor <cursor> | Navigate pages: "next", "prev", "first" (or raw cursor string) |
All commands support --json for machine-readable output and --fields to select specific JSON fields.
Examples
Section titled “Examples”Top errors (default)
Section titled “Top errors (default)”# Top errors in the last 24 hours, scoped to a projectsentry explore my-org/cli
# All projects in an orgsentry explore my-org/
# Bare project slug (searches across orgs)sentry explore cli
# Auto-detect from DSN/configsentry exploreSpike analysis
Section titled “Spike analysis”# Errors with user impact for a specific UTC windowsentry explore my-org/cli -F title -F "count()" -F "count_unique(user)" \ --period "2024-01-15T00:00:00Z/2024-01-16T00:00:00Z"
# Filter by specific error type (combines with auto-injected project filter)sentry explore my-org/cli -F title -F "count()" \ -q "error.type:TypeError" --period 1hSpan queries (performance)
Section titled “Span queries (performance)”# Span operation latency by routesentry explore my-org/cli -F span.op -F "p50(span.duration)" \ -F "p95(span.duration)" --dataset spans --period 1h
# Top spans by countsentry explore my-org/cli -F span.op -F "count()" \ --dataset spans --sort "-count()"Metrics
Section titled “Metrics”# Custom metric aggregationssentry explore my-org/cli -F transaction -F "avg(measurements.fcp)" \ --dataset metrics --period 24h# Log severity counts in the last hoursentry explore my-org/cli -F severity -F "count()" \ --dataset logs --period 1hJSON output for scripting
Section titled “JSON output for scripting”# Pipe to jq for filteringsentry explore my-org/cli -F title -F "count()" --json | jq '.data[:5]'
# Get raw data for analysissentry explore my-org/cli -F title -F "count()" -F "count_unique(user)" \ --json --limit 100Target Patterns
Section titled “Target Patterns”| Target | Behavior |
|---|---|
<org>/<project> | Auto-adds project:<slug> to query |
<org>/ | All projects in org (no project filter) |
<project> | Searches for project across all accessible orgs |
| (omitted) | Auto-detect from DSN/config |