Skip to content

Add DOM node counts to replay SDK #14001

@billyvg

Description

@billyvg

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: replayIssues related to the Sentry Replay SDK

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions