Skip to content

feat(nitro): Nitro SDK - #19224

Merged
logaretm merged 26 commits into
developfrom
awad/create-nitro-sdk-metadata
Apr 23, 2026
Merged

feat(nitro): Nitro SDK#19224
logaretm merged 26 commits into
developfrom
awad/create-nitro-sdk-metadata

Conversation

@logaretm

@logaretmlogaretm commented Feb 6, 2026

Copy link
Copy Markdown
Member

This PR just isolates the mundane changes needed for a new SDK to keep the next stacked PRs clean, it adds the Nitro SDK to the monorepo.

This PR is a base of a stack, the stacked PRs will be merged into it. I thought this will be easier to review.


This PR is part of a stack:

@github-actions

github-actionsBot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊


Generated by Codecov Action

@github-actions

github-actionsBot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

ScenarioRequests/s% of BaselinePrev. Requests/sChange %
GET Baseline10,850-9,029+20%
GET With Sentry1,68916%1,578+7%
GET With Sentry (error only)7,02665%5,938+18%
POST Baseline1,044-1,193-12%
POST With Sentry49047%566-13%
POST With Sentry (error only)91588%1,035-12%
MYSQL Baseline3,653-3,285+11%
MYSQL With Sentry36010%405-11%
MYSQL With Sentry (error only)2,88179%2,652+9%

View base workflow run

@github-actions

github-actionsBot commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize% ChangeChange
@sentry/browser25.88 kB--
@sentry/browser - with treeshaking flags24.35 kB--
@sentry/browser (incl. Tracing)43.8 kB--
@sentry/browser (incl. Tracing + Span Streaming)45.5 kB--
@sentry/browser (incl. Tracing, Profiling)48.73 kB--
@sentry/browser (incl. Tracing, Replay)82.98 kB--
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags72.5 kB--
@sentry/browser (incl. Tracing, Replay with Canvas)87.67 kB--
@sentry/browser (incl. Tracing, Replay, Feedback)99.93 kB--
@sentry/browser (incl. Feedback)42.7 kB--
@sentry/browser (incl. sendFeedback)30.55 kB--
@sentry/browser (incl. FeedbackAsync)35.55 kB--
@sentry/browser (incl. Metrics)27.16 kB--
@sentry/browser (incl. Logs)27.29 kB--
@sentry/browser (incl. Metrics & Logs)27.98 kB--
@sentry/react27.62 kB--
@sentry/react (incl. Tracing)46.05 kB--
@sentry/vue30.71 kB--
@sentry/vue (incl. Tracing)45.62 kB--
@sentry/svelte25.89 kB--
CDN Bundle28.57 kB--
CDN Bundle (incl. Tracing)46.08 kB--
CDN Bundle (incl. Logs, Metrics)29.95 kB--
CDN Bundle (incl. Tracing, Logs, Metrics)47.12 kB--
CDN Bundle (incl. Replay, Logs, Metrics)68.92 kB--
CDN Bundle (incl. Tracing, Replay)83.14 kB--
CDN Bundle (incl. Tracing, Replay, Logs, Metrics)84.17 kB--
CDN Bundle (incl. Tracing, Replay, Feedback)88.61 kB--
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics)89.69 kB--
CDN Bundle - uncompressed83.59 kB--
CDN Bundle (incl. Tracing) - uncompressed137.62 kB--
CDN Bundle (incl. Logs, Metrics) - uncompressed87.73 kB--
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed141.03 kB--
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed211.31 kB--
CDN Bundle (incl. Tracing, Replay) - uncompressed255.06 kB--
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed258.46 kB--
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed267.97 kB--
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed271.36 kB--
@sentry/nextjs (client)48.58 kB--
@sentry/sveltekit (client)44.22 kB--
@sentry/node-core58.35 kB+0.02%+9 B 🔺
@sentry/node175.66 kB+0.01%+13 B 🔺
@sentry/node - without tracing98.3 kB+0.02%+11 B 🔺
@sentry/aws-serverless115.33 kB+0.02%+14 B 🔺

View base workflow run

@logaretm
logaretmforce-pushed the awad/create-nitro-sdk-metadata branch 2 times, most recently from 1317257 to 2a86160CompareFebruary 23, 2026 14:51
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you apply the label PR: no-auto-close I will leave it alone ... forever!

