Skip to content

Worker Previews JSON schema for previews.observability requires top-level Worker properties #15793

Description

@NuroDev

Summary

Currently if you try and add a observability property to your previews object in your Wrangler config it will give you the following warning:

Missing property "compatibility_flags".
Missing property "jsx_factory".
Missing property "jsx_fragment".
Missing property "migrations".
Missing property "exports".
Missing property "triggers".
Missing property "rules".
Missing property "build".
Missing property "logfwdr".
Missing property "python_modules".
[...]

It seems one of the types or JSDoc types that the JSON schema is generated from is incorrect and is pulling in the type for the top-level config rather than just the observability types.

Reproduction

Paste this in as your wrangler.jsonc config and your editors LSP should warn you about previews.observability missing a large number of properties.

{
	"$schema": "node_modules/wrangler/config-schema.json",
	"name": "my-worker",
	"main": "src/index.ts",
	"compatibility_date": "2026-06-16",
	"compatibility_flags": ["nodejs_compat"],
	"observability": {
		"enabled": true,
	},
	"previews": {
		"observability": {
			"enabled": true,
		},
	},
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

package:wranglerRelating to the `wrangler` packagepreview:wranglerBuild and publish only Wrangler through pkg.pr.new

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions