Configuration file for Pages projects does not support "observability"

I'm trying to get my worker project working with observability via the documentation
compatibility_date = "2024-11-12"

[observability]
enabled = true
head_sampling_rate = 1
compatibility_date = "2024-11-12"

[observability]
enabled = true
head_sampling_rate = 1
I have the latest version of wrangler: 3.87.0 However I get this error: Configuration file for Pages projects does not support "observability" I have checked node_modules/wrangler/config-schema.json and observability is in there, I have also tried closing and reopening the app as well as wiping out node_modules and installing again.
5 Replies
discondition
disconditionOP•4d ago
Just checked the file at node_modules/wrangler/wrangler-dist/cli.js Looks like a bug:
var supportedPagesConfigFields = [
"pages_build_output_dir",
"name",
"compatibility_date",
"compatibility_flags",
"send_metrics",
"limits",
"placement",
"vars",
"durable_objects",
"kv_namespaces",
"queues",
// `producers` ONLY
"r2_buckets",
"d1_databases",
"vectorize",
"hyperdrive",
"services",
"analytics_engine_datasets",
"ai",
"version_metadata",
"dev",
"mtls_certificates",
"browser",
// normalizeAndValidateConfig() sets this value
"configPath",
"upload_source_maps"
];
var supportedPagesConfigFields = [
"pages_build_output_dir",
"name",
"compatibility_date",
"compatibility_flags",
"send_metrics",
"limits",
"placement",
"vars",
"durable_objects",
"kv_namespaces",
"queues",
// `producers` ONLY
"r2_buckets",
"d1_databases",
"vectorize",
"hyperdrive",
"services",
"analytics_engine_datasets",
"ai",
"version_metadata",
"dev",
"mtls_certificates",
"browser",
// normalizeAndValidateConfig() sets this value
"configPath",
"upload_source_maps"
];
Shouldn't observability be a key in here? Yeah I just edited the file, and it works 🤔 I made a PR
Chaika
Chaika•3d ago
Cloudflare Pages just doesn't support observability and there's no plans for it to do so https://discord.com/channels/595317990191398933/1283450491837091860/1299077704070594590
discondition
disconditionOP•3d ago
Oh really? Thanks I had no idea
Chaika
Chaika•3d ago
yea Pages probably isn't going to see many new things, Workers Assets is the new thing/replacement, built directly into Workers, they're working on migration pathways from Pages -> Workers Assets
discondition
disconditionOP•3d ago
Nice, looking forward to it
Want results from more Discord servers?
Add your server