Skip to content

feat(nitro): Instrument HTTP Server - #19225

Merged
logaretm merged 32 commits into
awad/create-nitro-sdk-metadatafrom
awad/js-1128-nitro-use-tracing-channels-for-srvx-and-h3
Apr 17, 2026
Merged

feat(nitro): Instrument HTTP Server#19225
logaretm merged 32 commits into
awad/create-nitro-sdk-metadatafrom
awad/js-1128-nitro-use-tracing-channels-for-srvx-and-h3

Conversation

@logaretm

@logaretmlogaretm commented Feb 6, 2026

Copy link
Copy Markdown
Member

@linear

linearBot commented Feb 6, 2026

Copy link
Copy Markdown

@logaretmlogaretm mentioned this pull request Feb 6, 2026
@github-actions

github-actionsBot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊


Generated by Codecov Action

@github-actions

Copy link
Copy Markdown
Contributor

Codecov Results 📊

25 passed | ⏭️ 5 skipped | Total: 30 | Pass Rate: 83.33% | Execution Time: 13.58s

All tests are passing successfully.


Generated by Codecov Action

@github-actions

github-actionsBot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize% ChangeChange
@sentry/browser25.78 kBaddedadded
@sentry/browser - with treeshaking flags24.27 kBaddedadded
@sentry/browser (incl. Tracing)43.61 kBaddedadded
@sentry/browser (incl. Tracing + Span Streaming)45.32 kBaddedadded
@sentry/browser (incl. Tracing, Profiling)48.51 kBaddedadded
@sentry/browser (incl. Tracing, Replay)82.74 kBaddedadded
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags72.25 kBaddedadded
@sentry/browser (incl. Tracing, Replay with Canvas)87.43 kBaddedadded
@sentry/browser (incl. Tracing, Replay, Feedback)99.67 kBaddedadded
@sentry/browser (incl. Feedback)42.59 kBaddedadded
@sentry/browser (incl. sendFeedback)30.45 kBaddedadded
@sentry/browser (incl. FeedbackAsync)35.45 kBaddedadded
@sentry/browser (incl. Metrics)27.07 kBaddedadded
@sentry/browser (incl. Logs)27.2 kBaddedadded
@sentry/browser (incl. Metrics & Logs)27.89 kBaddedadded
@sentry/react27.53 kBaddedadded
@sentry/react (incl. Tracing)45.88 kBaddedadded
@sentry/vue30.61 kBaddedadded
@sentry/vue (incl. Tracing)45.45 kBaddedadded
@sentry/svelte25.8 kBaddedadded
CDN Bundle28.46 kBaddedadded
CDN Bundle (incl. Tracing)44.69 kBaddedadded
CDN Bundle (incl. Logs, Metrics)29.83 kBaddedadded
CDN Bundle (incl. Tracing, Logs, Metrics)45.78 kBaddedadded
CDN Bundle (incl. Replay, Logs, Metrics)68.73 kBaddedadded
CDN Bundle (incl. Tracing, Replay)81.65 kBaddedadded
CDN Bundle (incl. Tracing, Replay, Logs, Metrics)82.73 kBaddedadded
CDN Bundle (incl. Tracing, Replay, Feedback)87.17 kBaddedadded
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics)88.23 kBaddedadded
CDN Bundle - uncompressed83.12 kBaddedadded
CDN Bundle (incl. Tracing) - uncompressed133.64 kBaddedadded
CDN Bundle (incl. Logs, Metrics) - uncompressed87.27 kBaddedadded
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed137.05 kBaddedadded
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed210.63 kBaddedadded
CDN Bundle (incl. Tracing, Replay) - uncompressed250.87 kBaddedadded
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed254.27 kBaddedadded
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed263.78 kBaddedadded
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed267.17 kBaddedadded
@sentry/nextjs (client)48.42 kBaddedadded
@sentry/sveltekit (client)44.06 kBaddedadded
@sentry/node-core57.94 kBaddedadded
@sentry/node174.78 kBaddedadded
@sentry/node - without tracing97.89 kBaddedadded
@sentry/aws-serverless115.12 kBaddedadded

