Repository navigation
types: add missing wrangler observability types - #4742
Conversation
|
@hacknug is attempting to deploy a commit to the Nitro Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The added fields accurately match the linked upstream Wrangler schema and introduce no runtime behavior changes.
Review effort: Balanced
Findings: None
What changed in this PR
Updates Nitro’s Wrangler configuration types to match Cloudflare’s observability schema.
Changes:
- Adds query redaction and real-time issue settings.
- Adds persistence and destination options for logs and traces.
| File | Description |
|---|---|
src/presets/cloudflare/wrangler/environment.ts |
Extends Observability with the missing upstream fields. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
observability typesobservability types
🔗 Linked issue
Wrangler observability types aren't up-to-date in v2 and TS was complaining about it on a NuxtHub project of mine. This small PR fixes that.
Should be a simple merge or close. No need to open an issue or further discussion imo.
❓ Type of change
📚 Description
The default config Cloudflare gives you to enable Observability on your project contains options missing in Nitro v2.
{ "observability": { "logs": { "enabled": true, "invocation_logs": true, "persist": true // the culprit that surfaced this } }, }This PR adds the missing
observabilitytypes from wrangler's config schema:https://github.com/cloudflare/workers-sdk/blob/93c10696930e50e310b8b49a8e792671bf371e82/packages/workers-utils/src/config/environment.ts#L1997-L2049
📝 Checklist