Skip to content

feat(solid): Turn Solid 2 observe build records into spans - #26794

Merged
chargome merged 5 commits into
developfrom
feat/solid-2-observe-records
Nov 26, 2026
Merged

chargome merged 5 commits into
developfrom
feat/solid-2-observe-records

Conversation

@chargome

Copy link
Copy Markdown
Member

What

On Solid 2 observe and dev builds, every server function execution gets a function span, and the request span is named after the route the render resolved to (GET /user/:id), also without withSentryRouterRouting. Production builds are unchanged.

Why

Observe builds record these facts already, so they are free to read. The span uses the function op, like server actions and loaders in other SDKs, so no new attributes are needed.

The span is made after the server function finished. So spans from inside the function, like a database query, show up next to it, not under it. Fixing that needs a hook that Solid gives to apps, so we leave it for later.

Refs JS-4118

@linear-code

linear-code Bot commented Nov 24, 2026

Copy link
Copy Markdown

JS-4118

@chargome chargome self-assigned this Nov 24, 2026
@chargome

Copy link
Copy Markdown
Member Author

bugbot run

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: 8027f92 (PR test merge using develop at abd9eca)

Against: abd9eca (develop) · base run #68109

✅ 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.66 kB - -
@sentry/browser (incl. Tracing Core) 40.58 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 53.66 kB - -
@sentry/browser (incl. Tracing, Profiling) 56.56 kB - -
@sentry/browser (incl. Tracing, Replay) 93.59 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 82.38 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 98.45 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 111.39 kB - -
@sentry/browser (incl. Feedback) 48.4 kB - -
@sentry/browser (incl. sendFeedback) 31.11 kB - -
@sentry/browser (incl. FeedbackAsync) 36.16 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.37 kB - -
@sentry/vue 38.74 kB - -
@sentry/vue (incl. Tracing) 56.67 kB - -
@sentry/svelte 30.57 kB - -
@sentry/effect (client) 42.22 kB - -
@sentry/effect (client, incl. Tracing) 54.96 kB - -
@sentry/effect (client, incl. Tracing, Logs, Metrics) 66.31 kB - -
@sentry/remix (Remix 3 client bundle) 59.39 kB - -
CDN Bundle 32.38 kB - -
CDN Bundle (incl. Tracing) 54.04 kB - -
CDN Bundle (incl. Logs, Metrics) 35.13 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 56.5 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 76.08 kB - -
CDN Bundle (incl. Tracing, Replay) 91.84 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 94.37 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 97.31 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 99.78 kB - -
CDN Bundle - uncompressed 94.56 kB - -
CDN Bundle (incl. Tracing) - uncompressed 159.84 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 102.9 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 167.47 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 233.29 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 280.28 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 287.9 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 292.21 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 299.83 kB - -
@sentry/nextjs (client) 60.08 kB - -
@sentry/sveltekit (client) 55.02 kB - -
@sentry/core/server 45.83 kB - -
@sentry/core/browser 14.46 kB - -
@sentry/node 157.38 kB - -
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.45 kB - -
@sentry/node - without tracing 89.79 kB - -
@sentry/node - without channel injection 146.36 kB -0.01% -1 B 🔽
@sentry/aws-serverless 100.42 kB -0.01% -3 B 🔽
@sentry/cloudflare (withSentry) - minified 211.94 kB - -
@sentry/cloudflare (withSentry) 491.72 kB - -
@sentry/cloudflare (withSentry, instrumented CommonJS package) - minified 214.88 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 237.18 kB - -

View base workflow run

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Optional E2E tests

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

Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E solidstart-2 (manual upload) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E solidstart-2 (delete all) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E solidstart-2-tunnel Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E solidstart-2 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E solidstart-2 (no upload) Test (optional) Successful in 1m Details

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

@chargome
chargome force-pushed the feat/solid-2-observe-records branch from e6547fd to c79d7f4 Compare November 24, 2026 13:38
@chargome

Copy link
Copy Markdown
Member Author

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

@chargome

Copy link
Copy Markdown
Member Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 99a9876. Configure here.

@chargome
chargome marked this pull request as ready for review November 25, 2026 11:45
*/
function nameRequestAfterRenderRoute({ route }: RenderEvent): void {
const activeSpan = getActiveSpan();
if (!route?.name || !activeSpan) {

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.

could we skip renders without route.params as well (Solid does not add this when no route matches)? otherwise we would use the raw path and attach route as the source (below), but we have no route that matches here.

Suggested change
if (!route?.name || !activeSpan) {
if (!route?.name || !route.params || !activeSpan) {

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.

Good catch, the router reports the raw path as the name with no params when nothing matched. Applied in 792be89, with a test.

chargome and others added 5 commits November 26, 2026 12:52
Solid 2 observe and dev builds record every server function execution and the
route each server render resolved to. solidServerObserveIntegration, on by
default on Node and Workers, adds a function span for each execution, and
names the request span after the render's route when the router wrapper did
not. Production builds have no records, so it does nothing there.

Refs JS-4118
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…@sentry/core

The span lint rule counts all of @sentry/solid as browser code, but this module
only runs on the server.

Refs JS-4118
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs JS-4118
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
performanceTimeToSeconds corrects for clock drift like the request span's
timestamps, and skips the span when there is no usable time origin.

Refs JS-4118
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without a match, the router reports the raw path as the route name and no params, so naming the span after it with source route was wrong.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chargome
chargome force-pushed the feat/solid-2-observe-records branch from 792be89 to 97eb5b2 Compare November 26, 2026 11:52
@chargome
chargome merged commit cbff039 into develop Nov 26, 2026
77 checks passed
@chargome
chargome deleted the feat/solid-2-observe-records branch November 26, 2026 12:01
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