Skip to content

[WO-2056] Report each redirect hop's URL on fetch spans - #8093

Draft
jmorrell-cloudflare wants to merge 1 commit into
mainfrom
jmorrell/fetch-span-url
Draft

jmorrell-cloudflare wants to merge 1 commit into
mainfrom
jmorrell/fetch-span-url

Conversation

@jmorrell-cloudflare

@jmorrell-cloudflare jmorrell-cloudflare commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Built-in fetch spans reported the wrong URL after a redirect: every hop carried the first request's URL in url.full, and in the url.path and url.query derived from it.

Each redirect hop now reports the URL it actually sent, with the fragment kept. The first hop still reports the URL as given, so relative Durable Object URLs on old compatibility dates stay relative.

Heads up: this isn't behind a compatibility flag, so the corrected URLs show up at every compatibility date.

Use the dispatch URL of each redirect hop for url.full instead of repeating the initial request URL. Preserve fragments in the tracing value even though they are not sent over HTTP.

Keep the original request URL unchanged for the first hop, including relative Durable Object URLs on older compatibility dates. This changes telemetry only, not fetch behavior.

Cover multi-hop redirects, fragments on redirected URLs and legacy relative URLs. Validate tail event ordering after collection so assertion failures are reported directly.
@jmorrell-cloudflare jmorrell-cloudflare changed the title [WO-2056] Report each redirect hop's URL on fetch spans and redact credentials [WO-2056] Report each redirect hop's URL on fetch spans Oct 30, 2026
@codecov-commenter

codecov-commenter commented Oct 30, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.46%. Comparing base (5bc9556) to head (3a59c36).
⚠️ Report is 40 commits behind head on main.

Files with missing lines Patch % Lines
src/workerd/api/http.c++ 70.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8093      +/-   ##
==========================================
- Coverage   68.49%   68.46%   -0.04%     
==========================================
  Files         721      722       +1     
  Lines      186640   186743     +103     
  Branches    29363    29366       +3     
==========================================
+ Hits       127836   127848      +12     
- Misses      41638    41727      +89     
- Partials    17166    17168       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

2 participants