Skip to content

fix(redirects): Restore backend project source maps links - #19795

Open
sansynx wants to merge 1 commit into
getsentry:masterfrom
sansynx:fix/backend-project-sourcemap-links
Open

sansynx wants to merge 1 commit into
getsentry:masterfrom
sansynx:fix/backend-project-sourcemap-links

Conversation

@sansynx

@sansynx sansynx commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

DESCRIBE YOUR PR

Fixes #17865
Fixes #17859
Fixes #17858

The reported source maps links use Django, PHP, and Rails project names as JavaScript guide names. All three return 404. This redirects those exact URLs to the JavaScript source maps guide, which returns 200

The three cases share one fix, so they are grouped here. Regression tests exercise the middleware response and check that the destination does not redirect again. All 82 middleware and redirect-tooling tests pass

This repairs the docs URLs only, not the code that generates links in the Sentry application. Vercel preview review is still pending

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.
Select exactly one option. For deadlines, replace YYYY-MM-DD with the due date. You can update this information later by editing the PR description.

  • Urgent deadline (GA date, etc.): YYYY-MM-DD
  • Other deadline: YYYY-MM-DD
  • No deadline: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've supplied a deadline.

Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

LEGAL BOILERPLATE

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

EXTRA RESOURCES

@vercel

vercel Bot commented Oct 4, 2026

Copy link
Copy Markdown

@sansynx is attempting to deploy a commit to the Sentry Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the Priority: Normal Docs review has no urgent deadline label Oct 4, 2026
@sansynx
sansynx marked this pull request as ready for review October 4, 2026 06:57
Copilot AI balanced review requested due to automatic review settings October 4, 2026 06:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codeowner-assignment
codeowner-assignment Bot requested a review from a team October 4, 2026 06:57
@cursor

cursor Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

The plan checks redirects on the three broken source-map URLs, sibling JavaScript source-map pages, and production errors. An issue escalates when those URLs still fail to redirect or error volume rises above the measured band.

Services: sentry-docs, develop-docs.

Mention @change-monitor in a comment to update the plan.

Plan

What changed

Requests to /platforms/javascript/guides/python-django/sourcemaps/, /platforms/javascript/guides/php/sourcemaps/, and /platforms/javascript/guides/ruby-rails/sourcemaps/ now return 301 to /platforms/javascript/sourcemaps/.
sentry-docs must deploy before this is live. The same middleware.ts file also ships in develop-docs. The new rows sit in USER_DOCS_REDIRECTS and do not apply when developer docs mode is on.
This change targets issues/17865, issues/17859, and issues/17858.

Risk

A bad redirect map can send valid JavaScript guide source-map pages to the wrong URL. A middleware fault can fail every request on both ships.
Existing :guide placeholder rows already send /platforms/javascript/guides/php/sourcemaps/multiple-origins/ to /platforms/javascript/guides/php/sourcemaps/. After this change that chain continues to /platforms/javascript/sourcemaps/.

Intended effect

The new behavior is a 301 on those three paths. absent looks like those paths still logged as middleware passthrough while redirect spans on those paths stay at zero.

Signal Baseline Rule Source
Redirect spans for the three broken paths 0 spans in 7d Rise above 0 after deploy Sentry org sentry project docs, environment:production AND middleware.outcome:redirect AND (url.path:"/platforms/javascript/guides/python-django/sourcemaps/" OR url.path:"/platforms/javascript/guides/php/sourcemaps/" OR url.path:"/platforms/javascript/guides/ruby-rails/sourcemaps/"), window 2026-09-27T06:58:42Z to 2026-10-04T06:58:42Z
Passthrough logs for the Django source-map URL 1 info log in 7d Stay at 0 after deploy Sentry org sentry project docs, production logs Middleware request processed: /platforms/javascript/guides/python-django/sourcemaps/, window 2026-09-27T06:58:42Z to 2026-10-04T06:58:42Z. Fixes issues/17865
Passthrough logs for the PHP source-map URL 1 info log in 7d Stay at 0 after deploy Sentry org sentry project docs, production logs Middleware request processed: /platforms/javascript/guides/php/sourcemaps/, window 2026-09-27T06:58:42Z to 2026-10-04T06:58:42Z. Fixes issues/17859
Passthrough logs for the Rails source-map URL 1 info log in 7d Stay at 0 after deploy Sentry org sentry project docs, production logs Middleware request processed: /platforms/javascript/guides/ruby-rails/sourcemaps/, window 2026-09-27T06:58:42Z to 2026-10-04T06:58:42Z. Fixes issues/17858

Those three logs all occurred at 2026-10-04T06:45:03Z to 2026-10-04T06:45:04Z. After deploy, handleRedirects returns before that log. Redirect spans on those paths must rise above zero if traffic continues.

Regression watch

A broken redirect table can widen to valid JavaScript guide source-map pages or fail middleware for every request. Watch errors first. Then watch redirect volume and sibling source-map pages.

Signal Baseline Rule Source
Production errors on docs 0-15 events/h, 59 events in 24h Hold in 0-15/h. Escalate if the rate rises above 15/h Sentry org sentry project docs, environment:production error count, window 2026-10-03T06:58:42Z to 2026-10-04T06:58:42Z
Middleware redirect spans 200-1300 spans/h, 12900 spans in 24h Hold in 200-1300/h. Escalate if volume collapses below 200/h or rises above 1300/h Sentry org sentry project docs, environment:production middleware.outcome:redirect, window 2026-10-03T06:58:42Z to 2026-10-04T06:58:42Z
React JavaScript source-map page spans 0-100 spans/h, 313 spans in 24h Hold in 0-100/h. Escalate if this path goes quiet across a full 24h Sentry org sentry project docs, environment:production url.path:"/platforms/javascript/guides/react/sourcemaps/", window 2026-10-03T06:58:42Z to 2026-10-04T06:58:42Z
Production errors on develop-docs 0-3 events/h, 12 events in 24h Hold in 0-3/h. Escalate if the rate rises above 3/h Sentry org sentry project develop-docs, environment:production error count, window 2026-10-03T06:58:42Z to 2026-10-04T06:58:42Z

If error volume rises, check whether valid /platforms/javascript/guides/*/sourcemaps/ paths now redirect. Node, React, and Next.js source-map pages had traffic in this window.

Not observable

HTTP 404 and 301 status codes for the three broken URLs are not in traces. A 24h query for http.status_code:404 on /platforms/javascript/* returned 0.
Middleware root spans sample at 1%. Rare hits may not create redirect spans even when the 301 works. Use the passthrough logs for path hits.

@coolguyzone coolguyzone left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks so much for fixing this @sansynx!

@vercel

vercel Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
develop-docs Ready Ready Preview Oct 8, 2026 9:20pm UTC
sentry-docs Ready Ready Preview Oct 8, 2026 9:20pm UTC

Request Review

This branch was successfully deployed

2 active deployments
Preview – sentry-docs — ce84c265 Deployed Oct 8, 2026 by vercel[bot]
Preview – develop-docs — ce84c265 Deployed Oct 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Normal Docs review has no urgent deadline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🔗 404 Error 🔗 404 Error 🔗 404 Error

3 participants