# Sticky Events

Keep a few important events on top of the list while new ones keep coming. Example: you watch a long Monolog
stream, and the one error you are working on stays in view.

Since server `2.17.0` (frontend `1.45.0`).

## Make an event sticky

- Click the **Keep on top of the list** button in the card header (an arrow pointing up to a bar).
- Or select a card with the keyboard and press <kbd>t</kbd>. Press <kbd>t</kbd> again to release it.

The event moves into a block above the feed. New events arrive below it, and the block stays where it is.

Making an event sticky also **pins** it, so **Clear** does not remove it. Releasing it keeps the pin: unpin it
yourself when you no longer need it. If you unpin an event that is still on top, it stays on top, but the next
**Clear** removes it.

## The block above the feed

- It shows the sticky events of the page you are on: Sentry events on the Sentry page, every type on **All events**.
- Search, pause and [feed filters](./feed-filters.md) do not hide them: they stay in sight on purpose.
- Events keep the order in which you made them sticky. A sticky event is not repeated in the feed below.
- The block takes at most half of the list height. With more events it scrolls on its own.
- <kbd>j</kbd> and <kbd>k</kbd> walk through the sticky block first, then the feed.

## How many events

**Settings → Appearance → Events kept on top** sets the limit: from 1 to 20, 3 by default. Past the limit the button and the
<kbd>t</kbd> key do nothing and show a notice. Release one event first. If you lower the limit, the oldest sticky
events are released at once.

Which events are sticky is kept in this browser only (local storage): another browser or another person has its own
list. The pins are on the server. With [sign-in](./sso.md) on, the limit follows your account.

## Send an event that is already sticky

Your app can ask for an event to arrive on top. Put `"is_sticky": true` at the **top level** of the event JSON. The
event then arrives on top of the list and pinned. When the limit is reached, the oldest sticky event is released to
make room.

This works for event types whose stored JSON is what your client sent:

```bash
# Monolog over TCP (one JSON record per line)
echo '{"message":"payment failed","context":{},"level":400,"level_name":"ERROR","channel":"app","datetime":"2026-11-30T10:00:00+00:00","extra":{},"is_sticky":true}' \
  | nc 127.0.0.1 9913

# Ray
curl -X POST http://127.0.0.1:8000/ -H 'Content-Type: application/json' -H 'User-Agent: Ray 1.0' \
  -d '{"uuid":"r1","payloads":[{"type":"log","content":{"values":["checkout"]},"origin":{"file":"a.php","line_number":1}}],"meta":{},"is_sticky":true}'

# Sentry
curl -X POST http://127.0.0.1:8000/api/1/store/ -H 'X-Sentry-Auth: Sentry sentry_version=7, sentry_key=k' \
  -H 'Content-Type: application/json' \
  -d '{"event_id":"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","platform":"php","level":"error","message":"m","is_sticky":true}'
```

- Only the top level counts. `is_sticky` inside Monolog `context` or `extra`, or in Sentry tags, does nothing.
- Only `true` counts: `"is_sticky": "yes"` does nothing.
- HTTP dumps, HTML pages and Inspector events cannot arrive sticky: their stored JSON is not your raw body.
  Make them sticky by hand.
- Ray joins requests with the same `uuid` into one event, so only the first request of a `uuid` can make it sticky.
- If you released an event yourself, reloading the page does not make it sticky again.

A status event that is both sticky and updated with a [replace key](./replace-key.md) stays on top and shows its
latest state.

## Limits

- Up to 20 sticky events, 3 by default.
- The list of sticky events is per browser. Clearing the site data in the browser forgets it; the pins stay on
  the server.
- The feed keeps the newest 500 events. Past that it drops the oldest **unpinned** event, so a sticky (pinned) event
  is not lost.