@github-actions

github-actionsBot commented Feb 6, 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 Baseline8,905--added
GET With Sentry1,72119%-added
GET With Sentry (error only)5,99367%-added
POST Baseline1,204--added
POST With Sentry58148%-added
POST With Sentry (error only)1,03186%-added
MYSQL Baseline3,262--added
MYSQL With Sentry38912%-added
MYSQL With Sentry (error only)2,67982%-added

@logaretm
logaretmforce-pushed the awad/js-1128-nitro-use-tracing-channels-for-srvx-and-h3 branch 2 times, most recently from 23a8b35 to 07ad5a1CompareFebruary 9, 2026 20:05
@logaretm
logaretmforce-pushed the awad/create-nitro-sdk-metadata branch from 81b555e to 161862dCompareFebruary 10, 2026 19:31
@logaretm
logaretmforce-pushed the awad/js-1128-nitro-use-tracing-channels-for-srvx-and-h3 branch 2 times, most recently from c3fef9e to 6799854CompareFebruary 10, 2026 20:23
Comment threadpackages/nitro/src/runtime/plugins/server.ts Outdated
@logaretm
logaretmforce-pushed the awad/create-nitro-sdk-metadata branch from a95e594 to 88d95dfCompareFebruary 23, 2026 14:46
@logaretm
logaretmforce-pushed the awad/js-1128-nitro-use-tracing-channels-for-srvx-and-h3 branch from 1923dda to be2f037CompareFebruary 23, 2026 14:50
@logaretm
logaretmforce-pushed the awad/create-nitro-sdk-metadata branch from 1317257 to 2a86160CompareFebruary 23, 2026 14:51
@logaretm
logaretmforce-pushed the awad/js-1128-nitro-use-tracing-channels-for-srvx-and-h3 branch 2 times, most recently from 3b30e36 to 36c96b6CompareFebruary 23, 2026 16:17
@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
@logaretm
logaretmforce-pushed the awad/js-1128-nitro-use-tracing-channels-for-srvx-and-h3 branch 3 times, most recently from 342ea3b to 8d44437CompareApril 15, 2026 14:55
@logaretm
logaretm marked this pull request as ready for review April 15, 2026 17:16
@logaretm
logaretmforce-pushed the awad/js-1128-nitro-use-tracing-channels-for-srvx-and-h3 branch from 0173b17 to 6b8d4d7CompareApril 16, 2026 17:09

await request.get('/api/non-existent-route');

expect(errorReceived).toBe(false);

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.

What we do in other e2e-tests for such tests is to have a separate flush endpoint that is called after the error endpoint to ensure that all events have been sent (e.g. nestjs, cloudflare), so I think it would be good to switch to that pattern here too

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Makes sense, I will merge this into the base branch but will make sure to do that! thanks!

@logaretm
logaretm merged commit 4cd6415 into awad/create-nitro-sdk-metadataApr 17, 2026
472 of 474 checks passed
@logaretm
logaretm deleted the awad/js-1128-nitro-use-tracing-channels-for-srvx-and-h3 branch April 17, 2026 15:09
logaretm added a commit that referenced this pull request Apr 17, 2026
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>
logaretm added a commit that referenced this pull request Apr 18, 2026
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>
logaretm added a commit that referenced this pull request Apr 22, 2026
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>
logaretm added a commit that referenced this pull request Apr 22, 2026
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>
logaretm added a commit that referenced this pull request Apr 22, 2026
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>
logaretm added a commit that referenced this pull request Apr 23, 2026
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>
logaretm added a commit that referenced this pull request Apr 23, 2026
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>
logaretm added a commit that referenced this pull request Apr 23, 2026
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:**
- #20358
- #19224 👈
- #19225 - #19304
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

5 participants

@logaretm@wadefletch@nicohrubec@s1gr1d