Skip to content

Conversation

@jaffrepaul
Copy link
Contributor

@jaffrepaul jaffrepaul commented Nov 10, 2025

DESCRIBE YOUR PR

The 404 link checker GitHub Action was processing over 9,000 pages despite the repository containing only ~2,200 source files. The Sentry docs use a "common files" architecture where a single source file generates multiple URLs across platforms and guides and we were checking every generated page independently.

Also made moves to what's bundled during the build to avoid Vercel's 250MB limit on serverless function size.

Implemented source-based deduplication using the existing /api/source-map endpoint:

  • Fetch source-map that maps each slug to its source file
  • Track which source files have been checked
  • Only check one page per unique source file
  • Always check API-generated pages (no source file)

That gets us...

  • ~72% faster - Checks ~2,200 unique pages instead of 9,000
  • ~72% fewer HTTP requests - Massive reduction in server load
  • Same coverage - Still validates all pages, just efficiently

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: 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 added an urgent due date to it.
    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
Copy link

vercel bot commented Nov 10, 2025

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

Project Deployment Preview Comments Updated (UTC)
develop-docs Ready Ready Preview Comment Dec 11, 2025 9:32pm
sentry-docs Ready Ready Preview Comment Dec 11, 2025 9:32pm

@codecov
Copy link

codecov bot commented Nov 10, 2025

Bundle Report

