feat: Emit low-cardinality pageload span names when streaming spans - #23424
feat: Emit low-cardinality pageload span names when streaming spans#23424Lms24 wants to merge 5 commits into
Conversation
| startBrowserTracingPageLoadSpan(client, { | ||
| name: parameterizedPathname ?? pathname, | ||
| // With span streaming, span names have to be low cardinality, so we can't fall back to the URL. | ||
| name: parameterizedPathname ?? (hasSpanStreamingEnabled(client) ? 'Pageload' : pathname), |
There was a problem hiding this comment.
Static routes named Pageload
High Severity
maybeParameterizeRoute / maybeParameterizeRemixRoute intentionally return nothing for known static manifest routes because those paths are already low-cardinality. The new streaming fallback treats that as “no route” and renames them to Pageload, so distinct static pages collapse into one span name.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 02f7a71. Configure here.
size-limit report 📦
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1a7dc4f. Configure here.
| expect(pageloadSpan.attributes).toMatchObject({ | ||
| ['sentry.segment.name.source']: 'url', | ||
| ['url.pathname']: '/pageload-tracing', | ||
| }); |
There was a problem hiding this comment.
Wrong streamed span attribute assertions
Medium Severity
The new toMatchObject checks compare streamed span attributes to plain strings and look up url.pathname, but serialized streamed attributes are { type, value } objects keyed as url.path. Sibling assertions in the same files already use ?.value and the url.path convention, so these expectations will fail.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 1a7dc4f. Configure here.


No description provided.