Skip to content

types: add missing wrangler observability types - #4742

Merged
pi0 merged 1 commit into
nitrojs:v2from
hacknug:v2
Oct 15, 2026
Merged

pi0 merged 1 commit into
nitrojs:v2from
hacknug:v2

Conversation

@hacknug

@hacknug hacknug commented Oct 7, 2026

Copy link
Copy Markdown

🔗 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

  • 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to 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 observability types from wrangler's config schema:
https://github.com/cloudflare/workers-sdk/blob/93c10696930e50e310b8b49a8e792671bf371e82/packages/workers-utils/src/config/environment.ts#L1997-L2049

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@hacknug
hacknug requested a review from pi0 as a code owner October 7, 2026 11:59
Copilot AI balanced review requested due to automatic review settings October 7, 2026 11:59
@vercel

vercel Bot commented Oct 7, 2026

Copy link
Copy Markdown

@hacknug is attempting to deploy a commit to the Nitro Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5a16dc5f-d011-4d0a-837e-70289a7434bf

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

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Copilot AI 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.

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.

@pi0 pi0 added the v2 label Oct 7, 2026
@pi0 pi0 changed the title fix(wrangler): add missing observability types types: add missing wrangler observability types Oct 7, 2026
@pi0
pi0 merged commit f6611c9 into nitrojs:v2 Oct 15, 2026
4 of 5 checks passed
@pi0x pi0x removed the v2 label Nov 10, 2026
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.

4 participants