Skip to content

RUM: document exclusion filters and restructure the retention filters page - #39386

Open
qsellem wants to merge 11 commits into
masterfrom
quentin.sellem/rum_exclusion_filters
Open

RUM: document exclusion filters and restructure the retention filters page#39386
qsellem wants to merge 11 commits into
masterfrom
quentin.sellem/rum_exclusion_filters

Conversation

@qsellem

@qsellem qsellem commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

What does this PR do? What is the motivation?

Documents exclusion filters, a new type of RUM filter evaluated between the permanent and the custom retention filters, and reorganizes the retention filters page around the three filter types that now exist.

An event matching an exclusion filter is not evaluated against the custom retention filters, so it can never be the reason its session is retained. Today customers achieve this by repeating negative queries inside every filter — one org maintains the same bot exclusion across 179 custom retention filters — which is the pain this feature removes.

New page structure (previous order in parentheses):

Section Change
Overview edited — names the three filter types
How it works edited and shortened
Types of filters new — the path an event takes, plus a table of what a match does
Permanent retention filters unchanged content, new screenshot
Exclusion filters new, marked Preview, with the Error Tracking filter as a subsection
Custom retention filters new wrapper around Excluding sessions using retention filters (was ##)
Setup new — how to reach the page, with Creating a filter, Modifying filters and Capping retention with quotas as subsections
How retention filters work with replays moved down
Cross-product retention filters, Best practices, API, Next steps unchanged

Sections follow the order in which an event is evaluated: permanent, exclusion, custom.

The distinction the page now makes explicit: retention filters are session-scoped — one matching event retains the whole session. Exclusion filters are event-scoped — a matching event is skipped, but its session can still be retained by another event. This is the single most confusable part of the feature, so it gets a callout in Exclusion filters.

Other changes

  • Rewrote Excluding sessions using retention filters rather than deleting it: in-query exclusions still work but only apply to the filter that contains them, with a pointer to exclusion filters for configuration-wide exclusion.
  • Updated guide/retention_filter_best_practices.md to mention exclusion filters, and fixed its link to retention_filters/#logic — an anchor that does not exist on the page (now #how-it-works).
  • Heading text for Modifying filters and Excluding sessions using retention filters is unchanged even though both are now nested, so existing deep links from the best practices guides still resolve.

Merge readiness

  • Ready for merge

Remaining before merge:

  1. Two screenshots still show the previous UI: modifying-filters.png, and the rum-without-limits-how-retention-filters-work-2.png flow diagram at the top of How it works, which still shows the two-stage model. The three filter-group screenshots and the permanent filters screenshot are updated to the new grouped UI.
  2. Preview launch timing — the Exclusion filters section links to https://www.datadoghq.com/product-preview/rum-exclusion-filters/, which 404s until the form is published.

For Datadog employees:

AI assistance

Used Claude Code to draft the restructure from the product brief and to audit inbound anchor links across the docs. Reviewed manually.

Additional notes

Open questions for reviewers:

  • Error Tracking exclusion filter default state — the page says you can enable or disable it but not delete it. It does not say whether it is on or off by default for existing orgs, because the brief doesn't specify. Needs a sentence once decided.
  • API — the API section is unchanged. The API reference does not document exclusion-filter endpoints yet (/api/latest/ has rum-retention-filters and rum-retention-quota only), so linking there now would send readers to a page that can't help them. Follow-up once the endpoints publish, along with Terraform coverage if applicable.
  • UI steps for creating an exclusion filter were written against the design prototype in the brief and should be checked against the shipped UI.

… page

Exclusion filters are a new type of filter, evaluated between the
permanent and the custom retention filters. An event matching an
exclusion filter is not evaluated against the custom retention filters,
so it can never be the reason its session is retained.

Because there are now three types of filters, the page is reorganized so
that each type is documented in its own section:

- New "Types of filters" section: the path an event takes through the
  three types, and a table contrasting what a match does in each case.
  Exclusion filters are event-scoped; retention filters are
  session-scoped. This is the distinction most likely to be misread.
- "Creating a retention filter", "Modifying filters" and "Excluding
  sessions using retention filters" are now subsections of a new
  "Custom retention filters" section. Heading text is unchanged so
  existing deep links still resolve.
- New "Exclusion filters" section (Preview), covering the event type +
  query model, "All events" targeting, order-independence, and the
  predefined filter for errors ignored in Error Tracking.
- "Excluding sessions using retention filters" is rewritten: in-query
  exclusions are scoped to a single filter, and exclusion filters are
  the way to exclude across the whole configuration.
- "How retention filters work with replays" moves below the filter
  types, next to the other cross-cutting sections.

Also updates the best practices guide to point at exclusion filters, and
fixes its link to retention_filters/#logic, an anchor that does not exist
on the page (now #how-it-works).

Screenshots still show the previous UI and are replaced before merge.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the Guide Content impacting a guide label Aug 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

qsellem and others added 9 commits August 21, 2026 16:29
- Overview: how to reach the Retention Filters page, including the new
  Settings entry point, instead of repeating it in the creation steps.
- Types of filters: drop the billing claim from the table (it does not
  hold for the forced replay permanent filter) and the scope column and
  paragraph; the event-scope point stays in the Exclusion filters
  callout.
- Exclusion filters: tighter definition, no cross-product mention.
- "Creating a filter" and "Modifying filters" are now standalone
  sections covering both custom retention and exclusion filters.
- Excluding sessions: the minimum retention rate is 0.1%, not 1%.
- Error Tracking filter: cannot be edited either.
- Quotas link now reads "Retention Quotas", matching the nav entry.
- Link the mobile conditional recording APIs.
- Drop the cross-product note about filter ordering.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Adds a Setup section holding the page access instructions, with
"Creating a filter", "Modifying filters" and "Capping retention with
quotas" as its subsections, matching how other RUM pages are laid out.

Exclusion filters now come before custom retention filters, so the
sections follow the order in which an event is evaluated.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the Images Images are added/removed with this PR label Aug 21, 2026
@qsellem
qsellem marked this pull request as ready for review August 21, 2026 20:06
@qsellem
qsellem requested review from a team as code owners August 21, 2026 20:06

@OliviaShoup OliviaShoup left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks great!

one non-blocking structural note. ## Exclusion filters and ### Excluding sessions using retention filters (a subsection two headings later, under Custom retention filters) are very similarly named for two different concepts. I see the PR description explains the heading text is intentionally unchanged to preserve existing deep links but flagging since a reader or AI agent skimming headings alone could conflate the two

#### Disable a filter

Disabled filters simply ignore events and do not make any sampling decisions. Events flowing in the list will skip disabled filters.
Disabled filters simply ignore events. A disabled custom retention filter makes no sampling decision, and a disabled exclusion filter excludes no event.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"simply" is on our remove-filler-word list

Suggested change
Disabled filters simply ignore events. A disabled custom retention filter makes no sampling decision, and a disabled exclusion filter excludes no event.
Disabled filters ignore events. A disabled custom retention filter makes no sampling decision, and a disabled exclusion filter excludes no event.


To keep a single filter from matching a subset of events, add exclusions **inside that filter's query**. For example:

- Adding `-version:(1* OR 2*)` to a retention filter ensures that filter never keeps events from older versions 1 and 2 of your application.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a style guide thing

Suggested change
- Adding `-version:(1* OR 2*)` to a retention filter ensures that filter never keeps events from older versions 1 and 2 of your application.
- Adding `-version:(1* OR 2*)` to a retention filter helps ensure that filter never keeps events from older versions 1 and 2 of your application.

- Retained sessions are saved and accessible in the Session Explorer and other RUM pages. New events coming from this session do not go through the list of retention filters, but are automatically kept to ensure complete visibility.
- Each event is evaluated against your filters in sequence.
- When an event matches a filter, the retention rate decides retention for the whole session. Either way, the event is not evaluated against the following filters, which is why the **order of retention filters matters**.
- Once a session is retained, it is available in the Session Explorer and other RUM pages, and its later events are kept automatically instead of going through the filters.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

totally optional

Suggested change
- Once a session is retained, it is available in the Session Explorer and other RUM pages, and its later events are kept automatically instead of going through the filters.
- After a session is retained, it is available in the Session Explorer and other RUM pages, and its later events are kept automatically instead of going through the filters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Guide Content impacting a guide Images Images are added/removed with this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants