Skip to content

feat(nuxt, nitro)!: Use convention cache ops for storage spans - #22689

Open
msonnb wants to merge 4 commits into
developfrom
ms/js-3105-cache-ops
Open

feat(nuxt, nitro)!: Use convention cache ops for storage spans#22689
msonnb wants to merge 4 commits into
developfrom
ms/js-3105-cache-ops

Conversation

@msonnb

@msonnb msonnb commented Jul 27, 2026

Copy link
Copy Markdown
Member

Collapse the ten per-method storage ops onto the three convention cache ops:

unstorage method op
hasItem, getItem, getItemRaw, getItems, getKeys cache.get
setItem, setItemRaw, setItems cache.put
removeItem, clear cache.remove

db.operation.name already carried the exact method, so no detail is lost.

The E2E tests located spans with a findSpansByOp helper, which no longer identifies a single operation. They now use findSpansByMethod, keyed on db.operation.name.

Part of #22446

@linear-code

linear-code Bot commented Jul 27, 2026

Copy link
Copy Markdown

JS-3105

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 29.84 kB - -
@sentry/browser - with treeshaking flags 28.05 kB - -
@sentry/browser (incl. Tracing) 47.12 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.13 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.83 kB - -
@sentry/browser (incl. Tracing, Replay) 86.43 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.86 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 91.15 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 103.79 kB - -
@sentry/browser (incl. Feedback) 47.16 kB - -
@sentry/browser (incl. sendFeedback) 34.68 kB - -
@sentry/browser (incl. FeedbackAsync) 39.78 kB - -
@sentry/browser (incl. Metrics) 30.91 kB - -
@sentry/browser (incl. Logs) 31.14 kB - -
@sentry/browser (incl. Metrics & Logs) 31.82 kB - -
@sentry/react 31.63 kB - -
@sentry/react (incl. Tracing) 49.35 kB - -
@sentry/vue 34.76 kB - -
@sentry/vue (incl. Tracing) 49.08 kB - -
@sentry/svelte 29.87 kB - -
CDN Bundle 31.89 kB - -
CDN Bundle (incl. Tracing) 47.47 kB - -
CDN Bundle (incl. Logs, Metrics) 33.44 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 48.84 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 72.8 kB - -
CDN Bundle (incl. Tracing, Replay) 85.11 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.4 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 90.88 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.19 kB - -
CDN Bundle - uncompressed 95.11 kB - -
CDN Bundle (incl. Tracing) - uncompressed 142.33 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 99.83 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 146.31 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 224.58 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 261.59 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 265.55 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 275.29 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 279.25 kB - -
@sentry/nextjs (client) 51.95 kB - -
@sentry/sveltekit (client) 47.54 kB - -
@sentry/core/server 79.78 kB - -
@sentry/core/browser 51.61 kB - -
@sentry/node 121.86 kB +0.66% +798 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 166 B - -
@sentry/node - without tracing 85.3 kB +0.97% +817 B 🔺
@sentry/aws-serverless 93.52 kB +0.89% +816 B 🔺
@sentry/cloudflare (withSentry) - minified 197.81 kB - -
@sentry/cloudflare (withSentry) 486.2 kB - -

View base workflow run

@msonnb
msonnb changed the base branch from ms/js-3105-fetch-stream-op to develop July 27, 2026 13:10
@msonnb
msonnb force-pushed the ms/js-3105-cache-ops branch from 9175981 to 15c4dbe Compare July 27, 2026 13:52
msonnb and others added 2 commits July 29, 2026 10:25
Collapse the per-method ops onto `cache.get` / `cache.put` /
`cache.remove`. The exact unstorage method is already preserved in
`db.operation.name`.

Ref: JS-3105

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@msonnb
msonnb force-pushed the ms/js-3105-cache-ops branch from 15c4dbe to 07fa5de Compare July 29, 2026 08:29
@msonnb
msonnb marked this pull request as ready for review July 29, 2026 08:43
@msonnb
msonnb requested a review from a team as a code owner July 29, 2026 08:43
@msonnb
msonnb requested review from nicohrubec and s1gr1d and removed request for a team July 29, 2026 08:43
Comment thread packages/nuxt/src/runtime/utils/instrumentStorage.ts
Comment thread packages/nitro/src/runtime/hooks/captureStorageEvents.ts

@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 and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

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 7d0f2ac. Configure here.

Comment thread packages/nuxt/src/runtime/utils/instrumentStorage.ts
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