Configure retention
You will learn how to set retention days and optional max stored bytes.
Retention controls how long events stay in a stream. An optional size cap deletes oldest events first when storage grows too large.
Set retention when creating a stream
In Create stream, choose Retention:
| Preset | Typical use |
|---|---|
| 3 days | Short debug windows |
| 7 days | Weekly ops |
| 30 days | Default for many streams |
| 90 days | Longer investigations |
| 1 year | Compliance-style keep |
You can change retention later on the Streams page.
Optional size limit
Max stored bytes is optional.
- Leave empty (or
0) for no size limit. - Set a whole number of bytes when you want a hard ceiling.
When both retention days and a size cap apply, time-based deletion still runs; the size valve removes oldest events first if the stream exceeds the cap.
Where to edit
- Select the stream.
- Open Streams.
- Edit Retention and Max stored bytes.
- Save.
Usage on Streams/Events (event count and sizes) helps you pick sensible limits.
What users notice
- After retention runs, older events disappear from Events, Query, and views for that window.
- Analytics storage is cleaned to match — Query cannot return purged history.
Next
- Streams: Create and manage streams
- Concepts: Streams and ingest
- Return to Workflows