@logaretm
logaretmforce-pushed the awad/create-nitro-sdk-metadata branch from 99ea611 to 9ded4c9CompareApril 15, 2026 13:10
@logaretmlogaretm changed the title feat(nitro): Nitro SDK entry and metadatafeat(nitro): Nitro SDKApr 15, 2026
Comment threadyarn.lock Outdated
@logaretm
logaretmforce-pushed the awad/create-nitro-sdk-metadata branch from 53bf486 to 5f43f63CompareApril 15, 2026 13:15
@logaretm
logaretm marked this pull request as ready for review April 15, 2026 17:16
Comment threadpackages/nitro/src/sdk.ts Outdated
Comment threadpackages/nitro/test/index.test.ts
Comment threadpackages/nitro/package.json Outdated
Comment threadpackages/nitro/tsconfig.types.json Outdated

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new @sentry/nitro package skeleton to the monorepo and wires it into the repo’s release/testing/triage infrastructure as the base for a stacked series of Nitro SDK PRs.

Changes:

  • Introduces the new packages/nitro package with initial SDK/config scaffolding, build config, and a placeholder test.
  • Registers the package across monorepo plumbing (workspace list, root README, issue templates/labeling, release config).
  • Updates lockfile for the newly introduced dependency graph.

Reviewed changes

Copilot reviewed 23 out of 24 changed files in this pull request and generated 12 comments.

Show a summary per file
FileDescription
yarn.lockLockfile updates due to dependency graph changes.
packages/nitro/package.jsonNew package manifest, exports, build/test scripts.
packages/nitro/rollup.npm.config.mjsRollup config for publishing builds (ESM-only).
packages/nitro/tsconfig.jsonPackage TS config (module/moduleResolution overrides).
packages/nitro/tsconfig.types.jsonDeclaration-only build config for emitted types.
packages/nitro/tsconfig.test.jsonTest TS config for package tests.
packages/nitro/src/index.tsPublic entrypoint re-exporting config + @sentry/node + Nitro init.
packages/nitro/src/sdk.tsNitro SDK initialization wrapper around @sentry/node.
packages/nitro/src/config.tswithSentryConfig / module setup helper for Nitro config.
packages/nitro/src/module.tsNitro module factory placeholder.
packages/nitro/src/common/debug-build.tsDebug-build flag constant (pattern consistent with other packages).
packages/nitro/src/utils/resolver.tsPath resolver helper utility.
packages/nitro/src/utils/plugin.tsHelper to add Nitro plugins.
packages/nitro/test/index.test.tsPlaceholder Vitest test.
packages/nitro/test/tsconfig.jsonTest tsconfig shim extending package test config.
packages/nitro/README.mdInitial package documentation.
packages/nitro/LICENSEPackage license file.
packages/nitro/.eslintrc.jsPackage-local ESLint config extending repo base.
package.jsonAdds packages/nitro to workspace list.
dev-packages/e2e-tests/verdaccio-config/config.yamlAllows publishing @sentry/nitro in Verdaccio E2E setup.
README.mdAdds @sentry/nitro to root package list.
.github/workflows/issue-package-label.ymlAdds Nitro to package-to-label mapping.
.github/ISSUE_TEMPLATE/bug.ymlAdds @sentry/nitro to bug template SDK dropdown.
.craft.ymlAdds Nitro package to Craft release targets/metadata.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/nitro/src/sdk.ts
Comment threadpackages/nitro/src/sdk.ts
Comment threadpackages/nitro/package.json Outdated
Comment threadpackages/nitro/README.md
Comment threadpackages/nitro/src/config.ts Outdated
Comment threadpackages/nitro/README.md Outdated
Comment threadpackages/nitro/src/config.ts Outdated
Comment threadpackages/nitro/tsconfig.types.json Outdated
Comment threadpackages/nitro/test/index.test.ts
Comment threadpackages/nitro/src/sdk.ts Outdated
Comment threadpackages/nitro/src/config.ts Outdated
Comment threadpackages/nitro/LICENSE Outdated
Comment threadpackages/nitro/package.json Outdated
Comment threadpackages/nitro/package.json Outdated
Comment threadpackages/nitro/README.md Outdated
Comment threadpackages/nitro/README.md Outdated
Comment threadpackages/nitro/README.md Outdated
Comment thread.craft.yml
@logaretm
logaretm requested a review from s1gr1dApril 16, 2026 13:59
@logaretm

