Only create Nuxt database and storage spans when there is a parent span

Open Beginner friendly
#25,805 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@nicohrubec is already working on this.

Since Oct 29, 2026.

  • #25859 by @lazerg — closed without merging
  • #25879 by @nicohrubec — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
83/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
nuxt, typescript
Domain
backend, testing

Research direction

Read packages/nuxt/src/runtime/utils/instrumentDatabase.ts and instrumentStorage.ts, then follow their startSpan calls and the nearby instrumentation tests. Add onlyIfParent: true to both calls and a test that performs an operation without an active span. Done means neither instrumentation creates a span for that operation without a parent.

Written by the indexing model from the issue text.

Description

Improvement Nuxt

The Nuxt database and storage instrumentations create db spans when there is no active span. Each of these spans becomes its own root span and has no context.

Pass onlyIfParent: true to the startSpan calls in packages/nuxt/src/runtime/utils/instrumentDatabase.ts and instrumentStorage.ts.

Add a test that checks that an operation without an active span creates no span.

Dominant language
TypeScript
Stars
8.8k
Forks
1.9k
Avg merge
1d 21h
Merged PRs (30d)
637

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getsentry/sentry-javascript

All issues in getsentry/sentry-javascript

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.