Skip to content

[Replays] Ability to exclude specific DOM Elements from Mutation Tracking #16831

Open

Description

@dalnoki

Problem Statement

The mutation tracking system currently halts replay when significant DOM mutations are detected, with the message:
“Significant mutations detected (N). Replay is now stopped to prevent poor performance for your customer.”

This is helpful for ensuring performance, but it lacks a way to exclude specific DOM elements from mutation tracking (elements that are safe to ignore).

In the customer's case, a specific <div> generates frequent mutations due to an SVG visualization library (D3.js). These mutations are expected and not relevant to user interaction tracking. However, they contribute heavily to the mutation count, triggering the above warning and halting replay.

They don't want to increase the mutation limit globally, as that could degrade performance in real problem areas.
and also cannot change or refactor the D3 code for architectural reasons.

Solution Brainstorm

Add a configuration option or API that allows developers to explicitly exclude certain DOM elements (e.g., via a CSS selector or attribute) from mutation tracking.

Product Area

Replays

Activity

  1. getsantry commented on Mar 27, 2025

    @getsantry

    Assigning to @getsentry/support for routing ⏲️

  2. moved this to Waiting for: Support in GitHub Issues with 👀 3on Mar 27, 2025
  3. getsantry commented on Mar 27, 2025

    @getsantry

    Routing to @getsentry/product-owners-replays for triage ⏲️

  4. moved this from Waiting for: Support to Waiting for: Product Owner in GitHub Issues with 👀 3on Mar 27, 2025
  5. billyvg commented on Mar 27, 2025

    @billyvg
    Member

    This feature request makes sense to me, we'll talk about it and discuss prioritization.

  6. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Mar 27, 2025
  7. added theissue type on Mar 27, 2025
  8. billyvg commented on Apr 23, 2025

    @billyvg
    Member

    @dalnoki actually, I think it can be excluded if it is blocked

  9. SteamWind commented on May 26, 2025

    @SteamWind

    @dalnoki actually, I think it can be excluded if it is blocked

    Hello, I'm the one behind the request. I tried to add the id of the svg to the block list and alternatively with data-sentry-block, tried to increase the range of blocked div, but still have this problem.
    That's why I created a ticket. I just tested back now and experienced the same problem.

    Image

  10. 13 remaining items

  11. added theissue type on Jul 7, 2025
  12. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Jul 7, 2025
  13. transferred this issue fromgetsentry/sentryon Jul 7, 2025
  14. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Jul 8, 2025
  15. SteamWind commented on Jul 14, 2025

    @SteamWind

    Thanks, is it still in experiment?

  16. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Jul 14, 2025
  17. andreiborza commented on Jul 14, 2025

    @andreiborza
    Member

    @SteamWind yes, but you should be able to use it safely.

  18. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions