From a574d2e15ad726373257b12804265e16921d04a0 Mon Sep 17 00:00:00 2001 From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com> Date: Sat, 25 Jul 2026 10:38:28 +0000 Subject: [PATCH 1/2] fix(spans): Truncate long strings for fuse.js index to prevent Firefox recursion --- .../events/interfaces/spans/waterfallModel.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/static/app/components/events/interfaces/spans/waterfallModel.tsx b/static/app/components/events/interfaces/spans/waterfallModel.tsx index e00d4c5b3fed..54f2ea4b9587 100644 --- a/static/app/components/events/interfaces/spans/waterfallModel.tsx +++ b/static/app/components/events/interfaces/spans/waterfallModel.tsx @@ -155,9 +155,11 @@ export class WaterfallModel { 'description', ]); + const MAX_SEARCH_STRING_LENGTH = 5000; + const basicValues = Object.values(pickedSpan) .filter(value => !!value) - .map(String); + .map(value => String(value).slice(0, MAX_SEARCH_STRING_LENGTH)); indexed.push(...basicValues); @@ -168,8 +170,10 @@ export class WaterfallModel { const tags = span?.tags; if (tags) { - tagKeys = Object.keys(tags); - tagValues = Object.values(tags); + tagKeys = Object.keys(tags).map(k => k.slice(0, MAX_SEARCH_STRING_LENGTH)); + tagValues = Object.values(tags).map(v => + String(v).slice(0, MAX_SEARCH_STRING_LENGTH) + ); } const data: Record | undefined = span?.data ?? {}; @@ -177,9 +181,9 @@ export class WaterfallModel { let dataKeys: string[] = []; let dataValues: string[] = []; if (data) { - dataKeys = Object.keys(data); + dataKeys = Object.keys(data).map(k => k.slice(0, MAX_SEARCH_STRING_LENGTH)); dataValues = Object.values(data).map( - value => JSON.stringify(value, null, 4) || '' + value => (JSON.stringify(value, null, 4) || '').slice(0, MAX_SEARCH_STRING_LENGTH) ); } From 7ac607cf6d7a3dcb2722c57b67488b039c51b583 Mon Sep 17 00:00:00 2001 From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com> Date: Sat, 25 Jul 2026 11:39:54 +0000 Subject: [PATCH 2/2] fix(spans): Truncate long strings for fuse.js to prevent Firefox recursion --- .../app/components/events/interfaces/spans/waterfallModel.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/app/components/events/interfaces/spans/waterfallModel.tsx b/static/app/components/events/interfaces/spans/waterfallModel.tsx index 54f2ea4b9587..614b456b9166 100644 --- a/static/app/components/events/interfaces/spans/waterfallModel.tsx +++ b/static/app/components/events/interfaces/spans/waterfallModel.tsx @@ -182,8 +182,8 @@ export class WaterfallModel { let dataValues: string[] = []; if (data) { dataKeys = Object.keys(data).map(k => k.slice(0, MAX_SEARCH_STRING_LENGTH)); - dataValues = Object.values(data).map( - value => (JSON.stringify(value, null, 4) || '').slice(0, MAX_SEARCH_STRING_LENGTH) + dataValues = Object.values(data).map(value => + (JSON.stringify(value, null, 4) || '').slice(0, MAX_SEARCH_STRING_LENGTH) ); }