Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
c993290
docs(java): Correct shutdownTimeoutMillis unit (#20683)
sentry-junior[bot] Nov 10, 2026
8921964
feat(docs): Apply new quick start template to Dart and Flutter quick …
sentry-junior[bot] Nov 10, 2026
6fabf68
docs(develop): Broaden invalid client report reason (#20595)
sentry-junior[bot] Nov 10, 2026
b9fb178
Bump API schema to 7caf510a (#20690)
sentry-api-schema-updater[bot] Nov 10, 2026
0d261a8
Bump API schema to 411ccf67 (#20691)
sentry-api-schema-updater[bot] Nov 10, 2026
c61ca28
docs(otlp): Remove beta and alpha callouts from OTLP pages (#20649)
sentry-junior[bot] Nov 10, 2026
f892526
docs(cloudflare): Document the isStreamingResponse option (#20092)
sentry-junior[bot] Nov 10, 2026
083a1af
Update Codeowners for Legal/Security docs (#20663)
geoffg-sentry Nov 10, 2026
ebcdb4c
feat(develop-docs): Render span attributes from sentry-conventions (#…
cleptric Nov 10, 2026
1a2e1ef
docs(js): Move the Cloudflare quick starts into the framework guides …
JPeer264 Nov 10, 2026
c9ed905
feat(js): Add a framework selector to the Node.js, Bun and Deno quick…
JPeer264 Nov 10, 2026
40b6259
docs(js): Add runtime quick starts to the agent guides (#20467)
JPeer264 Nov 10, 2026
8fa5488
feat(platform-selector): Show JavaScript runtimes first (#20132)
JPeer264 Nov 10, 2026
fed8490
Bump API schema to a484918a (#20693)
sentry-api-schema-updater[bot] Nov 10, 2026
84416d6
Bump API schema to e35efe6d (#20694)
sentry-api-schema-updater[bot] Nov 10, 2026
ad690a4
Bump API schema to e58a5c0e (#20696)
sentry-api-schema-updater[bot] Nov 10, 2026
cb0aa94
Bump API schema to 4674fdc9 (#20697)
sentry-api-schema-updater[bot] Nov 10, 2026
fcbe244
docs(godot): Document Web tunneling (#20596)
limbonaut Nov 10, 2026
84d9832
docs(godot): Document automatic performance metrics (#20660)
limbonaut Nov 10, 2026
70e38c3
docs(ai): Report onboarding progress through the Sentry CLI (#20650)
Abdkhan14 Nov 10, 2026
ce2d6f0
Bump API schema to 35520634 (#20701)
sentry-api-schema-updater[bot] Nov 10, 2026
dc0f73a
Bump API schema to c17b2fba (#20702)
sentry-api-schema-updater[bot] Nov 10, 2026
ec13806
perf(css): Ship only the Radix color scales we use (#20700)
coolguyzone Nov 10, 2026
ec47fe1
Bump API schema to a6c23b39 (#20703)
sentry-api-schema-updater[bot] Nov 10, 2026
b4a5554
Bump API schema to 1ef9bb60 (#20704)
sentry-api-schema-updater[bot] Nov 10, 2026
38a66b7
docs(dotnet): Correct quick-start setup and verification (#20240)
sfanahata Nov 10, 2026
bce2484
Bump API schema to 821639eb (#20707)
sentry-api-schema-updater[bot] Nov 10, 2026
f8af3f0
Bump API schema to 5906b2a7 (#20708)
sentry-api-schema-updater[bot] Nov 10, 2026
1731df1
Bump API schema to 71714be6 (#20710)
sentry-api-schema-updater[bot] Nov 10, 2026
286c970
Bump API schema to f76ffa03 (#20712)
sentry-api-schema-updater[bot] Nov 10, 2026
7623771
Bump API schema to b6988bd7 (#20713)
sentry-api-schema-updater[bot] Nov 11, 2026
e36c6f0
Bump API schema to 59ba269d (#20714)
sentry-api-schema-updater[bot] Nov 11, 2026
bf758ea
Bump API schema to 4431bbf1 (#20716)
sentry-api-schema-updater[bot] Nov 11, 2026
b2e1a29
Bump API schema to f13098b1 (#20717)
sentry-api-schema-updater[bot] Nov 11, 2026
176be58
docs(react-native): Explain EAS env var setup for Expo source maps (#…
sentry-junior[bot] Nov 11, 2026
2374e0a
Update migration notes for `sendDefaultPii` in SDK (#19340)
adinauer Nov 11, 2026
27f9cd9
docs(apple): Warn that debug logging can slow down apps (#20725)
sentry-junior[bot] Nov 11, 2026
f15e241
docs(react-native): Document SPM setup (#20727)
alwx Nov 11, 2026
1a20327
Bump API schema to 4c9379a2 (#20729)
sentry-api-schema-updater[bot] Nov 11, 2026
0c2d0f8
Bump API schema to 699efd0b (#20730)
sentry-api-schema-updater[bot] Nov 11, 2026
dcc0a19
docs(develop): Document decision and extraction spans (#20107)
andreiborza Nov 11, 2026
3e07aad
docs(develop): Document Objectstore hostAliases for Envoy sidecar (#2…
sentry-junior[bot] Nov 11, 2026
89d78d2
docs(android): Add experimental out-of-process crash handling (#20431)
jpnurmi Nov 11, 2026
29b1964
docs(crons): Document monitor config from @Scheduled for Spring @Sent…
wedamija Nov 11, 2026
d98d5ea
docs(java): Document Quartz monitor config upsert (#19777)
wedamija Nov 11, 2026
43466ed
Bump API schema to 51beb3e8 (#20733)
sentry-api-schema-updater[bot] Nov 11, 2026
1ce7b43
docs(issues): Update Issues page for the Feed and Issue Views (#20436)
sentry-junior[bot] Nov 11, 2026
55a8557
docs(issues): List all supported repo providers for Web Vitals issues…
sentry-junior[bot] Nov 11, 2026
8927871
docs(issues): Fix replay issue search, rage click alert steps, and hy…
sentry-junior[bot] Nov 11, 2026
aef7c12
docs(develop): Update issue type example category and grouptype links…
sentry-junior[bot] Nov 11, 2026
8962907
docs(issues): Note that Endpoint Regression issues are no longer crea…
sentry-junior[bot] Nov 11, 2026
c04e8ad
docs(issues): Clarify uptime issue grouping and thresholds (#20510)
sentry-junior[bot] Nov 11, 2026
0e5f816
Bump API schema to 4e986cf7 (#20734)
sentry-api-schema-updater[bot] Nov 11, 2026
bd54d17
Bump API schema to 52de466e (#20735)
sentry-api-schema-updater[bot] Nov 11, 2026
b5ae0b3
Bump API schema to 1e6b86c6 (#20736)
sentry-api-schema-updater[bot] Nov 11, 2026
9cf174a
Bump API schema to cf430bfd (#20739)
sentry-api-schema-updater[bot] Nov 11, 2026
c70fd74
Bump API schema to 129e7904 (#20740)
sentry-api-schema-updater[bot] Nov 11, 2026
0cb2e23
docs(develop): Point fork craft example at an active fork (#20738)
sentry-junior[bot] Nov 11, 2026
1d6cfaf
Update the agent prompts in docs to point to Sentry CLI (#20586)
sfanahata Nov 11, 2026
b1c24c7
docs(nestjs): Document SentryCron monitor config from @Cron (#19782)
wedamija Nov 12, 2026
3e33d6b
Bump API schema to d0a2e344 (#20753)
sentry-api-schema-updater[bot] Nov 12, 2026
d67c8ac
docs(develop): Fix the trace metric size limit (#20750)
logaretm Nov 12, 2026
d52e3b7
Bump API schema to 0a645b70 (#20754)
sentry-api-schema-updater[bot] Nov 12, 2026
0c63ef5
docs(js): Use Lambda Event Functions naming in AWS Lambda guide (#20722)
sentry-junior[bot] Nov 12, 2026
2643f95
feat(js): Add a framework selector to the Browser JavaScript quick st…
sentry-junior[bot] Nov 12, 2026
bb5b1b7
docs(python): Document Amazon Bedrock tracing (#20744)
alexander-alderman-webb Nov 12, 2026
f25c895
Bump API schema to c23c1fc5 (#20757)
sentry-api-schema-updater[bot] Nov 12, 2026
f4a964d
Bump API schema to 40e0d71b (#20758)
sentry-api-schema-updater[bot] Nov 12, 2026
b41f5b0
Bump API schema to 43ec4ae0 (#20759)
sentry-api-schema-updater[bot] Nov 12, 2026
372425f
Bump API schema to d3b6fd0f (#20760)
sentry-api-schema-updater[bot] Nov 12, 2026
867f9d8
Bump API schema to 6b734c5b (#20762)
sentry-api-schema-updater[bot] Nov 12, 2026
bb0dff4
Bump API schema to 64a372e0 (#20763)
sentry-api-schema-updater[bot] Nov 12, 2026
b806e1c
Bump API schema to e9eff808 (#20764)
sentry-api-schema-updater[bot] Nov 12, 2026
23680a0
Bump API schema to 6a777657 (#20765)
sentry-api-schema-updater[bot] Nov 12, 2026
579b6cc
chore(build): Remove Codecov bundle analysis plugin (#20720)
sentry-junior[bot] Nov 12, 2026
7a7ffc5
Bump API schema to ffef2e1c (#20766)
sentry-api-schema-updater[bot] Nov 12, 2026
f1b98a7
Bump API schema to c94043be (#20767)
sentry-api-schema-updater[bot] Nov 12, 2026
6af6484
Bump API schema to 9b2c7225 (#20769)
sentry-api-schema-updater[bot] Nov 12, 2026
5e4a969
Bump API schema to 3fe91b7a (#20770)
sentry-api-schema-updater[bot] Nov 12, 2026
22af4d6
Bump API schema to 36853aa5 (#20771)
sentry-api-schema-updater[bot] Nov 12, 2026
716f84b
Bump API schema to 277ad58b (#20772)
sentry-api-schema-updater[bot] Nov 12, 2026
af4718b
Bump API schema to 95b38cf1 (#20773)
sentry-api-schema-updater[bot] Nov 12, 2026
b8932f2
Bump API schema to 9dccc92b (#20774)
sentry-api-schema-updater[bot] Nov 12, 2026
36e7968
Bump API schema to 18c2d5fb (#20777)
sentry-api-schema-updater[bot] Nov 12, 2026
5e4ffd9
Bump API schema to e5635105 (#20779)
sentry-api-schema-updater[bot] Nov 12, 2026
f62b827
Bump API schema to f15d1f5c (#20795)
sentry-api-schema-updater[bot] Nov 13, 2026
bcd767e
Bump API schema to b771503e (#20796)
sentry-api-schema-updater[bot] Nov 13, 2026
635a5ec
Bump API schema to c08ef494 (#20797)
sentry-api-schema-updater[bot] Nov 13, 2026
e99454f
feat(api): Read the API base path from the spec's server URL (#20787)
sentry-junior[bot] Nov 13, 2026
a3d78d8
Bump API schema to f05e956a (#20798)
sentry-api-schema-updater[bot] Nov 13, 2026
db96a79
Bump API schema to 36d0d115 (#20799)
sentry-api-schema-updater[bot] Nov 13, 2026
bea506a
Bump API schema to 153706be (#20800)
sentry-api-schema-updater[bot] Nov 13, 2026
e1a31cc
Bump API schema to 2c01f623 (#20801)
sentry-api-schema-updater[bot] Nov 13, 2026
a2d3512
Bump API schema to 78718872 (#20802)
sentry-api-schema-updater[bot] Nov 13, 2026
48055c1
Bump API schema to 19b0d618 (#20803)
sentry-api-schema-updater[bot] Nov 13, 2026
b2730e0
Bump API schema to a2c2741c (#20804)
sentry-api-schema-updater[bot] Nov 13, 2026
1b7ba5c
Bump API schema to 5710a54d (#20805)
sentry-api-schema-updater[bot] Nov 13, 2026
6fab73b
Bump API schema to 461c4966 (#20806)
sentry-api-schema-updater[bot] Nov 13, 2026
05480c1
Bump API schema to 6c92bebc (#20807)
sentry-api-schema-updater[bot] Nov 13, 2026
e6fb2b0
docs(unity): Fix broken code samples and migration guide (#20412)
bitsandfoxes Nov 13, 2026
e85e93a
docs(unity): Fix options page defaults, types and stale options (#20413)
bitsandfoxes Nov 13, 2026
7be45d0
Bump API schema to 99650c98 (#20808)
sentry-api-schema-updater[bot] Nov 13, 2026
951cffc
Bump API schema to c3c65c9c (#20809)
sentry-api-schema-updater[bot] Nov 13, 2026
9547e27
Add Linear integration documentation (#20709)
cmanallen Nov 13, 2026
cf5a659
docs(slack): Remove assistant:write scope and Seer Agent assistant do…
sentry-junior[bot] Nov 13, 2026
280db0b
docs(unity): Document missing options and options configuration (#20414)
bitsandfoxes Nov 13, 2026
80d61ae
docs(unity): Fix native support and platform docs (#20416)
bitsandfoxes Nov 13, 2026
fd041ae
feat(api-docs): Build the API reference from @sentry/api/docs (#20679)
sentry-junior[bot] Nov 13, 2026
16307c1
Bump @sentry/api to 2.3.1 (#20811)
sentry-api-schema-updater[bot] Nov 14, 2026
ee97b72
Bump @sentry/api to 2.3.2 (#20812)
sentry-api-schema-updater[bot] Nov 14, 2026
282c045
Bump @sentry/api to 2.4.0 (#20813)
sentry-api-schema-updater[bot] Nov 14, 2026
79c1e15
Bump @sentry/api to 2.5.0 (#20815)
sentry-api-schema-updater[bot] Nov 14, 2026
ea3e2ac
ci(api-docs): Wait for the new @sentry/api version on dispatched bump…
sentry-junior[bot] Nov 14, 2026
4f2e2d5
docs(dotnet): Update docs for SDK 7.0.0 (#20641)
ric-oliv Nov 15, 2026
3ea46e5
docs(python): Update logging and Loguru integrations for SDK 3.0 (#20…
sentrivana Nov 16, 2026
0455e40
docs(python): Update configuration options for SDK 3.0 (#20783)
sentrivana Nov 16, 2026
721d4a4
docs(python): Use start_span in verify snippets for SDK 3.0 (#20785)
sentrivana Nov 16, 2026
31787ec
docs(js): Add Bun, Deno and Cloudflare quick starts to the React Rout…
JPeer264 Nov 16, 2026
f4d3083
docs(python): Update integration options for SDK 3.0 (#20788)
sentrivana Nov 16, 2026
919029e
docs(python): Update data collection pages for SDK 3.0 (#20790)
sentrivana Nov 16, 2026
62b14bf
Bump @sentry/api to 2.5.1 (#20824)
sentry-api-schema-updater[bot] Nov 16, 2026
4ef84d0
fix(apple): Use a published version in the SwiftLog SPM snippet (#20823)
sentry-junior[bot] Nov 16, 2026
eed2e21
docs(unity): Fix debug symbol upload docs (#20418)
bitsandfoxes Nov 16, 2026
d38d72e
docs(unity): Fix data collected, privacy and enriching pages (#20421)
bitsandfoxes Nov 16, 2026
851aa6d
docs(unity): Fix tracing, logs, metrics and error capture docs (#20426)
bitsandfoxes Nov 16, 2026
55de485
Bump @sentry/api to 2.5.2 (#20825)
sentry-api-schema-updater[bot] Nov 16, 2026
5720773
Bump @sentry/api to 2.5.3 (#20826)
sentry-api-schema-updater[bot] Nov 16, 2026
a21f2e1
Bump @sentry/api to 2.6.0 (#20827)
sentry-api-schema-updater[bot] Nov 16, 2026
630ff0b
Bump @sentry/api to 2.6.1 (#20830)
sentry-api-schema-updater[bot] Nov 16, 2026
0ade608
Bump @sentry/api to 2.7.0 (#20831)
sentry-api-schema-updater[bot] Nov 16, 2026
603b749
docs(python): Update integration data collection notes for SDK 3.0 (#…
sentrivana Nov 16, 2026
571488c
Bump @sentry/api to 2.7.0 (#20832)
sentry-api-schema-updater[bot] Nov 16, 2026
f06f850
docs(python): Make SDK 3.x the default in tracing pages (#20786)
sentrivana Nov 16, 2026
d864dd8
chore(deps): Bump @sentry/browser and @sentry/nextjs to 11.12.0 (#20821)
sentry-junior[bot] Nov 16, 2026
ccfa3b9
docs(js): Document the managed tunnel and serveTunnelIntegration (#20…
logaretm Nov 16, 2026
ad9c204
docs(dotnet): Add Quartz.NET crons page (#19790)
wedamija Nov 16, 2026
d0949a6
docs(apple): Add troubleshooting entry for revoked signing certificat…
sentry-junior[bot] Nov 16, 2026
b48de0b
docs(dotnet): Document monitoring all Quartz.NET jobs (#20051)
wedamija Nov 16, 2026
0d36307
chore: Run the Prettier and ESLint hooks from the repo's own install …
jamescrosswell Nov 16, 2026
f44b04c
docs(unity): Update screenshots, options and sampling for SDK 4.13.0 …
bitsandfoxes Nov 17, 2026
d2895e9
docs(apple): Document automatic WebView trace propagation (#20543)
antonis Nov 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

# See https://github.com/getsentry/sentry-docs/pull/13662 on how commented codeowners are tagged

# Requiring review from security team for Content-Security-Policy changes
# Requiring review from security team for CSP, Security/Legal Pages, but not IP Ranges
**/vercel.json @getsentry/security
/docs/security-legal-pii/security/ @getsentry/security
/docs/security-legal-pii/security/ip-ranges.mdx

# Codeowners listed below are used as a reference for the Sentry team to know who to contact for a given area of the codebase.

Expand Down
66 changes: 19 additions & 47 deletions .github/workflows/bump-api-schema-sha.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
name: Bump API Schema SHA
name: Bump @sentry/api
on:
# This could be run manually, but the general expectation is that this fires
# from GHA in getsentry/sentry-api-schema on changes there. See:
# The API reference is built from the pinned @sentry/api version. getsentry/sentry
# releases it whenever the API spec changes; this picks up the new version. See:
#
# https://develop.sentry.dev/api/public/#build-process

#
# The file keeps its old name so existing dispatches still reach it.
schedule:
- cron: '17 * * * *'
workflow_dispatch:
# A dispatch and the hourly run must not both push the same bump branch.
concurrency:
group: bump-sentry-api
cancel-in-progress: false
jobs:
release:
runs-on: ubuntu-latest
name: 'Bump API Schema SHA'
name: 'Bump @sentry/api'
steps:
- name: Get auth token
id: token
Expand All @@ -18,53 +25,18 @@ jobs:
app-id: ${{ vars.SENTRY_API_SCHEMA_UPDATER_APP_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_API_SCHEMA_UPDATER_PRIVATE_KEY }}
owner: getsentry
repositories: |
sentry-docs
sentry-api-schema
repositories: sentry-docs
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
token: ${{ steps.token.outputs.token }}
- name: 'Bump API Schema SHA'
shell: bash
- uses: pnpm/action-setup@02f6c237bd2518259fed6c71566509edfb3f2b74 # v4
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v4
with:
node-version-file: 'package.json'
- name: 'Bump @sentry/api'
env:
# An elevated token is necessary because with plain github.token
# GitHub does not recursively call workflows, which means CI does not
# kick off for the PR we're about to create.
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
run: |
set -euo pipefail

git config user.email "271575301+sentry-api-schema-updater[bot]@users.noreply.github.com"
git config user.name "sentry-api-schema-updater[bot]"

filepath="src/build/resolveOpenAPI.ts"

# Authenticate to avoid the low unauthenticated rate limit, and fail on
# HTTP errors so an error body never gets written in as the SHA.
sha="$(curl -sSL --fail \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H 'Accept: application/vnd.github.VERSION.sha' \
'https://api.github.com/repos/getsentry/sentry-api-schema/commits/main')"

if [[ ! "$sha" =~ ^[0-9a-f]{40}$ ]]; then
echo "::error::Expected a 40-character commit SHA from the GitHub API, got: $sha"
exit 1
fi
echo "Latest commit to 'getsentry/sentry-api-schema' is $sha"

sed -i -e "s|^const SENTRY_API_SCHEMA_SHA =.*$|const SENTRY_API_SCHEMA_SHA = '$sha';|g" "$filepath"
echo "Updated $filepath"

if git diff --quiet "$filepath"; then
echo "No changes to $filepath, skipping."
exit 0
fi

branch="bot/bump-api-schema-to-${sha:0:8}"
git checkout -b "$branch"
git add "$filepath"
git commit -m "Bump API schema to ${sha:0:8}"
git push --set-upstream origin "$branch"

gh pr create --fill
gh pr merge --squash --admin -d
run: sh scripts/bump-sentry-api.sh
17 changes: 11 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
default_language_version:
node: "22"
exclude: '\.snap|node_modules$'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand All @@ -23,22 +21,29 @@ repos:
- id: flake8
- id: fix-encoding-pragma
args: ['--remove']
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
args: ['--shell=sh', '--enable=check-extra-masked-returns']
# Older scripts are bash and predate this hook.
files: '^scripts/bump-sentry-api\.sh$'
- repo: local
hooks:
- id: prettier
name: Prettier
description: This hook runs Prettier on JavaScript and TypeScript files
entry: prettier
language: node
entry: pnpm exec prettier
language: system
files: '\.[cm]?[jt]sx?$'
exclude: 'node_modules'
types: [text]
args: ['--write']
- id: eslint
name: eslint
description: This hook runs eslint on JavaScript and TypeScript files
entry: eslint
language: node
entry: pnpm exec eslint
language: system
files: '\.[cm]?[jt]sx?$'
exclude: 'node_modules'
types: [text]
Expand Down
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ When writing requirements in `develop-docs/`:
- **ALWAYS** run `/brand-guidelines` to audit any user-facing content before committing. See `.agents/skills/brand-guidelines/SKILL.md`
- Use `docs-review` skill for Sentry style and voice review. See `.claude/skills/docs-review/SKILL.md`
- Use `technical-docs` skill when writing or reviewing SDK documentation. See `.claude/skills/technical-docs/SKILL.md`
- Quick starts set `runtime` (for example `node` or `cloudflare`) in their frontmatter. The page then shows a runtime selector at the top that links the quick starts of the same guide for the other runtimes

## LLM-Friendly MD Exports

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
import {
PlatformContentPayload,
RUNTIMES,
} from 'sentry-docs/components/frameworkSelector/frameworks';
import {resolvePlatformContent} from 'sentry-docs/components/platformContent';
import {getFileBySlugWithCache} from 'sentry-docs/mdx';

/**
* Serves the compiled MDX of a `<PlatformContent>` include as it applies to a framework running
* on a runtime, so a runtime's page can swap in framework snippets client-side
* (see `<FrameworkSelector>`).
*
* Only the combinations from `generateStaticParams` are built; there is no runtime rendering.
*/

export const dynamic = 'force-static';
export const dynamicParams = false;

export function generateStaticParams() {
return Object.entries(RUNTIMES).flatMap(([runtime, {frameworks, includePaths}]) =>
frameworks.flatMap(({key: framework}) =>
includePaths.map(includePath => ({
platform: 'javascript',
runtime,
framework,
includePath: includePath.split('/'),
}))
)
);
}

type SlugFile = Awaited<ReturnType<typeof getFileBySlugWithCache>>;

async function tryGetFile(slug: string): Promise<SlugFile | undefined> {
try {
return await getFileBySlugWithCache(slug);
} catch {
return undefined;
}
}

/**
* Resolves an include for a framework on a runtime:
* 1. `<platform>.<runtime>.<framework>`, for snippets specific to both
* 2. On Node.js, the framework guide's content, which falls back to Node.js
* Elsewhere, only a `<platform>.<framework>` snippet, to not pull in Node.js content
* 3. The runtime guide's own content
*/
async function resolveForFramework(
includePath: string,
platform: string,
runtime: string,
framework: string
): Promise<SlugFile | null | undefined> {
const base = `platform-includes/${includePath}/${platform}`;

const doc = await tryGetFile(`${base}.${runtime}.${framework}`);
if (doc) {
return doc;
}

if (runtime === 'node') {
return resolvePlatformContent({
includePath,
path: ['platforms', platform, 'guides', framework],
});
}

return (
(await tryGetFile(`${base}.${framework}`)) ??
resolvePlatformContent({
includePath,
path: ['platforms', platform, 'guides', runtime],
})
);
}

const INCLUDE_RE = /<Include\s+name=["']([^"']+)["']/g;
const PLATFORM_CONTENT_RE = /<PlatformContent\s+includePath=["']([^"']+)["']/g;

async function collectNested(
source: string,
resolve: (includePath: string) => Promise<SlugFile | null | undefined>,
payload: PlatformContentPayload
) {
for (const [, rawName] of source.matchAll(INCLUDE_RE)) {
const name = rawName.replace(/\.mdx$/, '');
if (name in payload.includes) {
continue;
}
// Missing includes render nothing, same as <Include>.
const doc = await tryGetFile(`includes/${name}`);
if (doc) {
payload.includes[name] = doc.mdxSource;
await collectNested(doc.matter.content, resolve, payload);
}
}

for (const [, includePath] of source.matchAll(PLATFORM_CONTENT_RE)) {
if (includePath in payload.platformContents) {
continue;
}
const doc = await resolve(includePath);
payload.platformContents[includePath] = doc?.mdxSource ?? null;
if (doc) {
await collectNested(doc.matter.content, resolve, payload);
}
}
}

async function buildPayload(
includePath: string,
resolve: (includePath: string) => Promise<SlugFile | null | undefined>
): Promise<PlatformContentPayload> {
const doc = await resolve(includePath);
const payload: PlatformContentPayload = {
changed: false,
code: doc?.mdxSource ?? null,
includes: {},
platformContents: {},
};
if (doc) {
await collectNested(doc.matter.content, resolve, payload);
}
return payload;
}

export async function GET(
_request: Request,
{
params,
}: {
params: Promise<{
framework: string;
includePath: string[];
platform: string;
runtime: string;
}>;
}
) {
const {platform, runtime, framework, includePath} = await params;
const resolve = (path: string) =>
resolveForFramework(path, platform, runtime, framework);

const resolveForRuntime = (path: string) =>
resolvePlatformContent({
includePath: path,
path: ['platforms', platform, 'guides', runtime],
});

const [payload, runtimePayload] = await Promise.all([
buildPayload(includePath.join('/'), resolve),
buildPayload(includePath.join('/'), resolveForRuntime),
]);
payload.changed =
payload.code !== runtimePayload.code ||
JSON.stringify(payload.platformContents) !==
JSON.stringify(runtimePayload.platformContents);

return Response.json(payload);
}
17 changes: 16 additions & 1 deletion app/globals.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
@import '@radix-ui/themes/styles.css';
/*
* Radix Themes, split up so we only ship the color scales we use. The all-in-one
* styles.css carries all 30 scales and was the bulk of our render-blocking CSS.
* Using a new Radix color (accentColor, color="..." or var(--<color>-N))? Add
* its scale here, or it renders unstyled. Order mirrors styles.css.
*/
@import '@radix-ui/themes/tokens/colors/gray.css';
@import '@radix-ui/themes/tokens/colors/sand.css';
@import '@radix-ui/themes/tokens/colors/amber.css';
@import '@radix-ui/themes/tokens/colors/green.css';
@import '@radix-ui/themes/tokens/colors/iris.css';
@import '@radix-ui/themes/tokens/colors/red.css';
@import '@radix-ui/themes/tokens/colors/yellow.css';
@import '@radix-ui/themes/tokens/base.css';
@import '@radix-ui/themes/components.css';
@import '@radix-ui/themes/utilities.css';

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.

Radix overlays missing alpha scales

Medium Severity

The Radix Themes import list adds only the semantic color scales in use and omits the black and white alpha scales. Those tokens back overlays, shadows, and scrims, so dropdowns, dialogs, and elevated surfaces can render with transparent or missing chrome.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit d2895e9. Configure here.


@tailwind base;
@tailwind components;
Expand Down
2 changes: 1 addition & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {SkipToContent} from 'sentry-docs/components/skipToContent';
import {ThemeProvider} from 'sentry-docs/components/theme-provider';

const rubik = Rubik({
weight: ['400', '500', '700'],
weight: ['400', '500', '600', '700'],
style: ['normal', 'italic'],
subsets: ['latin'],
variable: '--font-rubik',
Expand Down
10 changes: 6 additions & 4 deletions app/platform-redirect/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {SmartLink} from 'sentry-docs/components/smartLink';
import {extractPlatforms, getDocsRootNode, nodeForPath} from 'sentry-docs/docTree';
import {setServerContext} from 'sentry-docs/serverContext';

import {platformUrlFor, sanitizeNext} from './utils';
import {landingPageFallbackGuide, platformUrlFor, sanitizeNext} from './utils';

export const metadata: Metadata = {
robots: 'noindex',
Expand Down Expand Up @@ -142,9 +142,11 @@ export default async function Page(props: {

const requestedPlatform = Array.isArray(platform) ? platform[0] : platform;
if (requestedPlatform) {
const validPlatform = platformOrGuideList.find(
p => p.key === requestedPlatform?.toLowerCase()
);
const requestedKey = requestedPlatform.toLowerCase();
const fallbackKey = landingPageFallbackGuide(rootNode, requestedKey);
const validPlatform =
platformOrGuideList.find(p => p.key === requestedKey) ??
platformOrGuideList.find(p => p.key === fallbackKey);
if (validPlatform) {
return redirect(platformUrlFor(validPlatform.url, sanitized));
}
Expand Down
Loading
Loading