sentry-javascript icon indicating copy to clipboard operation
sentry-javascript copied to clipboard

Add DOM node counts to replay SDK

Open billyvg opened this issue 1 year ago • 0 comments

We currently show a DOM node count in the UI, but it's calculated on the frontend/UI side which is quite expensive.

We should instead calculate this on SDK (source) by either:

  • document.querySelectorAll('*')
  • record.mirror.idNodeMap

The former include elements that replay does not capture (meta, script and svg). The latter includes text nodes. I think using the rrweb mirror makes more sense since we would then be reporting what we are recording in the replay. It is also currently what we show in the replay details by the frontend.

billyvg avatar Oct 16 '24 19:10 billyvg