Skip to content

feat(nitro): Instrument HTTP Server#19225

Merged
logaretm merged 32 commits intoawad/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 intoawad/create-nitro-sdk-metadatafrom
awad/js-1128-nitro-use-tracing-channels-for-srvx-and-h3

Conversation

@logaretm
Copy link
Copy Markdown
Member

@logaretm logaretm commented Feb 6, 2026

@linear
Copy link
Copy Markdown

linear bot commented Feb 6, 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 6, 2026

Codecov Results 📊


Generated by Codecov Action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 6, 2026

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
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 6, 2026

size-limit report 📦

Path Size % Change Change
@sentry/browser 25.78 kB added added
@sentry/browser - with treeshaking flags 24.27 kB added added
@sentry/browser (incl. Tracing) 43.61 kB added added
@sentry/browser (incl. Tracing + Span Streaming) 45.32 kB added added
@sentry/browser (incl. Tracing, Profiling) 48.51 kB added added
@sentry/browser (incl. Tracing, Replay) 82.74 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 72.25 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 87.43 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 99.67 kB added added
@sentry/browser (incl. Feedback) 42.59 kB added added
@sentry/browser (incl. sendFeedback) 30.45 kB added added
@sentry/browser (incl. FeedbackAsync) 35.45 kB added added
@sentry/browser (incl. Metrics) 27.07 kB added added
@sentry/browser (incl. Logs) 27.2 kB added added
@sentry/browser (incl. Metrics & Logs) 27.89 kB added added
@sentry/react 27.53 kB added added
@sentry/react (incl. Tracing) 45.88 kB added added
@sentry/vue 30.61 kB added added
@sentry/vue (incl. Tracing) 45.45 kB added added
@sentry/svelte 25.8 kB added added
CDN Bundle 28.46 kB added added
CDN Bundle (incl. Tracing) 44.69 kB added added
CDN Bundle (incl. Logs, Metrics) 29.83 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 45.78 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 68.73 kB added added
CDN Bundle (incl. Tracing, Replay) 81.65 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 82.73 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 87.17 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 88.23 kB added added
CDN Bundle - uncompressed 83.12 kB added added
CDN Bundle (incl. Tracing) - uncompressed 133.64 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 87.27 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 137.05 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 210.63 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 250.87 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 254.27 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 263.78 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 267.17 kB added added
@sentry/nextjs (client) 48.42 kB added added
@sentry/sveltekit (client) 44.06 kB added added
@sentry/node-core 57.94 kB added added
@sentry/node 174.78 kB added added
@sentry/node - without tracing 97.89 kB added added
@sentry/aws-serverless 115.12 kB added added

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 6, 2026

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.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 8,905 - - added
GET With Sentry 1,721 19% - added
GET With Sentry (error only) 5,993 67% - added
POST Baseline 1,204 - - added
POST With Sentry 581 48% - added
POST With Sentry (error only) 1,031 86% - added
MYSQL Baseline 3,262 - - added
MYSQL With Sentry 389 12% - added
MYSQL With Sentry (error only) 2,679 82% - added

@logaretm logaretm force-pushed the awad/js-1128-nitro-use-tracing-channels-for-srvx-and-h3 branch 2 times, most recently from 23a8b35 to 07ad5a1 Compare February 9, 2026 20:05
@logaretm logaretm force-pushed the awad/create-nitro-sdk-metadata branch from 81b555e to 161862d Compare February 10, 2026 19:31
@logaretm logaretm force-pushed the awad/js-1128-nitro-use-tracing-channels-for-srvx-and-h3 branch 2 times, most recently from c3fef9e to 6799854 Compare February 10, 2026 20:23
Comment thread packages/nitro/src/runtime/plugins/server.ts Outdated
@logaretm logaretm force-pushed the awad/create-nitro-sdk-metadata branch from a95e594 to 88d95df Compare February 23, 2026 14:46
@logaretm logaretm force-pushed the awad/js-1128-nitro-use-tracing-channels-for-srvx-and-h3 branch from 1923dda to be2f037 Compare February 23, 2026 14:50
@logaretm logaretm force-pushed the awad/create-nitro-sdk-metadata branch from 1317257 to 2a86160 Compare February 23, 2026 14:51
@logaretm logaretm force-pushed the awad/js-1128-nitro-use-tracing-channels-for-srvx-and-h3 branch 2 times, most recently from 3b30e36 to 36c96b6 Compare February 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 logaretm force-pushed the awad/create-nitro-sdk-metadata branch from 99ea611 to 9ded4c9 Compare April 15, 2026 13:10
@logaretm logaretm force-pushed the awad/js-1128-nitro-use-tracing-channels-for-srvx-and-h3 branch 3 times, most recently from 342ea3b to 8d44437 Compare April 15, 2026 14:55
@logaretm logaretm marked this pull request as ready for review April 15, 2026 17:16
logaretm and others added 23 commits April 16, 2026 13:07
… hooks

Replace otel-tracing-channel with @sentry/opentelemetry's vendored tracingChannel.
Fix data.span -> data._sentrySpan references so tracing channel spans are
actually ended. Export TracingChannelContextWithSpan type for consumers.
Add e2e span nesting tests to verify context propagation through the full
srvx -> h3 -> user code span tree.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@logaretm logaretm force-pushed the awad/js-1128-nitro-use-tracing-channels-for-srvx-and-h3 branch from 0173b17 to 6b8d4d7 Compare April 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
Member Author

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-metadata Apr 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#141

Closes #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#141

Closes #18123

---

**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 free to 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