Skip to content

fix(spans): Truncate long strings for fuse.js to prevent Firefox recursion#120617

Draft
sentry[bot] wants to merge 2 commits into
masterfrom
seer/fix-spans-fuse-recursion-firefox
Draft

fix(spans): Truncate long strings for fuse.js to prevent Firefox recursion#120617
sentry[bot] wants to merge 2 commits into
masterfrom
seer/fix-spans-fuse-recursion-firefox

Conversation

@sentry

@sentry sentry Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Fixes JAVASCRIPT-22SP: "InternalError: too much recursion" in Firefox.

This error occurred in waterfallModel.tsx when fuse.js attempted to build a search index for span data. fuse.js tokenizes strings using regex, and Firefox has a stricter regex call stack limit than other browsers. When span fields like indexed, tagKeys, tagValues, dataKeys, or dataValues contained excessively long strings (e.g., raw SQL queries, large JSON blobs, or base64 payloads), the regex operations would cause a stack overflow in Firefox.

The solution truncates these strings to a maximum length of 5000 characters before they are passed to fuse.js. This prevents the recursion error without affecting the actual display or integrity of the span data, as the truncation only applies to the search index.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Fixes JAVASCRIPT-22SP

Comment @sentry <feedback> on this PR to have Autofix iterate on the changes.

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 25, 2026
@sentry sentry Bot changed the title fix(spans): Truncate long strings for fuse.js index to prevent Firefox recursion fix(spans): Truncate long strings for fuse.js to prevent Firefox recursion Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants