getsentry / getsentry/sentry-javascript

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

Ouverte
#16,831 11 commentaires 2 réactions 1 personne assignée Réclamée par @billyvg Voir sur GitHub
Explore > Replays Feature Replays
Langage dominant
TypeScript
Étoiles
8.7k
Forks
1.8k
Merge moyen
1 j 17 h
PR mergées (30 j)
515

Description

### 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 `

` 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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.