Changes will decrease total bundle size by 3.43MB (-9.68%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 21.13MB -3.7MB (-14.89%) ⬇️
sentry-docs-client-array-push 10.5MB 269.83kB (2.64%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
729.js (New) 5.49MB 5.49MB 100.0% 🚀
../instrumentation.js 39.5kB 4.82MB 0.83%
523.js 4.8MB 4.8MB 355298.0% ⚠️
556.js (New) 1.03MB 1.03MB 100.0% 🚀
../app/[[...path]]/page.js.nft.json -266.52kB 845.09kB -23.98%
../app/platform-redirect/page.js.nft.json -266.52kB 845.0kB -23.98%
../app/[[...path]]/page.js 68 bytes 639.9kB 0.01%
../app/api/source-map/route.js.nft.json (New) 266.22kB 266.22kB 100.0% 🚀
../app/sitemap.xml/route.js.nft.json -853.21kB 255.84kB -76.93%
411.js (New) 235.95kB 235.95kB 100.0% 🚀
236.js (New) 124.48kB 124.48kB 100.0% 🚀
151.js (New) 121.99kB 121.99kB 100.0% 🚀
548.js (New) 68.07kB 68.07kB 100.0% 🚀
../app/platform-redirect/page.js 66 bytes 32.56kB 0.2%
947.js (New) 31.7kB 31.7kB 100.0% 🚀
164.js (New) 25.01kB 25.01kB 100.0% 🚀
../../types/app/api/source-map/route.ts (New) 8.72kB 8.72kB 100.0% 🚀
786.js (New) 7.8kB 7.8kB 100.0% 🚀
../app/sitemap.xml/route.js -28.76kB 7.32kB -79.7%
../app/_not-found/page.js 1.95kB 6.8kB 40.07% ⚠️
../app/api/ip-ranges/route.js 3 bytes 6.07kB 0.05%
../app/api/source-map/route.js (New) 5.35kB 5.35kB 100.0% 🚀
../app/robots.txt/route.js 1 bytes 5.15kB 0.02%
../pages/_error.js -4 bytes 4.45kB -0.09%
../webpack-runtime.js -2 bytes 3.44kB -0.06%
175.js (New) 1.53kB 1.53kB 100.0% 🚀
597.js (New) 1.53kB 1.53kB 100.0% 🚀
672.js (New) 1.53kB 1.53kB 100.0% 🚀
180.js (New) 1.43kB 1.43kB 100.0% 🚀
247.js (New) 1.43kB 1.43kB 100.0% 🚀
11.js (New) 1.43kB 1.43kB 100.0% 🚀
980.js (New) 1.42kB 1.42kB 100.0% 🚀
51.js (New) 1.42kB 1.42kB 100.0% 🚀
../pages/_document.js -3 bytes 1.36kB -0.22%
129.js (New) 1.26kB 1.26kB 100.0% 🚀
160.js (New) 1.26kB 1.26kB 100.0% 🚀
468.js (New) 1.26kB 1.26kB 100.0% 🚀
202.js (New) 1.13kB 1.13kB 100.0% 🚀
445.js (New) 1.13kB 1.13kB 100.0% 🚀
97.js (New) 1.13kB 1.13kB 100.0% 🚀
../app/_not-found/page.js.nft.json 18 bytes 824 bytes 2.23%
../app/api/ip-ranges/route.js.nft.json 44 bytes 597 bytes 7.96% ⚠️
../app/robots.txt/route.js.nft.json 38 bytes 459 bytes 9.03% ⚠️
../instrumentation.js.nft.json -10 bytes 274 bytes -3.52%
../pages/_document.js.nft.json -2 bytes 213 bytes -0.93%
../pages/_error.js.nft.json -2 bytes 157 bytes -1.26%
1729.js (Deleted) -5.46MB 0 bytes -100.0% 🗑️
6529.js (Deleted) -4.88MB 0 bytes -100.0% 🗑️
9426.js (Deleted) -1.05MB 0 bytes -100.0% 🗑️
8049.js (Deleted) -548.51kB 0 bytes -100.0% 🗑️
1561.js (Deleted) -443.19kB 0 bytes -100.0% 🗑️
9269.js (Deleted) -366.94kB 0 bytes -100.0% 🗑️
5017.js (Deleted) -275.62kB 0 bytes -100.0% 🗑️
8413.js (Deleted) -219.4kB 0 bytes -100.0% 🗑️
8454.js (Deleted) -150.19kB 0 bytes -100.0% 🗑️
4236.js (Deleted) -100.47kB 0 bytes -100.0% 🗑️
6548.js (Deleted) -99.93kB 0 bytes -100.0% 🗑️
5947.js (Deleted) -84.32kB 0 bytes -100.0% 🗑️
8478.js (Deleted) -77.97kB 0 bytes -100.0% 🗑️
5905.js (Deleted) -72.14kB 0 bytes -100.0% 🗑️
8548.js (Deleted) -68.07kB 0 bytes -100.0% 🗑️
6795.js (Deleted) -61.28kB 0 bytes -100.0% 🗑️
257.js (Deleted) -46.74kB 0 bytes -100.0% 🗑️
2300.js (Deleted) -43.87kB 0 bytes -100.0% 🗑️
5629.js (Deleted) -39.53kB 0 bytes -100.0% 🗑️
5103.js (Deleted) -37.22kB 0 bytes -100.0% 🗑️
7238.js (Deleted) -37.14kB 0 bytes -100.0% 🗑️
7390.js (Deleted) -34.48kB 0 bytes -100.0% 🗑️
1947.js (Deleted) -31.7kB 0 bytes -100.0% 🗑️
8790.js (Deleted) -31.55kB 0 bytes -100.0% 🗑️
7484.js (Deleted) -26.37kB 0 bytes -100.0% 🗑️
1058.js (Deleted) -26.21kB 0 bytes -100.0% 🗑️
2351.js (Deleted) -25.28kB 0 bytes -100.0% 🗑️
1010.js (Deleted) -24.75kB 0 bytes -100.0% 🗑️
9567.js (Deleted) -24.69kB 0 bytes -100.0% 🗑️
6768.js (Deleted) -24.37kB 0 bytes -100.0% 🗑️
291.js (Deleted) -24.15kB 0 bytes -100.0% 🗑️
8938.js (Deleted) -22.32kB 0 bytes -100.0% 🗑️
7244.js (Deleted) -21.09kB 0 bytes -100.0% 🗑️
4819.js (Deleted) -12.42kB 0 bytes -100.0% 🗑️
4781.js (Deleted) -12.12kB 0 bytes -100.0% 🗑️
776.js (Deleted) -11.71kB 0 bytes -100.0% 🗑️
8065.js (Deleted) -7.05kB 0 bytes -100.0% 🗑️
7000.js (Deleted) -5.4kB 0 bytes -100.0% 🗑️
9153.js (Deleted) -5.02kB 0 bytes -100.0% 🗑️
7067.js (Deleted) -1.64kB 0 bytes -100.0% 🗑️
1672.js (Deleted) -1.53kB 0 bytes -100.0% 🗑️
9556.js (Deleted) -1.53kB 0 bytes -100.0% 🗑️
9597.js (Deleted) -1.53kB 0 bytes -100.0% 🗑️
2180.js (Deleted) -1.44kB 0 bytes -100.0% 🗑️
3011.js (Deleted) -1.44kB 0 bytes -100.0% 🗑️
8247.js (Deleted) -1.44kB 0 bytes -100.0% 🗑️
9980.js (Deleted) -1.42kB 0 bytes -100.0% 🗑️
2051.js (Deleted) -1.42kB 0 bytes -100.0% 🗑️
4749.js (Deleted) -1.35kB 0 bytes -100.0% 🗑️
6998.js (Deleted) -1.35kB 0 bytes -100.0% 🗑️
4160.js (Deleted) -1.27kB 0 bytes -100.0% 🗑️
6468.js (Deleted) -1.27kB 0 bytes -100.0% 🗑️
9129.js (Deleted) -1.27kB 0 bytes -100.0% 🗑️
2202.js (Deleted) -1.14kB 0 bytes -100.0% 🗑️
5097.js (Deleted) -1.14kB 0 bytes -100.0% 🗑️
9445.js (Deleted) -1.14kB 0 bytes -100.0% 🗑️
4865.js (Deleted) -1.08kB 0 bytes -100.0% 🗑️
3331.js (Deleted) -1.07kB 0 bytes -100.0% 🗑️
7502.js (Deleted) -1.07kB 0 bytes -100.0% 🗑️
7560.js (Deleted) -1.07kB 0 bytes -100.0% 🗑️
5225.js (Deleted) -1.07kB 0 bytes -100.0% 🗑️
1938.js (Deleted) -1.07kB 0 bytes -100.0% 🗑️
388.js (Deleted) -1.07kB 0 bytes -100.0% 🗑️

Files in 786.js:

  • ./src/frontmatter.ts → Total Size: 11.8kB

App Routes Affected:

App Route Size Change Total Size Change (%)
/platform-redirect -2.71MB 75.83kB -97.28%
/ -2.75MB 74.97kB -97.34%
/[[...path]] -2.71MB 683.17kB -79.88%
view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 893.1kB -0.0%
static/chunks/9366-*.js -3 bytes 437.05kB -0.0%
server/app/api/source-*.js (New) 268.31kB 268.31kB 100.0% 🚀
app-*.json 412 bytes 5.01kB 8.97% ⚠️
static/chunks/app/_not-*.js 5 bytes 1.06kB 0.47%
static/chunks/app/api/ip-*.js 5 bytes 1.06kB 0.47%
static/chunks/app/api/source-*.js (New) 1.06kB 1.06kB 100.0% 🚀
static/E5hvdbm1TbQ9vAw07fqld/_buildManifest.js (New) 725 bytes 725 bytes 100.0% 🚀
static/E5hvdbm1TbQ9vAw07fqld/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/LELdkQn7LznQXENKLTZVt/_buildManifest.js (Deleted) -684 bytes 0 bytes -100.0% 🗑️
static/LELdkQn7LznQXENKLTZVt/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️

@jaffrepaul jaffrepaul marked this pull request as draft November 10, 2025 19:10
@jaffrepaul jaffrepaul marked this pull request as ready for review November 10, 2025 21:15
cursor[bot]

This comment was marked as outdated.

@jaffrepaul jaffrepaul merged commit aad9f1e into master Dec 11, 2025
16 checks passed
@jaffrepaul jaffrepaul deleted the unique-link-checker branch December 11, 2025 22:01
@jaffrepaul jaffrepaul mentioned this pull request Dec 11, 2025
6 tasks
jaffrepaul added a commit that referenced this pull request Dec 11, 2025
<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->

## DESCRIBE YOUR PR
This PR fixes a regresses introduced in
#15452

The platform-redirect page was failing in production with: "Cannot find
module 'mdx-bundler'"

Update `docTree.ts` to import from `frontmatter.ts` instead of `mdx.ts`.
At runtime, these functions only read from pre-computed doctree.json
files, so mdx-bundler is not needed.

## IS YOUR CHANGE URGENT?  

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [ ] None: 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
added an urgent due date to it.
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](https://github.com/orgs/getsentry/teams/docs)

## LEGAL BOILERPLATE

<!-- Sentry employees and contractors can delete or ignore this section.
-->

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

- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
jaffrepaul added a commit that referenced this pull request Dec 12, 2025
<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->

## DESCRIBE YOUR PR
This PR fixes an issue where `doctree.json` wasn't accessible to a
couple of routes due to Vercel serverless filtering created in
#15452. It's now explicitly
included.

## IS YOUR CHANGE URGENT?  

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [ ] None: 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
added an urgent due date to it.
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](https://github.com/orgs/getsentry/teams/docs)

## LEGAL BOILERPLATE

<!-- Sentry employees and contractors can delete or ignore this section.
-->

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

- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
jaffrepaul added a commit that referenced this pull request Dec 12, 2025
…5812)

<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->

## DESCRIBE YOUR PR
Added docs/changelog.mdx to the outputFileTracingIncludes configuration
for the [[...path]] route. This ensures the file is available in the
serverless function when ISR (Incremental Static Regeneration) needs to
re-render the page.

The changelog page uses ISR with a 1-hour revalidation period. When
Next.js revalidates the page, it runs in the serverless function and
needs to read the source MDX file. However, PR #15452 excluded all
docs/**/* files from the serverless bundle to save on size, causing the
ENOENT error.

## IS YOUR CHANGE URGENT?  

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [ ] None: 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
added an urgent due date to it.
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](https://github.com/orgs/getsentry/teams/docs)

## LEGAL BOILERPLATE

<!-- Sentry employees and contractors can delete or ignore this section.
-->

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

- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
@jaffrepaul jaffrepaul mentioned this pull request Dec 14, 2025
6 tasks
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.

3 participants