Skip to content

Browser freeze caused by React traces #18020

@etienne-scaleway

Description

@etienne-scaleway

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which SDK are you using?

@sentry/react

SDK Version

10.10.0

Framework Version

React 19.2.0

Link to Sentry event

No response

Reproduction Example/SDK Setup

init({
  // ...
  integrations: [
      browserTracingIntegration(),
  ]
})

Steps to Reproduce

My app started to randomly freeze for a few second every now a then, I figured out that the freezing was happening when certain errors were send by sentry, those errors have a huge payload (~1MB for the one I looked at). This payload appear to be caused by a lot or spans generated by React

        {
            "data": {
                "sentry.origin": "auto.resource.browser.metrics",
                "sentry.op": "measure",
                "sentry.browser.measure.detail.devtools": "{\"properties\":[[\"Component name\",\"Router2\"],[\"Method name\",\"this.setState()\"]],\"track\":\"Blocking\",\"trackGroup\":\"Scheduler ⚛\",\"color\":\"primary-light\"}"
            },
            "description": "Update",
            "op": "measure",
            "parent_span_id": "bbc16784926ef270",
            "span_id": "b6eef92fdcbc9e04",
            "start_timestamp": 1761213364.9232,
            "timestamp": 1761213364.9232998,
            "trace_id": "56586792ec074c77b6bc8ae28f0f2daa",
            "origin": "auto.resource.browser.metrics"
        },

My understanding is that this is caused by the new Performance tracks introduced by React.

The issue is not present in production (only in dev) which make sense as React does not generate traces in productions build.

Note

We are not using the latest SDK, I'll try to update later didn't had time yet and I didn't see any mention of this issues in the latest release notes.

Additional Context

Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions