Skip to content

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

Draft
chargome wants to merge 2 commits into
developfrom
feat/solid-2-observe-records
Draft

chargome wants to merge 2 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

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>
@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: 13b5d5e (PR test merge using develop at f3de4d6)

Against: f3de4d6 (develop) · base run #67658

✅ 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.86 kB - -
@sentry/core/browser 14.46 kB - -
@sentry/node 156.26 kB - -
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.45 kB - -
@sentry/node - without tracing 89.22 kB -0.01% -6 B 🔽
@sentry/node - without channel injection 145.2 kB +0.01% +1 B 🔺
@sentry/aws-serverless 99.85 kB -0.01% -3 B 🔽
@sentry/cloudflare (withSentry) - minified 210.31 kB - -
@sentry/cloudflare (withSentry) 488.28 kB - -
@sentry/cloudflare (withSentry, instrumented CommonJS package) - minified 213.25 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 235.54 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. 3 successful. See the run.

Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E solid-2-ssr (cloudflare) Test (optional) Successful in 34s Details
✅ CI: Optional E2E Tests / E2E solidstart-2 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E solidstart-2-tunnel Test (optional) Successful in 44s 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8968129. Configure here.

parent_span_id: parentSpanId,
status: 'ok',
attributes: expect.objectContaining({
[SENTRY_OP]: 'function',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Test asserts span op as string

Low Severity

The new unit test asserts the server-function span op as the string 'function' instead of the FUNCTION constant from @sentry/conventions/op. This was flagged because the review rules require test assertions on span ops to use those constants, matching how the E2E test already compares getSpanOp(span) === FUNCTION.

Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 8968129. Configure here.

…@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>

This branch has not been deployed

No deployments
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.

1 participant