Skip to content

feat: built-in tracing channel support#4001

Draft
pi0 wants to merge 4 commits intomainfrom
feat/tracing
Draft

feat: built-in tracing channel support#4001
pi0 wants to merge 4 commits intomainfrom
feat/tracing

Conversation

@pi0
Copy link
Member

@pi0 pi0 commented Feb 5, 2026

This PR adds a new nitro config tracing: true (or options) to enable built-in tracing channel support for internals.

Currently adding for h3 and srvx + db0 and unstorage comming soon thanks to @logaretm ❤️)

Node.js tracing channel is availabe in Node.js, Deno, Bun and also Cloudflare workers so it is kinda a universal and very lightweight standard for tracing events.

TODO:

  • Node.js (prod)
  • Deno and Bun
  • Dev server (currently only h3 is traced, we need to migrate dev to srvx)
  • Add tests

Example events:

[tracing:h3.fetch] asyncStart event={app,req,url,context}, type=middleware, result=undefined
[tracing:h3.fetch] asyncEnd event={app,req,url,context}, type=middleware, result=undefined
[tracing:h3.fetch] asyncStart event={app,req,url,context}, type=middleware, result=undefined
[tracing:h3.fetch] asyncEnd event={app,req,url,context}, type=middleware, result=undefined
[tracing:srvx.fetch] asyncStart request={runtime,waitUntil,context}, server={runtime,options,node,serveOptions,fetch}, result=Response(200 OK)
[tracing:srvx.fetch] asyncEnd request={runtime,waitUntil,context}, server={runtime,options,node,serveOptions,fetch}, result=Response(200 OK)

@vercel
Copy link

vercel bot commented Feb 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nitro.build Ready Ready Preview, Comment Feb 5, 2026 11:37pm

Request Review

@coderabbitai
Copy link

coderabbitai bot commented Feb 5, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/tracing

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 5, 2026

Open in StackBlitz

npm i https://pkg.pr.new/nitrojs/nitro@4001

commit: b030a44

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