Skip to content

fix(solidstart): Ignore build output spans with span streaming - #26782

Merged
s1gr1d merged 5 commits into
developfrom
fix/solidstart-build-asset-spans
Nov 24, 2026
Merged

s1gr1d merged 5 commits into
developfrom
fix/solidstart-build-asset-spans

Conversation

@s1gr1d

@s1gr1d s1gr1d commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Similar to #26781 (same on Nuxt)

What

With span streaming (the default), the SolidStart SDK sent a span for every request to its build output under /_build/. Now the SDK ignores these requests in both trace modes, also under a base path, and it keeps real routes.

Request Before, span streaming (default) Before, static mode Now, both modes
Build files that the HTTP integration does not ignore, for example /_build/assets/app.js.map sent not sent not sent
All build files on SolidStart 2, also .js and .css sent not sent not sent
Build files under a base path, for example /app/_build/assets/app.js.map sent sent not sent
Routes, also ones that contain _build, for example /users/_build/ sent sent sent

"Static mode" is traceLifecycle: 'static'. Bold marks the problems this PR fixes.

Why

The old filter was an event processor that dropped transactions by name. Event processors do not run with span streaming, so the filter silently stopped working. Now the SDK adds an ignoreSpans default on url.path instead, which works in both modes. This is the same fix as for Nuxt.

The filter needs the base path (server.baseURL on SolidStart 1, Vite base on SolidStart 2) when Sentry.init() runs. SolidStart 2 bundles the SDK into the server build, so the build sets the value there. SolidStart 1 loads instrument.server.mjs with node --import before the server bundle, so the build now writes the base path into that file too. In development, the server SDK does not know the base path yet, so there the filter only matches /_build/.

On SolidStart 2, the SDK still sends spans for other static files such as /favicon.ico, because Nitro's server spans skip the HTTP integration's static file filter. That needs a separate fix in @sentry/server-utils.

The build asset filter was an event processor, and event processors do not run
with span streaming. So the SDK sent a span for every request to `/_build/`.
Add an `ignoreSpans` default on `url.path` instead, which works in both trace
modes.
@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: 2763cf9 (PR test merge using develop at e83f5db)

Against: e83f5db (develop) · base run #67702

✅ Baseline matches: this diff contains only this PR's changes.

Path Size % Change Change
@sentry/browser 30.54 kB - -
@sentry/browser - with treeshaking flags 28.73 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.6 kB - -
@sentry/browser (incl. Tracing) 53.67 kB - -
@sentry/browser (incl. Tracing Core) 40.59 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 53.67 kB - -
@sentry/browser (incl. Tracing, Profiling) 56.57 kB - -
@sentry/browser (incl. Tracing, Replay) 93.54 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 82.41 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 97.93 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 111.45 kB - -
@sentry/browser (incl. Feedback) 48.49 kB - -
@sentry/browser (incl. sendFeedback) 31.11 kB - -
@sentry/browser (incl. FeedbackAsync) 36.17 kB - -
@sentry/browser (incl. Metrics) 31.86 kB - -
@sentry/browser (incl. Logs) 32.13 kB - -
@sentry/browser (incl. Metrics & Logs) 32.8 kB - -
@sentry/react 32.56 kB - -
@sentry/react (incl. Tracing) 56.38 kB - -
@sentry/vue 38.75 kB - -
@sentry/vue (incl. Tracing) 56.68 kB - -
@sentry/svelte 30.57 kB - -
@sentry/effect (client) 42.25 kB - -
@sentry/effect (client, incl. Tracing) 49.41 kB - -
@sentry/effect (client, incl. Tracing, Logs, Metrics) 59.3 kB - -
@sentry/remix (Remix 3 client bundle) 59.39 kB - -
CDN Bundle 32.54 kB - -
CDN Bundle (incl. Tracing) 54.15 kB - -
CDN Bundle (incl. Logs, Metrics) 35.27 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 56.63 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 76.16 kB - -
CDN Bundle (incl. Tracing, Replay) 91.89 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 94.43 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 97.35 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 99.81 kB - -
CDN Bundle - uncompressed 94.92 kB - -
CDN Bundle (incl. Tracing) - uncompressed 160.25 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 103.26 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 167.88 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 233.5 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 280.54 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 288.17 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 292.47 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 300.09 kB - -
@sentry/nextjs (client) 60.09 kB - -
@sentry/sveltekit (client) 55.03 kB - -
@sentry/core/server 45.83 kB - -
@sentry/core/browser 14.46 kB - -
@sentry/node 156.29 kB +0.01% +1 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.45 kB - -
@sentry/node - without tracing 89.23 kB -0.01% -3 B 🔽
@sentry/node - without channel injection 145.21 kB -0.01% -4 B 🔽
@sentry/aws-serverless 99.87 kB -0.01% -2 B 🔽
@sentry/cloudflare (withSentry) - minified 210.54 kB - -
@sentry/cloudflare (withSentry) 488.88 kB - -
@sentry/cloudflare (withSentry, instrumented CommonJS package) - minified 213.49 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 235.78 kB - -

View base workflow run

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Optional E2E tests

All optional checks were successful. 2 successful. See the run.

Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E solidstart-2 Test (optional) Successful in 58s Details
✅ CI: Optional E2E Tests / E2E solidstart-2-tunnel Test (optional) Successful in 52s Details

@s1gr1d
s1gr1d marked this pull request as ready for review November 24, 2026 08:24
@s1gr1d
s1gr1d requested a review from andreiborza November 24, 2026 08:32

@andreiborza andreiborza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, LGTM

…ld-asset-spans

# Conflicts:
#	packages/solidstart/src/server/sdk.ts
The filter matched only `/_build/`, so with a base path the SDK still sent
spans for build files. It now reads the base path: from the build on
SolidStart 2, and from `instrument.server.mjs` on SolidStart 1, which
`node --import` loads before the server bundle sets it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the tests are in the tunnel because this is the only app that runs under a base path.

@s1gr1d
s1gr1d enabled auto-merge (squash) November 24, 2026 10:54
@s1gr1d
s1gr1d merged commit af2939e into develop Nov 24, 2026
53 checks passed
@s1gr1d
s1gr1d deleted the fix/solidstart-build-asset-spans branch November 24, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants