Skip to content
Docs GitHub

explore

Query aggregate event data (Explore)

Query aggregate event data (Explore)

Arguments:

ArgumentDescription
<target>Target: <org>/<project>, <org>/, or <project>. Auto-detected if omitted.

Options:

OptionDescription
-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, --freshBypass 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.

Terminal window
# Top errors in the last 24 hours, scoped to a project
sentry explore my-org/cli
# All projects in an org
sentry explore my-org/
# Bare project slug (searches across orgs)
sentry explore cli
# Auto-detect from DSN/config
sentry explore
Terminal window
# Errors with user impact for a specific UTC window
sentry 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 1h
Terminal window
# Span operation latency by route
sentry explore my-org/cli -F span.op -F "p50(span.duration)" \
-F "p95(span.duration)" --dataset spans --period 1h
# Top spans by count
sentry explore my-org/cli -F span.op -F "count()" \
--dataset spans --sort "-count()"
Terminal window
# Custom metric aggregations
sentry explore my-org/cli -F transaction -F "avg(measurements.fcp)" \
--dataset metrics --period 24h
Terminal window
# Log severity counts in the last hour
sentry explore my-org/cli -F severity -F "count()" \
--dataset logs --period 1h
Terminal window
# Pipe to jq for filtering
sentry explore my-org/cli -F title -F "count()" --json | jq '.data[:5]'
# Get raw data for analysis
sentry explore my-org/cli -F title -F "count()" -F "count_unique(user)" \
--json --limit 100
TargetBehavior
<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