Skip to content
Docs GitHub

event

View, list, and send Sentry events

sentry event view <org/project/event-id...>

Section titled “sentry event view <org/project/event-id...>”

View details of one or more events

Arguments:

ArgumentDescription
<org/project/event-id...>[<org>/<project>] <event-id> [<event-id>...] - Target (optional) and one or more event IDs

Options:

OptionDescription
-w, --webOpen in browser
--spans <spans>Span tree depth limit (number, "all" for unlimited, "no" to disable) (default: "3")
-f, --freshBypass cache, re-detect projects, and fetch fresh data

List events for an issue

Arguments:

ArgumentDescription
<issue>Issue: @latest, @most_frequent, <org>/ID, <project>-suffix, ID, or suffix

Options:

OptionDescription
-n, --limit <limit>Number of events (1-1000) (default: "25")
-q, --query <query>Search query (Sentry search syntax)
--fullInclude full event body (stacktraces)
-t, --period <period>Time range: "7d", "2026-04-01..2026-05-01", ">=2026-04-01" (default: "7d")
-f, --freshBypass cache, re-detect projects, and fetch fresh data
-c, --cursor <cursor>Navigate pages: "next", "prev", "first" (or raw cursor string)

Send a Sentry event

Arguments:

ArgumentDescription
<args...>Path(s) to JSON event file(s) to send

Options:

OptionDescription
--dsn <dsn>DSN to send events to (overrides SENTRY_DSN env var)
-m, --message <message>...Event message (repeat for multi-line)
-a, --message-arg <message-arg>...Arguments for message template (repeat for multiple)
-l, --level <level>Event severity level (default: "error")
-r, --release <release>Release version
-d, --dist <dist>Distribution identifier
-E, --env <env>Environment name (e.g. production, staging)
-p, --platform <platform>Platform identifier (default: other)
-t, --tag <tag>...Tag as KEY:VALUE (repeat for multiple)
-e, --extra <extra>...Extra data as KEY:VALUE (repeat for multiple)
-u, --user <user>...User info as KEY:VALUE — id, email, username, ip_address, or custom
-f, --fingerprint <fingerprint>...Custom fingerprint part (repeat for multiple)
--timestamp <timestamp>Event timestamp (Unix epoch, ISO 8601, or RFC 2822)
--no-environDo not include environment variables in the event
--rawSend file contents as-is without parsing

All commands support --json for machine-readable output and --fields to select specific JSON fields.

Terminal window
# Send an error event (default level)
sentry event send -m "Something went wrong"
# Specify level, release, and environment
sentry event send -m "Deploy check" -l info -r 1.0.0 -E production
# Add tags and extra data
sentry event send -m "Payment failed" --tag env:prod --tag region:us-east --extra amount:99.99
# Set user context
sentry event send -m "Login error" --user id:42 --user email:alice@example.com
# Custom fingerprint to group related events together
sentry event send -m "DB timeout" --fingerprint db-timeout --fingerprint {{ default }}
Terminal window
# Send a serialized Sentry Event object
sentry event send ./crash.json
# Send without re-parsing (raw mode — also supports pre-built envelopes)
sentry event send --raw ./crash.json
sentry event send --raw ./captured.envelope

sentry event send authenticates via a DSN rather than a user token. No sentry auth login is required.

The DSN is resolved in priority order:

  1. --dsn <value> flag (explicit)
  2. SENTRY_DSN environment variable
Terminal window
# Explicit DSN
sentry event send -m "Test" --dsn "https://key@o123.ingest.us.sentry.io/456"
# Via environment variable
export SENTRY_DSN="https://key@o123.ingest.us.sentry.io/456"
sentry event send -m "Test"
Terminal window
# List events for an issue (using short ID)
sentry event list PROJ-ABC
# List events for an issue (using numeric ID)
sentry event list 123456789
# Filter by search query
sentry event list PROJ-ABC --query "browser:Chrome"
# Include full event bodies (stacktraces)
sentry event list PROJ-ABC --full
# Limit results and time range
sentry event list PROJ-ABC --limit 50 --period 24h
# Paginate through results
sentry event list PROJ-ABC -c next
sentry event list PROJ-ABC -c prev
# Output as JSON
sentry event list PROJ-ABC --json
Terminal window
sentry event view abc123def456abc123def456abc12345
Event: abc123def456abc123def456abc12345
Issue: FRONT-ABC
Timestamp: 2024-01-20 14:22:00
Exception:
TypeError: Cannot read property 'foo' of undefined
at processData (app.js:123:45)
at handleClick (app.js:89:12)
at HTMLButtonElement.onclick (app.js:45:8)
Tags:
browser: Chrome 120
os: Windows 10
environment: production
release: 1.2.3
Context:
url: https://example.com/app
user_id: 12345
Terminal window
# Open in browser
sentry event view abc123def456abc123def456abc12345 -w

Event IDs can be found:

  1. In the Sentry UI when viewing an issue's events
  2. In the output of sentry issue view commands
  3. In error reports sent to Sentry (as event_id)

The old sentry-cli top-level command is available as a hidden alias:

Terminal window
sentry send-event # same as: sentry event send