Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Void drops cloudflare.observability on deploy

已关闭
#486 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@cpojer 已经在做这个了。

开始于 2026年10月20日。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
53/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
cloud, devops

调研方向

Start by tracing uploadPinnedCloudflareVersion and the cf workers versions create --prebuilt path described in the issue, then compare them with the cf deploy --prebuilt path that applies the setting. Check how observability is passed through each deploy path and use the Worker's script settings endpoint to confirm the result. Done means deploying with observability enabled applies it for the affected paths.

由索引模型根据 Issue 内容生成。

描述

Summary

I tried to enable traces for my worker via void configuration, followed by a deploy, but it never altered the worker settings. void deploy accepts cloudflare.observability in void.config.ts and records it in void.lock.json, but never applies it to the Worker.

More info from Claude:

Steps to reproduce
  1. Deploy a Void app to your own Cloudflare account once, so the Worker exists.

  2. Set at least one secret: void secret put OWNER_EMAIL.

  3. Add observability to void.config.ts:

    import { defineConfig } from 'void/config';
    
    export default defineConfig({
      deploy: { cloudflare: { mode: 'atomic' } },
      cloudflare: {
        name: 'my-app',
        observability: {
          enabled: true,
          logs: { enabled: true },
          traces: { enabled: true },
        },
      },
    });
    
  4. Run void deploy. It succeeds, and void.lock.json now records observability under source and resolved.

  5. Read the Worker's script settings: GET /accounts/{account_id}/workers/scripts/{script_name}/settings.

From reading the code, the default staged mode should fail the same way, with or without secrets. Only atomic mode was tested.

Root cause

Cloudflare only applies observability through the Worker's script settings (PATCH .../workers/scripts/{name}/script-settings) or a full script upload. A version upload does not carry it. Which call Void makes depends on the deploy path:

Path Used when Applies observability?
uploadPinnedCloudflareVersion (Workers beta versions API) Existing Worker with secrets, staged or atomic No: observability is on the allowlist of accepted keys but never sent
cf workers versions create --prebuilt Existing Worker, no secrets, staged No: cf sends observability: undefined
cf deploy --prebuilt First deploy, or atomic with no secrets Yes: cf PATCHes script-settings
主要语言
TypeScript
星标
402
派生
32
平均合并
11 小时 52 分钟
30 天内合并 PR
88

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

voidzero-dev/void 的其他 Issue

查看 voidzero-dev/void 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。