Copy link
Copy Markdown
MemberAuthor

Thank you for all comments @s1gr1d very thorough review! all addressed 🙏

Comment threadpackages/nitro/src/index.ts
@logaretm
logaretmforce-pushed the awad/create-nitro-sdk-metadata branch from 5f3baf0 to 1dad524CompareApril 16, 2026 14:53
@logaretm
logaretm changed the base branch from develop to awad/tracing-channel-otel-vendoringApril 16, 2026 14:53
@logaretm
logaretmforce-pushed the awad/create-nitro-sdk-metadata branch from 1dad524 to 120ecbaCompareApril 16, 2026 16:19
logaretmand others added 16 commits April 23, 2026 09:56
- Update LICENSE copyright year to 2026
- Expand peerDependencies range to cover nitro prereleases
- Bump nitro devDependency to latest beta
- Add beta notice to README
- Improve README wording (section title, Vite capitalization, --import mention)
- Point .craft.yml docs URL to package README until docs page exists
- Include 'node' in applySdkMetadata packages list for consistency
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The repo uses Oxlint, not ESLint. Remove the legacy .eslintrc.js file.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implements HTTP server instrumentation for both `h3` and `srvx` by
listening to their tracing channel events.
- `h3` TC PR: h3js/h3#1251
- `srvx` TC PR: h3js/srvx#141Closes#18123
---
**This PR is part of a stack:**
- #20358
- #19224
- #19225 👈
- #19304
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds automatic sourcemap handling to the Nitro SDK, using
`@sentry/bundler-plugin-core` for builder-agnostic post-build upload.
Nitro uses rollup or rolldown, so it made sense to make it as agnostic
as possible.
Closes#17992 ---
**This PR is part of a stack:**
- #20358
- #19224
- #19225
- #19304 👈
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nitro 3 is ESM-only, so the cjs output was shipping dead code. Also
removes a broken typesVersions entry pointing at build/types/plugins.d.ts
(file never existed, no consumer imports @sentry/nitro/plugins).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Align with Bun/Deno/Cloudflare SDKs by guarding the default integrations
computation behind an undefined check instead of relying on spread order.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@logaretm
logaretmforce-pushed the awad/create-nitro-sdk-metadata branch from 830ac6e to a62ff3cCompareApril 23, 2026 13:57
logaretmand others added 2 commits April 23, 2026 10:47
The URL constructor throws on relative paths like `/api/users`, causing
the transaction name and root span updates to be silently skipped. Use
parseUrl from @sentry/core, which handles relative URLs correctly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
E2E tests now install @sentry packages from packed tarballs under
dev-packages/e2e-tests/packed/ rather than a local verdaccio registry,
so the .npmrc and "latest || *" version specifiers are no longer needed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment threadpackages/nitro/src/runtime/hooks/captureErrorHook.ts
logaretmand others added 4 commits April 23, 2026 11:11
CI's ciPnpmOverrides script already pins @sentry/* deps to the packed
tarballs, so the "latest || *" specifiers are sufficient. Keep only the
.npmrc removal from the previous commit.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add `keywords`, `lint:fix` script, and `nx.targets` build config to package.json
- Link to the nitro-3 e2e app from the README
- Point `.craft.yml` `mainDocsUrl` to the docs page
- Add a CHANGELOG unreleased entry for the new SDK
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Remove the `exclude` and "built separately" comment referencing
`src/setup.ts` and `tsconfig.setup-types.json`, both of which no longer
exist in the package.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@cursorcursorBot 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 4 total unresolved issues (including 3 from previous reviews).

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 000b7b0. Configure here.

Comment threadpackages/nitro/src/runtime/hooks/captureErrorHook.ts
@logaretm
logaretm merged commit 8f32e18 into developApr 23, 2026
484 of 489 checks passed
@logaretm
logaretm deleted the awad/create-nitro-sdk-metadata branch April 23, 2026 16:45
logaretm added a commit that referenced this pull request Apr 24, 2026
There is no stable stream of Nitro 3 canary builds yet, so no point in
having this. I will add it back once we have a stable stream of builds,
likely after the full v3 release.
I probably had it at one point then didn't remove it properly before
merging #19224Closes#20472
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@logaretm@s1gr1d