Skip to content

Worker with an assets binding drops inbound traceparent #128

Open

Description

@charlesfrisbee

What versions & operating system are you using?

System:
OS: macOS 26.5.1
CPU: (10) arm64 Apple M1 Pro
Shell: 5.9 - /bin/zsh
Binaries:
Node: 26.10.0
npm: 11.19.1
pnpm: 10.33.0

wrangler 4.151.2, compatibility_date 2026-09-25

Please provide a link to a minimal reproduction

https://github.com/charlesfrisbee/cf-worker-assets-traceparent-repro

Describe the Bug

A Worker with an assets binding doesn't continue an inbound traceparent. The same Worker without it does.

Repro contains two Workers with identical source; the configs differ only by name, hostname and the assets block.

curl -H "traceparent: 00-cc26078eef060356fdb178f6a3ed9ef3-c514776e73d9b57d-01" \
     https://tp-noassets.<zone>/probe

curl -H "traceparent: 00-5f51ef102ca3fc9c8a4518b40a80335e-a021a1ac0f5b178e-01" \
     https://tp-assets.<zone>/probe

Search each trace id in Observability → Traces:

  • without assets: one trace, 7 spans, the Worker nested under upstream
Image
  • with assets: identical structure, but no Worker span under upstream. The Worker's span is in a separate trace with parent_span_id: null.
Image

The edge adopts the header in both cases, the break seems to be between the edge and the Worker.

Doesn't reproduce under wrangler dev or on *.workers.dev domains. Neither variant inherits the traceparent, so both look identical. Seems to need a custom domain on a zone.

Please provide any relevant error logs

No response

Activity

  1. workers-devprod commented on Oct 19, 2026

    @workers-devprod
    Collaborator

    Automated triage

    Issue assessment

    • Actionability: ✅ Actionable.
    • Type: Bug.
    • Reproduction: Automatic attempt requested.
    • Labels:
      • bug (high)
      • feature:workers-assets (high)
      • feature:observability (medium)
    Actionability and missing information

    Bug: with an assets binding, a deployed Worker on a custom domain starts a separate trace (parent_span_id null) instead of continuing the inbound traceparent; not reproducible in wrangler dev or on workers.dev. Minimal repro repo, versions, steps, and expected vs actual traces are all provided.

    Reproduction reason: The report provides a minimal two-Worker reproduction differing only by the assets block, exact request commands, and expected-versus-actual trace output for a current behavior defect.

    Reproduction

    • Result: ⚠️ Blocked.
    • Summary: Fixture for workers-sdk issue 16368 built and dry-run validated (wrangler 4.151.2, env.ASSETS binding); production deploy on a zone plus Observability Traces inspection blocked by missing Cloudflare credentials; local dev cannot exhibit the defect per the report.
    Evidence and attempted steps

    Steps attempted:

    1. Probed sandbox: Node 22.23.2, npm 10.9.8, no global pnpm; network to registry.npmjs.org (HTTP 200) and api.cloudflare.com OK; CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_KEY all unset and no wrangler OAuth config present.
      • Command: test -n "$CLOUDFLARE_API_TOKEN"; echo $?; test -d "$HOME/.wrangler"; echo $?; curl -s -o /dev/null -w '%{http_code}' https://api.cloudflare.com/client/v4
    2. Built the minimal fixture matching the report: wrangler.toml with an assets binding plus observability enabled, single worker source echoing the inbound traceparent, wrangler pinned to 4.151.2; installed with pnpm 10.33.0 via npx.
      • Command: npx -y pnpm@10.33.0 install && ./node_modules/.bin/wrangler --version
    3. Validated the fixture without authentication: dry-run build succeeded and listed the env.ASSETS Assets binding, confirming the reported configuration is set up correctly.
      • Command: ./node_modules/.bin/wrangler deploy --dry-run --outdir dist
    4. Attempted the credentials-gated reproduction path: wrangler whoami reported 'You are not authenticated. Please run wrangler login.' while api.cloudflare.com was reachable (HTTP 400 unauthenticated), isolating the blocker to missing credentials rather than connectivity or a broken fixture.
      • Command: ./node_modules/.bin/wrangler whoami; curl -s -o /dev/null -w 'HTTP %{http_code}' https://api.cloudflare.com/client/v4/user/tokens/verify

    Blocker: No Cloudflare account credentials (no OAuth token, no CLOUDFLARE_API_TOKEN, no CLOUDFLARE_ACCOUNT_ID, no CLOUDFLARE_API_KEY, no wrangler config) exist in the sandbox. Reproduction requires deploying the assets-bound and baseline Workers to production on custom domains attached to a zone, then reading the resulting trace trees in the dashboard's Observability Traces view. Credentials may not be requested or searched for. Per the issue, wrangler dev and workers.dev traffic do not exhibit the defect, so no local run can confirm or refute it.

    Artifact: Download reproduction archive (Cloudflare Access required).

    Treat archive contents as untrusted. Inspect them before running anything.


    This summary was generated by an LLM and may contain errors. Please verify its findings.

    Triage bot commands and options

    Repository collaborators with write or admin access can trigger actions by commenting on this issue:

    • @workers-devprod reproduce: Attempt to reproduce the issue using its description and recent comments.
  2. added
    bug
    feature:workers-assets
    on Oct 19, 2026
  3. removed
    bug
    on Nov 6, 2026
  4. moved this from Untriaged to Other in workers-sdkon Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature:workers-assets

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions